Skip to content

Settings: redesign the Themes tab as a visual library - #626

Closed
nickhamze wants to merge 4 commits into
WordPress:trunkfrom
nickhamze:feat/themes-tab-redesign
Closed

Settings: redesign the Themes tab as a visual library#626
nickhamze wants to merge 4 commits into
WordPress:trunkfrom
nickhamze:feat/themes-tab-redesign

Conversation

@nickhamze

@nickhamze nickhamze commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace the cramped installed-theme card grid with a clear current-theme stage and preview-first personal library
  • make theme selection a native radio group with resilient fallbacks for missing themes, descriptions, and preview art
  • separate site-wide install/remove controls into an admin-only management drawer with explicit busy states
  • add responsive container-query layouts, reduced-motion behavior, and focused regression coverage

Test plan

  • npm run build
  • npm run lint
  • npm run typecheck
  • npm run test:js — 362 files / 4,502 tests passed
  • focused Themes tab and Playground Blueprint suite — 10/10 passed
  • responsive fixture QA at desktop and 520px widths; no horizontal overflow or browser-console errors

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.

Open WordPress Playground Preview

@AllTerrainDeveloper AllTerrainDeveloper left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Yep Nick, way better :)

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
AllTerrainDeveloper enabled auto-merge (squash) August 18, 2026 23:16
AllTerrainDeveloper and others added 2 commits August 19, 2026 01:22
`--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>
@nickhamze

Copy link
Copy Markdown
Collaborator Author

Superseded by the WordPress Appearance → Themes redesign in #627 and its runtime QA follow-up in #628. This earlier PR targeted OpenStation Settings → Themes, which was not the surface requested.

@nickhamze nickhamze closed this Aug 18, 2026
auto-merge was automatically disabled August 18, 2026 23:40

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants