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
ENH: Move header items to sidebar on mobile #834
Conversation
35bb829
to
1ee0dbe
Compare
079b086
to
7880031
Compare
beautiful. +10 |
Nice 👍 it's really a better experience on mobile. I am just seeing some spacing inconsistencies around the icons (GitHub, Twitter, etc.). |
I will clean up the spacing inconsistencies and little CSS bugs if I know people like the general UI/UX :-) |
I love the idea ! |
9602c90
to
061fb2a
Compare
Update: ready for reviewOK I think this is one is ready for review. I've cleaned up the remaining CSS bugs that I found and included a bit more standardization of our variables etc. Let me know what you think. |
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 job figuring out how to move the version switcher JS out of the template! This all looks good to me, though in the process of reviewing I found a few (unrelated) things to open issues about :)
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.
This looks great 👍
About the version switcher, it's a breaking change on the styling correct?
We need to go from #version_switcher
to .version-switcher__container
? I am fine with this since we always update to the latest version of the theme (at least I do this for SciPy and NumPy).
indeed this would be a breaking change for any custom styling on the version switcher...though in general it feels like this is also a better practice to move to BEM-style classes instead of |
Hey all - we've got 3 approvals, so I am going to merge this one in! Many thanks for everybody's feedback, I think this is a nice place to settle on for the sidebar UX! |
This is the implementation that I used to show the preview in #833 - it is actually pretty close to complete if people think that this is a good UI/UX for the navbar / sidebar content. It does this:
center
andend
header items in the sidebar.@media
queries so that they apply only to the sidebar items.index.js
script.Here's how it looks
To Do
Let me know what folks think.
Release notes
The header items are now duplicated on each page, and wrapped in
<div>
s that will alternate displaying at the sidebar-primary breakpoint. The effect is that the header items after the "start" block are inside the sidebar on mobile.❗This changes the HTML of the theme and version switchers slightly!