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
Add ability to filter the container list #2390
Conversation
<div class="searchbar"> | ||
<label for="search-terms" | ||
class="hide-label" | ||
data-i18n-message-id="filterInputLabel"> |
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 don't see this (Filter container list by name:
) in the GIF. How is this used?
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 label is for screen reader only.
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.
Code changes look good.
What if we make the pop-up auto-focus into this new container filter list? Or maybe so we don't break existing habits where people might immediately type "1" or "2" to open a container tab in the 1st or 2nd container ... can we make the filter box completely invisible? So, if I open the pop-up and start typing "pers" or "shop" (basically any character that's NOT a number), it will call filterContainerList
with what I've typed so far? And then, for mega bonus cherries, if the filtered list contains only 1 item, we auto-focus it, so pressing "enter/return" will open it.
I guess I'm thinking of the auto-filter/search experience in other apps:
- Press Command + K
- Start typing anything
- The list of matching "things" gets smaller and smaller until there's just 1 item
- Press "Return/Enter" to use the 1 item
I decided not to autofocus exactly because of the hidden functionality to open a container.
On a UX point of view, I'd be against hiding the input. I'm already not a fan of the hidden "press a number" function.
Actually, I want to implement something similar in a follow-up PR. Pressing Enter could open whatever the first element in the filtered list is. That first element should always be hightlighted and the starting point if you tab/arrow down so that would be easy to select other items in the list. However, all of this definitely needs UX work first so I'll merge this PR as-is and we can work on more advanced features in a follow up bug. |
Sounds good, thanks @dannycolin ! |
Last idea-bomb: Maybe if someone types "f" for "filter" in the pop-up, that will auto-focus into the container filter input? |
Resolves #1103
Preview: