browserpass / browserpass-legacy

Legacy Browserpass repo, development is now happening at:
https://github.com/browserpass/browserpass-extension
MIT License
1k stars 80 forks source link

Filter the list of already discovered passwords #211

Closed maximbaz closed 6 years ago

maximbaz commented 6 years ago

I open github.com, click on browserpass and see two results: github.com/work and github.com/personal. I'd like to filter this list down, type wo and leave only github.com/work in place. However by doing this I don't want to add wordpress.com to the list, I'm not searching, I'm filtering passwords here.

These are the initial requirements that I came up with, feel free to comment/suggest:

sophacles commented 6 years ago

The filter/search differentiation and cancelling filter to return to search can be handled like this: (reusing your example above)

sophacles commented 6 years ago

Regarding:

The filtering should be in real time, I type w and the list is immediately being filtered, no pressing "Enter". If there is only one result left, pressing "Enter" should select it (this will also fix #40).

Can the keypress handler also be used for normal search to do real-time search as well (based on filter/search mode setting)? I know that's a different ticket probably, but bringing it up here as it may influence how the code for filter is designed.

maximbaz commented 6 years ago

I like the idea of how you describe filter/search, it reminds me of how Chromium draws search bar for custom searches:

filter

Can the keypress handler also be used for normal search to do real-time search as well?

I tried that at some point, it sounds cool but in reality it was a weird experience, I have hundreds of passwords and typing one letter changes the results list in a very unexpected way, especially when you press Backspace and the list suddenly grows with 20 new records, or when you clear the search box to type a completely new domain and the list fills up with all of your 100 passwords...

Filtering on keypress makes sense, because you are filtering a very limited subset of records and no unusual matches ever popup, but after that experiment I believe searching on keypress is too weird.

sophacles commented 6 years ago

Oh nice gif! That's exactly what I was describing - I didn't realize it was from Chromium, just knew it was a pattern I've encountered before that works here :).

Re real-time search - that makes sense.