-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: implement fuzzy search and dropdown grouping in SelectDropdown component #2431
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
feat: implement fuzzy search and dropdown grouping in SelectDropdown component #2431
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mocks for the Popover and related components force the dropdown to open, but they don’t simulate behavior for different option types (e.g., separators vs. shortcuts). While acceptable as a temporary workaround, consider refining these mocks or adding integration tests to simulate real interactions as per our testing guidelines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'X' icon used to clear the search leverages a <div> with an onClick handler. For accessibility, consider replacing it with a <button> element or adding appropriate ARIA roles and tab index to ensure it's keyboard-navigable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fuzzy search and grouping logic is implemented directly in the component. For improved modularity and testability (per our standards on modular code and reusable utilities), consider extracting the fuzzy search and grouping functionalities into separate helper functions or hooks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The search input lacks an aria-label, which is important for accessibility. Consider adding an aria-label attribute to the input element to improve screen reader support.
| <input | |
| <input aria-label="Search input" |
|
Nice. I have wanted fuzzy search in our long dropboxes for a while. Thanks for the contribution! |
af99ea6 to
d8bf63b
Compare
mrubens
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I can do it quickly, one sec |

Context
Improve UI UX in chatarea, this pr introduce fuzzy search box into mode & provider profile
Implementation
Using fzf to select-dropbox
ScreenCast
https://www.loom.com/share/5e69ee75da0044aaa41e98d8b13f6b40?sid=0b084a44-d811-4a0f-8a93-f5035fb01510
How to Test
Get in Touch
Important
Implement fuzzy search and dropdown grouping in
SelectDropdownusingfzfand refactor to usePopover.SelectDropdownusingfzf.Popoverinstead ofDropdownMenufor dropdown rendering.SelectDropdowninselect-dropdown.tsxto usePopover,PopoverContent, andPopoverTrigger.select-dropdown.test.tsxto mockPopovercomponents.This description was created by
for af99ea6079c372188fcebe0b420f6c8e866a6534. It will automatically update as commits are pushed.