Untangling Select: dropdowns vs autosuggest fields #57852
Replies: 5 comments
-
My gut feel is that:
|
Beta Was this translation helpful? Give feedback.
-
i'll try to distill what i've written in the previous discussion about this:
|
Beta Was this translation helpful? Give feedback.
-
I agree 100% that we have been missing an auto complete component (to be used with regular inputs), and hence overuse the Select component. |
Beta Was this translation helpful? Give feedback.
-
Talked about this with @JoaoSilvaGrafana and @staton-hyse11 and identified three common uses cases where we use Select currently:
Any additional components we develop should have sufficient visual differentiation between them so the user expectations match functionality (e.g. no search + cursor if not searchable). No immediate plans for any changes here, but something to keep in mind for future work. |
Beta Was this translation helpful? Give feedback.
-
Hello, as you may have heard, we are transitioning away from using discussions to discuss feature requests. Due to the age and number of responses to this discussion, we are deciding to close it. If this is something you would like to see in Grafana, feel free to open an issue so the discussion can continue. Thank you! |
Beta Was this translation helpful? Give feedback.
-
Problems with Select:
Many interfaces in Grafana make heavy use of our Select component for letting the user select a value from a list, with the ability to filter the list down by a search value. As Grafana (and it's users) have grown, we've spotted a few shortcommings of the current Select component:
Technically, we're actively working on improving the performance of Select, but this would not address the UX shortcomings of the component. It's clear that Select needs usability improvements, and possibly a new component for where a select/dropdown isn't best suited.
What others do
Consider the Dropdown component vs Autosuggest in Braid Design System. Dropdown is described as being for 'smaller lists', with Autosuggest as an alternative for 'larger lists':
The Dropdown component described as being for "smaller lists", and is used for selecting from a small list of predetermined items (does not allow for freeform input to select a value not in the list, yet supports jumping to an item by typing, like native controls) where it's plausible that the user will manually select a value by scrolling + clicking.
Autosuggest instead is presented as an enhanced text field, that provides suggestions as you type to complete, but does not require the select of a predetermined value. The user is never presented with a complete list of options, and it's theoretically 'infinite'.
Although it lacks an autosuggest/complete field, Radix's Select also keeps to a similar pattern of a small, fixed list with no text field search.
Notable examples
Datasource picker
Datasource picker presents a dynamic list of items that admin users have entered. The list is usually small enough to scroll through and pick a value, though you might not know exactly what it's called, so searching is also useful. It's never valid to enter a value that's not in the list, as you cannot query a data source that doesn't exist!
Prometheus metric picker
Presents all metric labels from a prometheus instance. Hundreds or thousands of options. Although admins would set up a prometheus server, many other users may push metrics into the instance, so they might not have control over how many options are presented. Users are probably at least starting to search for something, then scroll through options and pick one. While we can accurately predict what valid options are, it's not completely invalid to enter a value that's not in the list - it would just create a query that doesn't return any results.
Considerations
Beta Was this translation helpful? Give feedback.
All reactions