nuxt-themes/docus

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 in runtimeConfig. There's no option to disable either of them. I wish there was a flag to enable/disable both search functionalities directly from nuxt.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.

Screenshot 2023-08-01 at 4 15 13 PM

How it happened that you have both AppSearch and DocsSearch?

atinux commented

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.

atinux commented

Completely agree and very sorry about this, will land a fix ASAP

Verified v1.14.6 resolved this issue. Thanks a lot, @atinux for the fast response 🙏.