Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rate this Page to all Docs Pages #1057

Merged
merged 5 commits into from
Dec 20, 2024

Conversation

briandoyle81
Copy link
Contributor

CSS is inline, might be a better way to do this
Unsure if events are making it through

Copy link

vercel bot commented Dec 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 11:42pm

Copy link
Member

@chasefleming chasefleming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-12-19 at 2 03 10 PM

Should we left align the emojis? When its wide screen monitors it looks off center even though its not.

import { event } from "@site/src/utils/gtags.client";

// Default export function component
export default function FeedbackFaces() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best component name ever haha

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used to make games. I still do, but I used to too. I don't think I'll ever top getting to implement a function called

ExecuteWarpJump

src/components/feedbackFaces.tsx Outdated Show resolved Hide resolved
event({
action: "feedback_click",
category: "Feedback",
label: label,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would also probably lowercase here, but just a nit. Do you also want to use the user hash so that you can tell how many unique people are clicking it and reduce the number of multiple clicks?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually want multiple clicks here. Sort of like clapping on Medium vs. upvotes or downvotes.

});

// Reset the clicked state after a brief delay
setTimeout(() => setClickedFace(null), 300);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you want to let someone click more than one time? Do you just want to have in state its been clicked and disable clicking any further? I'd probably store something in local storage so the same person on the same browser can't click again imo.

src/components/feedbackFaces.tsx Outdated Show resolved Hide resolved
src/theme/TOC/styles.module.css Show resolved Hide resolved
src/utils/gtags.client.ts Outdated Show resolved Hide resolved
@briandoyle81 briandoyle81 merged commit 82eca0f into main Dec 20, 2024
3 checks passed
@briandoyle81 briandoyle81 deleted the brian-doyle/add-page-ranking-tags branch December 20, 2024 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants