-
Notifications
You must be signed in to change notification settings - Fork 101
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 “select all” & “select none” option to checkboxes #835
base: main
Are you sure you want to change the base?
Conversation
Nice! I tested the branch with https://github.com/alleyinteractive/fieldmanager-demos and with the checkboxes from the screenshot in #834, and it worked as expected. Some high-level comments:
|
Thanks for trying this out and sharing thoughtful feedback @dlh01!
I hadn't thought about it, but sure, I can get on board with that.
I'm not opposed to buttons like in your screenshot, and the argument that we can adopt core styles and benefit from core themes is reason enough for me. I considered something similar at first but moved to the UI I chose because I felt it was a pretty common pattern around the web (screenshot below for posterity). Here's a similar example from kayak.com: I looked around the WordPress Admin and the common UI pattern seems to be a single checkbox that represents all or none. See this screenshot from the menu manager, which is probably most similar: All that said, I don't have a strong preference here but agree with going with either your approach or one matching the menu manager. Do you have a preference between the two @dlh01?
You win, we can paint the bike shed blue! 😉 I like bulk actions, I'll rename things to that.
My two cents is that the top generally works best. In my opinion, adding it to the bottom requires that the list be limited in height and scrollable (like the menu manager screenshot) -- which is not out of the question to do alongside this change. But without that, if a user had a list of 100 items, they'd have to scroll down the page to get to the select all/none. I don't have a strong opinion this except that I don't particularly favor adding a top-or-bottom option here... decisions over options, after all. |
I pushed up the "Select all" toggle checkbox to kick around |
I think, probably, my personal favorite is the dual-links approach like the Kayak screenshot, which I think could be more-or-less be achieved with the The single-checkbox approach that core takes always seemed so-so for me. I would think (although I'm assuming) that it's not intuitive to many users that you have to "select all" before you can "select none," not to mention that "select none" requires an extra click if only some boxes are checked. But...I can see the value in providing an experience that looks and feels like core. So maybe that'd be slightly where my preference would be, if reluctantly. One thing I noticed in my testing of the PR: If I manually check all the boxes, the "Select all" box doesn't become checked, unlike in core. (If I check "Select all," then uncheck a box, "Select all" becomes unchecked as expected.) |
Something to get the conversation started.
Resolves #834