fix: improve mobile navbar responsiveness#87
Conversation
🚀 PR Received SuccessfullyHello @Anusmita12, Thank you for taking the initiative to contribute to this project. Please ensure that your PR follows all project guidelines properly before requesting review.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR refines the Navbar component by enhancing the "Tools" mega-menu panel with a new header and layout, centralizing state effects for scroll and route-triggered menu closure, updating desktop right controls to show a GitHub link for authenticated users, and restructuring the mobile menu with a scrollable container and pinned auth section. ChangesNavbar Refinement: Mega Menu, State Management, and Mobile Restructuring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR improves the mobile navigation experience by making the mobile menu scrollable within the viewport, pinning the auth section to the bottom, and preventing background page scroll while the mobile menu is open.
Changes:
- Add body scroll locking while the mobile menu is open.
- Refactor mobile menu layout to use a constrained, scrollable content region with a pinned auth section.
- Minor cleanup/formatting (comment removals, indentation).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // ── Lock body scroll when mobile menu is open ──────────────────────────── | ||
| useEffect(() => { | ||
| return () => { | ||
| clearTimeout(megaLeaveTimer.current); | ||
| }; | ||
| }, []); | ||
| if (isMenuOpen) { | ||
| document.body.style.overflow = "hidden"; | ||
| } else { | ||
| document.body.style.overflow = ""; | ||
| } | ||
| return () => { document.body.style.overflow = ""; }; | ||
| }, [isMenuOpen]); |
| <div | ||
| className="lg:hidden w-full bg-white border-t border-zinc-100 flex flex-col min-h-0" | ||
| style={{ maxHeight: "calc(100svh - 3.5rem)", overflow: "hidden" }} | ||
| > |
Summary
Improved mobile navbar responsiveness and scrolling behavior on smaller devices.
Closes #38
Changes
Tested On
Tested via Chrome DevTools.
codelens.mp4
Summary by CodeRabbit
New Features
Bug Fixes
Style