Skip to content

feat(ui): implement complete dark mode with theme toggle#521

Open
glorisdenisse wants to merge 1 commit into666ghj:mainfrom
glorisdenisse:feat/dark-mode
Open

feat(ui): implement complete dark mode with theme toggle#521
glorisdenisse wants to merge 1 commit into666ghj:mainfrom
glorisdenisse:feat/dark-mode

Conversation

@glorisdenisse
Copy link
Copy Markdown

Summary

Closes #340

  • theme.css — Single source of truth for all color tokens using CSS custom properties. :root defines light mode defaults; html.dark overrides them for dark mode
  • ThemeToggle.vue — Sun/moon toggle button added to every view header. Persists preference to localStorage, falls back to prefers-color-scheme on first visit
  • LanguageSwitcher.vue — Refactored to use color: inherit so it adapts automatically to both always-dark navbars (Home, Process) and light-themed headers (workflow views)
  • All views updatedHome, Process, MainView, InteractionView, SimulationView, SimulationRunView, ReportView — headers, content areas, and panel wrappers use CSS variables
  • All workbench components updatedGraphPanel, Step1GraphBuild, Step2EnvSetup, Step3Simulation, Step4Report, Step5Interaction — all hardcoded #FFF/#000 colors replaced with semantic CSS
    variables
  • Python version pinned.python-version set to 3.12 for uv compatibility (pillow wheel availability)

Design decisions

  • Always-dark navbars on Home and Process pages are intentionally kept with hardcoded #000 backgrounds — they're a brand element, not a content area
  • System log panels (background: #000) in workbench components are kept as-is — the terminal aesthetic is intentional
  • D3.js inline styles on graph SVGs are overridden with !important CSS selectors since D3 sets them as attributes
  • Accent colors (orange #ff6b35, status greens/reds, indigo badges) are preserved unchanged — they work well in both modes

Test plan

  • Toggle dark mode on Home page — navbar stays dark, content area switches
  • Toggle on Process page — graph SVG labels/edges update correctly
  • Toggle on MainView/InteractionView — light header adapts, workbench panels switch
  • Toggle on SimulationView/SimulationRunView/ReportView — same as above
  • Toggle dark mode on Home page — navbar stays dark, content area switches
  • Toggle on Process page — graph SVG labels/edges update correctly
  • Toggle on MainView/InteractionView — light header adapts, workbench panels switch
  • Toggle on SimulationView/SimulationRunView/ReportView — same as above
  • Verify ThemeToggle and LanguageSwitcher are visible and functional in all header contexts
  • Refresh page — theme persists from localStorage
  • First visit with prefers-color-scheme: dark — dark mode applied automatically

Adds a full dark/light theme system across all frontend views and components.
Closes 666ghj#340

- Add `theme.css` with CSS custom properties for light/dark color tokens
- Add `ThemeToggle.vue` component (sun/moon button) with localStorage persistence
  and prefers-color-scheme fallback
- Update `LanguageSwitcher.vue` to use `color: inherit` so it adapts to
  both dark navbars (Home, Process) and light headers (workflow views)
- Apply ThemeToggle and CSS variable theming to all views:
  Home, Process, MainView, InteractionView, SimulationView,
  SimulationRunView, ReportView
- Update all workbench components to replace hardcoded colors with
  CSS variables: GraphPanel, Step1GraphBuild, Step2EnvSetup,
  Step3Simulation, Step4Report, Step5Interaction
- Pin Python version to 3.12 via `.python-version` for uv compatibility

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request labels Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dark Mode

1 participant