Skip to content

fix(AppShell): add wash background color to root container - #328

Merged
cixzhang merged 2 commits into
mainfrom
navi/fix/appshell-wash-background
Feb 25, 2026
Merged

cixzhang merged 2 commits into
mainfrom
navi/fix/appshell-wash-background

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Summary

One-line fix: adds backgroundColor: colorVars['--color-wash'] to the AppShell root container.

Problem

The AppShell root had no background color. In dark mode, the body's default white showed through — the shell content was dark but any area not covered by a component (gaps, scrollable overflow) stayed white.

Fix

Set backgroundColor to --color-wash on the root style. This is the standard page background token — it's what the body/canvas should be. Since the AppShell is the top-level layout wrapper, it's the right place to set this.

Note on mobile sidebar

Internally, the left nav converts to a top nav appearance on mobile with a hamburger menu. Some teams have wanted to configure this behavior. That's a separate discussion — this PR just fixes the background.

Test plan

  • yarn build — clean
  • yarn test — 1006 tests pass
  • Dark mode: shell background matches theme wash color

Crafted with care by Navi

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 25, 2026
@github-actions

github-actions Bot commented Feb 25, 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.

Modified Components

AppShell · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A 209B N/A
Lines of Code N/A 338 -
Complexity N/A Very High (35) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@xds/core 7.9KB 12.9KB 2.0KB

Accessibility Audit

Status: No accessibility violations detected.

Component Previews

Includes interactive hover previews as animated GIFs.

XDSAppShell

Top Nav With Side Nav

Screenshot:

Top Nav With Side Nav

Interaction Preview: (view video)

Top Nav With Side Nav interaction

View in Storybook · core-xdsappshell--top-nav-with-side-nav

Side Nav Only

Screenshot:

Side Nav Only

View in Storybook · core-xdsappshell--side-nav-only

Top Nav Only

Screenshot:

Top Nav Only

View in Storybook · core-xdsappshell--top-nav-only

Full Featured

Screenshot:

Full Featured

View in Storybook · core-xdsappshell--full-featured

Auto Height

Screenshot:

Auto Height

View in Storybook · core-xdsappshell--auto-height

Controlled Collapse

Screenshot:

Controlled Collapse

View in Storybook · core-xdsappshell--controlled-collapse

Content Only

Screenshot:

Content Only

View in Storybook · core-xdsappshell--content-only

With Banner

Screenshot:

With Banner

View in Storybook · core-xdsappshell--with-banner


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

The AppShell root had no background color, so the body's default
white showed through in dark mode. Set backgroundColor to
--color-wash so the shell always matches the active theme.

Co-authored-by: Navi <[email protected]>
@cixzhang
cixzhang force-pushed the navi/fix/appshell-wash-background branch from 82b4ec4 to f94374a Compare February 25, 2026 05:41
Adds a `background` prop to XDSAppShell that controls the root
background color:
- `surface` (default): white in light, dark gray in dark
- `wash`: subtle gray in light, near-black in dark

Co-authored-by: Navi <[email protected]>
@cixzhang
cixzhang enabled auto-merge February 25, 2026 07:45
@cixzhang
cixzhang added this pull request to the merge queue Feb 25, 2026
Merged via the queue into main with commit 1fc082e Feb 25, 2026
9 checks passed
@cixzhang
cixzhang deleted the navi/fix/appshell-wash-background branch February 25, 2026 07:53
cixzhang added a commit that referenced this pull request Apr 26, 2026
* fix(AppShell): add wash background color to root container

The AppShell root had no background color, so the body's default
white showed through in dark mode. Set backgroundColor to
--color-wash so the shell always matches the active theme.

Co-authored-by: Navi <[email protected]>

* feat(AppShell): add background prop with wash/surface options

Adds a `background` prop to XDSAppShell that controls the root
background color:
- `surface` (default): white in light, dark gray in dark
- `wash`: subtle gray in light, near-black in dark

Co-authored-by: Navi <[email protected]>

---------

Co-authored-by: Navi <[email protected]>
cixzhang added a commit that referenced this pull request Jun 21, 2026
* fix(AppShell): add wash background color to root container

The AppShell root had no background color, so the body's default
white showed through in dark mode. Set backgroundColor to
--color-wash so the shell always matches the active theme.

Co-authored-by: Navi <[email protected]>

* feat(AppShell): add background prop with wash/surface options

Adds a `background` prop to XDSAppShell that controls the root
background color:
- `surface` (default): white in light, dark gray in dark
- `wash`: subtle gray in light, near-black in dark

Co-authored-by: Navi <[email protected]>

---------

Co-authored-by: Navi <[email protected]>
cixzhang added a commit that referenced this pull request Jun 21, 2026
* fix(AppShell): add wash background color to root container

The AppShell root had no background color, so the body's default
white showed through in dark mode. Set backgroundColor to
--color-wash so the shell always matches the active theme.


* feat(AppShell): add background prop with wash/surface options

Adds a `background` prop to XDSAppShell that controls the root
background color:
- `surface` (default): white in light, dark gray in dark
- `wash`: subtle gray in light, near-black in dark


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

1 participant