From 47f9aa714473da0874d6d6da2768eb88289f20e6 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Thu, 16 Jul 2026 12:48:51 -0700 Subject: [PATCH] FN-8124: reuse dashboard theme dropdown in Settings Unify Settings appearance theme selection with the dashboard control. - Reuse ThemeDropdown and its custom-color picker in ThemeSelector - Remove the obsolete Settings color-theme grid styles - Cover shared dropdown interactions and document the unified control - Add a patch changeset for the Settings theme selector Files changed: .changeset/FN-8124-settings-theme-dropdown.md | 7 + docs/dashboard-guide.md | 2 +- .../dashboard/app/components/ThemeDropdown.tsx | 9 +- .../dashboard/app/components/ThemeSelector.css | 48 -- .../dashboard/app/components/ThemeSelector.tsx | 49 +- .../components/__tests__/ThemeSelector.test.tsx | 778 ++------------------- .../__tests__/CommandCenterControls.test.tsx | 18 +- 7 files changed, 109 insertions(+), 802 deletions(-) Fusion-Task-Id: FN-8124 Fusion-Task-Lineage: 6bd87f2a-d9e1-4374-8f54-1a2266c4004f Co-authored-by: Fusion (runfusion.ai) --- .changeset/FN-8124-settings-theme-dropdown.md | 7 + docs/dashboard-guide.md | 2 +- .../app/components/ThemeDropdown.tsx | 9 +- .../app/components/ThemeSelector.css | 48 -- .../app/components/ThemeSelector.tsx | 49 +- .../__tests__/ThemeSelector.test.tsx | 788 ++---------------- .../__tests__/CommandCenterControls.test.tsx | 18 +- 7 files changed, 114 insertions(+), 807 deletions(-) create mode 100644 .changeset/FN-8124-settings-theme-dropdown.md diff --git a/.changeset/FN-8124-settings-theme-dropdown.md b/.changeset/FN-8124-settings-theme-dropdown.md new file mode 100644 index 0000000000..834d3f722e --- /dev/null +++ b/.changeset/FN-8124-settings-theme-dropdown.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Settings now uses the same compact color-theme dropdown as the dashboard. +category: fix +dev: AppearanceSection/ThemeSelector reuse ThemeDropdown; the old .theme-grid affordance and orphaned CSS were removed. Shared swatch classes retained. diff --git a/docs/dashboard-guide.md b/docs/dashboard-guide.md index 574eb622ab..b600bf96bc 100644 --- a/docs/dashboard-guide.md +++ b/docs/dashboard-guide.md @@ -1848,7 +1848,7 @@ Non-Command-Center dashboard CSS uses `--text` as the canonical primary text tok Dark/light modes via `data-theme`; fresh installs default to System mode so the resolved theme follows `prefers-color-scheme` until the user explicitly chooses Light, Dark, or System. 76 color themes via `data-color-theme` (lazy-loaded from `app/public/theme-data.css`), including the Shadcn zinc-neutral theme with an orange default highlight/accent, Shadcn Custom (the same base with sanitized per-token color-picker overrides), and its color family: Shadcn Blue/Green/Red/Purple/Pink/Orange/Yellow, Shadcn Mono Red/Blue/Green/Purple/Pink/Orange/Yellow (grayscale surfaces with color-specific accents; legacy `shadcn-mono` selections migrate to Shadcn Mono Red), Shadcn Black (pure black and white), Shadcn Gray (fully neutral zinc-gray accent), and Shadcn Gray Blue (blue-gray slate neutral surfaces with a muted slate-blue accent). Air is the minimal, borderless, paper-like preset with near-monochrome tokens and CSS-only chrome flattening. Glass Silver preserves the Glass theme's frosted translucent surfaces and transparent modal overlay behavior while using silver and graphite accents instead of purple/pink. -Choose Shadcn variants from **Settings → Appearance** or from the Command Center **Overview** theme card; both selectors use the same `themeOptions.ts` labels and color-chip swatches. The left sidebar active-item highlight and resize accent use the active theme's `--accent`, so they follow the selected Shadcn accent instead of staying fixed blue. +Choose Shadcn variants from **Settings → Appearance** or from the Command Center **Overview** theme card; both use the same compact `ThemeDropdown`, labels, and color-chip swatches. The left sidebar active-item highlight and resize accent use the active theme's `--accent`, so they follow the selected Shadcn accent instead of staying fixed blue. - **Base tokens** (`--bg`, `--surface`, etc.) — redefine in `:root`, `[data-theme="light"]`, and every theme block. - **Semantic tokens** (`--autopilot-pulse`, `--event-error-text`, `--badge-mission-*`, `--fab-*`) — `:root` + `[data-theme="light"]` only; no per-color-theme overrides. diff --git a/packages/dashboard/app/components/ThemeDropdown.tsx b/packages/dashboard/app/components/ThemeDropdown.tsx index db9ee1cfc3..efb0117cb2 100644 --- a/packages/dashboard/app/components/ThemeDropdown.tsx +++ b/packages/dashboard/app/components/ThemeDropdown.tsx @@ -17,6 +17,10 @@ interface ThemeDropdownProps { onShadcnCustomColorsChange?: (colors: Record) => void; } +export function resolveColorTheme(colorTheme: ColorTheme) { + return COLOR_THEMES.find((theme) => theme.value === colorTheme) ?? COLOR_THEMES[0]; +} + function ThemeSwatch({ className }: { className: string }) { return (