Move the sidebar collapse control to the header - #339
Merged
Conversation
Fumadocs puts the collapse button in the sidebar footer and its expand counterpart at the bottom-left of the viewport. Both now sit at the top beside the wordmark, the way commons-app's sidebar does it: the header copy is rendered through `nav.children`, the footer one is hidden, and the floating expand button is lifted to the same line — dropped clear of the table-of-contents bar below `xl`, where that bar is sticky at the top of the page. Brings back the "Docs" tag beside the wordmark, and drops the CLI install snippet that was pinned to the bottom of the sidebar. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three chrome fixes on the docs sidebar.
Collapse / expand button at the top. Fumadocs puts the collapse control in the sidebar footer and its expand counterpart at the bottom-left of the viewport. Both now sit at the top beside the wordmark, as they do in commons-app — the header copy is rendered through
nav.children, the footer one is hidden, and the floating expand button is lifted to the same line.Below
xlthe table of contents becomes a sticky bar across the top of the page, so the expand button is dropped clear of it there. Verified both states by driving the real toggle over CDP: at 1440px the button lands at y=14 with no TOC bar; at 1000px it lands at y=54 with the bar ending at y=37."Docs" tag is back beside the wordmark.
CLI install snippet removed from the bottom of the sidebar, along with the now-unused
components/sidebar-footer.tsx.One thing worth flagging: the selector I had been using for the sidebar footer (
#nd-sidebar > div:last-child) was wrong —#nd-sidebarwraps everything in a single div, so it matched the whole sidebar. It is replaced with a class-based selector that does not depend on nesting.🤖 Generated with Claude Code