feat: Added dark mode support via toggle and localstorage#11
Open
Wogle0724 wants to merge 1 commit intoZenYukti:mainfrom
Open
feat: Added dark mode support via toggle and localstorage#11Wogle0724 wants to merge 1 commit intoZenYukti:mainfrom
Wogle0724 wants to merge 1 commit intoZenYukti:mainfrom
Conversation
Member
|
Thanks for contributing @Wogle0724! Usually, we prefer having an issue assigned first to avoid duplicate work. However, since this is your first PR, we're considering this for the very first & last time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implemented full dark mode support across OpenMindWell with persistent theme preference using Tailwind CSS class-based dark mode and localStorage. Added a theme toggle button in the Dashboard header that switches between light and dark modes. The selected theme is automatically saved and restored on page reload, with fallback to system preference if no preference is stored.
Closes [#[10]](feat: adding Dark mode support #10)
Type of Change
How Has This Been Tested?
Screenshots
Checklist
Additional Information
Files Added:
frontend/src/hooks/useTheme.ts- Theme management hook with localStorage persistencefrontend/src/components/ThemeToggle.tsx- Toggle button component with moon/sun iconsFiles Modified:
frontend/tailwind.config.ts- EnableddarkMode: 'class'configurationfrontend/src/index.css- Added dark variants to component utilitiesfrontend/src/pages/Dashboard.tsx- Added toggle button and dark mode classesfrontend/src/pages/Home.tsx- Added dark mode variantsfrontend/src/pages/Onboarding.tsx- Added dark mode variantsfrontend/src/components/ChatRoom.tsx- Added dark mode variantsKey Features:
'theme'prefers-color-scheme) if no saved preferenceLearning Outcomes
Implemented Tailwind's class-based dark mode system, which involves:
dark:variants across a large codebase