Skip to content

experimental theme: a setting that changes a part's resting look keeps its hover and keyboard focus visible... - #13235

Merged
josephfarina merged 1 commit into
feature/theme-editorfrom
josephfarina/editor-rest-look-keeps-states
Nov 21, 2026
Merged

josephfarina merged 1 commit into
feature/theme-editorfrom
josephfarina/editor-rest-look-keeps-states

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

User impact

astryx experimental theme editor keeps a part's hover and keyboard focus visible when a setting changes its resting look: a resting background shorthand gives the part's hover and press Core's layer back; Core's focus and hover rings are drawn over a resting shadow, so a bevel never covers them; and a resting outline gives the part's focus state Core's focus outline back. A state the theme sets itself keeps what it set.

Problem and solution fit

The theme editor is experimental. Each change is one behaviour of its set or how commands, with its own test, and touches nothing outside packages/cli/api/theme-edit.

Smallest restoration

  • .changeset/experimental-theme-rest-look-keeps-hover-focus.md | 7 ++
  • packages/cli/api/theme-edit/_settings.mjs | 151 +++++++++++++++++++++++++++-
  • .../cli/api/theme-edit/theme-part-state-wins-build.test.mjs | 2 +-
  • packages/cli/api/theme-edit/theme-part-text-sits-core.test.mjs | 2 +-
  • .../theme-edit/theme-rest-look-keeps-hover-and-focus.test.mjs | 137 +++++++++++++++++++++++++
  • .../cli/api/theme-edit/theme-resting-shadow-part-rings.test.mjs | 36 ++++++-
  • .../cli/api/theme-edit/theme-state-part-states-changed.test.mjs | 2 +-
  • .../api/theme-edit/theme-titles-shadows-alpha-state.test.mjs | 2 +-

Evidence

Tests on this layer (CI=1, applied on its base in order):

  • packages/cli/api/theme-edit/theme-part-state-wins-build.test.mjs
  • packages/cli/api/theme-edit/theme-part-text-sits-core.test.mjs
  • packages/cli/api/theme-edit/theme-rest-look-keeps-hover-and-focus.test.mjs
  • packages/cli/api/theme-edit/theme-resting-shadow-part-rings.test.mjs
  • packages/cli/api/theme-edit/theme-state-part-states-changed.test.mjs
  • packages/cli/api/theme-edit/theme-titles-shadows-alpha-state.test.mjs

The whole packages/cli/api/theme-edit suite on the top of this stack fails only what its base fails in the same environment (app-copy and compile-check fixtures); eslint and prettier are clean on the changed files.

Scope

Components: theme editor (CLI, experimental)

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

preflight: pass e12e7e9 (review deferred to batch: subagent cap)

Replaces #12766, which merged into the theme-editor branch and was reverted there before its replay; same commit.

replay: worse 0 at e12e7e9

…s its hover and keyboard focus visible: a resting background shorthand gives the hover and press their layer back, Core's rings go over a resting shadow, and a resting outline gives the focus state Core's focus outline back
@vercel

vercel Bot commented Nov 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 21, 2026 7:07am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 21, 2026
@astracat-bot

astracat-bot Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🔄 In progress (for maintainers only) Nov 21, 2026, 7:07 AM UTC

@josephfarina
josephfarina changed the base branch from main to feature/theme-editor November 21, 2026 07:08
@josephfarina
josephfarina merged commit 060248a into feature/theme-editor Nov 21, 2026
127 of 131 checks passed
@josephfarina

Copy link
Copy Markdown
Contributor Author

Taken out of landing #13226 because the review of the combined head flagged a line this change made. It stays on the working branch and rides the next landing together with its fix: open the fix as a new pull request (base main or the working branch) whose description names #13235.

josephfarina added a commit that referenced this pull request Nov 21, 2026
… a state the theme sets, and keeps the theme's own focus outline properties

Fixes the cases from #13235: a resting background with no --when replaced a hover background the theme set for one variant with Core's overlay; the written-back press had no enabled guard, a combined --when got no hover or press back, and the written-back hover had no (hover: hover) condition; and any focus outline setting stopped Core's focus outline from coming back, so outline-color on focus then outline none left no visible keyboard focus. Each restored state now writes background-image: revert-layer in the setting's own scope, so Core's own rule shows through.
josephfarina added a commit that referenced this pull request Nov 21, 2026
… a state the theme sets, and keeps the theme's own focus outline properties

Fixes the cases from #13235: a resting background with no --when replaced a hover background the theme set for one variant with Core's overlay; the written-back press had no enabled guard, a combined --when got no hover or press back, and the written-back hover had no (hover: hover) condition; and any focus outline setting stopped Core's focus outline from coming back, so outline-color on focus then outline none left no visible keyboard focus. Each restored state now writes background-image: revert-layer in the setting's own scope, so Core's own rule shows through.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…s its hover and keyboard focus visible... (#13235)

Reviewed pull request #13235, merged into the theme working branch. It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
… a state the theme sets, and keeps the theme's own focus outline properties

Fixes the cases from #13235: a resting background with no --when replaced a hover background the theme set for one variant with Core's overlay; the written-back press had no enabled guard, a combined --when got no hover or press back, and the written-back hover had no (hover: hover) condition; and any focus outline setting stopped Core's focus outline from coming back, so outline-color on focus then outline none left no visible keyboard focus. Each restored state now writes background-image: revert-layer in the setting's own scope, so Core's own rule shows through.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…ook keeps its hover and keyboard focus visible... (#13235)"

#13235 was held on this working branch on an open review finding (HQ rule, 11-21): it returns as a pull request against main with its fix folded in.
@josephfarina

Copy link
Copy Markdown
Contributor Author

Reverted on the theme editor working branch: it was held there on an open review finding past the deadline. Please re-open it as one pull request against main with the fix folded in.

This branch was successfully deployed

1 active deployment
Preview — e12e7e93 Deployed Nov 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant