-
Notifications
You must be signed in to change notification settings - Fork 16
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
🧭 Move collapsed top-bar to primary sidebar on small screens #444
Conversation
🦋 Changeset detectedLatest commit: 0c735a3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
From a UX perspective I think this is an improvement over what we've got right now (which is that they just disappear). It also matches what the pydata theme does: The PST takes it a step further and puts all header items into the top section of the primary sidebar (except for a dedicated search button). But I think that's a decision that could be made in the future (e.g. whether to put them all in the sidebar, or have them split between primary and secondary sidebars, or have some other way to access header items on narrow screens). |
@choldgraf Yes, PST is a really good prior-art reference for what we might want to happen here. With all of the open PRs merged we should be in a reasonably good spot for small viewports. Folding in other components like the I'm hopeful we'll get all this in, and then do another round of UX evaluations. |
@agoose77 made some initial changes here with the intent of keeping the components reusable in other themes including composed themes like mystmd.org which doesn't yet work out of the box with these changes. Basically this is lifting props and letting components higher up the render tree (ideally in the themes) deal with getting the right SiteManifest etc... This PR is looking good but I'd like to get a parallel PR up on mystmd.org consuming these before merging. Doing that next. |
@stevejpurves I don't think it's this PR that broke alignment; I think something else that merged into main already did this. |
@agoose77 I've fixed alignment here in any case as doing so requires moving between this repo and other dependent repos - so to avoid duplicating work, and as the changes required are in the PrimarySidebar as well as a couple of other places, doing it in this pass. |
OK this is good to go!!! Made some changes to scroll behaviour as the 2 independent scrolling units in the sidebar does not work well. book-theme-nav.mp4Intending to bring this in ASAP to unblock PR's elsewhere |
This PR reworks our
TableOfContents
as aPrimarySidebar
. In doing so, it adds a new navigation section that is visible below thelg
selector (the breakpoint at which the top-nav disappears).>lg
:<lg
:This uses the same Radix components as the TOC, so it feels on brand.
Fixes #402