Skip to content

Site Editor: Mark root ThemeProvider as isRoot - #81178

Closed
mirka wants to merge 1 commit into
trunkfrom
edit-site-theme-provider-isroot
Closed

mirka wants to merge 1 commit into
trunkfrom
edit-site-theme-provider-isroot

Conversation

@mirka

@mirka mirka commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

What?

Marks the Site Editor's root ThemeProvider as isRoot.

Follow up to #81112

Why?

The Site Editor already wraps its layout in a root ThemeProvider seeded with admin theme colors, but it was missing isRoot. Without it, design tokens are scoped to the provider's wrapper div and are not forwarded to the document element. Portaled UI (modals, popovers, tooltips) rendered outside the React subtree cannot inherit those tokens.

The post editor and widgets editors already use isRoot on their root providers. This brings the Site Editor in line with them.

Testing Instructions

  1. Start wp-env and build the branch (npm start).
  2. Open the Site Editor (/wp-admin/site-editor.php).
  3. Switch admin color schemes under Users → Profile (e.g. Ocean, Midnight, Sunrise, Light).
  4. Reload the Site Editor and confirm WPDS-styled UI reflects the chosen scheme's primary/accent colors.
  5. Open portaled UI (e.g. a modal or popover in the Site Editor) and confirm it inherits the admin color scheme tokens.

@mirka mirka self-assigned this Aug 4, 2026
@github-actions github-actions Bot added the [Package] Edit Site /packages/edit-site label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Size Change: +1 B (0%)

Total Size: 7.81 MB

📦 View Changed
Filename Size Change
build/scripts/edit-site/index.min.js 310 kB +1 B (0%)

compressed-size-action

@mirka

mirka commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

Closing in favor of wrapping Popover content in ThemeProvider at the components level instead (see popover-theme-provider branch).

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

Labels

[Package] Edit Site /packages/edit-site

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant