Skip to content

Boot: Merge root theme providers - #79679

Closed
ciampo wants to merge 2 commits into
trunkfrom
codex/merge-boot-theme-providers
Closed

Boot: Merge root theme providers#79679
ciampo wants to merge 2 commits into
trunkfrom
codex/merge-boot-theme-providers

Conversation

@ciampo

@ciampo ciampo commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What?

Follow up to #78587.

Tries merging the two adjacent boot root ThemeProvider instances so the root provider and .boot-layout use the same admin theme color context.

Why?

The overscroll fix in #78587 needs a body background token that resolves in the same theme context as .boot-layout. Using one root provider should make the document-level tokens forwarded by isRoot match the boot layout tokens, instead of requiring a separate foreground-token workaround in the generated wp-admin template.

How?

  • Removes the outer root ThemeProvider that only overrode background to #f8f8f8.
  • Makes the existing admin-color-scheme provider the root provider.
  • Updates the generated wp-admin body background to use --wpds-color-background-surface-neutral-weak, matching .boot-layout.

Testing Instructions

  1. Build and load a boot-powered wp-admin page, such as the Connectors page.
  2. Switch between at least the fresh and light admin color schemes.
  3. On macOS, overscroll past the top and bottom of the page.
  4. Verify the revealed body background matches the boot layout background.
  5. Verify no duplicate root ThemeProvider warning appears in the console.

Testing Instructions for Keyboard

No keyboard interaction changes are expected. Use keyboard navigation through the boot page and confirm focus order is unchanged.

Screenshots or screencast

Not included. This is an experiment to validate the provider structure discussed in #78587.

Use of AI Tools

This PR was drafted with help from OpenAI Codex. I reviewed the generated changes and ran the checks listed below.

Checks

  • npm run lint:js -- packages/boot/src/components/root/index.tsx packages/boot/src/components/root/single-page.tsx
  • git diff --check
  • npx tsgo --build packages/boot/tsconfig.json currently fails before these changes on missing generated worker-code modules in packages/vips and packages/video-conversion.

@github-actions

Copy link
Copy Markdown

Size Change: -20 B (0%)

Total Size: 7.61 MB

📦 View Changed
Filename Size Change
build/modules/boot/index.min.js 51.1 kB -20 B (-0.04%)

compressed-size-action

@ciampo

ciampo commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

In its current form, this PR breaks the @wordpress/components portalled overlays:

Before After
Screenshot 2026-06-30 at 13 44 34 Screenshot 2026-06-30 at 13 46 56

So I guess it's a no-go for now, until we either:

  • tweak @wordpress/components overlay and wrap them in a ThemeProvider to forward the correct theme;
  • switch to using @wordpress/ui overlays, which already forward the theme correctly

cc @WordPress/gutenberg-components

I'm going to close this PR for now.

@ciampo ciampo closed this Jun 30, 2026
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.

1 participant