Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.

Unified search mode #93

Open
pureooze opened this issue Jan 6, 2019 · 5 comments
Open

Unified search mode #93

pureooze opened this issue Jan 6, 2019 · 5 comments

Comments

@pureooze
Copy link
Member

pureooze commented Jan 6, 2019

As mentioned by @MattsJones in #92 we can add a unified search mode that allows the user to search all modes at once. This might have some performance issues that would need to be addressed. Also need to figure out how users would use the mode.

@pureooze
Copy link
Member Author

pureooze commented Jan 6, 2019

@MattsJones would you like to work on the changes required for this?

@mattcompiles
Copy link
Contributor

Hey Bud. I'm interested but just a matter of finding time atm. I was thinking that history might be tricky as it seems slower than the other modes so maybe leave that out for now?

Also, I liked the idea of having different types of results in one box with icons stating what type they were. Not sure if you had any thoughts on it.

@pureooze
Copy link
Member Author

pureooze commented Jan 11, 2019

Hey Bud. I'm interested but just a matter of finding time atm. I was thinking that history might be tricky as it seems slower than the other modes so maybe leave that out for now?

We can do some benchmarks and see how much of a difference there is in speed with and without history. If it is a noticeable difference then yeah maybe we can remove it.

Also, I liked the idea of having different types of results in one box with icons stating what type they were. Not sure if you had any thoughts on it.

The color on the left side of each suggestion indicates the type as well as the icon on the right side when a suggestion is selected. I'm not sure if that is enough or if the types even matter to users? 🤷‍♀️

To implement this feature I think you should just be able to modify the code for recentlyViewed: https://github.com/lusakasa/saka/blob/master/src/suggestion_engine/server/providers/recentlyViewed.js#L73-L78

Note that this code is messy and inefficient. If you can think of a better way to do it feel free to use that. 😄

@eejdoowad
Copy link
Member

I think Vimium works around performance constraints by maintaining an in-memory history cache. Fauxbar works even better, but uses websql, which is being deprecated.

@mattcompiles
Copy link
Contributor

mattcompiles commented Jan 16, 2019

Did a little bit of work on this and have been running it on my machines to try it out.

Current changes are:

  • Added bookmarks into recently viewed search mode. Probably need a new mode or a rename if we actually add this.
  • Run all async code in parallel. Haven't checked if this increases perf much but seems like an easy win.
  • Returning no results when the search is empty. I feel this is cleaner as it's very difficult to suggest anything useful as the search could be for anything.
  • Not overwriting the search result type with recentlyViewed so each result shows its actual type (bookmark, openTab, etc). I like the idea you can see what each result is but not sure it's really valueable. The current color coding doesn't really mean anything. Would like to try adding labels to see if it helps.

My experience is positive so far though. I've switched to this as my default mode and haven't found a need to use any other modes. I love the "don't care where, just find it for me" style of search. Honestly id be happy if the extension just had this one mode but that might be just me haha. Also perf is slightly slower, I can feel a small delay. But it still feels responsive enough for me to use effectively.

If you're interested here's my work in progress code. Tests still failing lol. https://github.com/mattsjones/saka/tree/unified-search

@pureooze pureooze pinned this issue Sep 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants