Skip to content

feat(nav): modernize the mobile sidebar drawer#11653

Open
jd wants to merge 1 commit into
mainfrom
devs/jd/feat/mobile-nav-drawer/modernize-mobile-sidebar-drawer--7e917961
Open

feat(nav): modernize the mobile sidebar drawer#11653
jd wants to merge 1 commit into
mainfrom
devs/jd/feat/mobile-nav-drawer/modernize-mobile-sidebar-drawer--7e917961

Conversation

@jd
Copy link
Copy Markdown
Member

@jd jd commented May 22, 2026

Replace the full-screen overlay with a partial-width drawer that slides
in from the left over a tappable backdrop:

  • Drawer is min(85vw, 20rem) wide, leaving the page peeking on the
    right for visual context
  • Backdrop dim covers everything below the navbar; tapping it closes
    the drawer
  • ESC key also closes
  • Hamburger icon switches to an X when the drawer is open, with
    matching aria-expanded / aria-label
  • Backdrop lives at the BaseLayout level (sibling of #left-sidebar)
    so it isn't trapped in the Header's z-index 11 stacking context —
    prior placement inside the Header rendered above the sidebar and
    dimmed the drawer itself
  • 0.22s slide transition replaces the old jump-cut

The old mobile-sidebar-toggle .main-column { visibility: hidden }
rule was load-bearing for the full-screen overlay (hid the content
behind it) but isn't needed now that the backdrop handles dimming,
so it's gone.

Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com

Copilot AI review requested due to automatic review settings May 22, 2026 07:31
@mergify mergify Bot had a problem deploying to Mergify Merge Protections May 22, 2026 07:32 Failure
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 22, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 👀 Review Requirements

Waiting for

  • #approved-reviews-by >= 2
This rule is failing.
  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]
    • author = mergify-ci-bot

🔴 🔎 Reviews

Waiting for

  • #review-requested = 0
This rule is failing.
  • #review-requested = 0
  • #changes-requested-reviews-by = 0
  • #review-threads-unresolved = 0

🟢 🤖 Continuous Integration

Wonderful, this rule succeeded.
  • all of:
    • check-success = build
    • check-success = lint
    • check-success = test
    • any of:
      • check-success = test-broken-links
      • label = ignore-broken-links
    • any of:
      • check-success=Cloudflare Pages
      • -head-repo-full-name~=^Mergifyio/

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

@mergify mergify Bot requested a review from a team May 22, 2026 07:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the docs site’s mobile navigation from a full-screen overlay to a partial-width left drawer with a layout-level backdrop, aiming to improve visual context, interaction (tap-to-close + ESC), and animation smoothness.

Changes:

  • Adds a fixed, tappable backdrop at the BaseLayout level and converts the left sidebar into an off-canvas drawer with slide-in transition on mobile.
  • Enhances the header toggle button to reflect open/closed state (hamburger ↔ X) and adds ESC/backdrop click handling.
  • Adjusts styling to keep the toggle button above the backdrop and hides the backdrop on desktop breakpoints.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/layouts/BaseLayout.astro Introduces the mobile backdrop and converts the left sidebar into a transform-based sliding drawer on narrow viewports.
src/components/Header/SidebarToggle.tsx Updates toggle state handling, adds ESC/backdrop click-to-close behavior, and improves ARIA labeling.
src/components/Header/SidebarToggle.css Ensures the toggle remains clickable above the backdrop and hides mobile-only elements at desktop widths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/layouts/BaseLayout.astro
Comment thread src/layouts/BaseLayout.astro
Comment thread src/components/Header/SidebarToggle.tsx
@jd jd marked this pull request as ready for review May 22, 2026 09:05
Replace the full-screen overlay with a partial-width drawer that slides
in from the left over a tappable backdrop:

- Drawer is `min(85vw, 20rem)` wide, leaving the page peeking on the
  right for visual context
- Backdrop dim covers everything below the navbar; tapping it closes
  the drawer
- ESC key also closes
- Hamburger icon switches to an X when the drawer is open, with
  matching `aria-expanded` / `aria-label`
- Backdrop lives at the BaseLayout level (sibling of `#left-sidebar`)
  so it isn't trapped in the Header's z-index 11 stacking context —
  prior placement inside the Header rendered above the sidebar and
  dimmed the drawer itself
- 0.22s slide transition replaces the old jump-cut

The old `mobile-sidebar-toggle .main-column { visibility: hidden }`
rule was load-bearing for the full-screen overlay (hid the content
behind it) but isn't needed now that the backdrop handles dimming,
so it's gone.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Change-Id: I7e917961ef0e3448e8f3c95d79bfb0eb5af016b2
@jd jd force-pushed the devs/jd/feat/mobile-nav-drawer/modernize-mobile-sidebar-drawer--7e917961 branch from bb64ce3 to add90ea Compare May 22, 2026 09:12
@jd
Copy link
Copy Markdown
Member Author

jd commented May 22, 2026

Revision history

# Type Changes Reason Date
1 initial bb64ce3 2026-05-22 09:12 UTC
2 content bb64ce3 → add90ea (raw) 2026-05-22 09:12 UTC

@mergify mergify Bot had a problem deploying to Mergify Merge Protections May 22, 2026 09:13 Failure
@mergify mergify Bot requested a review from a team May 22, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants