feat: themed dashboard redesign with 6-family light/dark theme picker#21
Merged
Conversation
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>
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.
Summary
$lib/theme.svelte.ts) with 6 palette families — Catppuccin, Gruvbox, Nord, Solarized, Dracula, Tokyo Night — each with light and/or dark variants, persisted tolocalStorageand seeded from OS preference on first visit@fontsourceto satisfy the existing CSP (font-src 'self'— no Google Fonts needed)SparkLineandTrendChartfully theme-reactive by passing resolved hex strings as props to uPlot (canvas cannot read CSS custom properties); charts rebuild via$effecton every theme or data changecolor-contrastrule since palette choices are intentional designer decisionsTest plan
npm run typecheck— no errorsnpm run build— clean build, font files bundlednpm run test:e2e— all 4 axe tests pass (light + dark × home + detail)🤖 Generated with Claude Code