-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Block Editor: Update conditions for displaying the empty block inserter #70897
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
e2cfbc1 to
98a82e7
Compare
|
Size Change: +9 B (0%) Total Size: 1.92 MB
ℹ️ View Unchanged
|
3376c50 to
ad063a9
Compare
|
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. |
ad063a9 to
9a3328d
Compare
|
Flaky tests detected in 9a3328d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/17398389697
|
andrewserong
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.
Code-wise this looks like a good and straightforward change, and UX-wise I really like this as it (possibly subjectively) improves the state for things like a freshly inserted cover block, where we show an inserter rather than the block toolbar now:
| Trunk | This PR |
|---|---|
![]() |
![]() |
This sounds like a good idea to me, so I'm going to give it the ✅, but feel free to seek a second opinion if you need design feedback on the desired UX at all.
LGTM 👍
| name: 'Select parent block: Cover', | ||
| } ) | ||
| ); | ||
| await selectBlock( 'Block: Cover' ); |
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 for testing and the review, @andrewserong! Let's merge it and see what users think about it. |



What?
Closes #33143.
Closes #48806.
Related #70764, #70903.
PR relaxes conditions for displaying an
EmptyBlockInserterinserter. The user should be able to replace the empty default block if it doesn't cause a content loss.Only changes to attributes with
role: contentor block bindings are considered block modifications, rather than any attribute changes like block styling.Note
This introduces a small behavior change for the default block (Paragraph), where the toolbar isn't visible until you add the content. Previously, it would become visible after changing the styling. Hence, the testing changes in this PR.
Testing Instructions
Testing Instructions for Keyboard
Same.
Screenshots or screencast