Open billtubbs opened 7 months ago
Hm, I'm a little conused by why this is happening?
https://github.com/pydata/pydata-sphinx-theme/issues/1552 seems to be related
cc @jorisvandenbossche @mroeschke
I can confirm. It's very visually disrupting.
It's not directly clear to me why this is happening for 2.2.1 (https://pandas.pydata.org/pandas-docs/version/2.2.1/index.html), but not for 2.2.0 (https://pandas.pydata.org/pandas-docs/version/2.2.0/index.html), as both use the exact same version of the sphinx theme
Ah, I suppose this is because the javascript code that decides whether to show the warning or not is "comparing" the versions (not just checking exact equality of the strings, https://github.com/pydata/pydata-sphinx-theme/blob/fa456d0ea9fcfd4363f7af9cf43f7e84002d19eb/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js#L470-L474), and so "2.2.0" was comparable to "2.2", but "2.2.1" no longer compares equal (just a hypothesis, didn't actually check)
As a temporary fix, I patched the sources on our web server to:
pandas-docs/version/2.2.1/_static/documentation_options.js
to say VERSION: '2.2'
instead of '2.2.1'
find ./ -type f -exec sed -i "s/documentation_options.js?v=16656018/documentation_options.js?v=166560180/g" {} \;
(just adding a 0 to the ?v=
number, to ensure the browser fetches the new one, otherwise even a hard refresh doesn't help)We should still further investigate how to fix it properly for the next release
If we're not able to fix this for the next release, is it just fine to turn off the warning banner for now?
I think that's relatively easy to do. I'm not sure I can help much with debugging this further - I can't really read javascript.
If we're not able to fix this for the next release, is it just fine to turn off the warning banner for now?
I think that's relatively easy to do. I'm not sure I can help much with debugging this further - I can't really read javascript.
I do not see the warning banner anymore on stable docs, seems like Joris has fixed it. Is this still considered a blocker?
I don't see it either anymore so closing
Looks like this is still there.
@mroeschke @jorisvandenbossche
We should either patch or disable the banner altogether.
I again quickly patched the web sources for 2.2.2, but yes, we should fix this more permanently. Disabling the banner until we find a better solution might be the best option short term.
Pandas version checks
main
hereLocation of the documentation
https://pandas.pydata.org/docs/index.html
Documentation problem
A large red banner says 'This is documentation for an unstable development version.'
Below that, a small drop-down menu says '2.2 (stable)'.
Clicking the 'Switch to Stable Version' button simply returns to the same page.
Suggested fix for documentation
Modify the website settings so that version 2.2 is identified to be stable (or have the button redirect users to the 2.1.4 documentation).