feature: option to select search provider: DocSearch or AppSearch
Closed this issue · 7 comments
Recently in-app text search feature with the fuse
lib has been implemented. But this introduced a few minor UX issues.
Current behavior:
-
Currently, Algolia DocSearch and AppSearch components are enabled whenever there's an
algolia
property present inruntimeConfig
. There's no option to disable either of them. I wish there was a flag to enable/disable both search functionalities directly fromnuxt.config.js
. -
CMD + K keyboard shortcut brings up both the DocSearch component by Algolia and Fuse search component. Keyboard binding should only bring up one (active) search component.
How it happened that you have both AppSearch
and DocsSearch
?
Here's the link to the deployment: https://docs.hoppscotch.io
GitHub repo: https://github.com/hoppscotch/docs
package.json: https://github.com/hoppscotch/docs/blob/main/package.json
nuxt.config.json: https://github.com/hoppscotch/docs/blob/main/nuxt.config.ts
Would you prefer that we disable Fuse if you have Algolia @liyasthomas ?
Yes. Imo, if algolia keys are present, in-app search should be disabled. For backward compatibility purposes introducing Fuse should not disable Algolia search by default. And for those who hasn't setup Algolia DocSearch, Fuse will be enabled as well.
Completely agree and very sorry about this, will land a fix ASAP
Could you please test with https://github.com/nuxt-themes/docus/releases/tag/v1.14.6
Verified v1.14.6 resolved this issue. Thanks a lot, @atinux for the fast response 🙏.