Skip to content

Selected users are buried in filter dropdowns#2465

Closed
dwstyagi wants to merge 1 commit intobasecamp:mainfrom
dwstyagi:bug/filter-dropdown-selected-users-ordering
Closed

Selected users are buried in filter dropdowns#2465
dwstyagi wants to merge 1 commit intobasecamp:mainfrom
dwstyagi:bug/filter-dropdown-selected-users-ordering

Conversation

@dwstyagi
Copy link
Copy Markdown

@dwstyagi dwstyagi commented Feb 2, 2026

Problem

Selected users in filter dropdowns were buried in alphabetical order, making it difficult to see and manage current selections.


Steps to reproduce

  1. Open the “Assigned to…” filter
  2. Select one or more users
  3. Observe the order of users in the dropdown

Repeat for:

  • “Added by…”
  • “Closed by…”

Expected behavior

  • Selected users should appear at the top of the dropdown (sorted alphabetically among themselves)
  • Unselected users should appear below (also sorted alphabetically)

Actual behavior

Selected users remain mixed with unselected users in alphabetical order, making them hard to find and manage.


Test plan

  • Open “Assigned to…” filter and select users → they should move to the top
  • Unselect a user → they should return to their alphabetical position
  • Repeat for “Added by…” and “Closed by…”

Summary

Filter dropdowns now show:

  • Selected users at the top (sorted alphabetically)
  • Unselected users below (sorted alphabetically)
  • Special options like “No one” remain at the very top

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.
@dwstyagi
Copy link
Copy Markdown
Author

dwstyagi commented Feb 3, 2026

@dhh @jeremy could you please review this PR when you get time? Thanks!

@philocalyst
Copy link
Copy Markdown

I would appreciate this!

@jeremy jeremy requested a review from jzimdars February 8, 2026 18:34
Comment on lines +137 to +138
const list = this.element.querySelector("[role='listbox']")
if (!list) return
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the implementation makes sense, I feel this might not be the right place for these changes. Here is why:

  1. Using the role=listbox query 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.
  2. 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.

@jorgemanrubia
Copy link
Copy Markdown
Member

@jzimdars @andyra what do you think of this one, usability-wise? makes sense to me but not 100% sure

@jzimdars
Copy link
Copy Markdown
Member

jzimdars commented Mar 3, 2026

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.

@jzimdars jzimdars closed this Mar 3, 2026
@andyra
Copy link
Copy Markdown
Contributor

andyra commented Mar 3, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants