feat(settings): give ui.theme a device override
Theme joins text scale, text weight, and high contrast as a profile default with an optional per-device override, resolving profile_device -> profile -> default. The right theme is partly a function of the screen and the room — a light theme on a phone in daylight, a dark one on a TV at night — which is the same reasoning the other three appearance keys already used. All four appearance settings now cascade consistently, which also means one rule to explain in the UI rather than "these three follow the device, that one does not". ui.custom_theme_vars and ui.custom_css stay profile-wide. They are authored styling rather than a contextual preference, so a profile's custom tokens still apply on top of whichever theme a device resolves to. Recorded in the definition notes because it is a visible consequence: vars tuned against a dark theme will sit on top of a light one if a device overrides the theme. Widening those to profile_device later is an additive revision bump if it turns out to matter. Part of #376. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -417,8 +417,8 @@
|
||||
"key": "ui.theme",
|
||||
"introduced_in": 1,
|
||||
"persistence": "remote",
|
||||
"allowed_scopes": ["profile"],
|
||||
"resolution_order": ["profile", "default"],
|
||||
"allowed_scopes": ["profile", "profile_device"],
|
||||
"resolution_order": ["profile_device", "profile", "default"],
|
||||
"value_schema": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
@@ -435,7 +435,7 @@
|
||||
"label": "Theme",
|
||||
"description": "Colour theme for the Silo interface.",
|
||||
"recommended_control": "select",
|
||||
"notes": "Renamed from the unregistered legacy key \"ui_theme\", which the extension bag accepted without validation. Moved from account to profile scope: appearance is per household member, and the account row is copied to every profile during migration. Adding a theme is an additive enum widening. The admin-set default theme stays in server_settings and is not a user setting."
|
||||
"notes": "Renamed from the unregistered legacy key \"ui_theme\", which the extension bag accepted without validation. Moved from account to profile scope: appearance is per household member, and the account row is copied to every profile during migration. Carries a device override because the right theme is partly a function of the screen and the room — a light theme on a phone in daylight, a dark one on a TV at night — which is the same reasoning that gives ui.text_scale one. Note that ui.custom_theme_vars and ui.custom_css stay profile-wide, so a profile's custom styling still applies on top of a device's theme override. Adding a theme is an additive enum widening. The admin-set default theme stays in server_settings and is not a user setting."
|
||||
},
|
||||
{
|
||||
"key": "ui.text_scale",
|
||||
|
||||
Reference in New Issue
Block a user