Selected users are buried in filter dropdowns#2465
Selected users are buried in filter dropdowns#2465dwstyagi wants to merge 1 commit intobasecamp:mainfrom
Conversation
Add #reorderItems method to sort combobox options with selected items appearing after exclusive items. The method: 1. Separates items into exclusive, selected regular, and unselected regular 2. Sorts selected/unselected items alphabetically by label 3. Reorders list as: exclusive > selected > unselected This improves usability by bringing selected options to prominent positions in the dropdown, making filters easier to review.
|
I would appreciate this! |
| const list = this.element.querySelector("[role='listbox']") | ||
| if (!list) return |
There was a problem hiding this comment.
While the implementation makes sense, I feel this might not be the right place for these changes. Here is why:
- Using the
role=listboxquery will add this reordering behaviour to all multi-selection comboboxes, whether you want it or not. You won't have any way to control this behaviour. Ideally, this should be handled using a target. - This behaviour could be moved to a different controller. The current controller manages the core combobox implementation and is working fine. Since reordering is a cosmetic change, we can use an additional controller (preferably one that inherits multi_selection_combobox) for it. This way, the concerns remain well-segregated and the code stays decoupled.
|
I'd be more inclined to agree if the dropdown was the only place to see who's assigned. But the list of assignees is clearly indicated even when the dropdown is closed. Alphabetical is the expected ordering and allows people to easily skip past irrelevant items while scrolling. That with the filtering field seems to offer enough ways to quickly find someone. Thanks for the suggestion, @dwstyagi, but I think we'll pass on this one. |
|
Yes, I think this is a useful extension to what we're already doing with moving "Me" to the top of the assignments popover. Which is to say: move the stuff you commonly choose to the top of the list; everything else stays below in alphabetical order. |
Problem
Selected users in filter dropdowns were buried in alphabetical order, making it difficult to see and manage current selections.
Steps to reproduce
Repeat for:
Expected behavior
Actual behavior
Selected users remain mixed with unselected users in alphabetical order, making them hard to find and manage.
Test plan
Summary
Filter dropdowns now show: