-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Components: Expose Theme via private APIs
#53262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Flaky tests detected in 9ff62c0. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5737134101
|
| * @example | ||
| * ```jsx | ||
| * import { __experimentalTheme as Theme } from '@wordpress/components'; | ||
| * import { privateApis as componentsPrivateApis } from '@wordpress/components'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should add the unlocking in the example. Maybe just mention it's private? Whatever we decide here, should also apply to the other private components too(not for this PR). --cc @mirka
We could also do that in a follow up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, agreed - I was a bit torn about whether to include it or not, so I've removed that part from the example in 87e9815
Happy to do follow-up updates if anyone has a further suggestion.
ntsekouras
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the comments about readme usage, the change is straight forward. I'll pre-approve. Thanks!
9ff62c0 to
87e9815
Compare
What?
This exposes the existing
Themecomponent via the@wordpress/componentprivate APIs.Why?
It's necessary for #53032, for usage outside of the
@wordpress/componentspackage.Any prior usages of that component were within the package, so it could be directly imported.
Usage of
Themewas suggested by @mirka here: #53030 (comment)How?
Themeto the list of@wordpress/componentsprivate APIs,__experimentalThemeexposition, which isn't the case),Testing Instructions
Themestill works well in storybook.Testing Instructions for Keyboard
None
Screenshots or screencast
None