ParthJadhav / Verve

Verve is a lightweight and blazingly fast launcher for accessing and opening applications, files and documents. ⚡
GNU Affero General Public License v3.0
658 stars 25 forks source link

feat: make search results scrollable #35

Open benediktms opened 1 year ago

benediktms commented 1 year ago

Closes #3

benediktms commented 1 year ago

@ParthJadhav Do you know if the Tauri web vies support custom scroll bars? Only resources I could find on this are firefox specific or use webkit. But it seems Tauri doe snot support this (see below). The functionalty works, but the scroll bar is quite ugly... One option is to simply hide it and hope the user understands tha thtey can just scroll 🤷‍♂️

Screenshot 2023-01-12 at 14 23 37

ParthJadhav commented 1 year ago

So, I checked the code and there are few problems with that..

  1. The window is expanded at starting.
  2. The App search is okay. But if u try to get the full drive search with these changes, It would take ages for the result to even show up 😄 It would try to go into every directory searching for that thing.

My suggestion would be to load around 10 results at search. And keep loading other results on a separate thread to around 50 results. I guess 50 results would be sufficient.

i'd like to know your opinions on it.

benediktms commented 1 year ago

Yes that makes sense. I'll experiment a bit with this and let you know 👍

benediktms commented 1 year ago

@ParthJadhav few things I'd like to ask:

  1. I'm not sure how multi threading the current implementation can guarantee 50 results, since I'm not sure how split the limit in a way where it is resumable from one thread to the other (i.e. taking into account the existing results).
  2. If limiting the result search to 50, is multithreading even necessary?
  3. Maybe it makes sense to implement multi-threading in rust_search instead?
ParthJadhav commented 1 year ago

Well, I guess it's not needed at all. Sorry for the wrong tip. I don't think it would cost a lot to get few results.

Let's do 15 results. I don't think any human would scroll more then 15 results if he didn't find his answer in first 5 or 8. So Lets just change the limit from 5 to 15...

benediktms commented 1 year ago

@ParthJadhav I'm not happy with the scroll bars but I am unsure how to style them if the webviews don't support CSS for this

ParthJadhav commented 1 year ago

Idk why my scroll bar looks better😄

Screenshot 2023-01-18 at 6 28 15 PM
benediktms commented 1 year ago

Hmm are you using any global themes or something?

ParthJadhav commented 1 year ago

Nope @benediktms