KhronosGroup / Vulkan-Site

Vulkan Documentation Project framework for integrated documentation site with spec, proposals, guide, and more
Other
25 stars 2 forks source link

Pressing Enter in the search bar does nothing #12

Closed AntonioNoack closed 1 year ago

AntonioNoack commented 1 year ago

I'd expect that to open a page of results.

Also, when opening the search for the first time, it was quite laggy. Typing in "raytracing", the page gets stuck for about 0.7s after "ra" has been typed.

AntonioNoack commented 1 year ago

"framebuffer" got stuck a moment after "fr" as well.

AntonioNoack commented 1 year ago

It's fine when the page is loading results, and hopefully shows that. What is not fine is when the input field doesn't add the letters as I am typing them.

AntonioNoack commented 1 year ago

Also, I retyped them without reloading the page, and got the same lag. Search queries probably should be cached for a session. Since nobody types THAT much, it would be fine to store the typed queries and their results locally (localStorage).

oddhack commented 1 year ago

I'd expect that to open a page of results.

Are you seeing results in a popup underneath the searchbox?

The lag appears to be due to a, hopefully easily fixable logic issue in the Antora Lunr search extension, though it's also possible that the huge size of the Vulkan spec is aggravating matters. I am hopeful the Antora folks will be able to come up with an answer soon and am surprised other projects using the search extension haven't run into this already.

This is approximately the same issue as #3.

AntonioNoack commented 1 year ago

"Are you seeing results in a popup underneath the searchbox?" Yes, but I'd still kind of expect a results page.

And yes, let's hope it's fixable, and it indeed looks very similar to #3 :).

oddhack commented 1 year ago

On the "enter -> open a page of results", we are limited to how the Antora Lunr search extension operates, which is to present results in a popup underneath the searchbar. We could make a feature request on their issue tracker although since it's an OSS project, that is likely to be kicked back with a suggestion that we develop and contribute such functionality. So I would not expect this anytime soon. Fixing the search extension to reduce the lagginess seems something they're more engaged with and that impacts many projects with big search indices, probably.

oddhack commented 1 year ago

@AntonioNoack the current site (https://docs.vulkan.org/) has search improvements and is no longer so badly lagging. As commented previously, we are using the Antora Lunr extension's method of presenting search results, and it's unlikely we would try to change that any time soon. I encourage you to open an issue on that repository if you want to request a behavior change in how the extension works. Closing this as mostly fixed and remainder not something actionable by us.