feature: add light mode toggle and global theme support#29
feature: add light mode toggle and global theme support#29aadya284 wants to merge 4 commits intobetterbugs:developfrom
Conversation
|
@aadya284 please raise pr against develop branch instead of main. |
|
@rishima17 Thank you for pointing that out. I’ve updated the PR to target the develop branch. |
|
@SyedFahad7 @rishima17 kindly review my pr and merge it |
SyedFahad7
left a comment
There was a problem hiding this comment.
Please sync your PR branch with the latest develop before re-review.
Use rebase (preferred) instead of merging develop into your feature branch to keep history clean:
git fetch upstream
git rebase upstream/develop
Resolve conflicts, then run local checks (npm run lint and npm run build)
git push --force-with-lease origin
Notes:
No need to fix unrelated pre-existing warnings across the repo.
Do fix any errors introduced by your PR (especially in touched files).
Rebase rewrites only your PR branch history; it does not rewrite our develop branch.
Once updated, we’ll re-review quickly.
ec60d5e to
cbb77d0
Compare
|
@SyedFahad7 Rebased the branch on the latest Local checks performed:
Build completed successfully. Updated branch pushed for re-review. |
|
Good start on theme toggle and persistence, and build/lint are passing. Blocking concerns before merge: After these are addressed, theme architecture will be much cleaner and more maintainable. |
|
@SyedFahad7 I have addressed the changes you told please re-review it |
|
Thanks for addressing the previously requested blockers. I re reviewed the latest commit and can confirm the architectural issues mentioned earlier appear to be resolved: • ThemeProvider no longer blanks the application during initial load Build and lint checks are also passing. However, there are significant UI regressions introduced by this PR that need to be addressed before merge. The project originally had a well styled dark theme, but several visual aspects of the existing UI have been unintentionally modified. The goal of this PR should be to add light mode support without altering the current dark mode design. Current concerns:
Suggested approach: To keep the implementation maintainable and aligned with the project design: • Keep dark mode styles exactly the same as the existing UI Once the UI parity with the original dark theme is restored and light mode styling is cleaned up, this PR should be good to merge. |
|
@SyedFahad7 Addressed the UI regressions mentioned in the review. Updates made: Dark mode remains unchanged from the original design while light mode now applies targeted color overrides only. Local verification: Ready for re-review. |
SyedFahad7
left a comment
There was a problem hiding this comment.
Thanks for the quick iteration and for addressing the earlier architectural and UI issues. The theme toggle functionality is working and the previous blockers around provider behavior, global overrides, and component regressions are improved.
However, after testing the latest changes there are still a few UI and branding inconsistencies that need to be corrected before this can be merged.
Current issues observed:
-
Brand logo color
The BetterBugs logo should not change color across themes. In the current light mode implementation the logo becomes fully black. Our brand icon should remain the original green in both dark and light modes. Only the surrounding text or UI elements should adapt to theme changes. -
Light mode contrast and surfaces
Some UI surfaces in light mode still look visually flat or inconsistent compared to the dark theme version. Components such as the filter sidebar, cards, and badges should have clearer background contrast and maintain visual hierarchy. -
Filter panel styling
The category buttons and filter pills in light mode look slightly inconsistent compared to the dark version. The borders and backgrounds should be adjusted so they feel like the same component system rather than a separate design. -
Footer alignment with theme
The footer now renders correctly, but please ensure that icon colors, badge styling, and background surfaces follow the same theme logic used across the rest of the layout.
Suggested approach:
• Keep the BetterBugs logo color unchanged (green) in both themes
• Preserve the existing dark mode design exactly as it was
• Apply light mode by inverting background and text colors while keeping the same component structure
• Maintain consistent surfaces for cards, filters, and badges so both themes feel like the same UI system
Once these branding and visual consistency issues are corrected, this should be in a good state for approval.
Thanks again for the continued updates.
|
@SyedFahad7 Since the current logo asset is a JPG with a dark background, it does not adapt well to the light theme. |
98568b2 to
5c630ce
Compare
|
@SyedFahad7 i have addressed the changes you told, kindly review |
Description
Description
This PR introduces a Light Mode toggle functionality to the application.
A theme toggle button (Sun/Moon icon) has been added to the navbar, allowing users to switch between Dark Mode (default) and Light Mode. The selected theme is persisted using local storage and applied globally via a theme context and class-based styling.
The implementation ensures:
Fixes #[ISSUENO]
Dependencies
No additional external dependencies were added.
The implementation uses:
themeContext)darkclass)Future Improvements
prefers-color-scheme).Mentions
@maintainers
(Replace with actual maintainer usernames if required)
Screenshots of relevant screens
Dark Mode (Default)
Add screenshot here

Light Mode
Add screenshot here
Developer's checklist
If changes are made in the code:
Give a summary of the change that you have made
Fixes #[ISSUENO]
Dependencies
Mention any dependencies/packages used
Future Improvements
Mention any improvements to be done in future related to any file/feature
Mentions
Mention and tag the people
Screenshots of relevant screens
Add screenshots of relevant screens
Developer's checklist
If changes are made in the code:
Note:
The only remaining visual inconsistency is the logo in Light Mode.
Since the current logo asset is a JPG with a dark background, it does not adapt well to the light theme.
If a light-mode compatible logo (transparent PNG/SVG or alternate variant) is provided, I would be happy to open a separate PR to improve this further.