Skip to content

Commit 9ba0f54

Browse files
samkimclaude
andcommitted
Address feedback widget code review: event names, edit link, CTA spacing
- 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>
1 parent 3ff10ad commit 9ba0f54

3 files changed

Lines changed: 14 additions & 11 deletions

File tree

app/layout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ export default async function RootLayout({ children }) {
9090
feedback={{
9191
content: null,
9292
}}
93-
editLink={null}
9493
toc={{ backToTop: true, extraContent: <TocExtraContent /> }}
9594
>
9695
<OurLayout>

components/cta.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function TocCTA() {
99
const isCommercial = pathname?.startsWith("/authzed/");
1010

1111
return isCommercial ? (
12-
<div className="pt-4 pb-8">
12+
<div className="mt-10 pt-4 pb-8">
1313
<div className="text-sm mb-4 font-semibold">Explore your use case</div>
1414
<Link href="https://authzed.com/schedule-demo" className="cursor-pointer">
1515
<Button variant="default" size="sm" className="w-full cursor-pointer">
@@ -18,11 +18,15 @@ export function TocCTA() {
1818
</Link>
1919
</div>
2020
) : (
21-
<div className="pt-4 pb-8">
21+
<div className="mt-10 pt-4 pb-4">
2222
<div className="text-sm mb-1 font-semibold">AuthZed Cloud</div>
23-
<div className="text-sm mb-4 font-normal text-stone-400">Hosted, self-service SpiceDB</div>
23+
<div className="text-sm mb-4 font-normal text-gray-400">Hosted, self-service SpiceDB</div>
2424
<Link href="https://authzed.com/cloud/signup" className="cursor-pointer">
25-
<Button variant="outline" size="sm" className="w-full cursor-pointer">
25+
<Button
26+
variant="outline"
27+
size="sm"
28+
className="w-full cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800"
29+
>
2630
Get Started
2731
</Button>
2832
</Link>

components/feedback.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ export function Feedback() {
3434
}, []);
3535

3636
const handleYes = () => {
37-
posthog.capture("docs-feedback", { helpful: true });
37+
posthog.capture("docs-feedback-vote", { helpful: true });
3838
setIsHelpful(true);
3939
setShowForm(true);
4040
};
4141

4242
const handleNo = () => {
43-
posthog.capture("docs-feedback", { helpful: false });
43+
posthog.capture("docs-feedback-vote", { helpful: false });
4444
setIsHelpful(false);
4545
setShowForm(true);
4646
};
@@ -52,7 +52,7 @@ export function Feedback() {
5252
posthog.identify(formData.email);
5353
}
5454

55-
posthog.capture("docs-feedback", {
55+
posthog.capture("docs-feedback-detail", {
5656
helpful: isHelpful,
5757
details: formData,
5858
});
@@ -102,7 +102,7 @@ ${formData.comments || "No additional comments provided"}`;
102102
if (showThankYou) {
103103
return (
104104
<div
105-
className={`border-t border-neutral-200 dark:border-neutral-800 py-8 transition-opacity duration-700 ${isVisible ? "opacity-100" : "opacity-0"}`}
105+
className={`border-t border-neutral-200 dark:border-neutral-800 pt-4 pb-8 transition-opacity duration-700 ${isVisible ? "opacity-100" : "opacity-0"}`}
106106
>
107107
<div className="text-sm font-medium text-gray-900 dark:text-gray-200">
108108
Thank you for your feedback!
@@ -114,7 +114,7 @@ ${formData.comments || "No additional comments provided"}`;
114114
if (showForm) {
115115
return (
116116
<div
117-
className={`border-t border-neutral-200 dark:border-neutral-800 py-8 transition-opacity duration-700 ${isVisible ? "opacity-100" : "opacity-0"}`}
117+
className={`border-t border-neutral-200 dark:border-neutral-800 pt-4 pb-8 transition-opacity duration-700 ${isVisible ? "opacity-100" : "opacity-0"}`}
118118
>
119119
<form onSubmit={handleFormSubmit} className="space-y-4">
120120
<div>
@@ -279,7 +279,7 @@ ${formData.comments || "No additional comments provided"}`;
279279

280280
return (
281281
<div
282-
className={`border-t border-neutral-200 dark:border-neutral-800 py-8 transition-opacity duration-700 ${isVisible ? "opacity-100" : "opacity-0"}`}
282+
className={`border-t border-neutral-200 dark:border-neutral-800 pt-4 pb-8 transition-opacity duration-700 ${isVisible ? "opacity-100" : "opacity-0"}`}
283283
>
284284
<div className="text-sm mb-4 font-semibold text-gray-900 dark:text-gray-100">
285285
Was this page helpful?

0 commit comments

Comments
 (0)