matplotlib / mpl-brochure-site

Source for the top-level landing page.
Other
3 stars 13 forks source link

Search and light/dark buttons not working #73

Closed rcomer closed 1 year ago

rcomer commented 1 year ago

On https://matplotlib.org/ homepage, clicking either the search button or the light/dark mode button in the top bar doesn't do anything. Both are fine once I've clicked through to the stable docs. I see the same behaviour on Linux Firefox, Windows Chrome and IOS Safari.

QuLogic commented 1 year ago

I noticed this yesterday when uploading 3.6.3 docs; I'm sure it used to work, but I'm not sure when it broke.

QuLogic commented 1 year ago

The browser console shows an error about undefined jQuery; I'd guess one of our theme components dropped that and another was relying on it.

rcomer commented 1 year ago

The search definitely used to work. I noticed this last week and I use the search from there fairly often so I don’t think it’s been broken very long.

QuLogic commented 1 year ago

The last build was two weeks ago after a merge. Fetching those commits directly from GitHub and diffing them shows:

$ git diff --stat last-month..two-weeks-ago 
 .buildinfo                                      |     2 +-
 404.html                                        |     3 -
 _static/_sphinx_javascript_frameworks_compat.js |   134 ----
 _static/basic.css                               |     3 +
 _static/jquery-3.6.0.js                         | 10881 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 _static/jquery.js                               |     2 -
 _static/script.js                               |    11 +-
 _static/underscore-1.13.1.js                    |  2042 -------------------------------------------------
 _static/underscore.js                           |     6 -
 genindex.html                                   |     3 -
 index.html                                      |     3 -
 search.html                                     |     3 -
 12 files changed, 9 insertions(+), 13084 deletions(-)

So we definitely lost jquery from somewhere.

QuLogic commented 1 year ago

The last build caught Sphinx 6, which dropped jQuery and underscore.js. https://github.com/pydata/pydata-sphinx-theme/pull/1029 does the same for pydata-sphinx-theme, but that hasn't been released yet. The 3.6.3 docs were built with Sphinx 5.3.0 and thus didn't get affected (though I'm not entirely sure why, as I just regenerated the venv to create them yesterday.)