readthedocs / readthedocs-sphinx-search

Deprecated: Enable search-as-you-type feature for docs hosted by RTD.
https://readthedocs-sphinx-search.readthedocs.io/
MIT License
33 stars 16 forks source link

Support sphinx 6.0+ #126

Closed harshil21 closed 1 year ago

harshil21 commented 1 year ago

Since sphinx 6.0, they have removed support of the jQuery and underscore.js frameworks (https://www.sphinx-doc.org/en/master/changes.html#id37). This makes this library unusable until we adopt the workaround mentioned or downgrade to sphinx 5.

harshil21 commented 1 year ago

I've already supported sphinx 6.0 in my fork, let me know if those I can make those changes (or similar) here as well.

stsewd commented 1 year ago

Hi there! We were migrating to vanilla js, but the animations were the only thing missing migrating. @agjohnson do you have any opinions on keeping jquery for the animations or are we ok using vanilla js for that?

agjohnson commented 1 year ago

I don't have any strong opinions, but will note that to accomplish animations without jQuery, you'll be using CSS, not JS. jQuery is mostly just manipulating CSS properties (mostly transition and friends), though early on jQuery did some strong hacks for cross-browser animations as well.

The other option would be to conditionally use animations if jQuery is available. This will lead to some disparity in UX, but perhaps the animation issue is something we can polish up more later.

stsewd commented 1 year ago

Support for sphinx 6 was added in https://github.com/readthedocs/readthedocs-sphinx-search/pull/127, and we did a release yesterday.