Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Implements a new feedback component in the TOC sidebar that allows users to provide feedback about documentation pages. Also updates the CTA component with improved styling and new demo booking link. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Replace helpful options with: Accurate info, Solved my problem, Easy to understand, Something else - Replace not-helpful options with: Inaccurate, Couldn't find what I was looking for, Difficult to understand, Code sample error, Other - Add contextual textarea placeholder per branch - Mark email field as optional, show notification hint only on not-helpful branch Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Preview deployment status for this pull request.
|
Corey-T1000
left a comment
There was a problem hiding this comment.
Review
Nice widget — the UX flow (thumbs → form → thank you) is clean. A few things worth addressing:
Event name collision (strongest concern)
Both the initial vote (lines 41/47) and the detailed form submission (line 57) fire a "docs-feedback" event with different schemas. This means a query like "count positive feedback" would double-count users who click thumbs-up AND submit the form. Consider either:
- Distinct event names (
docs-feedback-votevsdocs-feedback-detail) - Or removing the initial capture and only firing on form submit
posthog.identify(formData.email) — product decision
Line 54 uses the optional email field as the PostHog distinct ID. This merges the anonymous docs browsing session with the email identity. Not a security issue — it's a documented PostHog pattern — but worth confirming this is the intended behavior for anonymous docs visitors who happen to leave feedback.
editLink={null} — intentional?
This removes the "Edit this page on GitHub" link. The feedback widget replaces the old "Something unclear? Create an issue" link, which makes sense. But the edit link was a separate contribution path — worth confirming this removal is deliberate.
Minor nits
text-stone-400in the open-source CTA subtitle while the rest of the component usesgray-*— probably should betext-gray-400for palette consistency- The positive/negative checkbox lists have significant markup duplication — a
.map()over an array of options would cut ~100 lines of near-identical JSX, but not blocking
Overall: solid addition. The event name collision is the main thing I'd want addressed before merge.
- Rename PostHog events to docs-feedback-vote and docs-feedback-detail to avoid double-counting
- Restore editLink (removed editLink={null}) to keep the GitHub edit path
- Fix text-stone-400 to text-gray-400 for palette consistency
- Add hover style to non-commercial CTA button
- Tighten separator spacing between CTA and feedback widget
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Test plan
🤖 Generated with Claude Code