-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Whatsnew bad redirection when changing version #138
Comments
Thanks for opening this issue, it's interesting! It also happen in any other change of whatsnew, but when "decreasing" the version it lands you on the homepage as the target file does not exist. The page switch is handled client-side via this function: => https://github.com/python/docsbuild-scripts/blob/main/templates/switchers.js#L81 so can you please reopen the issue (and or a PR) on the docsbuild-script repo? |
FYI @JulienPalard , you can simply transfer this issue directly to that repo with the (not easy to spot) For me, this is the expected (if not necessarily ideal) behavior, not a "bad redirection" per say—each What's New is its own separate page, and there is no one "current version" What's New page, so naturally switching between different branches gets that branch's version of that What's New page, What this issue is really requesting is not a bug fix, but rather an enhancement to the behavior of the version switcher, to add special-case logic to more "intelligently" handle switching between "What's New" pages of different Python versions in a way that is more useful to most users. Of course, its more complicated than the issue initially implies, as there are a number of cases to consider and its not completely obvious what the ideal logic should be in every case, but if @JulienPalard thinks its worth it, then it would be an improvement. cc @hugovk If so, I propose the following logic, in psuedocode:
One possible design for the implementation:
|
Yeah, I've experienced this and found it a little surprising, albeit logical when you think about it for a moment. I think the common case would to expect a "sticky" What's New, as suggested. |
Wow thanks! |
I think we all agree that something better can be implemented. I'm not sure we need to complicate things more than just navigating to
|
I certainly understand the desire to not complicate the logic, which was my one concern with this proposal to begin with. That's essentially what the above proposed implementation boils down to (in perhaps a dozen or so total lines of JS for the whole thing), except that if the reader is browsing a What's New that isn't the current version's, and exists on the target, the What's New version isn't touched, as it wouldn't make sense to arbitrarily change it (given the reader deliberately navigated to that older version, which I would view as a regression). |
I completely agree with @JulienPalard what I wanted here and what I think everyone wants is to be redirected to the version they want. When I arrived on the Whatsnew of 3.11 and I saw that the version 3.12 was available in alpha I said to myself I want to see the news about 3.12 So I think the best thing would be to keep it simple like Julien suggested in his message :) |
See also python/cpython#100734. |
Documentation
There is a bad redirection in the documentation in the whatsnew switch between version 3.11. and 3.12.
How to reproduce :
Link to the whatsnew 3.11 -> https://docs.python.org/3.11/whatsnew/3.11.html
When we switch to 3.12 we arrive in -> https://docs.python.org/3.12/whatsnew/3.11.html
And we see that this is the wrong redirection.
The link should be -> https://docs.python.org/3.12/whatsnew/3.12.html
I remain at your disposal if you need more details
The text was updated successfully, but these errors were encountered: