Skip to content

docs(spec): admit BottomSheet as a container publisher - #6882

Merged
imdreamrunner merged 3 commits into
mainfrom
docs/bottom-sheet-container-publisher
Oct 4, 2026
Merged

imdreamrunner merged 3 commits into
mainfrom
docs/bottom-sheet-container-publisher

Conversation

@imdreamrunner

@imdreamrunner imdreamrunner commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Exact decision needed

Should BottomSheet join the shared container-padding system as a container publisher, the way Dialog does? If so, what is its public projection, and what is its default?

Today the Sheet panel is only an overlay boundary owner. It resets inherited page geometry and publishes none of its own. Its content box has no padding, there is no padding prop, and a theme's padding on bottom-sheet pads the panel instead of the content. As a result:

  • Callers pad sheet content themselves, in different ways: a lone padded Section, a VStack padded with a raw token string, or private body styles.
  • A theme has no supported way to set sheet content padding.
  • Bleed children such as Table, Divider, and TabList have no host inset to compensate against inside a sheet.

Existing authority searched

Decision

  • BottomSheet publishes padding the way Dialog does. The Sheet panel stays the overlay boundary owner. The scrolling Content area becomes a container publisher: it pads caller content and publishes the inset it applies.
  • The inset comes from the padding prop (public spacing scale), then the theme's padding properties on bottom-sheet. This is the same projection Dialog has.
  • The released default is kept. With neither a prop nor a theme value, the Content area has no inset, and descendants see the boundary's reset values, exactly as today.
  • The change is additive, so no migration is needed. The one behavior change: a theme's padding on bottom-sheet now insets the Content area instead of the Sheet panel.

Rejected alternatives

  • Keep caller-owned padding. Callers keep re-implementing the inset, themes cannot set it, and bleed children have nothing to compensate against.
  • Default to --spacing-4 (full Dialog parity). This would double-pad every released sheet whose content supplies its own inset, and that is the common pattern. It would need a breaking change and a codemod.

Claim scope and non-goals

  • BottomSheetSwitcher is unchanged. Padding is set per sheet.
  • No new public target. The Content area stays reachable only through the bottom-sheet target's padding tokens.
  • No content-inset rule for safe areas or the handle band. The panel's existing bottom safe-area and overscroll handling are unchanged.

Evidence and implementation relationship

The implementation is #6883, based on main. In real Chromium, every existing sheet story shows 0 differing pixels and identical computed padding and published variables. This record does not depend on that implementation.

On architecture:container-padding, approved_by and approved_at are left as they are. The approving owner sets them at approval.

Scope

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a review transcript or rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
  • Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
  • Public text and artifacts contain no internal Meta context.

Validation

  • pnpm check:knowledge
  • Prettier
  • git diff --check

architecture:container-padding lists BottomSheet's Content area as a
container publisher with Dialog's projection: the padding prop, then the
theme's padding on bottom-sheet, then --spacing-4. The draft BottomSheet
contract records FR4, the precedence, and the breaking default.
@vercel

vercel Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 4, 2026 7:23pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 2, 2026
@astracat-bot

astracat-bot Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Oct 4, 2026, 7:40 PM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Previews ready: Storybook and Sandbox were built with this PR's docsite. CI evidence will be added when available.

View Storybook for this PR · View Sandbox for this PR

The Content area's inset resolves from the padding prop, then the
theme's bottom-sheet padding, then no inset, so an unthemed sheet is
unchanged. The contract is additive; no migration.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spelling out the decision and the alternatives so clearly. The proposal is coherent as a specification: BottomSheet would publish like Dialog, with the panel keeping the boundary reset, Content applying and publishing the inset, prop before theme before no inset, and the released unpadded default preserved for unthemed sheets.

Approval needs a maintainer decision first. Current container-padding authority lists Card, Section, Dialog, and ScrollableArea as publishers and says the record does not authorize another padding-prop projection, while the BottomSheet record today makes no padding claim. A maintainer needs to update those governing container-padding claims on the main line to admit BottomSheet with this exact projection — including the precedence, the zero default, and theme padding moving from the panel to Content — or point to the governing record that already settles it. Once that direction is settled, the specification text itself needs no separate fix from this review; runtime geometry proof stays with the pending implementation.

[Automated review]

@imdreamrunner
imdreamrunner enabled auto-merge (squash) October 4, 2026 19:17
@imdreamrunner

Copy link
Copy Markdown
Contributor Author

/approve-spec f1553b9

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Oct 4, 2026
@imdreamrunner
imdreamrunner disabled auto-merge October 4, 2026 19:22
@imdreamrunner
imdreamrunner enabled auto-merge (squash) October 4, 2026 19:22

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spelling out the decision and the alternatives so clearly. The proposal is coherent as a specification: BottomSheet would publish like Dialog, with the panel keeping the boundary reset, Content applying and publishing the inset, prop before theme before no inset, and the released unpadded default preserved for unthemed sheets.

Approval needs a maintainer decision first. Current container-padding authority lists Card, Section, Dialog, and ScrollableArea as publishers and says the record does not authorize another padding-prop projection, while the BottomSheet record today makes no padding claim. A maintainer needs to update those governing container-padding claims on the main line to admit BottomSheet with this exact projection — including the precedence, the zero default, and theme padding moving from the panel to Content — or point to the governing record that already settles it. Once that direction is settled, the specification text itself needs no separate fix from this review; runtime geometry proof stays with the pending implementation.

[Automated review]

@imdreamrunner
imdreamrunner merged commit f498458 into main Oct 4, 2026
42 of 44 checks passed
@github-actions
github-actions Bot deleted the docs/bottom-sheet-container-publisher branch October 5, 2026 06:35

This branch was successfully deployed

1 active deployment
Preview — f1553b96 Deployed Oct 4, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant