WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.56k stars 4.22k forks source link

Make it clearer how to remove a block #32085

Open simison opened 3 years ago

simison commented 3 years ago

What problem does this address?

Removing blocks is a fairly hidden feature behind the three dots dropdown, and requires multiple clicks, making it a more tedious task with multiple blocks.

Screenshot of menu item to remove block

https://user-images.githubusercontent.com/87168/119115894-5c9e3200-ba30-11eb-8584-fb2db329340c.mov

Context

There generally are two ways to build a page layout:

When using a ready-made starting point, it's common to need to remove some of the demo content to "shape" the layout where you want it to be.

I believe patterns and page templates are the easiest way to start for many, so shaping these patterns should be as obvious as possible, too. A good example of this clarity is the "replace" button for images; not something you'd think you need until you get a ready-assigned image from a pattern.

In the case where you build things from scratch, such needs might not be as pronounced. You're considering additions more carefully and might not have as much need to go "back and forth".

What is your proposed solution?

I know the block toolbar is already busy (https://github.com/WordPress/gutenberg/issues/24805) but I'd submit that removal is such common action that it makes sense a top-level item.

Proposed remove button visual

Perhaps this same icon can somehow tie into locking indicators as well (https://github.com/WordPress/gutenberg/issues/29864) in cases where you cannot remove the block, but are free to move it around?

cc @mtias (and others) you probably know to point me to prior conversations/reasoning, as I'm sure there's plenty that I'm missing here!

mtias commented 3 years ago

There's definitely plenty of history here :) Notably https://github.com/WordPress/gutenberg/issues/7216

This action as added and removed from the toolbar a couple times in the past. The general thinking is removing is something that needs to work well with backspace when the block is selected.