-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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 llm model search #1322
Conversation
@kamilfurtak thx for the PR. Here a few things: Size of dropdowns should be always the same and not break into 2 lines (doesnt look good in my view): Accessibillty / Tab selection order is wrong. From Provider it goes to edit instead of to the model dropdown. See this GIF: |
Added keyboard support for toggling the dropdown using Enter or Space keys, improving accessibility. Also set appropriate focus properties by adding tabindex to the combobox element.
@leex279 Thanks for feedback. I made fixes to your comments and added small UI and accessibility improvements. |
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.
Working now as expected. Can be merged to main (by another Core Member)
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.
Reviewed and looks good! Will go ahead and merge this now. Thanks @kamilfurtak
This Pull Request updates the ModelSelector component to replace the traditional dropdown UI for selecting models with a searchable and keyboard-navigable dropdown menu. The changes aim to improve usability by providing enhanced search and navigation capabilities.
Introduced state variables for managing the search query, dropdown state, and keyboard navigation.
Added refs for handling search input focus and tracking dropdown options.
Users can now filter models by typing in a search box.
Models are dynamically filtered based on provider and search criteria.
Arrow keys support navigating between filtered models.
Other key events (Enter, Escape, Tab) provide improved dropdown interaction.
Removed standard element and replaced it with a custom searchable dropdown UI styled with class-based utilities for responsive design and interactivity. Enhanced user-focused interactivity: Automatically focuses the search input when the dropdown is opened. Highlights selected or focused items within the dropdown for accessibility.