Docusaurus: Update to Algolia DocSearch v2

Created on 2 Dec 2017  路  4Comments  路  Source: facebook/docusaurus

I noticed Algolia has a v2 of their docsearch.js snippet (see https://community.algolia.com/docsearch/documentation/)

It looks like a breaking change, as simply loading the new file introduces some inconsistencies in React Native's search drop down (v2 requires a new css stylesheet).

I need to look into this and see what benefits we might get from v2.

better engineering

Most helpful comment

馃憢 @hramos,

The latest version (2.5.2 so far) had some improvement like:

  • polish the DOM structure
  • add new pre/post processing method
    (e.g. _handleSelected_, _queryHook_, _transformData_ , ... )
  • enhance the search Input
  • had responsive behaviour to the dropdown
  • fix bugs (obviously)

Please note also that the V1 isn't maintained anymore, dependencies on the v2 are automatically updated.

If you have any requirement, feel free to ask us straightly, we could see how to integrate your feedback within the v2.

All 4 comments

馃憢 @hramos,

The latest version (2.5.2 so far) had some improvement like:

  • polish the DOM structure
  • add new pre/post processing method
    (e.g. _handleSelected_, _queryHook_, _transformData_ , ... )
  • enhance the search Input
  • had responsive behaviour to the dropdown
  • fix bugs (obviously)

Please note also that the V1 isn't maintained anymore, dependencies on the v2 are automatically updated.

If you have any requirement, feel free to ask us straightly, we could see how to integrate your feedback within the v2.

FYI, the latest 2.6.2 version of docsearch.js also now displays suggestions as real <a href> links; allowing anyone to ctrl-click on the results to open them in a new tab \o/

This has been a long-awaited feature, and is now live :)

cc @endiliey @hramos 馃啓

I have tried upgrading to Algolia Docsearch v2 but I think it should be done in the next major version. It's not a good idea to do it on current version because it will break user's css (if they write their own custom.css for search). The css is also incompatible.

P.S: We do use docsearch v2 on next major version

Was this page helpful?
0 / 5 - 0 ratings

Related issues

endiliey picture endiliey  路  3Comments

ericnakagawa picture ericnakagawa  路  3Comments

chandankumar4 picture chandankumar4  路  3Comments

ericnakagawa picture ericnakagawa  路  3Comments

philipmjohnson picture philipmjohnson  路  3Comments