Skip to content

Add bottom padding to the desktop sidebar nav - #5452

Merged
Jeremy Rose (jeremyrose-viam) merged 4 commits into
viamrobotics:mainfrom
jeremyrose-viam:sidebar-bottom-padding
Oct 23, 2026
Merged

Jeremy Rose (jeremyrose-viam) merged 4 commits into
viamrobotics:mainfrom
jeremyrose-viam:sidebar-bottom-padding

Conversation

@jeremyrose-viam

@jeremyrose-viam Jeremy Rose (jeremyrose-viam) commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Adds 4rem of bottom padding to the sidebar scroll container (.td-sidebar-nav) at the md breakpoint and up, so the last nav item can scroll clear of the bottom edge of the viewport. Mobile spacing is unchanged.

The padding is on the container rather than the top-level list, so it lands after whichever list renders last: the main nav at lg and up, or the off-site links (Courses, Discord, GitHub, Open app) between md and lg.

The change is one line in assets/scss/_sidebar-tree.scss. make build-prod passes.

🤖 Generated with Claude Code

@netlify

netlify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for viam-docs ready!

Name Link
🔨 Latest commit f97b877
🔍 Latest deploy log https://app.netlify.com/projects/viam-docs/deploys/6ada43035f28a88612cfdcbf
😎 Deploy Preview https://deploy-preview-5452--viam-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 37 (🔴 down 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label Oct 21, 2026
@elizafarley

Eliza Farley (elizafarley) commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Docs review: Ready to merge

This PR adds padding-bottom: 4rem to the sidebar scroll container (.td-sidebar-nav) at md and up. The earlier should-fix is resolved: the padding now sits on the container, so it lands after whichever list renders last. I checked this on the deploy preview at both lg and md widths.

CI: All required checks passing

Docs health: No regressions (no content pages changed)

Nits

  • assets/scss/_sidebar-tree.scss:13: This is the same as last round and is optional. The nav's top sits at 96px, but max-height: calc(100vh - 4rem) only reserves 64px, so the scroll container runs 32px past the viewport bottom. The new padding works around that. Fix: in a follow-up, set max-height: calc(100vh - 6rem) and retune the padding. Check the result against the -76px sidebar margin in _styles_project.scss:1672.
Verified (deploy preview, /reference/overview/)
  • At 1280×800 (lg+), the computed padding-bottom is 64px. Scrolled to the end, the last item ("Glossary") ends at y=736, 64px above the viewport bottom.
  • At 900×700 (md–lg), the last item is the off-site "Open app" link, which ends at y=664, 36px above the viewport bottom. There's no gap between the main nav and the off-site links.
  • The rule is inside media-breakpoint-up(md), so mobile is unchanged. No other rule in assets/scss/ or layouts/ sets padding on .td-sidebar-nav or #td-section-nav. The workshop sidebar (sidebar-workshop.html) uses the same class, so it gets the same padding.

Automated review by Claude. Rerunning the review updates this comment.

@jeremyrose-viam

Copy link
Copy Markdown
Member Author

Thanks, good catch. I moved the padding-bottom onto .td-sidebar-nav inside the existing md+ block, so it now follows the off-site links between 768px and 991px instead of sitting mid-list. Checked locally at about 850px and at 1280px. I left the optional max-height nit alone, and updated the PR description to match the actual selector.

@jeremyrose-viam
Jeremy Rose (jeremyrose-viam) marked this pull request as ready for review October 22, 2026 17:16
@jeremyrose-viam
Jeremy Rose (jeremyrose-viam) merged commit 329af11 into viamrobotics:main Oct 23, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to build This pull request is marked safe to build from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants