Skip to content

Gate v2 Site Editor styles for classic themes - #79229

Closed
scruffian wants to merge 1 commit into
trunkfrom
scruffian/v2-classic-gating
Closed

scruffian wants to merge 1 commit into
trunkfrom
scruffian/v2-classic-gating

Conversation

@scruffian

Copy link
Copy Markdown
Contributor

What?

Adds v2 Site Editor gating so unsupported classic themes do not get the Styles menu or Styles canvas, while classic themes with Style Book support keep access.

Why?

V1 already has classic-theme fallback behavior for Style Book and unsupported screens, but v2 registered the Styles route/menu without the same support checks.

How?

The v2 menu registration now checks block-theme and classic Style Book support, and the v2 Styles route/stage share a support helper that shows the unsupported notice and skips the canvas when unavailable.

Testing Instructions

  1. Activate a block theme and confirm admin.php?page=site-editor-v2 still shows Styles, Navigation, Pages, Templates, Template Parts, and Patterns.
  2. Activate a classic theme with editor styles or theme.json support and confirm v2 still shows Styles and the Style Book preview.
  3. Activate a classic theme without Style Book support and confirm v2 hides Styles and direct /styles access shows the unsupported-theme notice.

Testing Instructions for Keyboard

Repeat the testing steps using keyboard navigation and confirm focus reaches the available menu items and unsupported notice.

Screenshots or screencast

N/A

Use of AI Tools

Used OpenAI Codex to implement the change, run checks, and prepare this PR.

@github-actions

github-actions Bot commented Jun 16, 2026 •

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 8.59 MB

compressed-size-action

@github-actions

github-actions Bot commented Jun 16, 2026 •

Copy link
Copy Markdown

Flaky tests detected in 5d45dff.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/27623782229
📝 Reported issues:

@scruffian
scruffian force-pushed the scruffian/v2-classic-gating branch from 52b3ecf to 5d45dff Compare June 16, 2026 14:11
@scruffian scruffian mentioned this pull request Jul 6, 2026
4 of 14 tasks
@youknowriad

Copy link
Copy Markdown
Contributor

Need to check what's left but I think, I've landed a fix for this.

@youknowriad
youknowriad deleted the scruffian/v2-classic-gating branch August 17, 2026 13:00
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