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

feat: make search results scrollable #35

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

benediktms
Copy link
Contributor

Closes #3

@benediktms
Copy link
Contributor Author

@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

@@ -97,7 +97,7 @@

<style>
.container {
height: 100%;
height: 350px;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be 100% ? Cause that makes the window large but without anything inside...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes true probably something like

height: 100%;
max-height: 350px;

is needed

@ParthJadhav
Copy link
Owner

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
Copy link
Contributor Author

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

@benediktms
Copy link
Contributor Author

benediktms commented Jan 14, 2023

@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
Copy link
Owner

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 benediktms marked this pull request as ready for review January 17, 2023 10:22
@benediktms
Copy link
Contributor Author

@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

@benediktms benediktms changed the title Make search results scrollable feat: make search results scrollable Jan 17, 2023
@ParthJadhav
Copy link
Owner

Idk why my scroll bar looks better😄
Screenshot 2023-01-18 at 6 28 15 PM

@benediktms
Copy link
Contributor Author

Hmm are you using any global themes or something?

@ParthJadhav
Copy link
Owner

Nope @benediktms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add scroll feature to display all results
2 participants