ui(env): explicit switcher button+modal, forced selection, 3px color bar
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 2m6s
CI / docker (push) Successful in 1m18s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 38s

- Replace EnvironmentSelector "All Envs" dropdown with Button+Modal (DS Modal, forced on first-use).
- Add 8-swatch preset color picker in the Environment settings "Appearance" section; commits via useUpdateEnvironment.
- Render a 3px fixed top bar in the current env's color across every page (z-index 900, below DS modals).
- New env-colors tokens (--env-color-*, light + dark) and envColorVar() helper with slate fallback.
- Vitest coverage for button, modal, and color helpers (13 new specs).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-22 19:24:48 +02:00
parent 79fa4c097c
commit 2835d08418
16 changed files with 593 additions and 38 deletions

View File

@@ -0,0 +1,34 @@
/*
* Per-environment preset color tokens. Used by:
* - LayoutShell's 3px top-bar indicator
* - EnvironmentSwitcherButton / EnvironmentSwitcherModal (color dot)
* - EnvironmentsPage "Appearance" swatch grid
*
* Light-mode and dark-mode values are tuned for WCAG-AA contrast against the
* respective surface tokens (`--bg-surface`, `--text-primary`).
*
* Storage: plain lowercase string ("slate", "red", ...). Unknown values fall
* back to `slate` via `envColorVar()`.
*/
:root {
--env-color-slate: #94a3b8;
--env-color-red: #ef4444;
--env-color-amber: #f59e0b;
--env-color-green: #10b981;
--env-color-teal: #14b8a6;
--env-color-blue: #3b82f6;
--env-color-purple: #a855f7;
--env-color-pink: #ec4899;
}
[data-theme='dark'] {
--env-color-slate: #a1a9b8;
--env-color-red: #f87171;
--env-color-amber: #fbbf24;
--env-color-green: #34d399;
--env-color-teal: #2dd4bf;
--env-color-blue: #60a5fa;
--env-color-purple: #c084fc;
--env-color-pink: #f472b6;
}