-
Notifications
You must be signed in to change notification settings - Fork 70
🐛fix: improve dark mode hover visibility in Related Projects sidebar #919
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?
🐛fix: improve dark mode hover visibility in Related Projects sidebar #919
Conversation
Signed-off-by: JANHVI BABANI <114232474+Janhvibabani@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 |
✅ Deploy Preview for kubestellar-docs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi @Janhvibabani. 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. |
|
Welcome to KubeStellar! 🚀 Thank you for submitting this Pull Request. Before your PR can be merged, please ensure: ✅ DCO Sign-off - All commits must be signed off with ✅ PR Title - Must start with an emoji: ✨ (feature), 🐛 (bug fix), 📖 (docs), 🌱 (infra/tests), Getting Started with KubeStellar: Contributor Resources:
🌟 Help KubeStellar Grow - We Need Adopters! Our roadmap is driven entirely by adopter feedback. Whether you're using KubeStellar yourself or know someone who could benefit from multi-cluster Kubernetes: 📋 Take our Multi-Cluster Survey - Share your use cases and help shape our direction! A maintainer will review your PR soon. Feel free to ask questions in the comments or on Slack! |
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 fixes a dark mode hover visibility issue in the Related Projects sidebar where the hover state had insufficient contrast, making it difficult to see which item was being hovered over.
Changes:
- Separated current/active project rendering into a dedicated block with distinct styling
- Replaced dark mode hover state from
hover:bg-gray-800tohover:bg-blue-500/20 hover:text-blue-400for better visibility - Replaced light mode hover state from
hover:bg-gray-100tohover:bg-blue-50 hover:text-blue-600for consistency - Applied Tailwind classes for non-current project hover states instead of conditional inline styles
Comments suppressed due to low confidence (1)
src/components/docs/RelatedProjects.tsx:190
- There is significant code duplication between the current project render block (lines 158-172) and the non-current project render block (lines 176-190). The only differences are:
- The styling (which could be handled with conditional classes)
- The
font-mediumclass on the current project
Consider consolidating these into a single render block with conditional styling to improve maintainability. For example:
return (
<a
key={project.title}
href={projectUrl}
className={`
block px-3 text-sm rounded-md transition-colors
${bannerActive ? 'py-0.5' : 'py-1.5'}
${isCurrentProject
? (isDark
? 'font-medium text-blue-400 bg-blue-500/20'
: 'font-medium text-blue-600 bg-blue-50')
: (isDark
? 'text-gray-200 hover:bg-blue-500/20 hover:text-blue-400'
: 'text-gray-700 hover:bg-blue-50 hover:text-blue-600')
}
`}
>
{project.title}
</a>
);This eliminates duplication and makes the code easier to maintain.
if (isCurrentProject) {
return (
<a
key={project.title}
href={projectUrl}
className={`
block px-3 text-sm rounded-md transition-colors font-medium
${bannerActive ? 'py-0.5' : 'py-1.5'}
`}
style={{
color: isDark ? '#60a5fa' : '#2563eb',
backgroundColor: isDark ? 'rgba(59, 130, 246, 0.2)' : 'rgba(239, 246, 255, 1)'
}}
>
{project.title}
</a>
);
}
return (
<a
key={project.title}
href={projectUrl}
className={`
block px-3 text-sm rounded-md transition-colors
${bannerActive ? 'py-0.5' : 'py-1.5'}
${isDark
? 'text-gray-200 hover:bg-blue-500/20 hover:text-blue-400'
: 'text-gray-700 hover:bg-blue-50 hover:text-blue-600'
}
`}
>
{project.title}
</a>
);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| style={{ | ||
| color: isDark ? '#60a5fa' : '#2563eb', | ||
| backgroundColor: isDark ? 'rgba(59, 130, 246, 0.2)' : 'rgba(239, 246, 255, 1)' | ||
| }} |
Copilot
AI
Jan 29, 2026
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.
The PR description states "Removed inline style logic for non-current projects, using Tailwind classes instead," but the current/active project (lines 165-168) still uses inline styles. This is a discrepancy between the PR description and the actual implementation.
Either the PR description should be updated to clarify that inline styles were only removed for non-current projects, or the inline styles should be removed from the current project block as well to fully match the stated changes.
| `} | ||
| style={{ | ||
| color: isDark ? '#60a5fa' : '#2563eb', | ||
| backgroundColor: isDark ? 'rgba(59, 130, 246, 0.2)' : 'rgba(239, 246, 255, 1)' | ||
| }} |
Copilot
AI
Jan 29, 2026
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.
The current/active project still uses inline styles (lines 166-167), which is inconsistent with the PR description stating "Removed inline style logic for non-current projects, using Tailwind classes instead." For consistency and maintainability, consider converting these inline styles to Tailwind classes as well, using the same pattern applied to non-current projects:
For the current project block, you could use Tailwind classes like:
- Dark mode:
text-blue-400 bg-blue-500/20 - Light mode:
text-blue-600 bg-blue-50
This would make the styling consistent throughout the component and eliminate the need for inline style attributes.
| `} | |
| style={{ | |
| color: isDark ? '#60a5fa' : '#2563eb', | |
| backgroundColor: isDark ? 'rgba(59, 130, 246, 0.2)' : 'rgba(239, 246, 255, 1)' | |
| }} | |
| ${isDark | |
| ? 'text-blue-400 bg-blue-500/20' | |
| : 'text-blue-600 bg-blue-50' | |
| } | |
| `} |
📌 Fixes
Fixes #918
📝 Summary of Changes
In dark mode, hovering over project links in the Related Projects sidebar was barely visible. The
hover:bg-gray-800background didn't provide enough contrast, making it hard to see which item was being hovered.hover:bg-blue-500/20 hover:text-blue-400hover:bg-blue-50 hover:text-blue-600Changes Made
hover:bg-gray-800withhover:bg-blue-500/20 hover:text-blue-400(dark mode)hover:bg-gray-100withhover:bg-blue-50 hover:text-blue-600(light mode)Checklist
Please ensure the following before submitting your PR:
Screenshots or Logs (if applicable)
👀 Reviewer Notes
Add any special notes for the reviewer here