Skip to content

[Doc]: Version switcher is broken #28639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
timhoffm opened this issue Aug 1, 2024 · 3 comments · Fixed by #28644
Closed

[Doc]: Version switcher is broken #28639

timhoffm opened this issue Aug 1, 2024 · 3 comments · Fixed by #28644

Comments

@timhoffm
Copy link
Member

timhoffm commented Aug 1, 2024

Documentation Link

No response

Problem

  • Start at: https://matplotlib.org/stable/ - the switcher shows "choose version" (?)
  • In the switcher select "3.10 (dev)" - you are directed to the correct page but the switcher still shows "choose version"
  • In the switcher select "3.9 (stabe)" - you are directed to the correct page but the switcher still shows "choose version"
  • In the switcher select "3.8" - you are directed to the correct page but the switcher still shows "stable"
  • In the switcher select "3.87 - you are directed to the correct page but the switcher again shows "stable" and is now broken (i.e. does not have a dropdown anymore)

Suggested improvement

I'm not really sure what's going on. https://matplotlib.org/devdocs/_static/switcher.json is used, which is the correct file.

questions:

@QuLogic
Copy link
Member

QuLogic commented Aug 1, 2024

3.7 is probably broken because it used an older version of the theme, and the switcher json may have changed a bit since.

The rest are broken because our version_match setting is wrong; it currently picks either 'stable' or 'devdocs', neither of which are used in the switcher.json. Prior to #28512, 'stable' was a thing, but this broke the banner so it was changed to the actual version. And it makes no sense to use 'stable'; as you have noted, once a version becomes older, it's no longer 'stable'. And devdocs actually have been set to a version of 'dev' since #23949.

@QuLogic
Copy link
Member

QuLogic commented Aug 2, 2024

I pushed matplotlib/matplotlib.github.com@4eabb2b which applies the linked PR to the published docs, and fixed these pages.

  • In the switcher select "3.10 (dev)" - you are directed to the correct page but the switcher still shows "choose version"

This should be fixed by #28644.

  • In the switcher select "3.9 (stabe)" - you are directed to the correct page but the switcher still shows "choose version"

See first point.

  • In the switcher select "3.8" - you are directed to the correct page but the switcher still shows "stable"

I pushed matplotlib/matplotlib.github.com@fd6b5d2 which backported the theme fixes and fixes these pages.

  • In the switcher select "3.7" - you are directed to the correct page but the switcher again shows "stable" and is now broken (i.e. does not have a dropdown anymore)

Here the JavaScript raises on missing jQuery before it can populate everything; possibly we updated Sphinx and not pydata-sphinx-theme, but I'm not sure exactly which versions were used for that build. I pushed matplotlib/matplotlib.github.com@1fca7e7 which restores jQuery on the files, and fixes populating the dropdown.

And then I also backported pydata/pydata-sphinx-theme@59401a6#diff-dff36566ae5c858672e0d5a02ec6a57756f11ff11751e0cf7509098fb0941234R308 via matplotlib/matplotlib.github.com@691be21 which fixed 3.6 and 3.7

@QuLogic QuLogic added this to the v3.9-doc milestone Aug 2, 2024
@QuLogic
Copy link
Member

QuLogic commented Aug 20, 2024

Here the JavaScript raises on missing jQuery before it can populate everything; possibly we updated Sphinx and not pydata-sphinx-theme, but I'm not sure exactly which versions were used for that build. I pushed matplotlib/matplotlib.github.com@1fca7e7 which restores jQuery on the files, and fixes populating the dropdown.

One more followup here which fixes the jQuery references for files 3.7 that are in subdirectories: matplotlib/matplotlib.github.com@8fd7442

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants