fix: Add dark mode and high contrast theme support to header components#231
fix: Add dark mode and high contrast theme support to header components#231kr1shnac wants to merge 2 commits intoAOSSIE-Org:mainfrom
Conversation
📝 WalkthroughWalkthroughFrontend components receive styling updates applying new color tokens and UI refinements. The Header gains a 60-second polling mechanism to refresh notifications alongside existing triggers. Sidebar receives cosmetic formatting adjustments. No changes to component interfaces or exported signatures. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code graph analysis (1)frontend/src/components/Header.tsx (1)
🔇 Additional comments (10)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
The mobile sidebar (hamburger menu), notification popover, and profile popover were not respecting the user's selected theme. When users switched toDark mode orHigh Contrast mode, these components remained white/light, creating visual inconsistency and accessibility issues.
Before (Bug)
Solution
Demo Video:
https://drive.google.com/file/d/1cij7AQ_JKWPeK-KLRPpkOAYctJJFjeGt/view?usp=sharing
Replaced all hardcoded Tailwind color classes with theme-aware CSS variable classes that automatically adapt to the current theme:
bg-whitebg-backgroundborder-gray-200border-bordertext-gray-900text-foregroundtext-gray-500/600text-muted-foregroundtext-blue-600text-primarytext-red-600text-destructivebg-gray-100bg-mutedhover:bg-gray-50hover:bg-mutedFiles Changed
-
frontend/src/components/Header.tsx-
frontend/src/components/Sidebar.tsxTesting
Manually tested all three themes:
Screenshots
Dark Mode - Mobile Sidebar
High Contrast Mode - Mobile Sidebar
Summary by CodeRabbit
New Features
Style
✏️ Tip: You can customize this high-level summary in your review settings.