Skip to content
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

Merged
merged 1 commit into from Jul 27, 2022

Conversation

dannycolin
Copy link
Collaborator

@dannycolin dannycolin commented Jul 19, 2022

Resolves #1103

Preview:

mac-filter-container-list

src/js/popup.js Outdated Show resolved Hide resolved
<div class="searchbar">
<label for="search-terms"
class="hide-label"
data-i18n-message-id="filterInputLabel">
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

Copy link
Member

@groovecoder groovecoder left a 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:

  1. Press Command + K
  2. Start typing anything
  3. The list of matching "things" gets smaller and smaller until there's just 1 item
  4. Press "Return/Enter" to use the 1 item

@dannycolin
Copy link
Collaborator Author

@groovecoder 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

I decided not to autofocus exactly because of the hidden functionality to open a 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?

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.

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.

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.

@groovecoder
Copy link
Member

Sounds good, thanks @dannycolin !

@groovecoder
Copy link
Member

Last idea-bomb: Maybe if someone types "f" for "filter" in the pop-up, that will auto-focus into the container filter input?

@dannycolin dannycolin merged commit b69b839 into mozilla:main Jul 27, 2022
Nomes77 added a commit to Nomes77/multi-account-containers that referenced this pull request Jul 30, 2022
@mozilla mozilla locked as resolved and limited conversation to collaborators Dec 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI Enhancement: Scrollable container list with search bar
4 participants