fix(docs): stop the pinned sidebar running under the site footer - #6422
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview A new
Reviewed by Cursor Bugbot for commit b32127f. Configure here. |
Greptile SummaryThe PR prevents the fixed documentation sidebar and divider from running beneath the footer.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| 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
Reviews (2): Last reviewed commit: "fix(docs): stop the pinned sidebar runni..." | Re-trigger Greptile
|
@cursor review |
There was a problem hiding this comment.
✅ 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.
Summary
FooterOverlapProbepublishes how far the footer reaches into the viewport as--docs-footer-overlap; the sidebar reads it asbottomand slides up out of view as the footer arrives, keeping the full list readable0while 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
Testing
Tested manually, plus Playwright measurements at 1280x800 and 2000x1100:
0px/0px, content column left unchangedz-[22]covers the rounding sliver)top: 92pxto the footer's top border at both sizeslgis untouched — the rule is inside the existing desktop-only media queryChecklist