fix: scroll to bottom should show footer#1352
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughThis PR updates the package page to compute and apply a footer-aware bottom offset for the package navigation. It adds reactive Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
app/pages/package/[[org]]/[name].vue
Outdated
| 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) | ||
| } | ||
|
|
There was a problem hiding this comment.
what about https://vueuse.org/core/useIntersectionObserver ?
There was a problem hiding this comment.
duh 😅
I'll update it.
|
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. |
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