Skip to content

Private APIs: Remove design system packages from packages using private APIs - #80215

Closed
aduth wants to merge 2 commits into
trunkfrom
remove/theme-private-apis
Closed

Private APIs: Remove design system packages from packages using private APIs#80215
aduth wants to merge 2 commits into
trunkfrom
remove/theme-private-apis

Conversation

@aduth

@aduth aduth commented Jul 13, 2026

Copy link
Copy Markdown
Member

What?

Updates @wordpress/private-apis internal list of packages using private APIs to reflect the fact that @wordpress/theme and @wordpress/ui no longer use private APIs.

Follow-up to: #78958 (comment)

Why?

This list should reflect the current reality of packages using private APIs.

Tracking issue for @wordpress/ui removing private APIs: #75319

#78958 removed API locking from @wordpress/theme.

Timing-wise, this also pairs well with ongoing stabilization of the theme package , which was promoted to a stable package in #80049.

Testing Instructions

I suppose you could try to use the lock or unlock mechanism with this package name and verify that it no longer allows you to lock or unlock.

Use of AI Tools

No AI was used.

@aduth
aduth requested a review from a team July 13, 2026 20:37
@aduth aduth added [Type] Code Quality Issues or PRs that relate to code quality [Package] Private APIs /packages/private-apis labels Jul 13, 2026
@aduth
aduth requested a review from ciampo July 13, 2026 20:39
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: aduth <aduth@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: jsnajdr <jsnajdr@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

Copy link
Copy Markdown

Size Change: -5 B (0%)

Total Size: 7.71 MB

📦 View Changed
Filename Size Change
build/scripts/private-apis/index.min.js 1.13 kB -5 B (-0.44%)

compressed-size-action

@ciampo ciampo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice clean up 🚀

- Allow `@wordpress/global-styles-engine` to opt in to private APIs. ([#79104](https://github.com/WordPress/gutenberg/pull/79104))
- Allow `@wordpress/global-styles-engine` to opt in to private APIs ([#79104](https://github.com/WordPress/gutenberg/pull/79104)).

### Code Quality

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather use the ### Deprecations header here. That's a better description, even if we're not literally doing a typical API deprecation. "Code Quality" are usually internal refactorings that are invisible to the consumer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also wouldn't add the new entry under "Code Quality", but I would choose "Internal" instead

'@wordpress/routes',
'@wordpress/storybook',
'@wordpress/sync',
'@wordpress/theme',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, wait a moment — the theme package is still using private APIs at this time

@ciampo

ciampo commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

I just realized that, after the changes from #79594 and #79620, both @wordpress/ui and @wordpress/theme still use private APIs. We will be able to remove the ThemeProvider private export/import starting from WordPress 7.3.

I believe we can close this PR for now.

@ciampo ciampo closed this Jul 14, 2026
@aduth

aduth commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

Good catch @ciampo 🙏 I was unquestioningly catching up on my backlog task in #78958 (comment) and neglected to consider the partial revert that came later. Thanks for flagging that, and let's plan to revisit this once we can remove that compatibility layer.

Glad to see that the tests caught it as well.

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

Labels

[Package] Private APIs /packages/private-apis [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants