Skip to content

fix(components/Doc): add spacing below the docs prev/next bar - #1106

Merged
KevinVandy merged 1 commit into
mainfrom
fix/docnav-footer-gap
Aug 4, 2026
Merged

fix(components/Doc): add spacing below the docs prev/next bar#1106
KevinVandy merged 1 commit into
mainfrom
fix/docnav-footer-gap

Conversation

@sukvvon

@sukvvon sukvvon commented Aug 4, 2026

Copy link
Copy Markdown
Member

Scrolled to the bottom of a docs page, the Previous/Next cards sit flush against the footer's top edge with no gap at all.

The bar is sticky bottom-2. That offset spaces it from the viewport while it floats, but once the page bottoms out the bar settles as the last element of its flex column and there is nothing below it — the footer starts immediately.

Fix

One spacer div after the bar in Doc.tsx:

{footer ?? <DocNavigation />}
<div className="h-4" />

This follows the spacing idiom already used in MarkdownContent, which separates its sections with explicit spacer divs (h-12 under the prose, py-4 around the Edit on GitHub row) rather than padding on the elements themselves.

Why not pb-4 on the bar itself

That was my first attempt, and it was wrong: padding lives inside the sticky element's box, so it changes both states — the floating card would have moved from 8px to 24px off the viewport edge. bottom-2 deliberately sets the floating gap, and that part was never the bug.

The two gaps measure different things and should stay different. Floating, the card is an overlay hovering above the text scrolling under it — tight to the edge is correct. Settled, it only needs enough room not to collide with the footer's top border; the section separation itself is already provided by the footer, which carries py-12 lg:py-16 of its own. That is also why h-4 and not something larger — 48px here would stack on top of the footer's own 48–64px.

Measured on a docs page

State Before After
Floating (card → viewport bottom) 8px 8px
Settled (card → footer top) 0px 16px

Screenshot

AS-IS

image

TO-BE

image

Summary by CodeRabbit

  • Style
    • Added extra spacing below the document footer or navigation to improve page layout.

@sukvvon sukvvon self-assigned this Aug 4, 2026
@sukvvon
sukvvon marked this pull request as draft August 4, 2026 01:51
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Documentation navigation

Layer / File(s) Summary
Footer and navigation spacing
src/components/Doc.tsx
Adds an h-4 spacer after the footer or navigation content.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: tannerlinsley

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the spacing fix for the documentation previous/next navigation bar.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/docnav-footer-gap

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sukvvon
sukvvon force-pushed the fix/docnav-footer-gap branch from 9a78568 to 7da526f Compare August 4, 2026 01:55
@sukvvon
sukvvon force-pushed the fix/docnav-footer-gap branch from 7da526f to f90b178 Compare August 4, 2026 01:58
@sukvvon sukvvon changed the title fix(components/LibraryLayout): add bottom padding to docs prev/next bar fix(components/Doc): add spacing below the docs prev/next bar Aug 4, 2026
@sukvvon
sukvvon marked this pull request as ready for review August 4, 2026 02:03
@sukvvon
sukvvon requested a review from a team August 4, 2026 02:03
@KevinVandy
KevinVandy merged commit 20d57b8 into main Aug 4, 2026
7 checks passed
@KevinVandy
KevinVandy deleted the fix/docnav-footer-gap branch August 4, 2026 02:13
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.

2 participants