lablup / lablup/backend.ai-webui
Convert theme.json to the v2 {theme, branding} appearance document (Astryx vocabulary)
- Dominant language
- TypeScript
- Stars
- 133
- Forks
- 81
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 344
Description
## Scope (restructured 2026-09-01 — bottom PR of the FR-1964 app-config stack)
Convert the theme document to the **v2 `{theme, branding}` appearance document** (Astryx vocabulary), so no antd-shaped document is ever stored and no data migration is needed when it is served from app config (FR-1964). PR: #9361.
- Convert `resources/theme.json` + `theme.schema.json` to v2: `schemaVersion: 2`, `theme.families..seeds` (string = both schemes, `[light, dark]` tuple splits them), `headerBg`, `fontFamily`, `siderMode`; `branding.logo` / `companyName` / `brandName` / `familyLabels`.
- Loader (`customThemeConfig`) reads **v2 only**; a v1 document logs a loud console error and falls back to the built-in defaults. **Breaking** for operators with a custom `theme.json` — migration guide + release note required (v1→v2 field map in the PR description).
- Roles stay derived in code (brand←accent, admin←info, secondary←success); the document stores brand seeds only. `computeThemeName` hash inputs unchanged, so the prebuilt brand theme artifact still matches by name.
- Branding editor **format adaptation** rides along (color pickers write seed tuples, `ThemeJsonConfigModal` validates the v2 schema, stale pre-v2 localStorage draft reseeded) so the editor never produces a document the loader rejects. The dead Text Color item is dropped.
- **Remove `custom_primary_color` / `ThemeAccentColorPicker`** (2026-08-19 decision) — the accent override mechanism is antd's palette algorithm over the v1 document and dies with the internal-currency switch. `usePrimaryColors` stays (reads shim tokens, not the setting). **(Moved here from FR-3834: engineering coupling.)**
- Delete `antdThemeConfig.schema.json` and its generator script.
## Out of scope (follow-ups)
- Serving the document from app config + bootstrap unification → FR-1964 (PR #8860).
- Theme family via userConfig + Branding Apply-to-app-config → FR-3834 (PR #9362).
- Migrating remaining `theme.useToken()` call sites and deleting the antd-shaped theme **shim** internals (items 2–3 of this ticket's original goal) — split out, to be re-ticketed when scheduled.
JIRA Issue: FR-3605
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with PR #9361 and review resources/theme.json, theme.schema.json, and the customThemeConfig loader entry point. Then inspect ThemeJsonConfigModal, the branding editor adaptation, and the referenced schema generator for the affected surfaces. Done means v2-only loading, updated editor validation, migration documentation and release notes, removal of the deprecated accent picker and schemas, with existing hash inputs preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- design, frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100