Instatic
Instatic copied to clipboard
feat(admin): add light theme appearance preferences
Summary
- Adds persistent user-level admin appearance preferences for theme and UI text scale, alongside the existing density setting.
- Adds light theme token overrides for admin chrome, including readable identity accents, overlay-based neutral controls, and clearer body/surface separation.
- Keeps editor layout roots and portaled UI surfaces in sync through
data-editor-theme,data-editor-density, anddata-editor-text-scaleattributes. - Adds regression coverage for appearance preference persistence, light-theme accent contrast, light body/surface contrast, and neutral control backgrounds.
Why
Issue #138 asks for a light version of Instatic and persistent user appearance settings. The previous light-theme pass also exposed low contrast between pale surfaces, rail tint colors, badges, and active controls. This PR moves those differences into global tokens and shared primitives so the behavior is consistent across admin workspaces.
Closes #138.
User / Developer Impact
- Users can switch the admin UI to light mode and adjust UI text scale from preferences.
- Light mode keeps dashboard, editor sidebars, segmented controls, buttons, rails, badges, and inspector groups readable on white surfaces.
- New tests lock down token contrast and prevent shared chrome from drifting back to surface-only states.
Verification
npx react-doctor@latest --verbose --scope changed --base origin/main→ no issues foundbun test→ 5,919 pass, 0 failbun run build→ exit 0bun run lint→ exit 0git diff --check→ exit 0- Browser QA on
http://localhost:5173/admin/dashboardandhttp://localhost:5173/admin/sitefor light-theme contrast fixes