fix(Banner): expose status on root xdsClassName for theme targeting - #810
Merged
Conversation
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsBanner · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 1 accessibility violation(s) found — 1 serious. XDSBanner - 1 issue(s)
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
Merged
rubyycheung
added a commit
that referenced
this pull request
Mar 27, 2026
Updates based on Cindy's PR review comments: - Use status:* keys for banner per-status overrides (#810) - Use pseudo-class overrides for radio/checkbox/switch hover (#811) instead of component-owned CSS vars (--radio-border, etc.) - Remove all duplicate token declarations - Remove --banner-status-bg var, use status:* class targeting instead - Remove --radio/checkbox/switch CSS vars not present on main - Add fonts field for Figtree font loading via XDSTheme - Add @xds/theme-meta to transpilePackages in next.config.mjs - Add @xds/theme-meta to root build script - Clean up component overrides to be more concise
rubyycheung
added a commit
that referenced
this pull request
Mar 27, 2026
Updates based on Cindy's PR review comments: - Use status:* keys for banner per-status overrides (#810) - Use pseudo-class overrides for radio/checkbox/switch hover (#811) instead of component-owned CSS vars (--radio-border, etc.) - Remove all duplicate token declarations - Remove --banner-status-bg var, use status:* class targeting instead - Remove --radio/checkbox/switch CSS vars not present on main - Add fonts field for Figtree font loading via XDSTheme - Add @xds/theme-meta to transpilePackages in next.config.mjs - Add @xds/theme-meta to root build script - Clean up component overrides to be more concise
rubyycheung
added a commit
that referenced
this pull request
Mar 27, 2026
Updates based on Cindy's PR review comments: - Use status:* keys for banner per-status overrides (#810) - Use pseudo-class overrides for radio/checkbox/switch hover (#811) instead of component-owned CSS vars (--radio-border, etc.) - Remove all duplicate token declarations - Remove --banner-status-bg var, use status:* class targeting instead - Remove --radio/checkbox/switch CSS vars not present on main - Add fonts field for Figtree font loading via XDSTheme - Add @xds/theme-meta to transpilePackages in next.config.mjs - Add @xds/theme-meta to root build script - Clean up component overrides to be more concise
rubyycheung
added a commit
that referenced
this pull request
Mar 27, 2026
* feat: add Meta Theme to sandbox (rebased on main) - Add @xds/theme-meta package with updated token names matching main's naming convention - Wire Meta theme into sandbox: providers, layout CSS, SandboxNav selector - Use --xds-card-padding / --xds-section-padding instead of raw --container-padding vars - Meta theme is sandbox-only (not in Storybook) * refactor: align Meta theme with latest theming infrastructure Updates based on Cindy's PR review comments: - Use status:* keys for banner per-status overrides (#810) - Use pseudo-class overrides for radio/checkbox/switch hover (#811) instead of component-owned CSS vars (--radio-border, etc.) - Remove all duplicate token declarations - Remove --banner-status-bg var, use status:* class targeting instead - Remove --radio/checkbox/switch CSS vars not present on main - Add fonts field for Figtree font loading via XDSTheme - Add @xds/theme-meta to transpilePackages in next.config.mjs - Add @xds/theme-meta to root build script - Clean up component overrides to be more concise * refactor: move illustrations from theme package to sandbox app Illustrations are consumed by the sandbox, not by the theme itself. Keeps the theme package lean (tokens + icons + component overrides). Sandbox imports them directly from src/components/MetaIllustrations. * fix: resolve build errors — remove fonts field, move variants into components - fonts field doesn't exist on XDSDefineThemeInput; use url on typography roles instead (body.url) for font loading - variants field was removed from defineTheme; declare custom variants as variant:name keys inside components.button instead
cixzhang
added a commit
that referenced
this pull request
Apr 26, 2026
cixzhang
pushed a commit
that referenced
this pull request
Apr 26, 2026
* feat: add Meta Theme to sandbox (rebased on main) - Add @xds/theme-meta package with updated token names matching main's naming convention - Wire Meta theme into sandbox: providers, layout CSS, SandboxNav selector - Use --xds-card-padding / --xds-section-padding instead of raw --container-padding vars - Meta theme is sandbox-only (not in Storybook) * refactor: align Meta theme with latest theming infrastructure Updates based on Cindy's PR review comments: - Use status:* keys for banner per-status overrides (#810) - Use pseudo-class overrides for radio/checkbox/switch hover (#811) instead of component-owned CSS vars (--radio-border, etc.) - Remove all duplicate token declarations - Remove --banner-status-bg var, use status:* class targeting instead - Remove --radio/checkbox/switch CSS vars not present on main - Add fonts field for Figtree font loading via XDSTheme - Add @xds/theme-meta to transpilePackages in next.config.mjs - Add @xds/theme-meta to root build script - Clean up component overrides to be more concise * refactor: move illustrations from theme package to sandbox app Illustrations are consumed by the sandbox, not by the theme itself. Keeps the theme package lean (tokens + icons + component overrides). Sandbox imports them directly from src/components/MetaIllustrations. * fix: resolve build errors — remove fonts field, move variants into components - fonts field doesn't exist on XDSDefineThemeInput; use url on typography roles instead (body.url) for font loading - variants field was removed from defineTheme; declare custom variants as variant:name keys inside components.button instead
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
cixzhang
pushed a commit
that referenced
this pull request
Jun 21, 2026
* feat: add Meta Theme to sandbox (rebased on main) - Add @xds/theme-meta package with updated token names matching main's naming convention - Wire Meta theme into sandbox: providers, layout CSS, SandboxNav selector - Use --xds-card-padding / --xds-section-padding instead of raw --container-padding vars - Meta theme is sandbox-only (not in Storybook) * refactor: align Meta theme with latest theming infrastructure Updates based on Cindy's PR review comments: - Use status:* keys for banner per-status overrides (#810) - Use pseudo-class overrides for radio/checkbox/switch hover (#811) instead of component-owned CSS vars (--radio-border, etc.) - Remove all duplicate token declarations - Remove --banner-status-bg var, use status:* class targeting instead - Remove --radio/checkbox/switch CSS vars not present on main - Add fonts field for Figtree font loading via XDSTheme - Add @xds/theme-meta to transpilePackages in next.config.mjs - Add @xds/theme-meta to root build script - Clean up component overrides to be more concise * refactor: move illustrations from theme package to sandbox app Illustrations are consumed by the sandbox, not by the theme itself. Keeps the theme package lean (tokens + icons + component overrides). Sandbox imports them directly from src/components/MetaIllustrations. * fix: resolve build errors — remove fonts field, move variants into components - fonts field doesn't exist on XDSDefineThemeInput; use url on typography roles instead (body.url) for font loading - variants field was removed from defineTheme; declare custom variants as variant:name keys inside components.button instead
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
cixzhang
pushed a commit
that referenced
this pull request
Jun 21, 2026
* feat: add Meta Theme to sandbox (rebased on main) - Add @xds/theme-meta package with updated token names matching main's naming convention - Wire Meta theme into sandbox: providers, layout CSS, SandboxNav selector - Use --xds-card-padding / --xds-section-padding instead of raw --container-padding vars - Meta theme is sandbox-only (not in Storybook) * refactor: align Meta theme with latest theming infrastructure Updates based on Cindy's PR review comments: - Use status:* keys for banner per-status overrides (#810) - Use pseudo-class overrides for radio/checkbox/switch hover (#811) instead of component-owned CSS vars (--radio-border, etc.) - Remove all duplicate token declarations - Remove --banner-status-bg var, use status:* class targeting instead - Remove --radio/checkbox/switch CSS vars not present on main - Add fonts field for Figtree font loading via XDSTheme - Add @xds/theme-meta to transpilePackages in next.config.mjs - Add @xds/theme-meta to root build script - Clean up component overrides to be more concise * refactor: move illustrations from theme package to sandbox app Illustrations are consumed by the sandbox, not by the theme itself. Keeps the theme package lean (tokens + icons + component overrides). Sandbox imports them directly from src/components/MetaIllustrations. * fix: resolve build errors — remove fonts field, move variants into components - fonts field doesn't exist on XDSDefineThemeInput; use url on typography roles instead (body.url) for font loading - variants field was removed from defineTheme; declare custom variants as variant:name keys inside components.button instead
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.
Summary
Adds
statusto the root element'sxdsClassName('banner', {variant, status})call. This lets themes override per-status styles (like background color) via component overrides indefineTheme, eliminating the need for the--banner-status-bgCSS custom property escape hatch.Before
After
Theme usage
Changes
xdsClassName('banner', {variant})→xdsClassName('banner', {variant, status})statustoxds-bannertheming targets (both en and zh sections)Ref: PR #692 (Meta Theme) identified this gap — the theme needed
--banner-status-bgbecause status wasn't targetable on the root element.