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
Algolia: Search integration only works on full-width searchbox, not on narrow pages #739
Comments
|
It kinda sounds like from v3's reference docs, like it only works with one input box: https://docsearch.algolia.com/docs/api/#container
|
|
I just realised maybe this is why you encourage setting To avoid having multiple search elements. I set that, and I'm still getting all the search elements in the screenshots above. |
|
The algolia branch of Graphviz is up here: https://gitlab.com/markhnsn/graphviz.gitlab.io/-/commits/algolia if it would help to reproduce. |
|
Ok that's weird, it should work fine if you don't have the sidebar search enabled. Let me do some investigating. |
|
Cross-referencing bugs: I have filed algolia/docsearch#1109 on DocSearch to ask for their help too. |
|
I too have Hopefully if this issue is fixed, it will resolve that problem too. |
Hi there, I just integrated Algolia DocSearch v2 on www.graphviz.org, but I'm having some trouble.
The search works for the full-width page, where search is at the top right (note there are search results):
But it doesn't work if the page is a little narrower, and the searchbox moves to above the sidenav (note no search results):
Nor do I get any results for the narrowest width:
And if I press enter it takes me to /?q=attrs, which 404s:
Here's my config:
My guess is the event handlers are only being attached to a single
.td-search-inputelement, but we have multiple of them. Let's check:The full-width searchbox has event listeners:
The medium-width searchbox has no event listeners:
Nor does the smallest-width searchbox:
So I think the practice of having multiple search boxes for responsive design isn't working well with DocSearch. Maybe we need to rethink how this integration works. Possibly we could move to DocSearch v3 at the same time (#738).
algolia/docsearch#230 seems to be the same issue on DocSearch's repo. I'm not clear if algolia/docsearch#230 (comment) means this is doable in v3 or not.
The text was updated successfully, but these errors were encountered: