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

arrow up causing crashed when using @docusaurus/theme-search-algolia #5031

Closed
4 of 5 tasks
vagusX opened this issue Jun 22, 2021 · 9 comments · Fixed by #5135
Closed
4 of 5 tasks

arrow up causing crashed when using @docusaurus/theme-search-algolia #5031

vagusX opened this issue Jun 22, 2021 · 9 comments · Fixed by #5135
Labels
bug An error in the Docusaurus core causing instability or issues with its execution external This issue is caused by an external dependency and not Docusaurus.

Comments

@vagusX
Copy link

vagusX commented Jun 22, 2021

🐛 Bug Report

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io
  • I have read the console error message carefully (if applicable)

Description

(A clear and concise description of what the bug is.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

Steps to reproduce

Use https://new.docusaurus.io to create a CodeSandbox reproducible demo of the bug.

(Write your steps here:)

  1. Press Cmd + K
  2. Press (arrow up)
  3. Page is crashed

image

Expected behavior

No crashing

(Write what you thought would happen.)

Actual behavior

(Write what happened. Add full console log messages and screenshots, if applicable.)

Your environment

  • Public source code:
  • Public site URL:
  • Docusaurus version used:
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0):
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS):

Reproducible demo

https://docusaurus.io/docs/api/themes/@docusaurus/theme-search-algolia

@vagusX vagusX added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Jun 22, 2021
@slorber
Copy link
Collaborator

slorber commented Jun 22, 2021

@vagusX I'm sorry but I can't reproduce on that page

https://docusaurus.io/docs/api/themes/@docusaurus/theme-search-algolia

image

As this issue has been reported first on the Ant design website (apparently), why are you reporting it to Docusaurus? Ant Design website is not using Docusaurus. I can reproduce it on the Ant design website, not on Docusaurus website.

@shortcuts is this issue known?

@shortcuts
Copy link
Contributor

Hi,

I'm not able to reproduce this issue in an up-to-date DocSearch v3 experience (with ant design index https://2ppfv.csb.app/)

@slorber do you have a link where I could see the issue on the Ant design website?

@vagusX if you can still reproduce on your side, could you please let me know which User Agents are sent with the query? They should contain the version of the DocSearch and Autocomplete library, which might gives a hint.

@slorber
Copy link
Collaborator

slorber commented Jun 22, 2021

I can reproduce it on the url reported here ant-design/ant-design#31040: https://ant.design/

@vagusX
Copy link
Author

vagusX commented Jun 22, 2021

@slorber would you like to clean all recent items and try it again?

@vagusX
Copy link
Author

vagusX commented Jun 22, 2021

Same issue @shortcuts
image

The component version is here https://github.com/facebook/docusaurus/blob/master/packages/docusaurus-theme-search-algolia/package.json#L16

I just found the code is archived https://github.com/francoischalifour/autocomplete.js/blob/ds-react/src/DocSearchModal.tsx (the latest code is different with @docsearch/[email protected])

I just wonder where is @docsearch/react source code repo? @francoischalifour told me that should fire a issue at the repo?

@shortcuts
Copy link
Contributor

Yep the repo of the underlying library is now https://github.com/algolia/autocomplete, thanks for pointing that out! The PR I've opened (algolia/autocomplete#599) will also fix this issue.

@vagusX
Copy link
Author

vagusX commented Jun 22, 2021

Yep the repo of the underlying library is now algolia/autocomplete, thanks for pointing that out! The PR I've opened (algolia/autocomplete#599) will also fix this issue.

Wow, just looking forward for this fix pr release.

@shortcuts would you like to tell that when your pr ship out.

@gearcoded
Copy link

To reproduce the issue, you need to open the search popup and make sure that no entries are displayed. If there are previous search entries, you can remove them.
Then press the Up Arrow and the page will crash.

@shortcuts
Copy link
Contributor

Update: this PR has been merged but didn't solved the DocSearch issue, I've found an other related issue which should solve it: algolia/autocomplete#623

The DocSearch update will be released by the end of the week!

@Josh-Cena Josh-Cena added external This issue is caused by an external dependency and not Docusaurus. and removed status: needs triage This issue has not been triaged by maintainers labels Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution external This issue is caused by an external dependency and not Docusaurus.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants