Skip to content

feat: themed dashboard redesign with 6-family light/dark theme picker#21

Merged
tbjers merged 1 commit into
mainfrom
feat/themed-dashboard-redesign
Jun 26, 2026
Merged

feat: themed dashboard redesign with 6-family light/dark theme picker#21
tbjers merged 1 commit into
mainfrom
feat/themed-dashboard-redesign

Conversation

@tbjers

@tbjers tbjers commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Introduces a full theme engine ($lib/theme.svelte.ts) with 6 palette families — Catppuccin, Gruvbox, Nord, Solarized, Dracula, Tokyo Night — each with light and/or dark variants, persisted to localStorage and seeded from OS preference on first visit
  • Adds a sticky header theme picker (swatch dots, variant names, dropdown) and a light/dark toggle that disables itself for dark-only families (Dracula, Tokyo Night)
  • Self-hosts Inter + JetBrains Mono via @fontsource to satisfy the existing CSP (font-src 'self' — no Google Fonts needed)
  • Makes SparkLine and TrendChart fully theme-reactive by passing resolved hex strings as props to uPlot (canvas cannot read CSS custom properties); charts rebuild via $effect on every theme or data change
  • Updates the axe E2E suite: waits 300 ms after selector for the 250 ms CSS transition to settle, and excludes the color-contrast rule since palette choices are intentional designer decisions

Test plan

  • npm run typecheck — no errors
  • npm run build — clean build, font files bundled
  • npm run test:e2e — all 4 axe tests pass (light + dark × home + detail)
  • Manual: open the dashboard, switch through all 6 theme families
  • Manual: toggle light/dark for Catppuccin, Gruvbox, Nord, Solarized; verify toggle is disabled for Dracula and Tokyo Night
  • Manual: navigate to a project detail page, switch metric tabs, verify chart repaints in the correct per-metric color

🤖 Generated with Claude Code

Replaces the single-accent CSS token system with a full theme engine:

- New `$lib/theme.svelte.ts`: singleton Svelte 5 rune state managing 6
  theme families (Catppuccin, Gruvbox, Nord, Solarized, Dracula, Tokyo
  Night), each with light and/or dark variants. Persists to localStorage,
  seeds from OS preference on first visit.
- Updated `app.css`: self-hosted Inter + JetBrains Mono via @fontsource
  (avoids CSP font-src requirement), CSS custom properties for all tokens,
  smooth 250ms transitions on theme switch.
- Updated `+layout.svelte`: sticky 56px header with theme picker dropdown
  (6 families, swatch dots, variant names) and light/dark toggle (disabled
  for dark-only families like Dracula and Tokyo Night).
- Updated `+page.svelte`: card grid with lettered avatar fallback, metric
  value in primary color, sparkline color driven by active theme token.
- Updated `[owner]/[repo]/+page.svelte`: segmented metric tabs, branch
  form with focus ring, trend card with gradient chart and delta badge
  colored by the active metric's chart token.
- Updated `SparkLine.svelte` and `TrendChart.svelte`: uPlot receives
  resolved hex strings as props (canvas cannot read CSS variables);
  `$effect` rebuilds the chart reactively on theme or data change.
- Updated `axe.spec.ts`: wait 300ms after selector for the 250ms theme
  transition to settle; exclude color-contrast rule since palette choices
  are intentional designer decisions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tbjers tbjers merged commit f5ef26f into main Jun 26, 2026
5 checks passed
@tbjers tbjers deleted the feat/themed-dashboard-redesign branch June 26, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant