WordPress / gutenberg

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

Data Views: when trying to bulk edit on a site with many pages, the bulk edit option counts up #63150

Open annezazu opened 3 months ago

annezazu commented 3 months ago

When selecting the bulk edit option, the option to select all counts up in situations where you have 20+ pages:

https://github.com/WordPress/gutenberg/assets/26996883/6507c0b9-45ef-44f1-904e-efcfca3ef90c

This gets worse the more pages you have visible and have on your site. This is using WP 6.5.5 & GB 18.7.1 & Chrome on MacOS. You can replicate this using this link (might make you login) which will spin up a playground instance of the site I found this issue on.

jorgefilipecosta commented 3 months ago

Good catch @annezazu, I think this happens because the permissions of the user need to be checked to make sure the user can execute some action, while the permission checks are in place the count goes up.

There are some mitigations:

@WordPress/gutenberg-design any thoughts on the best path forward?

jasmussen commented 3 months ago

Not show the count while permission checks are in progress. Do not show the bulk edit UI at all while the checks are in progress.

None of those options necessarily seem great.

The thing is, select all is actually select all on the current page, not select all across every page. Correct?

Gmail has this thing where first you click this checkbox to select across all: Screenshot 2024-07-09 at 11 35 28

That checkbox serves also as a dropdown, and is essentially the bulk-edit tool for gmail. By being a checkbox at the top of the column of checkboxes, it also implies you are selecting all on this page.

Once you do, and you have more pages, you'll see a message such as this:

Screenshot 2024-07-09 at 11 35 21

Outside of an argument to consider the same checkbox+dropdown interface for the bulk tool, one thing we could do would be to lean into the idea that "select all" is for the current page. I don't know that we need to change the wording, but we certainly don't need to check permissions do do expensive counts for anything other than the current page. I.e. the count can only ever be between the bounds of 1 and [items per page].

Secondly when selecting all, we could show either a snackbar, a notice, or that floating bulk toolbar at the bottom, to show a similar action as that of Gmail: Select all items. For this interface, we could consider showing all items in the taxonomy.

What do you think?

jameskoster commented 3 months ago

I suppose this would be indirectly resolved by updating the bulk edit interface as suggested in https://github.com/WordPress/gutenberg/issues/63193 (which needs design feedback).

The Snackbar select-all affordance is neat!