-
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
Add a delete control to toolbar on zoom-out mode #60214
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: +53 B (0%) Total Size: 1.72 MB
ℹ️ View Unchanged
|
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.
LGTM. Not sure if we want to limit the action for headers and footers, but that could be a followup.
Do we need to worry about that if #59249 lands? |
That'll land, but it won't limit selection of header and footer template parts.
Let's keep a close eye on this; it may be appropriate to not delete headers/footers. |
Actually, let's go ahead and omit the template parts from this. You can't edit them anyhow from the page perspective, the control does not do anything when viewing a page in the site editor. |
Does the trash icon render for locked blocks that cannot be deleted? |
edc4686
to
3851375
Compare
* add a delete button to zoomed out mode toolbar * remove delete button from template parts * don's show the remove button if block can't be removed --------- Co-authored-by: MaggieCabrera <[email protected]> Co-authored-by: draganescu <[email protected]> Co-authored-by: scruffian <[email protected]> Co-authored-by: richtabor <[email protected]>
What?
Closes #60121
Adds a delete button to the BlockSelectionButton toolbar
Why?
So we don't need to move out from zoom out mode if we insert the wrong pattern to delete it
Testing Instructions
In the site editor, click zoom-out mode.
Select one of the sections, the button should show on the toolbar and it should work as expected.
Screenshots or screencast