Skip to content

Conversation

@ackzell
Copy link
Contributor

@ackzell ackzell commented Feb 10, 2026

Screen.Recording.2026-02-10.at.9.23.55.p.m.mov

My attempt at fixing #1340

Using an intersection observer to determine the footer would be hidden behind the ButtonGroup, then re-positioning the buttons when on mobiled

@vercel
Copy link

vercel bot commented Feb 10, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 10, 2026 10:35pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 10, 2026 10:35pm
npmx-lunaria Ignored Ignored Feb 10, 2026 10:35pm

Request Review

@ackzell ackzell changed the title Fixing Scroll to bottom should show footer fix: scroll to bottom should show footer Feb 10, 2026
@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 0% with 21 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/pages/package/[[org]]/[name].vue 0.00% 17 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2026

📝 Walkthrough

Walkthrough

This PR updates the package page to compute and apply a footer-aware bottom offset for the package navigation. It adds reactive navExtraOffset, isMobile, a footerTarget, and an IntersectionObserver to set navExtraOffset from footer height when intersecting. An initFooterObserver lifecycle function locates the footer, pauses/resumes the observer based on media queries, and is invoked on mount. A computed navExtraOffsetStyle exposes --package-nav-extra, which is bound to the navigation element; mobile CSS now uses this variable for the nav bottom position.

Possibly related PRs

Suggested labels

front

Suggested reviewers

  • serhalp
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly relates to the changeset, referencing issue #1340 and explaining the use of an intersection observer to reposition buttons and prevent footer overlap on mobile.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Comment on lines 55 to 68
function setupFooterObserver() {
if (!footerEl) return
const thresholdValues = Array.from({ length: 101 }, (_, index) => index / 100)
footerObserver = new IntersectionObserver(
entries => {
const entry = entries[0]
if (!entry) return
navExtraOffset.value = entry.isIntersecting ? entry.intersectionRect.height : 0
},
{ threshold: thresholdValues },
)
footerObserver.observe(footerEl)
}

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

duh 😅

I'll update it.

@danielroe danielroe added this pull request to the merge queue Feb 11, 2026
Merged via the queue into npmx-dev:main with commit 344fd65 Feb 11, 2026
18 checks passed
@github-actions
Copy link

Thanks for your first contribution, @ackzell! 🥳

We'd love to welcome you to the npmx community. Come and say hi on Discord! And once you've joined, visit npmx.wamellow.com to claim the contributor role.

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