Skip to content

🐛 Docs sidebar - Scroll the left nav when it's taller than the window - #76

Merged
joshbermanssw merged 3 commits into
mainfrom
fix/sidebar-scroll
Nov 4, 2026
Merged

joshbermanssw merged 3 commits into
mainfrom
fix/sidebar-scroll

Conversation

@tiagov8

@tiagov8 tiagov8 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Closes #75

The docs sidebar was sticky with no maximum height. When the nav was taller than the window, its bottom items stayed off-screen until the article had been scrolled to its end. The sidebar is now capped at the window height and scrolls on its own.

What changed

  • sidebar.tsx: the sidebar box gets max-h-[calc(100vh-2rem)] and overflow-y-auto, so the nav scrolls inside it. top-4 plus the cap leaves 1rem clear above and below.
  • overscroll-contain stops the page from scrolling when you reach the end of the nav, and [scrollbar-width:thin] keeps the scrollbar narrow inside the rounded box.
  • Switching between the Docs and Learn tabs scrolls the sidebar back to the top, so the new tab doesn't open partway down.

Risky areas

  • src/components/docs/layout/sidebar.tsx wraps both tabs (Docs and Learn) and the slide between them. Check that switching tabs still slides and starts at the top, and that on a tall screen, where the nav fits, the sidebar looks the same as before.

🤖 Changes made by Claude Opus 5.5 via Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tiagov8
tiagov8 requested a review from a team as a code owner November 2, 2026 21:55
@tiagov8 tiagov8 self-assigned this Nov 2, 2026
@tiagov8
tiagov8 requested a review from joshbermanssw November 2, 2026 21:55
@vercel

vercel Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 3, 2026 10:31pm UTC

Request Review

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@joshbermanssw
joshbermanssw enabled auto-merge (squash) November 4, 2026 01:10
@joshbermanssw
joshbermanssw merged commit bc5c85e into main Nov 4, 2026
7 checks passed
@joshbermanssw
joshbermanssw deleted the fix/sidebar-scroll branch November 4, 2026 01:10

This branch was successfully deployed

1 active deployment
Preview — 165207b1 Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Docs sidebar - Bottom of the left nav can't be reached on shorter screens

2 participants