🐛 Fix: related projects hover appears dark in light mode#1202
🐛 Fix: related projects hover appears dark in light mode#1202Copilot wants to merge 2 commits intofix/related-projects-hover-dark-light-modefrom
Conversation
✅ Deploy Preview for kubestellar-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi @Copilot. Thanks for your PR. I'm waiting for a kubestellar member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
…matting - Add isProduction as useState(true) + useEffect (from #1190) to avoid render-time window check - Remove render-time typeof window !== 'undefined' isProduction check - Restore Moon/Sun className to original 3-line format (revert unrelated reformatting) - Add suppressHydrationWarning to <a> tag (from #1190) - Keep hover fix: hoveredProject state, onMouseEnter/onMouseLeave, bgColor logic Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits. 📝 Please follow instructions in the contributing guide to update your commits with the DCO Full details of the Developer Certificate of Origin can be found at developercertificate.org. The list of commits missing DCO signoff:
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
clubanderson
left a comment
There was a problem hiding this comment.
1195 🐛 Fix: related projects hover appears dark in light mode btwshivam
|
Closing — this is a Copilot-generated duplicate of #1195 which is the human-authored fix for the same issue. |
Hover effects on related project links rendered with dark-mode styling in light mode due to Tailwind
dark:hover:bg-gray-800being applied during SSR hydration before the theme was resolved. Additionally,isProductionwas computed at render time viatypeof window !== 'undefined', causing a hydration mismatch.📝 Summary of Changes
dark:hover:bg-gray-800Tailwind class with React hover state (hoveredProject) and programmaticbgColorbased on resolved themeisProductionfrom render-timetypeof windowcheck intouseState(true)+useEffect(aligns with 🐛 Fix: resolve hydration mismatch in RelatedProjects links #1190)suppressHydrationWarningto project<a>tagsclassNametemplate literals to original 3-line formatChanges Made
dark:variant with JS state-driven inline stylesisProductiontouseState/useEffectpattern to eliminate SSR/client hydration mismatchChecklist
Please ensure the following before submitting your PR:
Screenshots or Logs (if applicable)
👀 Reviewer Notes
Rebased onto
mainafter #1190 merged. Conflict inRelatedProjects.tsxresolved by keeping #1190'sisProductionstate pattern and layering the hover fix on top. No functional changes toisProductionbehavior — only the hover styling fix is net-new.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.