Skip to content

docs(spec): BottomSheet defaults to Dialog's container inset - #6938

Merged
imdreamrunner merged 2 commits into
mainfrom
docs/bottom-sheet-default-padding
Oct 6, 2026
Merged

imdreamrunner merged 2 commits into
mainfrom
docs/bottom-sheet-default-padding

Conversation

@imdreamrunner

@imdreamrunner imdreamrunner commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Exact decision needed

#6882 makes BottomSheet's Content area a container publisher but keeps the released unpadded default. Should BottomSheet's default container inset match Dialog's, --spacing-4, starting with the next minor release (0.7.0)?

Existing authority searched

Decision

  • The Content area's inset resolves from the padding prop, then the theme's padding properties on bottom-sheet, then --spacing-4 on every logical edge (block and inline). This matches Dialog.
  • This is a breaking default, scheduled for a minor release:
    • Content whose only child is a padded Section keeps its geometry, because the Section escapes the inset.
    • Content that supplies its own inset is padded twice until it drops that inset or sets padding={0}.
  • Migration: padding={0} restores the released unpadded Content area.

Rejected alternatives

  • Keep the unpadded default permanently. BottomSheet stays the one overlay that differs from Dialog by default, and every sheet keeps opting in to the inset.

Claim scope and non-goals

Evidence and implementation relationship

The implementation is #6884, stacked on #6883. In real Chromium, the 10 existing Section-wrapped and migrated sheet stories show 0 differing pixels against main. An astryx upgrade codemod adds padding={0} where a sheet would otherwise change. This record does not depend on that implementation.

Merge order: #6883, then this PR, then #6884.

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

The Content area's inset resolves from the padding prop, then the
theme's bottom-sheet padding, then --spacing-4, matching Dialog. This is
a breaking default for a minor release; padding={0} restores the
released unpadded Content area.
@vercel

vercel Bot commented Oct 4, 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 6, 2026 9:02pm UTC

Request Review

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

astracat-bot Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
⏳ Waiting for review (for maintainers only) Oct 6, 2026, 9:17 PM UTC

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

@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 staging this as its own decision. This change is spec-only and internally consistent, but it intentionally reverses the current architecture:container-padding claim that BottomSheet's Content area keeps its released default of no inset when neither the padding prop nor theme padding is set.

Approval therefore needs a maintainer to update that existing governing claim first — specifically, to settle that the default should become Dialog-matching --spacing-4 as a breaking default for the next minor release, with padding={0} restoring the released unpadded Content area. No other findings: the precedence order is preserved, the two records agree after the edit, and knowledge validation passes. The Section-escape and double-padding geometry will still need their evidence in the implementation change.

[Automated review]

@github-actions

github-actions Bot commented Oct 4, 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

@rubyycheung

Copy link
Copy Markdown
Contributor

BottomSheet is used as the mobile version of Dialog, Popover, and DropdownMenu. A theme may also give Dialog more padding, but that spacing could feel too large in a BottomSheet. Should each presentation define its own padding instead of making BottomSheet match Dialog by default?

@meta meta deleted a comment from astracat-bot Bot Oct 5, 2026
@imdreamrunner

Copy link
Copy Markdown
Contributor Author

@rubyycheung Yep the intention is of this spec change is to create some padding by default for BottomSheet to match dialog, but the value doesn't need to exactly match Dialog. At the moment the default padding is 0 (content responsible for their own padding). Do you have a good default value in mind?

The default inset is --spacing-4 on all four logical edges (block and
inline), matching Dialog.
@imdreamrunner

Copy link
Copy Markdown
Contributor Author

Discussed offline, update the default padding to spacing-4 (16px in neutral). This can be removed or updater by setting padding to other value.

@imdreamrunner

Copy link
Copy Markdown
Contributor Author

/approve-spec d5578e5

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Oct 6, 2026
@imdreamrunner
imdreamrunner enabled auto-merge (squash) October 6, 2026 21:03
@imdreamrunner
imdreamrunner merged commit 8af0f8e into main Oct 6, 2026
41 checks passed
@github-actions
github-actions Bot deleted the docs/bottom-sheet-default-padding branch October 7, 2026 06:24

This branch was successfully deployed

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

2 participants