-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Make BlockPopover
component public
#61529
Make BlockPopover
component public
#61529
Conversation
BlockPopover
component publicBlockPopover
component public
Hi there!, Thanks for opening this PR. I would love more opinions on the PR (maybe @ellatrix) but I think making this component a public one is fine. But I'd probably make the two unstable props "private" before opening the component. (have a private version of the component and a public one) |
packages/block-editor/README.md
Outdated
@@ -207,6 +207,10 @@ _Related_ | |||
|
|||
Undocumented declaration. | |||
|
|||
### BlockPopover | |||
|
|||
Undocumented declaration. |
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.
Adding a JSDoc to the component helps with this. Also the component already has a README, so you might be able to reuse the README content.
I updated the PR, and I'm opening it to be reviewed. I:
Let me know if I missed something! Thanks for the help! |
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 If 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. |
That looks good to me. I'd appreciate a second opinion @WordPress/gutenberg-core |
It's a useful component that I reach for a lot e.g. when building UIs for block supports. I imagine making it public might make it possible to build more advanced design tooling in plugins which is great. So I'm a 👍. Before making it public let's be sure to check that there are no APIs (props, etc.) that we want to clean up first. |
Dev Note: BlockPopover Component PublicThe |
What?
Note
This PR is just a draft to get feedback. If making sense to make the
BlockPopover
component public, I would suggest marking it as an unstable API and improving the documentation.This PR makes the
BlockPopover
component public.Why?
Currently, a consumer can add the Gutenberg toolbar block with the
BlockToolbar
component. Hoverwer, theBlockToolbar
isn't flexible, and it is complex to hide/show different buttons and text.Making
BlockPopover
public allows a consumer to create a customBlockToolbar
and customize it according to application needs.This PR could be part of #53874.
You can check woocommerce/woocommerce#47323 and woocommerce/woocommerce#47322 for a real-use case.
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast