[Enhancement]: Support dark mode

Aperta
#455 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, python, tailwindcss

Direzione di ricerca

Start with frontend/src/index.css and frontend/tailwind.config.js, then inspect NavBar, MobileMenu, and the listed state components to see how themes and colors are handled. Read docs/design-system.md and prerequisite issue #452 for the semantic token conventions. Done means the light, dark, and system choices persist and update without reload, system changes are followed, and both themes meet the stated contrast and surface criteria.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement ui/ux
Is your feature request related to a problem?

SimBoard only has a light theme. Users who work in dark environments or prefer a dark OS theme get a bright UI. The unused .dark token scaffolding was removed in #452 because there was no toggle and no dark: usage, and raw slate-*, gray-*, and bg-white classes would not have adapted to a dark theme.

Describe the solution you'd like
  • Define dark values for every semantic token in frontend/src/index.css and re-enable class-based dark mode in frontend/tailwind.config.js.
  • Add a theme control (light, dark, system) to NavBar and MobileMenu that persists the user's choice and defaults to the OS preference.
  • Make state colors (Alert variants, ExecutionStatusBadge, compare diff highlights, links) readable in both themes.
  • Document the theming rules in docs/design-system.md.

Prerequisite: neutral colors use semantic tokens instead of raw slate-*, gray-*, and bg-white (#452, "Neutral colors").

Acceptance criteria
  • Given a user selects dark, light, or system, then the whole app switches theme without a reload and keeps the choice on the next visit.
  • Given system is selected, when the OS theme changes, then the app follows it.
  • In both themes, text meets WCAG 2.2 AA contrast (4.5:1) and focus indicators and control icons meet 3:1.
  • No page shows light-only surfaces (for example, white panels) in dark mode.
Describe alternatives you've considered
  • Follow the OS preference only, with no toggle. Simpler, but users can't override it per app.
  • Stay light-only. This is the current documented convention.
Additional context

Follow-up to #452.

Lingua principale
Python
Stelle
2
Fork
2
Merge medio
12h 49m
PR unite (30g)
30

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di E3SM-Project/simboard

Tutte le issue di E3SM-Project/simboard

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.