feat: add search to dropdown and multi-select fields#753
feat: add search to dropdown and multi-select fields#753gosiexon-zen wants to merge 1 commit intomasterfrom
Conversation
| "@types/react": "^17.x", | ||
| "nwsapi": "^2.2.20" | ||
| "nwsapi": "^2.2.20", | ||
| "@zendeskgarden/container-utilities": "^1.0.0" |
There was a problem hiding this comment.
It was to fix a Rollup build error. The @zendeskgarden/react-dropdowns.legacy package imports KEY_CODES from @zendeskgarden/container-utilities, but that export only exists in v1.x. Our package.json has @zendeskgarden/container-utilities at ^2.0.2 in dependencies, and v2.x removed the KEY_CODES export — so the legacy dropdowns package couldn't resolve it and the build failed.
- But this is already fixed in Melissa's PR: Remove legacy react dropdowns #751
9966bca to
475a925
Compare
475a925 to
8b837ff
Compare
|
could you run yarn build and re-commit assets? currently shows a 91 thousand lines change |
Fredx87
left a comment
There was a problem hiding this comment.
Some general comments:
Difference with Support
I noticed a couple of differences between this component and the one in support. It doesn't need to be exactly the same, but it would be nice to have some consistency.
In our case, the search results are presented "flat" (both for tagger and multiselect):
while in Support they are presented with the full path:
I think it is nicer to see the full path, since we also show it when an item is selected. It also nice that it highlights the search string
Second difference, when an item is selected from search in the Tagger component, we don't show it as selected when the user opens the combobox, in some cases we show a completely different set of options where the selected one is not visible (in this case "precision" is selected):
While support always show the right option as selected:
I think this is a big problem for a11y. for a screen reader user there is no way to know which option is currently selected.
There are also some differences in how we present things (search placeholder, no results, ...). This may be ok since are coherent with the lookup fields
Duplicated logic
There is a lot of duplicated logic in the two components around the search logic, like search state, filtered options, .... It would be better to consolidate it in a single hook, maybe even reusing the useNestedOptions hooks
No tests
There are no tests for the search logic and the components. It is true that we don't have tests for these two components right now, but we can take the opportunity to add them
Translation strings
Probably it is better to create a separate PR with the translations string only, so we avoid releasing this with untranslated strings
I said it countless time, but there is no need to commit the assets, they just create noise and also conflicts to resolve, without any benefit. The only helpful thing is the ability for others to test the branch without previewing locally, but I if I need to I just checkout the branch and run the preview |
8b837ff to
68535fb
Compare
- Add search functionality to Tagger and MultiSelect fields - Create useFieldSearch hook to consolidate duplicated search logic - Add HighlightMatch component for search result highlighting - Add comprehensive tests for hook and components - Show full path for nested options in search results - Navigate to parent group after selecting nested option in Tagger - Reset to root group when focusing MultiSelect after search Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
68535fb to
52702e5
Compare
|
I'm not exactly a typescript expert but how is the |
Description
Added possibility to search in drop-down fields: Tagger and MultiSelect component. DropDown component is used only for system fields.
PR with translations: #758
Jira: GG-3415 & GG-3416
Screenshots
Screen.Recording.2026-02-13.at.12.00.05.mov
Checklist