-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
DOC [PST] version switcher and warning banner #28347
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
DOC [PST] version switcher and warning banner #28347
Conversation
Part I: Generate the version switcher JSONYou may want to look at this documentation first. In short, the changes under Part II: Tweak the version switcher (optional)I think it might be nice to move the "Other versions and download" button in the navbar dropdown button into the version switcher, so that all version-related stuff are in the same place. My current approach is a bit of... hacky? Since the version switcher is itself populated by JS at load time, if we want to add another tab to the version switcher dropdown we need to use JS as well. More importantly to ensure the added tab is the last one we need to wait until the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
The banner looks good on the landing page: or on the Examples index page: however it's missing when navigating to a particular example of the gallery: I also checked navigating to subpages of the narrative and API docs and the banner is there is both case. On the example pages have a missing banner. |
Perhaps you haven't scrolled to the top (the breadcrumbs are not showing up)? If you navigate from the gallery index page to gallery example pages it jumps to the anchor on the header so the page is not automatically at the top; the banner only shows up when you scroll to the top (this is the |
Indeed you are right. Please ignore my comment then. I suppose this is good the way it is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please feel free to do update the json URL to https://scikit-learn.org/_pst_preview/versions.json and merge this PR.
If the URL causes any issue I'll fix in a follow-up PR. Thanks @ogrisel! |
Please note that this PR targets the
new_web_theme
branch!Towards #28084. This main task of this PR is to configure the version switcher and the version warning banner.
Here is the list of things left to be done in this PR (if any). Maintainers please feel free to modify.