feat(AppShell): add contentPadding prop - #612
Merged
Merged
Conversation
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsAppShell · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
cixzhang
force-pushed
the
navi/feat/content-padding
branch
2 times, most recently
from
March 13, 2026 22:19
761a99f to
dd5ce23
Compare
Add a contentPadding prop to XDSAppShell that controls the main content
area padding. Set based on the dominant content pattern for the page:
- contentPadding={4} for forms, settings, text-heavy pages
- contentPadding={0} for dashboards, maps, tables (edge-to-edge)
Override individual sections with <XDSSection padding={...}>.
Defaults to 0 (current behavior) for backward compatibility.
Migrated all existing usages:
- Storybook stories: replaced manual padding div with contentPadding={6}
- Shell Lab: replaced hardcoded padding: 24 with contentPadding={6}
Validated via ad-hoc vibe test (10 prompts × 3 approaches):
- contentPadding won on mixed layouts (7 decisions vs 8 for default-padding)
- Balanced doc examples are critical — both contentPadding={4} and
contentPadding={0} mixed-layout examples must be shown
Ref #565
cixzhang
force-pushed
the
navi/feat/content-padding
branch
from
March 13, 2026 22:21
dd5ce23 to
e03a366
Compare
This was referenced Mar 14, 2026
Merged
cixzhang
added a commit
that referenced
this pull request
Apr 26, 2026
Add a contentPadding prop to XDSAppShell that controls the main content
area padding. Set based on the dominant content pattern for the page:
- contentPadding={4} for forms, settings, text-heavy pages
- contentPadding={0} for dashboards, maps, tables (edge-to-edge)
Override individual sections with <XDSSection padding={...}>.
Defaults to 0 (current behavior) for backward compatibility.
Migrated all existing usages:
- Storybook stories: replaced manual padding div with contentPadding={6}
- Shell Lab: replaced hardcoded padding: 24 with contentPadding={6}
Validated via ad-hoc vibe test (10 prompts × 3 approaches):
- contentPadding won on mixed layouts (7 decisions vs 8 for default-padding)
- Balanced doc examples are critical — both contentPadding={4} and
contentPadding={0} mixed-layout examples must be shown
Ref #565
Co-authored-by: Navi <navi@users.noreply.github.com>
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
Add a contentPadding prop to XDSAppShell that controls the main content
area padding. Set based on the dominant content pattern for the page:
- contentPadding={4} for forms, settings, text-heavy pages
- contentPadding={0} for dashboards, maps, tables (edge-to-edge)
Override individual sections with <XDSSection padding={...}>.
Defaults to 0 (current behavior) for backward compatibility.
Migrated all existing usages:
- Storybook stories: replaced manual padding div with contentPadding={6}
- Shell Lab: replaced hardcoded padding: 24 with contentPadding={6}
Validated via ad-hoc vibe test (10 prompts × 3 approaches):
- contentPadding won on mixed layouts (7 decisions vs 8 for default-padding)
- Balanced doc examples are critical — both contentPadding={4} and
contentPadding={0} mixed-layout examples must be shown
Ref #565
Co-authored-by: Navi <navi@users.noreply.github.com>
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
Add a contentPadding prop to XDSAppShell that controls the main content
area padding. Set based on the dominant content pattern for the page:
- contentPadding={4} for forms, settings, text-heavy pages
- contentPadding={0} for dashboards, maps, tables (edge-to-edge)
Override individual sections with <XDSSection padding={...}>.
Defaults to 0 (current behavior) for backward compatibility.
Migrated all existing usages:
- Storybook stories: replaced manual padding div with contentPadding={6}
- Shell Lab: replaced hardcoded padding: 24 with contentPadding={6}
Validated via ad-hoc vibe test (10 prompts × 3 approaches):
- contentPadding won on mixed layouts (7 decisions vs 8 for default-padding)
- Balanced doc examples are critical — both contentPadding={4} and
contentPadding={0} mixed-layout examples must be shown
Ref #565
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 a
contentPaddingprop toXDSAppShellthat controls the main content area padding.Motivation
Ran an ad-hoc vibe test comparing three padding mental models (10 prompts × 3 approaches = 30 tests).
contentPaddingwon on mixed layouts — the hard case — with the fewest total decisions (15 vs 16 for no-default-padding vs 19 for default-padding).Key insight: the LLM correctly picks
contentPadding={4}for mostly-padded pages andcontentPadding={0}for mostly-bleed pages, then overrides only the exceptions withXDSSection.API
Changes
contentPadding?: SpacingSteptoXDSAppShellPropsXDSLayoutContent padding(defaults to 0 for backward compat)Test plan
yarn build✅yarn test— 90 files, 1436 tests passing ✅Ref #565