Repository navigation
UI: Remove the ThemeProvider compatibility fallback and private APIs dependency - #87837
Conversation
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: 0 B Total Size: 8.73 MB
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome 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. inserts patterns by dragging and dropping from the global inserter in
|
bfb887a to
4e57a07
Compare
…dependency No component mounts ThemeProvider since the Tooltip change, so the fallback and its lock-unlock module have no runtime consumer. Tests import ThemeProvider from @wordpress/theme directly. Keep @wordpress/ui in the private APIs allowlist, because published versions still opt in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
063062a to
1f7851d
Compare
|
I'll merge as soon as required CI checks pass to fix a static analysis error on trunk |
What?
Follow-up to #87817. Removes the
ThemeProvidercompatibility fallback from@wordpress/ui(utils/theme-provider.ts), itslock-unlock.tsmodule, and the@wordpress/private-apisdependency.Why?
The fallback resolved
ThemeProviderfrom the private APIs of older@wordpress/themeruntimes. Its only runtime consumer wasTooltip.Popup, which stopped mountingThemeProviderin #87817. Now only tests use it.None of the removed modules are exported, so there is no public API change and no dev note.
How?
ThemeProviderfrom@wordpress/theme.@wordpress/private-apisfrompackage.json, the lockfile and the three tsconfig references.check-private-apis.config.jsonexceptions that pointed at the deleted file. Tooltip: Invert the theme's neutral tokens instead of nesting a dark ThemeProvider #87817 made them stale, so the "Check private API usage in bundled packages" job fails ontrunkuntil this PR merges.@wordpress/uistays in the private APIs allowlist, with a "Do not remove" comment. Published versions, such as0.15.1, still opt in at load time, so plugins bundling them would throw without the entry.privateApis.ThemeProvider.Testing Instructions
npm run test:unit:vitest -- packages/ui packages/private-apis. All tests should pass.npm run typecheck -- packages/ui/tsconfig.jsonandnode tools/validation/check-private-apis.mjs. Both should pass.npm run storybook:devand open Components > @wordpress-ui > Tooltip > Default. The tooltip should look the same as in Tooltip: Invert the theme's neutral tokens instead of nesting a dark ThemeProvider #87817.Testing Instructions for Keyboard
No interaction changes.
Screenshots
No visual changes.
Use of AI Tools
Written with Claude Code (Claude Opus 5.5), at my direction: Claude made the change, ran the checks, and drafted this description.
🤖 Generated with Claude Code