Settings: redesign the Themes tab as a visual library - #626
Closed
nickhamze wants to merge 4 commits into
Closed
Conversation
AllTerrainDeveloper
approved these changes
Aug 18, 2026
The redesigned tab is a native radio group, and a native radio group selects as focus moves. Here selecting is not editing a preference: `pick()` swaps the desktop stylesheet, repaints every themed icon, and the first time a user wears a theme it seeds that theme's recommended dock size, layout and effects over whatever they had arranged, then records the slug so the offer is never made again. Arrowing past six themes on the way to the seventh fired all of that six times and burned six one-shot seeds, silently and unrecoverably. So the group keeps its semantics but activation is manual: arrows move focus, Space or Enter or a click commits. That is the bargain every other picker in this panel already makes — <os-swatch> tiles are buttons inside a role="radiogroup" and have never selected on focus. The selected radio also bound `?checked`, the attribute. Once an input has been clicked its dirty-checkedness flag is set and the attribute stops reflecting to the property, so a desktop whose worn theme left the library — deleted, or its plugin deactivated — repainted with the stage reading "OpenStation" and no radio checked at all. Bind the property. Three tokens nothing declares: --os-ui-shadow-sm, --os-ui-shadow-md and --os-ui-focus always resolved to their fallback literal, so they were unthemeable names a theme author would never find in the slot list. --os-ui-focus mattered visibly — it fell through to --wp-admin-theme-color, painting focus in the WordPress admin colour while the checked ring two rules away painted Pulse. Route them to --os-ui-card-shadow-hover and --os-ui-focus-ring, and add the resting --os-ui-card-shadow that was the one genuinely missing sibling. The focus rule has to sit after :checked: they weigh the same, so source order was the only thing deciding which ring a focused, selected card wore, and :checked was winning it. The system miniature stays spelled out in literals — it depicts a fixed thing and has to keep depicting it while the user wears something else, or the OpenStation card would repaint itself in Legacy's greys and lie about the option it is offering. But the literals are now real values from variables.css. #8e5cf6 and #ff8f6b were in no palette at all, and the purple-to-orange title bar matched no OpenStation window: real ones are --os-titlebar-bg over --os-window-bg. Everything that is chrome rather than depiction — the artwork wash, the letterboxes, the Current badge — reads its token. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
AllTerrainDeveloper
enabled auto-merge (squash)
August 18, 2026 23:16
`--os-ui-card-shadow` was declared in the palette but never added to the Legacy snapshot, so `test_legacy_answers_every_palette_literal` failed on both PHP 8.3 and 8.4: the resting elevation the Themes library needs came back Void on a theme that exists to keep the pre-brand look. Answering it meant choosing between two fallbacks, because two rules were reading the one name for different jobs — the choice card at rest (`rgba( 0, 0, 0, 0.07 )`) and the "Current" badge sitting on the preview art (`rgba( 0, 0, 0, 0.3 )`). That is the collapse AGENTS.md warns about: the moment the palette declared the shared token both resolved to the same value, and the badge lost the heavier shadow it needs to read against arbitrary imagery. So the badge gets its own name. `--os-ui-card-mark-shadow` keeps it themeable and keeps it distinct from the card it sits on, and Legacy answers both at the value its own consuming rule falls back to. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Collaborator
Author
auto-merge was automatically disabled
August 18, 2026 23:40
Pull request was closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Test plan
PHPUnit was not run locally because this change does not touch PHP and Docker Desktop is unavailable. CI will run the complete PHP matrix and Plugin Check.