-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Move version switcher next to the logo #23142
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
Conversation
Still have to find out how to shorten the version number in the devdocs. IMHO this should only Edit: the length should be fixed by #23145. Still waiting for that to propagate to https://matplotlib.org/devdocs/_static/switcher.json |
249cc32
to
6be0e66
Compare
This is in preparation for adding the search field to the navbar. IMHO placing the version next to the logo also rhymes better. Styling of the switcher is more muted (not the strong blue). It's colors are taken from the panels on the index page.
6be0e66
to
ef89431
Compare
I am not a fan of it next to the logo - it's a pretty junky widget and I prefer the whitespace around the logo. EDIT: under the logo is even worse - it makes the topbar thicker just to accommodate this one element. |
Under the logo is only because the devdocs full version is so long. In a release this should already be ok. As written, I still have to figure out how to shorten the version entry. It should look something like this then: We could also reduce the style even more (and only display the box when hovering over it): |
Although I like the idea of being able to switch version in the header, I do share the concerns of @jklymak . With styling I think it is a completely different thing though. Right now it just looks so big (partly because of the width, which as you say will not really be a problem except for CI builds, but also the height). |
5d20c44
to
a18aa85
Compare
I think I have fixed the start value to show in the switcher. |
|
||
|
||
/* styling for version switcher */ | ||
.navbar-brand { |
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.
I like this styling, but still opposed to moving next to the logo for aesthetic reasons.
I probably have a slight preference for it on the right-hand side as well, but can't say it makes a huge difference to me. Note that Pandas and Numpy have the version switcher on the right, but the Python docs have it on the left, so it is somewhat project dependent. |
Note that the suggestion to move the version switcher next to the logo has gotten much appreciation with pydata-sphinx-theme pydata/pydata-sphinx-theme#680. And they are making it the default position pydata/pydata-sphinx-theme#698. I haven't seen a version switcher in NumPy. But for pandas I suspect that they have just taken over the default from pydata-sphinx-theme (not least because they use the default color, which is a bit off for the general theme; and that may be a hint that they haven't yet taken the time for any customization/optimization). |
This got out of date. Since pydata-sphinx-theme has the version next to the logo by default. Implementation would now be simply to revert to the theme defaults. While I still think this would be better, I'm not going to follow up due to above opposition. |
This is in preparation for adding the search field to the navbar (matplotlib/mpl-brochure-site#50). IMHO
placing the version next to the logo also rhymes better.
Styling of the switcher is more muted (not the strong blue). It's colors
are taken from the panels on the index page.
New:

Old:
