Skip to content

feat(mobile-menu): fill the viewport when the drawer opens - #189

Merged
yigitdot merged 6 commits into
mainfrom
claude/wizardly-kepler-6b5581
Jul 13, 2026
Merged

yigitdot merged 6 commits into
mainfrom
claude/wizardly-kepler-6b5581

Conversation

@yigitdot

@yigitdot yigitdot commented Jul 10, 2026 •

Copy link
Copy Markdown
Collaborator

What

Two related changes to the phone/tablet navigation drawer:

  1. Full-bleed — the drawer now fills the entire viewport when open, instead of a partial right-side panel that left a sliver of the page behind a dark scrim.
  2. Right-to-left slide, 500ms — the drawer keeps its slide-in-from-the-right motion, moving as one solid screen, at a snappy 500ms both ways.

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-panel uses inset: 0 (was top/right/bottom + width: min(88vw, 380px)).
  • Removed border-left and box-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.
  • Content capped to a left-aligned column (.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

  • Panel keeps its right-to-left slide (translate3d(100%) → 0) at 500ms with a smooth cubic-bezier(0.4, 0, 0.2, 1). Overlay fade matched to the same 500ms so the scrim stays in step on open and close.
  • Content moves with the panel as one solid screen. Removed the per-link fade/stagger that animated separately from the slide — it blanked the links out on close and trailed the panel on open. The links now ride in and out with the slide.
  • Reduced-motion path retained (opacity fade, no slide).

Review fixes (from bot review)

  • .mm-panel gets pointer-events: none by default and pointer-events: auto when open (mirroring .mm-overlay), so the full-viewport reduced-motion closed panel can't intercept clicks even where inert is unavailable.
  • Overlay and panel transition durations kept in sync (both 500ms) so the scrim never clears before the panel finishes moving.

Reviewer notes

  • .mm-toggle (close X, z-65 above the panel) and MobileMenu.tsx (state, focus trap, body-scroll lock, portal) are untouched and width-agnostic.
  • Verified in-browser: full-bleed at 375px (edge-to-edge, no sliver/scrim/border) and 768px (content capped at 544px, left-aligned); open → scroll lock, X → unlock, section links resolve; closed panel sits off-screen and doesn't intercept pointer events (including the reduced-motion on-screen case). pnpm lint and pnpm build pass.
  • The 500ms slide duration is a single-value tweak if a different pace is preferred.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings July 10, 2026 13:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The 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.

Changes

Mobile menu layout

Layer / File(s) Summary
Full-bleed panel and constrained content
app/globals.css
.mm-panel uses inset: 0, disables pointer events while closed, caps direct children at 34rem, and updates overlay timing.
Transition-based menu reveals
app/globals.css
.mm-head and .mm-row replace keyframe animations with opacity/transform transitions; reduced-motion mode uses opacity-only transitions for the overlay and panel with transforms disabled.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: the mobile menu drawer now fills the viewport when opened.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/wizardly-kepler-6b5581

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread app/globals.css
right: 0;
bottom: 0;
width: min(88vw, 380px);
inset: 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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;
  }

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8645846 and ed4b33c.

📒 Files selected for processing (1)
  • app/globals.css

Comment thread app/globals.css Resolved
@yigitdot
yigitdot merged commit 3ba28d5 into main Jul 13, 2026
7 checks passed
@yigitdot
yigitdot deleted the claude/wizardly-kepler-6b5581 branch July 13, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants