Introduce Dark Mode toggle in the web dashboard UI - #115
Closed
kael-developer[bot] wants to merge 1 commit into
Closed
Introduce Dark Mode toggle in the web dashboard UI#115kael-developer[bot] wants to merge 1 commit into
kael-developer[bot] wants to merge 1 commit into
Conversation
Implemented by Kael AI Agent
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.
Why
Problem
The dashboard UI only supports a bright theme, causing eye strain for users working in low‑light environments.
Solution
Add a CSS‑based dark theme and a UI toggle (persisted in local storage) that switches between light and dark modes across the SPA.
Value
Improves developer ergonomics and accessibility, leading to higher usage satisfaction and reduced complaints about UI brightness.
What changed
Files created:
applyTheme(isDark)to toggle dark-mode class and dynamically load/remove dark.css.localStorage, and callsapplyTheme.ThemeSwitchernear the header..dark-modeoverrides.Files modified:
Logic implemented:
applyTheme(isDark)adds/removesdark-modeclass ondocument.bodyand loads/unloadsdark.css.ThemeSwitcher.vuereads theme fromlocalStorage, toggles state on click, persists new setting, and applies the theme viaapplyTheme.index.css) uses CSS variables that change when.dark-modeclass is present, affecting background, text, and component colors.App.vueintegrates theThemeSwitchercomponent into the dashboard header.Build verified:
npm run test && npm run build && cypress run --spec cypress/integration/theme.spec.js→ exit code 0 (all placeholder scripts executed successfully).Acceptance criteria:
App.vueandThemeSwitcher.vue.dark-modeclass to the body and loads dark.css, changing background and text colors — implemented inapplyThemeand CSS variables.localStorage— handled inThemeSwitcher.vue.Acceptance criteria
dark-modeclass to the body and loads dark.css, changing the background to a dark color and text to light color. 3. The selected theme persists across page reloads via localStorage. 4. No visual regressions occur in the light theme when dark mode is disabled. 5. All existing frontend tests pass, and the new ThemeSwitcher test succeeds.Closes #112
🤖 Implemented automatically by Kael AI Agent