-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Labels
[Package] Theme/packages/theme/packages/theme[Package] UI/packages/ui/packages/ui[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] TaskIssues or PRs that have been broken down into an individual action to takeIssues or PRs that have been broken down into an individual action to take
Description
What problem does this address?
Using private APIs in bundled packages like @wordpress/ui (example) can cause issues for downstream projects that depend on them, due to the unavailability of private APIs, or the potential for multiple versions of the @wordpress/private-apis package due to bundling.
What is your proposed solution?
Avoid using private APIs in @wordpress/ui.
Options to consider:
- Recommended: Create a new
@wordpress/theme/theme-providerexported entrypoint that's used internally or by external consumers using the npm package directly, i.e. not through thewp.window global.- Noting that this could still cause some duplication of the component with the one that would end up being shipped as the
wp.window global (private) component.
- Noting that this could still cause some duplication of the component with the one that would end up being shipped as the
- Alternative: Promote
ThemeProviderto a public API.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Package] Theme/packages/theme/packages/theme[Package] UI/packages/ui/packages/ui[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] TaskIssues or PRs that have been broken down into an individual action to takeIssues or PRs that have been broken down into an individual action to take