Skip to content

Commit 76356bb

Browse files
committed
feat(website): hand feedback off to a prefilled GitHub issue form
- Feedback form now opens a prefilled issue on github.com/IamCoder18/synapse instead of faking a local submit - Add .github/ISSUE_TEMPLATE/website-feedback.yml issue form (website-feedback label, name/team optional, experience required) plus config.yml keeping blank issues enabled - Drop the email field; make name optional - Button acknowledges the GitHub handoff: "Send feedback on GitHub"
1 parent ca38604 commit 76356bb

3 files changed

Lines changed: 73 additions & 27 deletions

File tree

‎.github/ISSUE_TEMPLATE/config.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: true
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Website feedback
2+
description: Feedback on the Synapse website and docs — the good, the broken, and the missing
3+
title: "[Website] "
4+
labels: ["website-feedback"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time! This goes straight to the maintainers
10+
and into release planning. Issues are public — please don't include
11+
anything you don't want visible.
12+
- type: input
13+
id: name
14+
attributes:
15+
label: Name (optional)
16+
description: You, your team, or both.
17+
validations:
18+
required: false
19+
- type: input
20+
id: team
21+
attributes:
22+
label: Team number (optional)
23+
placeholder: "23684"
24+
validations:
25+
required: false
26+
- type: textarea
27+
id: experience
28+
attributes:
29+
label: Your experience so far
30+
description: The good, the broken, and the missing...
31+
validations:
32+
required: true

‎website/src/components/redesign/PilotForm.tsx‎

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,78 @@
11
import { useState, type FormEvent } from "react"
2-
import { CheckCircle2 } from "lucide-react"
2+
import { ArrowUpRight } from "lucide-react"
33
import { Button } from "@/components/ui/button"
44
import { Input } from "@/components/ui/input"
55
import { Label } from "@/components/ui/label"
66
import { Textarea } from "@/components/ui/textarea"
77

8+
const REPO = "https://github.com/IamCoder18/synapse"
9+
810
export function PilotForm() {
9-
const [sent, setSent] = useState(false)
11+
const [name, setName] = useState("")
12+
const [team, setTeam] = useState("")
13+
const [experience, setExperience] = useState("")
1014

11-
function submit(e: FormEvent) {
12-
e.preventDefault()
13-
setSent(true)
15+
function issueUrl() {
16+
const params = new URLSearchParams({
17+
template: "website-feedback.yml",
18+
title: `[Website] Feedback${name ? ` from ${name}` : ""}`,
19+
experience,
20+
})
21+
if (name) params.set("name", name)
22+
if (team) params.set("team", team)
23+
return `${REPO}/issues/new?${params.toString()}`
1424
}
1525

16-
if (sent) {
17-
return (
18-
<div className="flex h-full min-h-64 flex-col items-center justify-center gap-3 text-center">
19-
<div className="flex size-12 items-center justify-center rounded-full bg-primary/15">
20-
<CheckCircle2 className="size-6 text-primary" />
21-
</div>
22-
<p className="font-display text-lg font-semibold">Feedback received</p>
23-
<p className="max-w-xs text-sm text-muted-foreground">
24-
Thanks for taking the time — your notes go straight to the
25-
maintainers and into release planning.
26-
</p>
27-
</div>
28-
)
26+
function submit(e: FormEvent) {
27+
e.preventDefault()
28+
window.open(issueUrl(), "_blank", "noopener")
2929
}
3030

3131
return (
3232
<form onSubmit={submit} className="grid gap-5">
3333
<div className="grid gap-5 sm:grid-cols-2">
3434
<div className="grid gap-2.5">
35-
<Label htmlFor="pilot-name">Name</Label>
36-
<Input id="pilot-name" placeholder="Ada Lovelace" required />
35+
<Label htmlFor="pilot-name">
36+
Name <span className="text-muted-foreground">(optional)</span>
37+
</Label>
38+
<Input
39+
id="pilot-name"
40+
placeholder="Ada Lovelace"
41+
value={name}
42+
onChange={(e) => setName(e.target.value)}
43+
/>
3744
</div>
3845
<div className="grid gap-2.5">
3946
<Label htmlFor="pilot-team">
4047
Team number <span className="text-muted-foreground">(optional)</span>
4148
</Label>
42-
<Input id="pilot-team" placeholder="23684" />
49+
<Input
50+
id="pilot-team"
51+
placeholder="23684"
52+
value={team}
53+
onChange={(e) => setTeam(e.target.value)}
54+
/>
4355
</div>
4456
</div>
45-
<div className="grid gap-2.5">
46-
<Label htmlFor="pilot-email">Email</Label>
47-
<Input id="pilot-email" type="email" placeholder="you@team.org" required />
48-
</div>
4957
<div className="grid gap-2.5">
5058
<Label htmlFor="pilot-about">Your experience so far</Label>
5159
<Textarea
5260
id="pilot-about"
61+
required
5362
placeholder="The good, the broken, and the missing..."
5463
className="min-h-24"
64+
value={experience}
65+
onChange={(e) => setExperience(e.target.value)}
5566
/>
5667
</div>
5768
<div className="flex flex-wrap items-center gap-3">
5869
<Button type="submit" size="lg">
59-
Send feedback
70+
Send feedback on GitHub
71+
<ArrowUpRight />
6072
</Button>
6173
<p className="text-xs text-muted-foreground">
62-
Read by the maintainers — no newsletter, no spam.
74+
Opens a public issue on GitHub — read by the maintainers, no email
75+
needed.
6376
</p>
6477
</div>
6578
</form>

0 commit comments

Comments
 (0)