WordPress / gutenberg

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

De-emphasise bulk actions on Grid layout #63302

Open jameskoster opened 2 weeks ago

jameskoster commented 2 weeks ago

In Grid layout checkboxes are permanently visible giving outsized emphasis to bulk actions. They aren't so visible on the Table layout which is arguably the layout most optimised toward bulk actions.

Let's explore ways we can update the grid layout design so that bulk actions are always within reach, but not so in-your-face.

jameskoster commented 2 weeks ago

Currently it's possible to select grid items using cmd+click. This may be too buried as the only affordance if we were to visually hide checkboxes, but if we updated the mechanic to work on click (similar to List layout), that might work?

https://github.com/WordPress/gutenberg/assets/846565/d9dd4b82-ae70-4983-9a7a-1b6f7d24f771

The drawback to this approach is that when all fields are hidden, the click target would be very small, given the title + preview already serve as links to the Editor.

cc @WordPress/gutenberg-design for thoughts.

annezazu commented 2 weeks ago

Came here to open this exact issue. I find it very odd that we emphasize bulk editing when the only action that can be taken is a destructive one.

jasmussen commented 2 weeks ago

Dropbox does this, which doesn't seem unreasonable, and would match the DOM order:

overlay

ellatrix commented 2 weeks ago

Why not just show the checkboxes after you press "Bulk Edit"?

jameskoster commented 2 weeks ago

@jasmussen the challenge with that approach is that there may be data view consumers that utilise Grid layout, but do not supply a Preview field. There may be a case for making a Preview field a pre-requisite for Grid layout (which would unlock this idea), but that's a different discussion.

@ellatrix that's a good point, when figuring out solutions here we should consider the updated bulk actions UI design in https://github.com/WordPress/gutenberg/issues/63193. Selecting the bulk checkbox in the Footer could expose per-item checkboxes.

jasmussen commented 2 weeks ago

there may be data view consumers that utilise Grid layout, but do not supply a Preview field. There may be a case for making a Preview field a pre-requisite for Grid layout (which would unlock this idea), but that's a different discussion.

Is there a way to preview how that would look at the moment? If we do want to support this, which can bevalid enough, the idea might still work with some clever use of whitespace, padding, and flexing. But I'd need to see what that state looks like at the moment to figure it out.

jameskoster commented 2 weeks ago

Is there a way to preview how that would look at the moment?

Only by manually hiding elements in dev tools:

Screenshot 2024-07-10 at 16 07 18

The grid layout kind of falls apart without the preview. It's also hard to imagine when the Grid layout would be preferable to other layouts when no preview is visible.

This makes me think the preview probably should be mandatory.