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

Improve behaviour with Algolia search #66

Closed
ArtFlag opened this issue Jul 1, 2021 · 7 comments
Closed

Improve behaviour with Algolia search #66

ArtFlag opened this issue Jul 1, 2021 · 7 comments
Labels
enhancement New feature or request
Milestone

Comments

@ArtFlag
Copy link
Contributor

ArtFlag commented Jul 1, 2021

Feature suggestion

I suppose that most users that need a search bar will use the Algolia plugin provided by docusaurus.

Using this search, it can happen that you click on an API hit result, and it takes you to the right page, but not to the correct heading. Most probably because the page can take a bit too long to load, depending on your OAS file.

Here is an example. Notice that:

  • the first search takes me to the top of the API docs, instead of the correct header.
  • the second time I go to the search hit works fine, as the page is loaded.

example

I understand that the load times are purely redoc-related and there's nothing this great plugin can do about it. But maybe we could have some kind of property to manage a timer until the browser tries to reach the anchor.
I'm not sure how to deal with this issue.

Any ideas?

@rohit-gohri
Copy link
Owner

I think this would be solved by adding SSR support (#44)

@rohit-gohri rohit-gohri added the enhancement New feature or request label Jul 1, 2021
@ArtFlag
Copy link
Contributor Author

ArtFlag commented Jul 1, 2021

Great, you're already on it then 👍 Looking forward to see if that fixes this issue 🙂

@ArtFlag
Copy link
Contributor Author

ArtFlag commented Jul 1, 2021

One other thing:
On the video, you can see that the y scroll offset is incorrect once we get to the endpoint via the search.

Would this be also fixed by #44 or is it a different problem?

@rohit-gohri
Copy link
Owner

offset could be a different problem. Can you share a link to your site/repo so I can recreate the issue?

@ArtFlag
Copy link
Contributor Author

ArtFlag commented Jul 2, 2021

You can see it here, but the repo's private.

@rohit-gohri
Copy link
Owner

Did you fix the scroll offset somehow because it's not reproducible for me now.

@rohit-gohri rohit-gohri added this to the v0.5 milestone Aug 28, 2021
@rohit-gohri rohit-gohri modified the milestones: v0.5, v0.6 Nov 13, 2021
@rohit-gohri
Copy link
Owner

I think SSR should fix this, let me know if you try it out and problem still persists

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

No branches or pull requests

2 participants