-
Couldn't load subscription status.
- Fork 4.6k
Block Visibility: show snackbar when hiding block #72027
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
|
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. |
|
Size Change: +140 B (+0.01%) Total Size: 1.95 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 17d0b2c. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18209373178
|
|
Nice! Looks good. I guess it needs a quick code gut check. |
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.
Works for me, thanks for the follow up. It's helpful to have confirmation of this action.
packages/block-editor/src/components/block-visibility/menu-item.js
Outdated
Show resolved
Hide resolved
packages/block-editor/src/components/block-visibility/menu-item.js
Outdated
Show resolved
Hide resolved
…m.js Co-authored-by: Ramon <[email protected]>
packages/block-editor/src/components/block-visibility/menu-item.js
Outdated
Show resolved
Hide resolved
|
@jasmussen @ramonjd Thanks for the review! |
What?
Shows a snackbar when hiding the selected block.
Screenshots in Windows OS: The shortcut key should be
⌃⌥Oin MacOSWhy?
When the Hide button is clicked, the selected block is visually hidden, and users may not know how to enable the block again.
How?
One problem may be that this snackbar will be displayed even when the block is hidden via the List View. This is because the same options dropdown component is used in both the List View and the block toolbar. I'm a bit hesitant to do this because it would likely require changing the behavior of public components.
Testing Instructions
Hide a block and confirm the snackbar.
Screenshots or screencast
4ae12de94dff9f57c3f99a915be14e70.1.mp4