-
Notifications
You must be signed in to change notification settings - Fork 32
feat: search box #241
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: search box #241
Conversation
Requries leanprover/verso#267, but the search code is by @jakobvase |
@jakobvase the live search results seem to be vertically misaligned. Looks like the term (on the left) is top justified, while the category (on the right) is bottom justified within the flex container. ![]() |
Yeah that's how I wanted it to work. If you view it on mobile or a smaller screen, or if the term is long, the category is displayed below the term. But you're right that on your screenshot it looks off. I'll see if I can improve that. |
This is a search box, and autocomplete functionality is not necessary.
Is it possible with the available time to additionally indicate that there were more results not in the list? Ideally the bottom might say something like "Showing 30/150 results", or potentially just "Showing the first 30 results", so that there's some indication that it was truncated? I think that the current design communicates that all the results are present, which could be really frustrating. Other than that, assuming that the spelling correction is what's turning |
This was a little complex to get to work, since it didn't show up when navigating the search results with the keyboard, but it's working now.
I've increased the limit to 30, removed autocorrect on ios, and added the "showing n/m results". I see the "!" as "1" too, but only some of the time. I haven't had the time to dig into it - I can see if I have time later this week, but I don't see it as a blocker. I agree it has to be fixed soon. |
This is much nicer! Thank you! |
I've changed the basic approach from reading what key the user entered to read what is in the combobox. This also means that searching for α works, which I think it didn't before.
This gets the Z-index fix for the ToC
This makes the search box work for "IO monad"
Preview for this PR is ready! 🎉 (also as a proofreading version). built with commit c78da68. |
OK, I think it's finally good to go. Thanks again! 🚀 |
Adds a search box that uses Verso's internal metadata for a live index.