Repository navigation
feat(mobile-menu): fill the viewport when the drawer opens - #189
Conversation
Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe mobile menu changes from a constrained right-side drawer to a full-viewport overlay. Its direct children are capped at 34rem, and header and row reveals use opacity/transform transitions with updated timing and reduced-motion cross-fade behavior. ChangesMobile menu layout
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Deploying website with
|
| Latest commit: |
860e698
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://185e20a3.website-70y.pages.dev |
| Branch Preview URL: | https://claude-wizardly-kepler-6b558.website-70y.pages.dev |
There was a problem hiding this comment.
Code Review
This pull request updates the mobile menu panel (.mm-panel) in app/globals.css to be a full-bleed panel using inset: 0 instead of a fixed width, and caps the maximum width of its child elements to 34rem for larger screens. Feedback points out that because the panel now covers the entire viewport (inset: 0), it can block pointer interactions when closed under prefers-reduced-motion: reduce (where it has opacity: 0 and transform: none). It is recommended to manage pointer events dynamically based on the panel's open state.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| right: 0; | ||
| bottom: 0; | ||
| width: min(88vw, 380px); | ||
| inset: 0; |
There was a problem hiding this comment.
When the mobile menu is closed, it is translated off-screen (transform: translate3d(100%, 0, 0)). However, under prefers-reduced-motion: reduce (defined at the bottom of the file), the panel is styled with transform: none and opacity: 0 when closed. Because it is positioned with inset: 0 (covering the entire viewport), an invisible panel with opacity: 0 and transform: none will sit on top of the entire page and block all pointer interactions (clicks, taps, hovers) for users with reduced motion enabled if their browser has any issues with the inert attribute.
Adding pointer-events: none by default and enabling pointer-events: auto only when data-open="true" ensures that the closed panel never intercepts pointer events, making the layout robust and accessible under all motion settings.
inset: 0;
pointer-events: none;
&[data-open="true"] {
pointer-events: auto;
}There was a problem hiding this comment.
Added pointer-events: none to .mm-panel and pointer-events: auto on [data-open="true"] (commit 550d281), mirroring the .mm-overlay pattern already in this file. inert stays the primary guard, but since the full-bleed change made the reduced-motion closed panel span the whole viewport, this hardens it against any browser where inert is unavailable.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/globals.css`:
- Line 1082: The overlay and panel close animations use mismatched durations,
causing the overlay to disappear before the panel finishes sliding. Update the
relevant overlay and panel transition declarations in the global styles to use
the same close duration, or explicitly add a close-only delay if the 200ms gap
is intentional.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 21f2d6ef-89d8-4b20-9d43-9651c788eeba
📒 Files selected for processing (1)
app/globals.css
…timing Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
What
Two related changes to the phone/tablet navigation drawer:
Why
The drawer should fill the entire page when open, and the open/close slide should feel snappy (settled on 500ms after tuning).
Changes
Single file:
app/globals.css, on the.mm-*rules.Full-bleed panel
.mm-panelusesinset: 0(wastop/right/bottom+width: min(88vw, 380px)).border-leftandbox-shadow— a floating-panel border becomes a stray 1px line at the screen edge when full-bleed, and the leftward shadow casts entirely off-screen..mm-panel > * { max-width: 34rem }), replacing the old@media (min-width: 768px)width override. No-op on phones (viewport < 34rem, so rows fill the width as before); on tablets it keeps the nav a tidy left column instead of stretching each row edge-to-edge.Motion
translate3d(100%)→0) at 500ms with a smoothcubic-bezier(0.4, 0, 0.2, 1). Overlay fade matched to the same 500ms so the scrim stays in step on open and close.Review fixes (from bot review)
.mm-panelgetspointer-events: noneby default andpointer-events: autowhen open (mirroring.mm-overlay), so the full-viewport reduced-motion closed panel can't intercept clicks even whereinertis unavailable.Reviewer notes
.mm-toggle(close X, z-65 above the panel) andMobileMenu.tsx(state, focus trap, body-scroll lock, portal) are untouched and width-agnostic.pnpm lintandpnpm buildpass.500msslide duration is a single-value tweak if a different pace is preferred.🤖 Generated with Claude Code