-
Notifications
You must be signed in to change notification settings - Fork 7
feat(header): simplify Dark/Light toggle in non-demo mode #453
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
Conversation
- Add `iconOnly` prop to ThemeToggler component to display only sun/moon icon - Update NavigationControls to use iconOnly in non-demo mode - Keep combobox with text in demo mode (unchanged behavior) - Footer remains unaffected and keeps the combobox
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... 📒 Files selected for processing (2)
Tip CodeRabbit can enforce grammar and style rules using `languagetool`.Configure ✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
Greptile SummarySimplified theme toggle UI in non-demo mode by adding an
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant NavigationControls
participant isDemoMode
participant ThemeToggler
participant useTheme
User->>NavigationControls: Load header
NavigationControls->>isDemoMode: Check demo mode
isDemoMode-->>NavigationControls: return isDemo (true/false)
alt Demo Mode (isDemo = true)
NavigationControls->>ThemeToggler: render with iconOnly=false
ThemeToggler->>useTheme: Get current theme
ThemeToggler-->>User: Display dropdown combobox with text
User->>ThemeToggler: Click theme dropdown
ThemeToggler-->>User: Show Light/Dark options
User->>ThemeToggler: Select theme option
ThemeToggler->>useTheme: setTheme(selected)
else Non-Demo Mode (isDemo = false)
NavigationControls->>ThemeToggler: render with iconOnly=true
ThemeToggler->>useTheme: Get current theme
ThemeToggler-->>User: Display icon button (Sun/Moon)
User->>ThemeToggler: Click icon button
ThemeToggler->>useTheme: setTheme(toggle dark/light)
end
|
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.
No issues found across 2 files
iconOnlyprop to ThemeToggler component to display only sun/moon iconSummary
Related Issues
Description
Changes Made
Screenshots / Videos
Type of Change
Implementation Details
Testing Instructions
Deployment Notes
Checklist
Additional Context
Summary by cubic
Simplifies the header theme toggle in non-demo mode by replacing the combobox with an icon-only button. Demo mode keeps the combobox; the footer is unchanged.
Written for commit cfd7b08. Summary will update on new commits.
Note
Introduces an icon-only variant of the theme switcher and wires it into the header based on demo mode.
iconOnlyprop toThemeToggler; when true, renders a single Sun/Moon button that toggles light/dark directlyNavigationControlsto passiconOnly={!isDemo}so non-demo uses the icon-only toggle; demo keeps the dropdowncompactand dropdown behaviors (no other UI affected)Written by Cursor Bugbot for commit cfd7b08. This will update automatically on new commits. Configure here.