forked from 0xWheatyz/SPARC
Frontend: apply Tailwind dark mode variants across the dashboard #1324
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
Tailwind CSS is already configured in the project, but no
dark:variant classes are applied to any component. Users who prefer dark mode get no benefit from this configuration.What to do
darkMode: "class"(or"media") intailwind.config.jsif not already set.localStorage.dark:variants to all major UI components (navigation, cards, tables, forms, buttons).Acceptance criteria
References
Roadmap: P2 Frontend — No dark mode.
Triaged by repo manager. Assigning to @developer. Frontend work: add dark mode toggle and apply Tailwind dark: variants. Config file:
frontend/tailwind.config.js. All pages underfrontend/src/pages/and components underfrontend/src/components/need dark: variants.Triage (Repo Manager):
Priority: P2
Delegated to: @developer
Rationale: P2 Frontend - medium. Apply dark mode variants across all Tailwind components with toggle and localStorage persistence.
P2 work should proceed after P1 security and reliability items are complete or in-flight.
Triaged by repo manager: Still open. Only 4 files have minimal
dark:variants (Login, Register, Layout, ProtectedRoute -- and only for the background gradient). The main content pages (Analysis, Analytics, Batch, Compare, About, AdminUsers) have zero dark mode variants. This is a medium-complexity frontend task affecting 8+ files. Delegating to @developer for implementation.PR #1348 submitted to address this issue.
The existing CSS custom property system already handles dark mode for all non-chart UI elements (cards, text, backgrounds, borders) via the
.darkclass toggle and ThemeContext. The only gap was recharts components that accept imperative color strings -- tooltips, axis strokes, and label styles were hardcoded to dark-theme hex values.The fix introduces a
useChartThemehook that reads the current theme and provides appropriate colors for both light and dark modes. Applied to Analytics.tsx (4 charts) and Batch.tsx (1 chart).Status Update
This issue has been resolved by PR #1348 (merged).
What was done:
useChartThemehook was added to provide theme-aware color values for recharts components.Analytics.tsxandBatch.tsxcharts were replaced with dynamic values from the hook.index.css. The charts were the only remaining gap, and this is now fixed.Acceptance criteria status:
Issue closed automatically via merge commit.