-
-
Notifications
You must be signed in to change notification settings - Fork 237
fix: scroll to bottom should show footer #1352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about https://vueuse.org/core/useIntersectionObserver ?
There was a problem hiding this comment.
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.
|
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