Skip to content

docs(cli): use the standard Section wrapper in Bottom Sheet examples - #5238

Merged
imdreamrunner merged 1 commit into
fix/overlay-padding-var-isolationfrom
fix/bottom-sheet-example-section
Aug 20, 2026
Merged

imdreamrunner merged 1 commit into
fix/overlay-padding-var-isolationfrom
fix/bottom-sheet-example-section

Conversation

@imdreamrunner

Copy link
Copy Markdown
Contributor

Removes the #5208 workaround from the Bottom Sheet examples. Stacked on #5231 (which is stacked on #5209) — only the last commit belongs to this PR, and the diff cleans up as those merge.

What the examples were doing

Four of the six Bottom Sheet examples padded the sheet body by hand instead of using a Section, in two flavors:

// BottomSheetHeights, BottomSheetMobileKeyboard, BottomSheetNoScrim
<VStack gap={4} style={{padding: 'var(--spacing-4)'}}>

// BottomSheetSnapPoints
<VStack gap={4} padding={4}>

The other two — BottomSheetShowcase and all three sheets in BottomSheetSwitcherShowcase — already use the house pattern:

<Section padding={4}>
  <VStack gap={4}>

The split wasn't taste. A Section inside a sheet used to escape padding that wasn't visually there and hang off both edges (#5208), so these four reached for something without escape behavior. BottomSheetNoScrim shows the mechanism plainly: its own page wrapper is a <Section padding={4}>, which is exactly the value that leaked into the sheet.

With the boundary fixed, all four use the standard wrapper. Every Bottom Sheet example now reads the same way, and none reaches for an inline style with a raw token string.

Rendering is unchanged

Rendered the real example components in Chromium at 2x, opened each sheet, and diffed before/after:

example differing pixels
BottomSheetSnapPoints 0 / 1,444,800
BottomSheetNoScrim 0 / 1,444,800
BottomSheetHeights 0 / 1,444,800

Sheet body is 420px inside a 420px sheet in all three (no overflow), with 16px padding as before.

One thing I checked rather than assumed: Divider's edge-to-edge behavior is opt-in via isFullBleed (default false), so moving a Divider inside a Section does not silently turn the separators into full-bleed rules. That's why the diffs are exactly zero rather than merely close.

componentsUsed updated in the three affected .doc.mjs files. pnpm lint clean, packages/cli suite 198 files / 2,724 tests green, pnpm build produces no drift.

@vercel

vercel Bot commented Aug 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview Aug 20, 2026 12:29am

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 19, 2026
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Aug 19, 2026
@github-actions

github-actions Bot commented Aug 20, 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

BottomSheet (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 3127 -
Complexity N/A Very High (249) -
Dialog (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 624 -
Complexity N/A Very High (79) -
Layer (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 791 -
Complexity N/A Very High (87) -
Layout (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 1481 -
Complexity N/A Very High (84) -
Lightbox (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 638 -
Complexity N/A Very High (83) -
MobileNav (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 445 -
Complexity N/A Very High (51) -
Popover (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 553 -
Complexity N/A Very High (52) -
Section (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 230 -
Complexity N/A Very High (42) -
Drawer (@astryxdesign/lab) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 483 -
Complexity N/A Very High (52) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.8KB 1.2KB
@astryxdesign/lab N/A 3.6KB 1.5KB

Accessibility Audit

Status: 2 accessibility violation(s) found — 1 serious, 1 moderate.

Layout - 2 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 1/18 stories · Learn more
    • WCAG: 1.4.3 (Level AA)
  • 🟡 moderate: Ensure landmarks are unique
    • Rule: landmark-unique · Affects 1/18 stories · Learn more

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

github-actions Bot added a commit that referenced this pull request Aug 20, 2026
Four Bottom Sheet examples padded the sheet body by hand rather than
using a Section: BottomSheetHeights, BottomSheetMobileKeyboard and
BottomSheetNoScrim with an inline style={{padding: 'var(--spacing-4)'}},
and BottomSheetSnapPoints with <VStack padding={4}>.

That was a workaround for #5208 — a Section inside a sheet escaped
padding that was not visually there and hung off both edges. The
workaround is recorded in the issue, and BottomSheetNoScrim shows why
it was needed: its own page wrapper is a <Section padding={4}>, which
is exactly the value that leaked in.

With the boundary fixed, these can use the same
<Section padding={4}><VStack gap={4}> wrapper that BottomSheetShowcase
and BottomSheetSwitcherShowcase already use, so every Bottom Sheet
example reads the same way and none reaches for an inline style.

Rendering is unchanged: the three converted examples are pixel-identical
before and after (0 differing pixels at 2x). Divider's edge-to-edge
behavior is opt-in via isFullBleed, so moving into a Section does not
silently change the separators.
@imdreamrunner
imdreamrunner force-pushed the fix/bottom-sheet-example-section branch from 30edc33 to d9c5604 Compare August 20, 2026 00:26
github-actions Bot added a commit that referenced this pull request Aug 20, 2026
@imdreamrunner
imdreamrunner changed the base branch from main to fix/overlay-padding-var-isolation August 20, 2026 01:00
@imdreamrunner
imdreamrunner merged commit dce98d8 into fix/overlay-padding-var-isolation Aug 20, 2026
19 checks passed
@github-actions
github-actions Bot deleted the fix/bottom-sheet-example-section branch August 20, 2026 06:12

This branch was successfully deployed

1 active deployment
Preview — d9c56041 Deployed Aug 20, 2026 by vercel[bot]
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. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant