feat(nav): modernize the mobile sidebar drawer#11653
Open
jd wants to merge 1 commit into
Open
Conversation
Contributor
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🔴 👀 Review RequirementsWaiting for
This rule is failing.
🔴 🔎 ReviewsWaiting for
This rule is failing.
🟢 🤖 Continuous IntegrationWonderful, this rule succeeded.
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 📕 PR descriptionWonderful, this rule succeeded.
|
There was a problem hiding this comment.
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
BaseLayoutlevel 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.
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
bb64ce3 to
add90ea
Compare
Member
Author
Revision history
|
remyduthu
approved these changes
May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the full-screen overlay with a partial-width drawer that slides
in from the left over a tappable backdrop:
min(85vw, 20rem)wide, leaving the page peeking on theright for visual context
the drawer
matching
aria-expanded/aria-label#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
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