fix(ui): account for sticky headers in sidebar height - #3242
Conversation
Signed-off-by: dvd233 <111864431+dvd233@users.noreply.github.com>
Thanks for opening this pull request! 🎉We really appreciate you taking the time to contribute, @dvd233. A maintainer will take a look as soon as they can. In the meantime, please make sure that:
If anything needs adjusting we'll leave comments here. Thanks again! |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughChangesPackage sidebar behaviour
Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The sidebar now accounts for sticky app and package headers when calculating available space and positioning, with regression coverage for the reported layout case. No merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@dvd233 |
🔗 Linked issue
Fixes #3212
🧭 Context
The sidebar currently decides whether to enable its scroll-aware sticky behavior by comparing its content height with the full viewport height. The app and package headers reduce the space actually available to the sidebar, so content near the viewport height can stay inactive while its last sections remain hidden.
📚 Description
At a 1544×1400 viewport in the reported boundary case, the baseline left 53.55 px of the sidebar below the viewport. With this change the sidebar switches direction while scrolling and keeps its bottom at the existing 32 px inset.
Screenshots
Testing
vp test --project unit— 1,781 passedvp test --project nuxt— 1,138 passed, 5 skippedvue-tsc -b --noEmitvp run --filter npmx-connector test:typesvp lintvp fmt --checknode scripts/unocss-checker.tsplaywright test --workers=1against the built output — 266 passed, 1 skipped