Skip to content

fix(docs): stop the pinned sidebar running under the site footer - #6422

Merged
waleedlatif1 merged 1 commit into
stagingfrom
worktree-docs-sidebar-footer
Aug 8, 2026
Merged

fix(docs): stop the pinned sidebar running under the site footer#6422
waleedlatif1 merged 1 commit into
stagingfrom
worktree-docs-sidebar-footer

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • The docs sidebar and its divider are fixed to the viewport, so at the end of the page the footer was drawn over them and the bottom of the nav list became unreachable
  • FooterOverlapProbe publishes how far the footer reaches into the viewport as --docs-footer-overlap; the sidebar reads it as bottom and slides up out of view as the footer arrives, keeping the full list readable
  • The divider reads the same value but is shortened rather than slid, so it terminates on the footer's top border instead of stopping short
  • Measured against the viewport rather than the document on purpose — the value is a constant 0 while the footer is off screen, so a content-height change higher up the page cannot move the sidebar (the regression fix(docs): stop the sidebar drifting when page content resizes #6301 fixed)

Type of Change

  • Bug fix

Testing

Tested manually, plus Playwright measurements at 1280x800 and 2000x1100:

  • Expanding/collapsing an FAQ with the footer off screen moves the sidebar 0px / 0px, content column left unchanged
  • At the page bottom the sidebar's bottom edge lands within ~1px of the footer's top (the footer's z-[22] covers the rounding sliver)
  • Divider spans top: 92px to the footer's top border at both sizes
  • Below lg is untouched — the rule is inside the existing desktop-only media query

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

The sidebar and its divider are fixed to the viewport, so at the end of the
page the footer was drawn over them and the lower part of the nav list became
unreachable.

FooterOverlapProbe publishes how far the footer reaches into the viewport as
`--docs-footer-overlap`. The sidebar reads it as `bottom`, so it keeps its full
height and slides up out of view as the footer arrives; the divider reads it too
but is shortened rather than slid, so it terminates on the footer's top border
instead of stopping short.

Measured against the viewport rather than the document on purpose: the value is
a constant 0 while the footer is off screen, so a content-height change higher up
the page cannot move the sidebar. Verified with Playwright at 1280x800 and
2000x1100 — expanding/collapsing an FAQ with the footer off screen moves the
sidebar 0px/0px and leaves the content column unchanged, and at the page bottom
the sidebar's bottom edge lands within ~1px of the footer's top.
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 8, 2026 7:06pm

Request Review

@cursor

cursor Bot commented Aug 8, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Scoped to docs desktop CSS and a small footer measurement hook; no auth, data, or API changes. Main risk is layout regressions on docs pages near the footer or on FAQ expand/collapse.

Overview
Fixes the desktop docs layout where the fixed sidebar and vertical divider drew through the site footer, leaving bottom nav items unreachable.

A new FooterOverlapProbe in the footer measures how far the footer intrudes into the viewport and sets --docs-footer-overlap on the document root (viewport-based, so overlap stays 0 while the footer is off-screen—preserving the #6301 fix against sidebar jumps when content height changes higher on the page).

global.css (desktop lg+ only): the sidebar placeholder uses bottom: var(--docs-footer-overlap) with top: auto so the nav slides up as the footer enters; the #nd-docs-layout::before divider switches from a fixed height to top + bottom overlap so the line meets the footer’s top border instead of stopping short.

Reviewed by Cursor Bugbot for commit b32127f. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR prevents the fixed documentation sidebar and divider from running beneath the footer.

  • Adds a client-side probe that publishes the footer’s viewport overlap through a CSS custom property.
  • Uses that overlap to slide the sidebar upward and shorten its divider as the footer enters view.
  • Mounts the probe inside the shared site footer.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/docs/components/footer/footer-overlap.tsx Adds the viewport-overlap measurement and publishes it as a root CSS custom property with scheduled updates and cleanup.
apps/docs/components/footer/footer.tsx Mounts the overlap probe at the top of the positioned footer.
apps/docs/app/global.css Applies the measured footer overlap to the desktop sidebar and divider positioning.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Footer[Footer enters viewport] --> Probe[FooterOverlapProbe measures overlap]
  Probe --> Variable["Set --docs-footer-overlap"]
  Variable --> Sidebar[Move fixed sidebar upward]
  Variable --> Divider[Shorten fixed divider]
  Sidebar --> Result[Stop at footer boundary]
  Divider --> Result
Loading

Reviews (2): Last reviewed commit: "fix(docs): stop the pinned sidebar runni..." | Re-trigger Greptile

Comment thread apps/docs/app/global.css
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@waleedlatif1
waleedlatif1 merged commit 533afaa into staging Aug 8, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the worktree-docs-sidebar-footer branch August 8, 2026 19:10

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit b32127f. Configure here.

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.

1 participant