Skip to content
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

De-emphasise bulk actions on Grid layout #63302

Closed
Tracked by #63128
jameskoster opened this issue Jul 9, 2024 · 12 comments · Fixed by #64209
Closed
Tracked by #63128

De-emphasise bulk actions on Grid layout #63302

jameskoster opened this issue Jul 9, 2024 · 12 comments · Fixed by #64209
Assignees
Labels
[Feature] Data Views Work surrounding upgrading and evolving views in the site editor and beyond Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@jameskoster
Copy link
Contributor

jameskoster commented Jul 9, 2024

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 update the design so the checkbox appears on hover/focus/focus-within above the preview in the zstack:

Screenshot 2024-08-02 at 15 37 53

Optional extra: Move the actions menu too, giving the title more room to breathe in smaller grids.

@jameskoster jameskoster changed the title Explore 'show on hover/focus' pattern for checkboxes in grid layout (needs design) De-emphasise bulk actions on Grid layout Jul 9, 2024
@jameskoster jameskoster added [Type] Enhancement A suggestion for improvement. Needs Design Needs design efforts. [Feature] Data Views Work surrounding upgrading and evolving views in the site editor and beyond labels Jul 9, 2024
@jameskoster
Copy link
Contributor Author

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?

select.mp4

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.

@jameskoster jameskoster added Needs Design Feedback Needs general design feedback. and removed Needs Design Needs design efforts. labels Jul 9, 2024
@annezazu
Copy link
Contributor

annezazu commented Jul 9, 2024

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
Copy link
Contributor

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

overlay

@ellatrix
Copy link
Member

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

@jameskoster
Copy link
Contributor Author

@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 #63193. Selecting the bulk checkbox in the Footer could expose per-item checkboxes.

@jasmussen
Copy link
Contributor

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
Copy link
Contributor Author

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.

@jasmussen
Copy link
Contributor

This makes me think the preview probably should be mandatory.

Can the preview field be mandatory for just the grid layout? If yes, then it seems reasonable, since that layout itself is meaningless without a preview.

@jameskoster
Copy link
Contributor Author

Can the preview field be mandatory for just the grid layout?

Yes that's what I meant 👍

In Grid layout the Preview field is always visible and cannot be toggled off. If the data doesn't include a preview field then Grid layout is disabled.

This unlocks the ability to overlay the checkbox (and potentially the actions) 'on top' of the preview, and reveal on hover/focus-within:

Screenshot 2024-08-01 at 18 11 07

@jorgefilipecosta jorgefilipecosta self-assigned this Aug 1, 2024
@jasmussen
Copy link
Contributor

Let's try it.

@jameskoster
Copy link
Contributor Author

Let's get some technical feedback on the feasibility. @youknowriad @jorgefilipecosta how do you feel about the idea of Grid layout and a Preview field being exclusive? IE the Grid layout is only applicable when the data provides a preview.

@youknowriad
Copy link
Contributor

If I'm not wrong right now, the preview field is already kind of mandatory. If you don't provide it, you get a placeholder area. So I don't see any blocker in moving the select on top of the "preview" area.

@jameskoster jameskoster added Needs Dev Ready for, and needs developer efforts and removed Needs Design Feedback Needs general design feedback. labels Aug 2, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Data Views Work surrounding upgrading and evolving views in the site editor and beyond Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants