Skip to content

feat(AppShell): add variant prop for nav/content background styles - #571

Merged
cixzhang merged 2 commits into
mainfrom
navi/feat/shell-lab
Mar 12, 2026
Merged

cixzhang merged 2 commits into
mainfrom
navi/feat/shell-lab

Conversation

@cixzhang

@cixzhang cixzhang commented Mar 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Replace the background prop with a variant prop that controls how nav areas contrast with content. Closes #346, part of #565 shell deep review.

Variants

Variant Nav areas Content Dividers Border radius
wash wash wash no no
surface surface surface no no
section inherit inherit yes no
elevated wash surface no top-left corner when both navs present

Key changes

  • variant prop replaces background on XDSAppShell
  • --radius-page token (20px) — themeable border radius for elevated content
  • --color-navbar token removed — nav background now controlled by the shell variant
  • SideNav/TopNav — no longer set their own background, inherit from shell
  • Elevated variant uses a decorative backdrop sibling with isolation: isolate stacking (no z-index, no overflow clipping, preserves scroll)
  • Shell Lab sandbox page for interactive testing of all configurations
  • Storybook Playground story updated with variant control

Shell Lab

Interactive sandbox page at /pages/shell-lab/ with toggles for variant, height, collapse, mobile nav, top nav style, and visibility of all shell areas.

Breaking changes

  • background prop removed — use variant instead
  • --color-navbar token removed — use variant="surface" or theme the shell

Interactive playground for testing AppShell, SideNav, TopNav, and
MobileNav configurations. Floating config panel lets you toggle:

- AppShell: background, height mode, breakpoint
- Visibility: sideNav, topNav, banner, footer icons, top content, nested items
- Collapse: default state, controlled mode, toggle
- Mobile nav: auto/custom/none, drawer side
- TopNav: alignment (start/center/end), heading visibility

Use for the #565 deep review — covers all three problem areas
(collapsed mode, auto-expand, mobile nav defaults).
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 12, 2026
@github-actions

github-actions Bot commented Mar 12, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@xds/core 9.3KB 15.0KB 2.3KB

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

- Switch sandbox to consume dist (no StyleX build pipeline)
- Import pre-compiled CSS via @xds/core/xds.css and @xds/theme-default/theme.css
- Shell Lab owns full viewport (no sandbox chrome wrapper)
- Add CLAUDE.md agent-docs injection at repo root
- Fix Switch API: value not isSelected
- Fix Badge API: children not label
- Fix footerIcons: use XDSButton icon-only instead of XDSSideNavItem
- Fix Selector API: options prop not children composition
- Add XDSBanner for banner slot
- Add NavIcon to SideNav and TopNav headings
- Add SideNav Heading visibility toggle
- Add TopNav style selector: Items / Menus / Mega
- Remove stylex from all sandbox pages (inline styles)
@cixzhang
cixzhang marked this pull request as ready for review March 12, 2026 22:59
@cixzhang
cixzhang merged commit 04c0c64 into main Mar 12, 2026
14 checks passed
@cixzhang cixzhang mentioned this pull request Mar 12, 2026
52 of 55 tasks
@cixzhang cixzhang changed the title feat(sandbox): Shell Lab — interactive shell configuration playground feat(AppShell): add variant prop for nav/content background styles Mar 13, 2026
cixzhang added a commit that referenced this pull request Mar 13, 2026
PR #571 accidentally stripped the StyleX babel plugin from the sandbox
babel config and removed the @stylex directive from globals.css. Without
these, local stylex.create() calls in sandbox pages fail to compile,
causing the sandbox build to silently fail (CI uses continue-on-error).

Changes:
- Restore @stylexjs/babel-plugin in babel.config.js (without the old
  @xds/core aliases since sandbox now consumes dist)
- Restore @stylex directive in globals.css for CSS extraction
- Convert all sandbox pages from inline style objects to stylex.create()
  for consistency and type safety
- Fix pre-existing type errors in shell-lab (XDSSideNavSection heading→
  title, XDSAppShellBreakpoint xl→none, VStack padding→xstyle)
- Convert mega-menu page to stylex (fixes position type error)
cixzhang added a commit that referenced this pull request Mar 13, 2026
PR #571 accidentally stripped the StyleX babel plugin from the sandbox
babel config and removed the @stylex directive from globals.css. Without
these, local stylex.create() calls in sandbox pages fail to compile,
causing the sandbox build to silently fail (CI uses continue-on-error).

Changes:
- Restore @stylexjs/babel-plugin in babel.config.js (without the old
  @xds/core aliases since sandbox now consumes dist)
- Restore @stylex directive in globals.css for CSS extraction
- Convert all sandbox pages from inline style objects to stylex.create()
  for consistency and type safety
- Fix pre-existing type errors in shell-lab (XDSSideNavSection heading→
  title, XDSAppShellBreakpoint xl→none, VStack padding→xstyle)
- Convert mega-menu page to stylex (fixes position type error)
cixzhang added a commit that referenced this pull request Mar 13, 2026
PR #571 accidentally stripped the StyleX babel plugin from the sandbox
babel config and removed the @stylex directive from globals.css. Without
these, local stylex.create() calls in sandbox pages fail to compile,
causing the sandbox build to silently fail (CI uses continue-on-error).

Changes:
- Restore @stylexjs/babel-plugin in babel.config.js (without the old
  @xds/core aliases since sandbox now consumes dist)
- Restore @stylex directive in globals.css for CSS extraction
- Convert all sandbox pages from inline style objects to stylex.create()
  for consistency and type safety
- Fix pre-existing type errors in shell-lab (XDSSideNavSection heading→
  title, XDSAppShellBreakpoint xl→none, VStack padding→xstyle)
- Convert mega-menu page to stylex (fixes position type error)
cixzhang added a commit that referenced this pull request Apr 26, 2026
…#571)

* feat(sandbox): add Shell Lab experimentation page

Interactive playground for testing AppShell, SideNav, TopNav, and
MobileNav configurations. Floating config panel lets you toggle:

- AppShell: background, height mode, breakpoint
- Visibility: sideNav, topNav, banner, footer icons, top content, nested items
- Collapse: default state, controlled mode, toggle
- Mobile nav: auto/custom/none, drawer side
- TopNav: alignment (start/center/end), heading visibility

Use for the #565 deep review — covers all three problem areas
(collapsed mode, auto-expand, mobile nav defaults).

* feat(sandbox): Shell Lab updates — dist build, full viewport, API fixes

- Switch sandbox to consume dist (no StyleX build pipeline)
- Import pre-compiled CSS via @xds/core/xds.css and @xds/theme-default/theme.css
- Shell Lab owns full viewport (no sandbox chrome wrapper)
- Add CLAUDE.md agent-docs injection at repo root
- Fix Switch API: value not isSelected
- Fix Badge API: children not label
- Fix footerIcons: use XDSButton icon-only instead of XDSSideNavItem
- Fix Selector API: options prop not children composition
- Add XDSBanner for banner slot
- Add NavIcon to SideNav and TopNav headings
- Add SideNav Heading visibility toggle
- Add TopNav style selector: Items / Menus / Mega
- Remove stylex from all sandbox pages (inline styles)
cixzhang added a commit that referenced this pull request Jun 21, 2026
…#571)

* feat(sandbox): add Shell Lab experimentation page

Interactive playground for testing AppShell, SideNav, TopNav, and
MobileNav configurations. Floating config panel lets you toggle:

- AppShell: background, height mode, breakpoint
- Visibility: sideNav, topNav, banner, footer icons, top content, nested items
- Collapse: default state, controlled mode, toggle
- Mobile nav: auto/custom/none, drawer side
- TopNav: alignment (start/center/end), heading visibility

Use for the #565 deep review — covers all three problem areas
(collapsed mode, auto-expand, mobile nav defaults).

* feat(sandbox): Shell Lab updates — dist build, full viewport, API fixes

- Switch sandbox to consume dist (no StyleX build pipeline)
- Import pre-compiled CSS via @xds/core/xds.css and @xds/theme-default/theme.css
- Shell Lab owns full viewport (no sandbox chrome wrapper)
- Add CLAUDE.md agent-docs injection at repo root
- Fix Switch API: value not isSelected
- Fix Badge API: children not label
- Fix footerIcons: use XDSButton icon-only instead of XDSSideNavItem
- Fix Selector API: options prop not children composition
- Add XDSBanner for banner slot
- Add NavIcon to SideNav and TopNav headings
- Add SideNav Heading visibility toggle
- Add TopNav style selector: Items / Menus / Mega
- Remove stylex from all sandbox pages (inline styles)
cixzhang added a commit that referenced this pull request Jun 21, 2026
…#571)

* feat(sandbox): add Shell Lab experimentation page

Interactive playground for testing AppShell, SideNav, TopNav, and
MobileNav configurations. Floating config panel lets you toggle:

- AppShell: background, height mode, breakpoint
- Visibility: sideNav, topNav, banner, footer icons, top content, nested items
- Collapse: default state, controlled mode, toggle
- Mobile nav: auto/custom/none, drawer side
- TopNav: alignment (start/center/end), heading visibility

Use for the #565 deep review — covers all three problem areas
(collapsed mode, auto-expand, mobile nav defaults).

* feat(sandbox): Shell Lab updates — dist build, full viewport, API fixes

- Switch sandbox to consume dist (no StyleX build pipeline)
- Import pre-compiled CSS via @xds/core/xds.css and @xds/theme-default/theme.css
- Shell Lab owns full viewport (no sandbox chrome wrapper)
- Add CLAUDE.md agent-docs injection at repo root
- Fix Switch API: value not isSelected
- Fix Badge API: children not label
- Fix footerIcons: use XDSButton icon-only instead of XDSSideNavItem
- Fix Selector API: options prop not children composition
- Add XDSBanner for banner slot
- Add NavIcon to SideNav and TopNav headings
- Add SideNav Heading visibility toggle
- Add TopNav style selector: Items / Menus / Mega
- Remove stylex from all sandbox pages (inline styles)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(AppShell): add navBackground prop for nav/content color contrast

1 participant