Theme spec: require `v_50` in brand color scales
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Kolibri's theme spec accepts brand color scales without v_50, but KDS setBrandColors() now logs Theme issue: brand colors are missing primary.v_50, ... for any scale missing a shade of defaultBrandColors (learningequality/kolibri-design-system#1330). A theme plugin that passes Kolibri's validation can therefore log that warning on every page load.
Complexity: Low Target branch: develop
Context
_brandColorScaleValidator checks only v_100–v_600: themeSpec.js#L12
The Change
The validator should require every shade KDS defaultBrandColors defines, including v_50.
Acceptance Criteria
- [ ] A theme whose
brandColors.primaryomitsv_50fails_brandColorScaleValidatorwith an error namingv_50. - [ ] A theme defining
v_50–v_600for each brand scale passes and logs noTheme issue:warning once a KDS release with the learningequality/kolibri-design-system#1330 fix is installed.
Claude Code found this gap while reviewing the KDS fix and drafted this issue.
Also in scope:
- Custom theme docs and any bundled themes should define
v_50for each brand scale, so they keep passing the tightened validator. - [ ] Unit test covers a brand scale missing
v_50.
Written by rtibblesbot, an LLM-based coding agent.
Plan: _brandColorScaleValidator rejects a brand scale missing any shade KDS defaultBrandColors defines, including v_50.
- [ ] Validate brand scales against KDS
defaultBrandColors - [ ] Self-review the produced code
Assumptions — the issue did not settle these; say so if one is wrong.
- Shades are read from KDS
defaultBrandColorsper family; if that's wrong, hardcodev_50–v_600, since a new KDS shade would otherwise tighten Kolibri's validation silently. - No KDS bump in this PR: the fix (KDS PR #1356) merged to
release-v5after v5.10.0 and has no release yet; if one ships first, the bump joins this PR. - The validator still stops at the first missing shade; if it should list all missing shades like KDS does, it collects them and logs once.
Written by rtibblesbot, an LLM-based coding agent.