Repository navigation
feat(TopNav): mobile responsive rendering (#565) - #652
Merged
Merged
Conversation
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsAppShell · View in Storybook
SideNav · View in Storybook
TopNav · View in Storybook · 🆕 XDSTopNavRenderContext
Bundle Size Summary
Accessibility AuditStatus: 1 accessibility violation(s) found — 1 serious. XDSSideNav - 1 issue(s)
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
cixzhang
marked this pull request as ready for review
March 17, 2026 14:52
added 3 commits
March 17, 2026 14:57
…tching TopNav now supports three render modes via XDSTopNavRenderContext: - default: full top bar (desktop) - mobile-bar: heading + endContent + toggle, hides nav items - drawer: nav items rendered vertically inside XDSMobileNav XDSTopNavItem adapts in drawer mode — renders as a SideNavItem-style vertical list element with full-width tap targets. AppShell integration: - Wraps topNav in mobile-bar context when below breakpoint - Renders topNav in drawer context for TopNav-only layouts - Breakpoint detection now triggers on hasTopNav (not just hasSideNav) - TopNav handles its own XDSMobileNavToggle in mobile-bar mode Handles all cases: - TopNav + SideNav: TopNav simplifies to heading+endContent+toggle, TopNav items go to a separate drawer (SideNav has its own) - TopNav only: TopNav renders its own drawer with items - No collapsible content: no toggle shown, no drawer rendered Co-authored-by: Navi <[email protected]>
When both TopNav and SideNav exist, renders a single mobile drawer instead of two separate ones. TopNav owns the drawer and SideNav content is passed via XDSTopNavMobileContentContext. - New 'drawer-content' mode for SideNav: renders items without XDSMobileNav wrapper (used when nested inside TopNav's drawer) - AppShell passes SideNav (in drawer-content mode) as context to TopNav when both exist - TopNav drawer renders its items first, then SideNav content below - TopNav heading goes to the drawer header Cases: - TopNav+SideNav: one drawer (TopNav owns, SideNav items below) - TopNav only: one drawer (TopNav owns) - SideNav only: one drawer (SideNav owns, unchanged) Co-authored-by: Navi <[email protected]>
Co-authored-by: Navi <[email protected]>
cixzhang
force-pushed
the
navi/feat/topnav-mobile
branch
from
March 17, 2026 14:58
dfe57cb to
7fd92e4
Compare
52 of 55 tasks
cixzhang
added a commit
that referenced
this pull request
Apr 26, 2026
* feat(TopNav): mobile responsive rendering with context-based mode switching TopNav now supports three render modes via XDSTopNavRenderContext: - default: full top bar (desktop) - mobile-bar: heading + endContent + toggle, hides nav items - drawer: nav items rendered vertically inside XDSMobileNav XDSTopNavItem adapts in drawer mode — renders as a SideNavItem-style vertical list element with full-width tap targets. AppShell integration: - Wraps topNav in mobile-bar context when below breakpoint - Renders topNav in drawer context for TopNav-only layouts - Breakpoint detection now triggers on hasTopNav (not just hasSideNav) - TopNav handles its own XDSMobileNavToggle in mobile-bar mode Handles all cases: - TopNav + SideNav: TopNav simplifies to heading+endContent+toggle, TopNav items go to a separate drawer (SideNav has its own) - TopNav only: TopNav renders its own drawer with items - No collapsible content: no toggle shown, no drawer rendered Co-authored-by: Navi <[email protected]> * feat(AppShell): single combined mobile drawer for TopNav + SideNav When both TopNav and SideNav exist, renders a single mobile drawer instead of two separate ones. TopNav owns the drawer and SideNav content is passed via XDSTopNavMobileContentContext. - New 'drawer-content' mode for SideNav: renders items without XDSMobileNav wrapper (used when nested inside TopNav's drawer) - AppShell passes SideNav (in drawer-content mode) as context to TopNav when both exist - TopNav drawer renders its items first, then SideNav content below - TopNav heading goes to the drawer header Cases: - TopNav+SideNav: one drawer (TopNav owns, SideNav items below) - TopNav only: one drawer (TopNav owns) - SideNav only: one drawer (SideNav owns, unchanged) Co-authored-by: Navi <[email protected]> * fix: add spacing before injected SideNav content in mobile drawer Co-authored-by: Navi <[email protected]> --------- Co-authored-by: navi[bot] <[email protected]>
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
* feat(TopNav): mobile responsive rendering with context-based mode switching TopNav now supports three render modes via XDSTopNavRenderContext: - default: full top bar (desktop) - mobile-bar: heading + endContent + toggle, hides nav items - drawer: nav items rendered vertically inside XDSMobileNav XDSTopNavItem adapts in drawer mode — renders as a SideNavItem-style vertical list element with full-width tap targets. AppShell integration: - Wraps topNav in mobile-bar context when below breakpoint - Renders topNav in drawer context for TopNav-only layouts - Breakpoint detection now triggers on hasTopNav (not just hasSideNav) - TopNav handles its own XDSMobileNavToggle in mobile-bar mode Handles all cases: - TopNav + SideNav: TopNav simplifies to heading+endContent+toggle, TopNav items go to a separate drawer (SideNav has its own) - TopNav only: TopNav renders its own drawer with items - No collapsible content: no toggle shown, no drawer rendered Co-authored-by: Navi <[email protected]> * feat(AppShell): single combined mobile drawer for TopNav + SideNav When both TopNav and SideNav exist, renders a single mobile drawer instead of two separate ones. TopNav owns the drawer and SideNav content is passed via XDSTopNavMobileContentContext. - New 'drawer-content' mode for SideNav: renders items without XDSMobileNav wrapper (used when nested inside TopNav's drawer) - AppShell passes SideNav (in drawer-content mode) as context to TopNav when both exist - TopNav drawer renders its items first, then SideNav content below - TopNav heading goes to the drawer header Cases: - TopNav+SideNav: one drawer (TopNav owns, SideNav items below) - TopNav only: one drawer (TopNav owns) - SideNav only: one drawer (SideNav owns, unchanged) Co-authored-by: Navi <[email protected]> * fix: add spacing before injected SideNav content in mobile drawer Co-authored-by: Navi <[email protected]> --------- Co-authored-by: navi[bot] <[email protected]>
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
* feat(TopNav): mobile responsive rendering with context-based mode switching TopNav now supports three render modes via XDSTopNavRenderContext: - default: full top bar (desktop) - mobile-bar: heading + endContent + toggle, hides nav items - drawer: nav items rendered vertically inside XDSMobileNav XDSTopNavItem adapts in drawer mode — renders as a SideNavItem-style vertical list element with full-width tap targets. AppShell integration: - Wraps topNav in mobile-bar context when below breakpoint - Renders topNav in drawer context for TopNav-only layouts - Breakpoint detection now triggers on hasTopNav (not just hasSideNav) - TopNav handles its own XDSMobileNavToggle in mobile-bar mode Handles all cases: - TopNav + SideNav: TopNav simplifies to heading+endContent+toggle, TopNav items go to a separate drawer (SideNav has its own) - TopNav only: TopNav renders its own drawer with items - No collapsible content: no toggle shown, no drawer rendered * feat(AppShell): single combined mobile drawer for TopNav + SideNav When both TopNav and SideNav exist, renders a single mobile drawer instead of two separate ones. TopNav owns the drawer and SideNav content is passed via XDSTopNavMobileContentContext. - New 'drawer-content' mode for SideNav: renders items without XDSMobileNav wrapper (used when nested inside TopNav's drawer) - AppShell passes SideNav (in drawer-content mode) as context to TopNav when both exist - TopNav drawer renders its items first, then SideNav content below - TopNav heading goes to the drawer header Cases: - TopNav+SideNav: one drawer (TopNav owns, SideNav items below) - TopNav only: one drawer (TopNav owns) - SideNav only: one drawer (SideNav owns, unchanged) * fix: add spacing before injected SideNav content in mobile drawer ---------
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.
What
TopNav items now collapse into a mobile drawer below the breakpoint, matching the SideNav pattern.
How it works
Same context-based rendering strategy as SideNav. TopNav reads
XDSTopNavRenderContextand adapts:default— full top bar (desktop)mobile-bar— heading + endContent + hamburger toggle, hides nav itemsdrawer— nav items rendered vertically inside<XDSMobileNav>XDSTopNavItemalso reads the context — in drawer mode it renders as a full-width SideNavItem-style list element with vertical layout and tap targets.AppShell integration
topNavinmobile-barcontext when below the breakpointtopNavindrawercontext for the mobile drawerhasTopNav(not justhasSideNav)<XDSMobileNavToggle>in mobile-bar modeCases handled
Not in this PR
Part of #565