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

Search does not find "docsVersionDropdown" #3293

Open
joshribakoff opened this issue Aug 16, 2020 · 9 comments
Open

Search does not find "docsVersionDropdown" #3293

joshribakoff opened this issue Aug 16, 2020 · 9 comments

Comments

@joshribakoff
Copy link

@joshribakoff joshribakoff commented Aug 16, 2020

📚 Documentation

Pasted "docsVersionDropdown" into search box at top right of the docs page & hit enter, nothing happens. Search seems broken?

Have you read the Contributing Guidelines on issues?

yes

@slorber
Copy link
Collaborator

@slorber slorber commented Aug 17, 2020

Hi,

Search is not broken, it does not look up inside code blocks, and this string only appears in a codeblock.
https://v2.docusaurus.io/docs/theme-classic/#navbar-docs-version-dropdown

So it's more a docs issue: we should add every options available in code blocks documented outside of code blocks, so that search can find it. Do you want to improve the doc of these items?


See also

#3172 (comment)

Algolia says searching in code blocks is likely to degrade the search experience, so I guess we should follow his recommendations.

@s-pace as you can see this problem is quite common :) if Algolia could search in Docusaurus 2 code blocks that would likely be very helpful. Not sure you can do about it right now, just wanted to let you know about this new issue ;)

@slorber slorber changed the title search is broken Search does not find "docsVersionDropdown" Aug 17, 2020
@joshribakoff
Copy link
Author

@joshribakoff joshribakoff commented Aug 17, 2020

Actually, yes, search was broken. I could not search at all last night. Today I can search again.

It wasn't even popping up saying "no results found", literally nothing happened just like I said. Maybe Algolia was down & there is insufficient feedback to the end user if it is down?

@joshribakoff
Copy link
Author

@joshribakoff joshribakoff commented Aug 17, 2020

Ah, I see the problem. If you paste a search term that simply has 0 results, you get no feedback. If you type the term in character by character, you at least have a chance to see some results & then see them go away.

Ideally there should be a popup that says "no results found for 'docsVersionDropdown'", right now it just acts like the search is broken.

@slorber
Copy link
Collaborator

@slorber slorber commented Aug 17, 2020

image

To me it does exactly that, no?

@s-pace
Copy link
Contributor

@s-pace s-pace commented Aug 17, 2020

Same as @slorber

I couldn't reproduce this issue. I can confirm you that the search was up last night.

@joshribakoff
Copy link
Author

@joshribakoff joshribakoff commented Aug 17, 2020

https://youtu.be/5YCfHz_R4j0

video showing the reproduction.

@s-pace problem wasn't search being down, as I clarified in follow-up comment. Its confusing UX. See the video :)

@slorber
Copy link
Collaborator

@slorber slorber commented Aug 17, 2020

@joshribakoff this is docusaurus v1, v1 does not even have docsVersionDropdown feature 🤪

But still, there's the docs / search problem that search can't find it either on v2 due to appearing in a code block

@s-pace
Copy link
Contributor

@s-pace s-pace commented Aug 17, 2020

Yes the issue is only on docusaurus v1. There is no "no result" dropdown.

@joshribakoff
Copy link
Author

@joshribakoff joshribakoff commented Aug 17, 2020

@slorber that also explains the "no results" :)

@s-pace that seems correct, up to you all whether to backport the fix from v2 to v1 or not, just figured I'd make you aware.

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.