Follow-up to #1358, which made configuration.general.styles.accent reachable but as a plain string input. That was deliberate and is not sufficient.
The gap
Type banana into the accent field and save. The save succeeds, the value is stored, and the site silently keeps the style template's own colour. Nothing tells the owner their input was not a colour, and nothing on the page changes, so the natural reading is that the feature is broken.
array fields already show inline validation (config-editor.tsx renders a per-field error under the control). string fields have no such surface at all, so this is not a matter of adding a message to an existing mechanism.
Why it was deferred
The editor renders string, select, boolean, number and array. There is no colour type, so a picker needs a renderer case of its own. And a bare <input type="color"> cannot express "unset", which is the value every live instance currently holds and the state an owner has to be able to return to. That is the same constraint that gave the font preset its explicit '' "Theme default" option.
What this needs
- A
color field type with a renderer case: a picker paired with a hex text input, since the two have to stay in sync and the text input is what expresses empty.
- Inline validation on
string fields generally, so an accepted-but-meaningless value is visible at the point of entry rather than by its absence of effect.
- A way to clear back to the template default that is obvious, matching the font preset's "Theme default" entry.
Worth pairing with a live preview: theme-appearance.ts already derives the hover fill, the on-accent text and the corrected readable text purely, so the values can be shown without saving.
Not in scope
The engine itself. theme-appearance.ts already ignores an unparseable accent and falls back, which is why this is a feedback problem rather than a correctness one.
Follow-up to #1358, which made
configuration.general.styles.accentreachable but as a plainstringinput. That was deliberate and is not sufficient.The gap
Type
bananainto the accent field and save. The save succeeds, the value is stored, and the site silently keeps the style template's own colour. Nothing tells the owner their input was not a colour, and nothing on the page changes, so the natural reading is that the feature is broken.arrayfields already show inline validation (config-editor.tsxrenders a per-field error under the control).stringfields have no such surface at all, so this is not a matter of adding a message to an existing mechanism.Why it was deferred
The editor renders
string,select,boolean,numberandarray. There is no colour type, so a picker needs a renderer case of its own. And a bare<input type="color">cannot express "unset", which is the value every live instance currently holds and the state an owner has to be able to return to. That is the same constraint that gave the font preset its explicit''"Theme default" option.What this needs
colorfield type with a renderer case: a picker paired with a hex text input, since the two have to stay in sync and the text input is what expresses empty.stringfields generally, so an accepted-but-meaningless value is visible at the point of entry rather than by its absence of effect.Worth pairing with a live preview:
theme-appearance.tsalready derives the hover fill, the on-accent text and the corrected readable text purely, so the values can be shown without saving.Not in scope
The engine itself.
theme-appearance.tsalready ignores an unparseable accent and falls back, which is why this is a feedback problem rather than a correctness one.