-
Notifications
You must be signed in to change notification settings - Fork 4
reincorporate thumb ratings to documentation pages #182
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
base: main
Are you sure you want to change the base?
Conversation
Amplify deployment status
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- src/components/ThumbsFeedback.module.css: Language not supported
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.
Files not reviewed (2)
- docs/get-started.mdx: Language not supported
- src/components/ThumbsFeedback.module.css: Language not supported
Comments suppressed due to low confidence (1)
src/components/ThumbsFeedback.tsx:11
- [nitpick] Consider providing an explicit return type for the ThumbsFeedback functional component (e.g., React.FC) to improve type clarity and consistency.
const ThumbsFeedback = () => {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR reincorporates the thumbs feedback rating feature to documentation pages in order to capture user metrics via Google Analytics.
- Added a ThumbsFeedback component to MDX and DocItem layouts
- Implemented the ThumbsFeedback component with Google Analytics event tracking for both thumbs up and thumbs down feedback
Reviewed Changes
Copilot reviewed 3 out of 7 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/theme/MDXComponents/index.tsx | Imported and added the ThumbsFeedback component into MDX context |
src/theme/DocItem/Layout/index.tsx | Imported and rendered the ThumbsFeedback component in the documentation layout |
src/components/ThumbsFeedback.tsx | Created the ThumbsFeedback component with Google Analytics event triggering |
Files not reviewed (4)
- content/18.x: Language not supported
- docs/get-started.mdx: Language not supported
- docs/get-started_test_copy.mdx: Language not supported
- src/components/ThumbsFeedback.module.css: Language not supported
Comments suppressed due to low confidence (2)
src/components/ThumbsFeedback.tsx:35
- Consider adding an explicit type attribute to the button element (e.g., type="button") to prevent potential unintended behavior in forms.
<button onClick={() => handleFeedback('up')} aria-label="Thumbs up" className={styles.feedbackButton}>
src/components/ThumbsFeedback.tsx:43
- Consider adding an explicit type attribute to this button element (e.g., type="button") to ensure it does not default to a submit behavior if nested in a form.
<button onClick={() => handleFeedback('down')} aria-label="Thumbs down" className={styles.feedbackButton}>
Attempting to re-add the thumbs up/down option to docs so we can again capture those metrics, this time using Google Analytics since PostHog was deprecated. Testing out different methods, there may be a better way to do this in Docusaurus.