-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Components: Expose Theme
via private APIs
#53262
Conversation
Flaky tests detected in 9ff62c0. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5737134101
|
@@ -20,7 +20,15 @@ import { useCx } from '../utils'; | |||
* | |||
* @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.
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
Theme
component via the@wordpress/component
private APIs.Why?
It's necessary for #53032, for usage outside of the
@wordpress/components
package.Any prior usages of that component were within the package, so it could be directly imported.
Usage of
Theme
was suggested by @mirka here: #53030 (comment)How?
Theme
to the list of@wordpress/components
private APIs,__experimentalTheme
exposition, which isn't the case),Testing Instructions
Theme
still works well in storybook.Testing Instructions for Keyboard
None
Screenshots or screencast
None