Skip to content

spec(BottomSheet): a changed sheet waits at a peek while the discard dialog asks (DEC-5) - #11095

Merged
imdreamrunner merged 1 commit into
mainfrom
spec/bottom-sheet-edge-discard-choices
Nov 12, 2026
Merged

imdreamrunner merged 1 commit into
mainfrom
spec/bottom-sheet-edge-discard-choices

Conversation

@imdreamrunner

@imdreamrunner imdreamrunner commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Decisions for the owner

The direction is the record owner's: a changed sheet waits at a peek while the regular discard dialog asks. She also decided that Escape, a scrim tap and the platform close request (Android back) wait at the same peek, that the wait's height is the sheet's existing peek detent, and that a sheet with no peek detent waits with a quarter of its fully open visible height in view. You agree with the quarter. These are recorded as decided.

Not ready to merge: you're still judging whether the motion is right.

These calls remain open:

  1. Integration approach. Recorded: caller composition, no new API. BottomSheet gains one behavior on its existing isOpen / onOpenChange contract. When its owner refuses a dismissal and, in the same update, opens a modal dialog above it, the sheet waits at the peek while that dialog is open. Tokenizer and PowerSearch already refuse and render SheetConfirmation, so they get it with no change of their own.
    • Pro: no prop, type, export or catalog string. It works for any owner that composes its own AlertDialog or Dialog. The hosts' dialog code, words and focus stay as they are.
    • Con: the sheet reads the owner's answer, a refusal plus a dialog opened in the same update, instead of being told ahead of time. FR21 records the edges: a dialog opened in a later update (even one frame later), or a modal outside Core's dismissal stack (a native dialog the app shows itself, another library's modal), leaves the sheet at its detent, as today. The sheet cannot act differently during the pull for a changed draft; this design only changes where a refused release rests.
    • Alternative: one dismissConfirmation prop on BottomSheet ({isActive, onDiscard, title?, description?, keepLabel?, discardLabel?}), with which the sheet renders the regular dialog itself. Pro: an explicit opt-in; the sheet knows about the draft before the release; callers write less. Con: new public API and catalog copy that duplicate the hosts' dialogs; Tokenizer and PowerSearch are rewired; two ways to confirm a discard (the prop, or composing your own dialog), against architecture:public-component-api INV21.
  2. Peek height (decided: a quarter), and its known limits. A sheet with a peek detent waits at its own peek; one snap point can be a peek, since the sheet's own height is always its tallest stop. A sheet with none, such as Tokenizer and PowerSearch, waits with a quarter of its fully open visible height in view, the same measure that makes a stop a peek. It never shows less than the grabber's band (24 px), so a very short sheet still shows its grabber; this floor only affects sheets under about 96 px tall and keeps DEC-5's grabber claim true (decided, with the record owner's agreement). For the tall Tokenizer and PowerSearch sheets that is 194 px at 390 × 844 and 131 px at 320 × 568 (prototype measurements), about 314 px at 1024 × 1366, and about 90 px at 844 × 390 and 74 px at 568 × 320 in landscape. Header check: the Tokenizer search field ends 68 px below the sheet's top at the default text size (from the tokens), and the PowerSearch Filters heading sits above that. With body text about twice its size through iOS Dynamic Type or Android's font scale (root unchanged), it ends at 95 px for Tokenizer and 81 px for PowerSearch (earlier Chromium measurement). In portrait both fit at every size. Where 200 % text scales the root too (a desktop browser, or Android with the text-scale meta), rem spacing doubles and the field ends about 140 px down (estimated from those measurements). That fits at 390 × 844 and up but not at 320 × 568 (131 px), a limit FR22 records. In landscape the default size fits, 68 px against 90 and 74 px. At twice the body size the Tokenizer field does not fit (95 px), and the PowerSearch heading fits at 844 × 390 but not at 568 × 320. Dialog overlap, recorded in FR22: the centered discard dialog paints above the waiting sheet, and its box does not move with the sheet. From the box positions measured earlier: at the default text size it clears the grabber in portrait, and on a 568 × 320 phone turned sideways it clears it by about a pixel. With body text about twice its size it covers the grabber in landscape, and also at 320 × 568 in portrait, where it reaches its 75dvh cap (box 71–497 px against a sheet top of 437 px). There it also covers the top of the Tokenizer search field (about 23 px) and of the PowerSearch heading (about 33 px). In landscape at that size it covers the top of the PowerSearch heading too. In portrait at the default text size it covers neither the grabber nor the first control.
  3. Focus after Keep editing. Recorded: unchanged, as each dialog's owner returns it today. Tokenizer returns focus to the search field (on a phone this raises the keyboard while the sheet springs back). PowerSearch returns it to the Filters header's Add filter, else the panel. A generic AlertDialog returns it to its opener (component:Dialog FR4). Alternative: on a coarse pointer, return focus to the sheet's panel so the keyboard stays down.
  4. Tokenizer FR27 now names the platform close request. It listed only swipe, scrim and Escape, although the sheet already routes Android back and the close watcher through the same confirmation. FR27 sits under Tokenizer DEC-4, whose decider is you (imdreamrunner); the edit applies your existing direction and needs your sign-off.
  5. Record owner sign-off. DEC-5's decider is cixzhang (2026-11-11). Its Basis line quotes her answer for a sheet with no peek detent, "A quarter of the open height". She re-approves at the final head. The change also touches spec:AST-094 (owner vjeux). The [feat] patch tier for the Tokenizer and PowerSearch behavior change wants the agreement of the spec:AST-017 owners (cixzhang, josephfarina).

Exact decision needed

Where a bottom sheet rests while its owner asks before a dismissal discards changes, and how it moves there and back. Today Tokenizer's and PowerSearch's sheets refuse a changed draft's dismissal and open the regular confirmation dialog, and the sheet springs back to its detent under the dialog. The record owner set the sheet to wait low at its peek while the regular dialog asks.

Existing authority searched

  • Records: component:BottomSheet (FR6, FR7, FR9, FR11, FR15, FR19), component:Dialog (FR4), component:AlertDialog, component:Tokenizer (FR27, DEC-4), component:PowerSearch (FR15a–FR15c, DEC-7), spec:AST-094 (FR7, FR36–FR39, FR43, FR45), family:overlay-dismissal (FR7), design:reduced-motion (DR1–DR3), architecture:public-component-api (INV21, INV24, INV25), spec:AST-017 (FR3, FR7, FR25).
  • Paths and code: packages/core/src/BottomSheet/ (useSheetGestures.ts: the refused-release path and its scrim restore; snapOffsets.ts: the existing peek detent and its thinned scrim), internal/SheetConfirmation.tsx, Tokenizer/TokenizerBottomSheet.tsx, PowerSearch/PowerSearchBottomSheet.tsx, with pnpm specs:for on each.
  • Terms: refused dismissal, discard confirmation, keep editing, peek, SheetConfirmation.
  • Open pull requests: none owns this behavior. These overlap in files only: a Tall-sheet keyboard fix in component:BottomSheet, a Tokenizer focus-list fix, two PowerSearch suggestion PRs, and several spec:AST-094 PRs on other rows.
  • Why existing claims don't settle it: the BottomSheet record does not say where a refused dismissal rests (FR7 leaves the refusal to the owner, and FR19 covers only a taken close). Tokenizer FR27 and PowerSearch FR15c specify the dialog, not the sheet beneath it. family:overlay-dismissal FR7 already leaves whether a dismissal closes to the member, so the family needs no change.
  • Canonical owner: component:BottomSheet, extended with FR21–FR24 and DEC-5. Tokenizer and PowerSearch defer to it with one sentence each, and spec:AST-094 FR36 and FR43 point to it. No new record is needed: the behavior is a BottomSheet dismissal path.

Decision

  • Trigger: a dismissal the sheet requested (a swipe release FR19 closes — projected past the dismiss point, or a touch flick at the lowest detent — Escape, a scrim tap, or a platform close request, where purpose allows it, on the top sheet only), answered by the owner keeping isOpen true and, in the same update, opening a modal dialog that joins Core's dismissal stack (AlertDialog, Dialog, SheetConfirmation). Another sheet opened in answer stacks as today. A dialog opened in a later update, or a modal outside that stack, leaves the sheet at its detent under it.
  • Wait: the sheet settles at its peek detent while the dialog is open; a sheet with no peek detent waits with a quarter of its fully open visible height in view. Its grabber stays above the viewport's edge. The Tokenizer search field and the PowerSearch heading stay above it in portrait, except at 320 × 568 with root-scaling 200 % text, and in landscape at the default text size (the limits in decision 2). A release FR19 settles on a detent requests nothing, so the sheet settles there and no dialog opens. A refusal with no dialog springs back as today. An unchanged sheet's owner takes the close, and it closes as today.
  • Keep editing (the dialog closes, the sheet stays open): the sheet springs back to the detent it left. Discard (the dialog and the sheet close together): the sheet leaves from the peek. A close from code while waiting also leaves from the peek.
  • Scrim: the sheet's scrim keeps its resting opacity while it waits, so the page stays dimmed; it does not thin as it would at a peek detent. This extends the refused-dismissal scrim rule (fix(BottomSheet, Tokenizer, PowerSearch): the scrim returns with a sheet whose swipe dismissal the owner refuses #10141, the scrim returns with a refused sheet) to the peek. The dialog's own backdrop adds its dim above, as it does today over a sheet at its detent.
  • Motion: the move to the peek is the sheet's settle, from the release velocity after a swipe and from rest after Escape, a scrim tap or the platform cancel. The dialog's entrance runs at the same time. The return plays the settle from rest, and Discard's exit is the close a control starts. Under reduced motion there is no travel: on a coarse pointer the sheet cross-fades to the peek and back (opacity only, 200 ms or less); on other pointers a move to the peek started by a touch release cross-fades the same way, and every other change, the return included, is immediate.
  • Focus and announcement: the sheet moves no focus and announces nothing. The dialog's name and description carry the question, and its owner decides focus (decision 4). Closing the sheet with the dialog returns focus as a sheet close does (FR9, FR11). The modal dialog blocks the waiting sheet and is the only exposed dialog (AR3); the sheet sets no inert of its own, because the dialog may render inside it.
  • RTL: nothing in the wait depends on direction; the dialog keeps its own RTL behavior.
  • Catalog strings: none new. The hosts keep their existing dialog strings (@astryx.tokenizer.discardChanges*, keepEditing; @astryx.powersearch.sheet.discard*, keepEditing).
  • Compatibility: no prop, type, default or export changes. No released contract said where a refused dismissal rests, so this is [feat] and admissible in a patch as additive (spec:AST-017 FR7, FR25). Tokenizer and PowerSearch name their visible change: while the dialog is open, the sheet waits at the peek instead of springing back.

Rejected alternatives

All three are one line in DEC-5.

  • A dismissConfirmation prop that renders the dialog (decision 1).
  • Choices that grow from the sheet's edge (this PR's first version): the regular dialog is the system's one look for a confirmation.
  • Springing back to the detent under the dialog (today's behavior): the sheet rises again just as the person is asked whether to let it go.

Claim scope and non-goals

  • Governs only where a refused dismissal's sheet rests while the owner's dialog is open, and how it moves there and back.
  • Not covered: the dialog itself (its words, actions, focus and backdrop stay its owner's); Clear all's confirmation; BottomSheetSwitcher steps; a public theming target.
  • family:overlay-dismissal, component:Dialog, component:AlertDialog and design:reduced-motion are applied, not changed.

Evidence and implementation relationship

  • The record owner reviewed interactive prototypes of the earlier edge-choice direction and chose the peek plus the regular dialog. She then answered three questions: the direction, the non-swipe requests, and the peek height.
  • The refused-release path and its scrim restore already exist in useSheetGestures. FR21 records the remaining difference as an implementation gap: today the sheet springs back under the dialog.
  • No implementation PR yet; this PR contains specification records only.

Earlier explored direction (superseded)

The recordings that were described here show this PR's first direction, in which choices grow from the sheet's edge. The spec owner chose the peek and the regular dialog instead, so the recordings no longer describe these records.

Writing rubric results

  • R1 narration: none. DEC-5 states the rule and names, in the present tense, the four parts the record owner sets and that the engineering owner agrees. The new Compatibility bullets state the difference from the released behavior ("where the sheet sprang back", "instead of springing back"), which is what that section records.
  • R2 research in the record: none. The approach comparison lives only in this description; DEC-5 keeps one-line conclusions.
  • R3 evidence naming a change: none. The quarter is the existing peek-detent measure. The verification row checks the wait with and without a peek detent, at three viewports in both orientations, and at default, Dynamic Type, Android font-scale and root-scaling text sizes. Verification rows name test layers, not changes.
  • R4 rejected alternatives over one line or outside a decision: three, one line each, inside component:BottomSheet DEC-5.
  • R5 pull request or issue references remaining: none in the records (searched # + digits, /pull/, /issues/ in every changed line).
  • R6 ruled open questions still listing options: none. The no-peek-detent height is decided (a quarter), so its open question is removed rather than kept with options. The record owner's answers appear in the records as rules, plus DEC-5's Basis line quoting her one-line answer. DEC-5's decider is cixzhang.
  • R7 project status: none as status. Unbuilt behavior is stated as a requirement gap: component:BottomSheet FR21 ("a refused dismissal answered by a dialog returns the sheet to the detent it left, under the dialog"), echoed in Tokenizer FR27's and PowerSearch FR15c's status cells.

Scope

Components: BottomSheet, Tokenizer, PowerSearch

  • 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 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: Knowledge templates and records are aligned (its project-status warnings name other records only).
  • Prettier: clean on the four records.
  • git diff --check: clean.
  • pnpm review:pre: 0 findings; 147 authored lines; merges cleanly into origin/main.

@vercel

vercel Bot commented Nov 10, 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 Nov 11, 2026 8:47pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 11, 2026, 8:58 PM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 10, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 10, 2026
@imdreamrunner
imdreamrunner force-pushed the spec/bottom-sheet-edge-discard-choices branch from f4d7422 to 748eadb Compare November 10, 2026 20:17

@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.

This spec change needs an engineering owner's decision and five record fixes before it can be approved.

Owner decision. The pull request writes new and changed requirements into current records, including the new public dismissConfirmation prop: component:BottomSheet FR21–FR27, PR3, AR6–AR7, DD1 and DEC-5 (with FR1, FR2, FR7 and FR19 amended), spec:AST-094 FR36, component:Tokenizer FR27 and component:PowerSearch FR15c. An engineering owner, the author included, records that decision by commenting /approve-spec <full head SHA> once the fixes below are pushed.

Blocking record fixes:

  • FR24's park offset (the shortest detent plus clamp(17 % vh, 96–170 px)) puts a hug sheet with little content, or a peek snap point, at or past closed, against FR22's "the sheet never reaches closed"; cap the travel by the shortest detent's visible height, or limit the prop to sheets tall enough to park.
  • FR19 ("projected past the dismiss point closes, or parks") and spec:AST-094 FR36 ("parks where it would close") disagree with FR23's position-based park rule, so one release on a short sheet is told both to park and to return; state in both places that an active sheet never closes on a release and follows FR23.
  • AR6 says Tab moves between the two choices only (FR16), but the prop is offered to non-modal sheets, which FR11 and FR16 give no focus containment; limit the prop to modal sheets or state where Tab goes on a non-modal park.
  • FR22 and FR23 apply to every active sheet, so pulling a form or required sheet raises Keep editing and Discard that FR21 then refuses; scope both rows to a sheet whose purpose allows the swipe.
  • The AR6–AR7 verification row lists VoiceOver and TalkBack runs as verification, which spec:AST-009 FR17 says no record may make a gate; move them to a recommended follow-up and prove the announcement by its accessibility-tree routing.

Non-blocking: PowerSearch FR15c's status cell still says "verified by focused sheet tests" beside its new implementation gap.

[Automated review]

@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.

This spec change needs an engineering owner's decision and two record fixes before it can be approved.

Owner decision. The pull request intentionally changes current records: it adds the public dismissConfirmation prop and the park to component:BottomSheet (FR21–FR27, PR3, AR6–AR7, DD1 and DEC-5, with FR1, FR2, FR7 and FR19 amended), amends spec:AST-094 FR36, and moves component:Tokenizer FR27 and component:PowerSearch FR15c from the confirmation dialog to the park as a [feat] patch. Approval needs an engineering owner to accept those spec updates by commenting /approve-spec <full head SHA> on the head that carries the fixes below, and the author may do so if they are an engineering owner.

Blocking record fixes:

  • spec:AST-094 FR36 parks an active BottomSheet on any release past its park offset or any downward touch flick, while BottomSheet FR22–FR23 park only a sheet whose purpose allows the swipe and only a flick below the shortest detent, so scope FR36's sentence the same way or defer to FR23.
  • Miss: Keep editing and Discard are two sibling choices that family:action-groups covers by its membership rule, yet no changed record names the family, Tokenizer FR27 drops the action-group rule from the discard ask, and FR24 takes its touch target from spec:AST-094 FR42 instead of the family's FR5, so add the family to BottomSheet, state that the choices are one action group, and add a slide across them to the verification cases.

Non-blocking: Tokenizer's Compatibility bullet says Keep editing on a touch screen leaves focus on the panel, while BottomSheet AR6 returns it to the element that held it; PowerSearch's wording fits both.

[Automated review]

@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.

This spec change needs an engineering owner's decision and three record fixes before it can be approved.

Owner decision. The pull request intentionally changes current records: it adds the public dismissConfirmation prop and the park to component:BottomSheet (FR21–FR27, PR3, AR6–AR7, DD1 and DEC-5, with FR1, FR2, FR7 and FR19 amended), amends spec:AST-094 FR36 and FR45, and moves component:Tokenizer FR27 and component:PowerSearch FR15c from the confirmation dialog to the park as a [feat] patch. Approval needs an engineering owner to accept those spec updates by commenting /approve-spec <full head SHA> on the head that carries the fixes below, and the author may do so if they are an engineering owner.

Blocking record fixes:

  • Miss: spec:AST-094 FR43 still says a BottomSheet info sheet pulled by a trackpad closes on a flick or past its close distance, while the amended FR36 and BottomSheet FR23 say an active sheet never closes on a release, so add the dismissal-confirmation exception to FR43's sentence and a trackpad pull to the FR21–FR25 cases.
  • Miss: BottomSheet AR6 returns Keep editing's focus only to an element inside the sheet's content, so a keyboard user whose Escape parked a non-modal sheet from the page ends on the sheet's panel; return focus to the element that held it while it is still connected (in the page, for a non-modal sheet) and add that case to the AR6–AR7 row.
  • Miss: when a caller keeps the sheet open after Discard (FR24), AR6 hides the choices but moves focus only on a close, so focus stays on the hidden Discard; send focus where Keep editing does in that case and add it to the verification cases.

Non-blocking: FR24 says a parked sheet still takes a pull under FR23, which covers only a sheet whose purpose allows a swipe, so state what a parked form sheet's pull does.

[Automated review]

@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.

This spec change needs an engineering owner's decision and two record fixes before it can be approved; the three fixes from the last review are in.

Owner decision. The pull request intentionally changes current records: it adds the public dismissConfirmation prop and the park to component:BottomSheet (FR21–FR27, PR3, AR6–AR7, DD1 and DEC-5, with FR1, FR2, FR7 and FR19 amended), amends spec:AST-094 FR36, FR43 and FR45, and moves component:Tokenizer FR27 and component:PowerSearch FR15c from the confirmation dialog to the park as a [feat] patch. Approval needs an engineering owner to accept those spec updates by commenting /approve-spec <full head SHA> on the head that carries the fixes below, and the author may do so as an engineering owner.

Blocking record fixes:

  • BottomSheet AR6 sends focus back to the element that held it when the sheet parked on every Keep editing path, including a pull back up and isActive turning false, so a keyboard user who has moved from a parked non-modal sheet into the page loses that focus, unlike FR11's non-modal close, which returns focus only while it is still inside the sheet; return focus only while it is still on a choice, leave it in the page otherwise, and add that case to the AR6–AR7 row.
  • Miss: spec:AST-094 FR36 says "any other release settles on a detent", but BottomSheet FR23 keeps a release from the park parked unless it comes back halfway or flicks up, for every purpose, so end FR36's sentence with "settles as component:BottomSheet FR23 states", as FR43 now does.

Non-blocking: AR6's "Discard returns focus as a close does (FR9)" should cite FR11 too, since a non-modal sheet closes under FR11.

[Automated review]

@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.

This spec change needs an engineering owner's decision and one record fix before it can be approved; the two fixes from the last review are in.

Owner decision. The pull request intentionally changes current records: it adds the public dismissConfirmation prop and the park to component:BottomSheet (FR21–FR27, PR3, AR6–AR7, DD1 and DEC-5, with FR1, FR2, FR7 and FR19 amended), amends spec:AST-094 FR36, FR43 and FR45, and moves component:Tokenizer FR27 and component:PowerSearch FR15c from the confirmation dialog to the park as a [feat] patch. Approval needs an engineering owner to accept those spec updates by commenting /approve-spec <full head SHA> on the head that carries the fix below, and the author may do so as an engineering owner.

Blocking record fix:

  • Miss: BottomSheet FR23 returns a parked sheet on a release that has come back halfway or flicks up even when the release moves back toward the park, but spec:AST-094 FR37 says "A release whose velocity points back toward the start MUST cancel", so give the from-the-park sentence the same FR37 exception the from-rest sentence has (or state the exception in FR37) and add those releases to the FR21–FR25 cases.

[Automated review]

@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.

This spec change needs an engineering owner's decision and one record fix before it can be approved; the fix from the last review is in.

Owner decision. The pull request intentionally changes current records: it adds the public dismissConfirmation prop and the park to component:BottomSheet (FR21–FR27, PR3, AR6–AR7, DD1 and DEC-5, with FR1, FR2, FR7 and FR19 amended), amends spec:AST-094 FR36, FR43 and FR45, and moves component:Tokenizer FR27 and component:PowerSearch FR15c from the confirmation dialog to the park as a [feat] patch. Approval needs an engineering owner to accept those spec updates by commenting /approve-spec <full head SHA> on the head that carries the fix below, and the author may do so as an engineering owner.

Blocking record fix:

  • Miss: the FR21–FR25 verification row fails "a release at or past the park offset that does not park", but FR23 and spec:AST-094 FR37 return that release when it moves back up, so a correct build fails the row; reword it to "…that does not park, unless it moves back up", make "a release from the park that returns while moving back down" read "…while moving back toward the park" so it also covers a pull further down ended by an upward flick, and narrow "a change while parked that unparks" to a viewport or detent change, since isActive turning false must unpark the sheet (FR21).

[Automated review]

@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.

This spec change needs an engineering owner's decision before it can be approved; the record fix from the last review is in, and no blocking finding remains.

Owner decision. The pull request intentionally changes current records: it adds the public dismissConfirmation prop and the park to component:BottomSheet (FR21–FR27, PR3, AR6–AR7, DD1 and DEC-5, with FR1, FR2, FR7 and FR19 amended), amends spec:AST-094 FR36, FR43 and FR45, and moves component:Tokenizer FR27 and component:PowerSearch FR15c from the confirmation dialog to the park as a [feat] patch. Approval needs an engineering owner to accept those spec updates by commenting /approve-spec <full head SHA> on this head, and the author may do so as an engineering owner.

Optional, in the FR21–FR25 verification row (BottomSheet.spec.md:545):

  • isActive turned off while parked has no failure signal now that the unpark failure covers only a viewport or detent change; consider failing "a sheet still parked after isActive turns false", and reading the Discard signal as "other than from Discard, after its onDiscard when one is given", since onDiscard is optional.
  • Miss: "Discard kept open by the caller" is a listed case with no failure signal; consider failing "a sheet still parked after a Discard the caller keeps open" (FR24).

[Automated review]

@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.

This spec change needs an engineering owner's decision before it can be approved. FR22's coverage sentence now speaks of a centered dialog, and no record fix is required.

Owner decision needed

  • The pull request writes new requirements into four current records: the refused-dismissal wait in component:BottomSheet FR21–FR24, DEC-5 and OQ2, with FR7, FR19 and AR3 amended (including the 96 px wait for a sheet with no peek detent, and the every-pointer scope, so Escape and a mouse click on the scrim move a desktop sheet too), the sentences added to spec:AST-094 FR36 and FR43, the wait added to component:Tokenizer FR27 and component:PowerSearch FR15c, and the [feat] patch class; an engineering owner records that decision by commenting /approve-spec <full head SHA> on the head that will merge, and the author may do so as an engineering owner.

Non-blocking

  • Miss: FR22 says the waiting sheet always has most of itself off-screen, which does not hold for a short sheet with no peek detent, such as a hug sheet that shows less than 192 px (see the inline note).

CI passed on this head.

Automated review (maintainer link)

@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.

This spec change needs an engineering owner's decision before it can be approved. No record fix is required, and the FR22 wording note from the last review is fixed.

Owner decision needed

  • The pull request writes new requirements into four current records: the refused-dismissal wait in component:BottomSheet FR21–FR24, DEC-5 and OQ2, with FR7, FR19 and AR3 amended (including the 96 px wait for a sheet with no peek detent, and the every-pointer scope, so Escape and a mouse click on the scrim move a desktop sheet too), the sentences added to spec:AST-094 FR36 and FR43, the wait added to component:Tokenizer FR27 and component:PowerSearch FR15c, and the [feat] patch class; an engineering owner records that decision by commenting /approve-spec <full head SHA> on the head that will merge, and the author may do so as an engineering owner.

CI passed on this head.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec e15739b

@cixzhang

Copy link
Copy Markdown
Contributor

Decision: D-20261111-368

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 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.

Approved: an engineering owner approved the spec change at this head, and the records have no remaining defects. CI passed on this head.

  • The description still marks the pull request not ready to merge while the motion is judged; when to merge stays with you.
  • The pull request that builds the wait will need to cite the owner's decision for its desktop part (Escape and a mouse click on the scrim moving the sheet).

Automated review (maintainer link)

@imdreamrunner
imdreamrunner force-pushed the spec/bottom-sheet-edge-discard-choices branch from e15739b to 6fd29a0 Compare November 11, 2026 19:27
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 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.

This spec change needs an engineering owner's approval at this head before it can be approved. The earlier /approve-spec named the previous revision, which this one changes.

Owner decision needed

  • component:BottomSheet FR22 now has a sheet with no peek detent, such as the Tokenizer and PowerSearch sheets, wait with a quarter of its fully open visible height in view instead of 96 px, DEC-5 is rewritten to match and OQ2 is removed, so the refused-dismissal wait (FR21–FR24, DEC-5, the FR7, FR19 and AR3 amendments, and the AST-094, Tokenizer and PowerSearch sentences) needs an engineering owner to record the decision by commenting /approve-spec <full head SHA> on the head that will merge, which the author may do as an engineering owner.

No record fix is required. Two optional FR22 notes:

  • FR22 now lists Android's system font scale among text sizes that leave the root font size unchanged, but a page with the text-scale meta puts that scale on the root (AST-102 FR3); naming "Android with the text-scale meta" beside the desktop browser's text size, as the previous revision did, gives the verification row's with-meta run a stated outcome.
  • With the "96 px or less does not move" exemption gone, a sheet under about 56 px tall would wait with its grabber below the screen's edge; a floor at the 24 px grabber band keeps FR22's grabber promise.
Claims and files checked

Claims:

  • Records only, with no prop, type, export or catalog string change: verified (four Markdown records; BottomSheet's compatibility section and public concepts state it).
  • Tokenizer and PowerSearch already refuse a changed draft's dismissal and open their confirmation in the same handler: verified (TokenizerBottomSheet.tsx:704-713, PowerSearchBottomSheet.tsx:1045-1050).
  • The Tokenizer sheet already routes the platform close request to the same confirmation: verified (TokenizerBottomSheet.tsx:290-296, through the sheet's onOpenChange).
  • The confirmation is a Core Dialog that joins the shared dismissal stack: verified (SheetConfirmation.tsx:22, :57).
  • A quarter is the existing peek measure: verified (snapOffsets.ts:46, :171-183).
  • The quarter shows about 194, 131, 314, 90 and 74 px at the listed viewports: verified from the tall sheet's 92dvh height (BottomSheetPanel.tsx:85).
  • The refused-release path and its scrim restore already exist: verified (useSheetGestures.ts:576-600, :740-755).
  • Header and dialog positions (68, 95, 81 and about 140 px; the dialog box at 71–497 px): not re-measured; FR22's sentences agree with them.
  • Tokenizer DEC-4's decider is the author, and the AST-094 and AST-017 owners are as named: verified (DEC-4 and record front matter).
  • DEC-5's decider reads pending: verified (BottomSheet.spec.md:593).
  • No pull request or issue references in the records, 143 authored lines, and a clean merge into main: verified.
  • The record owner decided the quarter and the author agrees: not verifiable in the repository; no approval exists at this head.

Files:

  • docs/specs/components/BottomSheet/BottomSheet.spec.md: owner approval needed at this head; two optional FR22 notes.
  • docs/specs/AST-094-touch-presentations/spec.md: clear.
  • docs/specs/components/Tokenizer/Tokenizer.spec.md: clear.
  • docs/specs/components/PowerSearch/PowerSearch.spec.md: clear.

Automated review (maintainer link)

@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.

This spec change needs an engineering owner's approval at this head before it can be approved; the earlier /approve-spec named a revision that this one changes.

Owner decision needed

  • component:BottomSheet FR22 now has a sheet with no peek detent, such as the Tokenizer and PowerSearch sheets, wait with a quarter of its fully open visible height in view, never less than its grabber band, instead of 96 px, with DEC-5 rewritten and OQ2 removed, so the refused-dismissal wait (FR21–FR24, DEC-5, the FR7, FR19 and AR3 amendments, and the AST-094, Tokenizer and PowerSearch sentences) needs an engineering owner to record the decision by commenting /approve-spec <full head SHA> on the head that will merge, which the author may do as an engineering owner.

No record fix is required, and both FR22 notes from the last review are addressed. One optional note:

  • FR22's "with no more than its peek or that quarter in view" and DEC-5's "no sheet waits higher than a peek would" do not allow for the new grabber floor, which makes a sheet under 96 px tall wait with 24 px in view; adding "or its grabber's band" in both places, and a sheet under 96 px tall to the FR22 verification states, keeps the record consistent.
Claims and files checked

Claims:

  • Records only, with no prop, type, export or catalog string change: verified (four Markdown records; BottomSheet's compatibility section and public concepts state it).
  • Tokenizer and PowerSearch already refuse a changed draft's dismissal and open their confirmation in the same handler: verified (TokenizerBottomSheet.tsx:704-713, PowerSearchBottomSheet.tsx:1045-1051).
  • The Tokenizer sheet already routes the platform close request to the same confirmation: verified (TokenizerBottomSheet.tsx:286-295, through the sheet's onOpenChange).
  • The confirmation is a Core Dialog that joins the shared dismissal stack: verified (SheetConfirmation.tsx:22, :57).
  • A quarter is the existing peek measure, and one snap point can be a peek: verified (snapOffsets.ts:46, :118-136, :171-183).
  • The wait never shows less than the 24 px grabber band, which matters only for sheets under about 96 px: verified (--spacing-6 is 1.5rem, tokens.stylex.ts:195; 24 ÷ 0.25 = 96).
  • The quarter shows about 194, 131, 314, 90 and 74 px at the listed viewports: verified from the tall sheet's 92dvh height (BottomSheetPanel.tsx:85).
  • The refused-release path and its scrim restore already exist: verified (useSheetGestures.ts:576-600, :744-755).
  • Header and dialog positions (68, 95, 81 and about 140 px; the dialog box at 71–497 px): not re-measured; FR22's sentences agree with them.
  • Tokenizer DEC-4's decider is the author, and the AST-094 and AST-017 owners are as named: verified (DEC-4 and record front matter).
  • DEC-5's decider reads pending: verified (BottomSheet.spec.md:593).
  • No pull request or issue references in the records, 143 authored lines, and a clean merge into main: verified.
  • No other open pull request owns this behavior: not re-checked.
  • The record owner decided the direction, the non-swipe requests and the wait heights, and the engineering owner agrees: not verifiable in the repository; no approval exists at this head.

Files:

  • docs/specs/components/BottomSheet/BottomSheet.spec.md: owner approval needed at this head; one optional FR22 and DEC-5 note.
  • docs/specs/AST-094-touch-presentations/spec.md: clear.
  • docs/specs/components/Tokenizer/Tokenizer.spec.md: clear.
  • docs/specs/components/PowerSearch/PowerSearch.spec.md: clear.

Automated review (maintainer link)

@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.

This spec change needs an engineering owner's approval at this head before it can be approved; the earlier /approve-spec named a revision that this one changes.

Owner decision needed

  • component:BottomSheet FR22 has a sheet with no peek detent, such as the Tokenizer and PowerSearch sheets, wait with a quarter of its fully open visible height in view, never less than its grabber band, instead of 96 px, with DEC-5 rewritten and OQ2 removed, so the refused-dismissal wait (FR21–FR24, DEC-5, the FR7, FR19 and AR3 amendments, and the AST-094, Tokenizer and PowerSearch sentences) needs an engineering owner to record the decision by commenting /approve-spec <full head SHA> on the head that will merge, which the author may do as an engineering owner.

No record fix is required, and the last review's note on the grabber floor is addressed in FR22, DEC-5 and the FR22 verification states.

Claims and files checked

Claims:

  • Records only, with no prop, type, export or catalog string change: verified (four Markdown records; BottomSheet's compatibility section and public concepts state it).
  • Tokenizer and PowerSearch already refuse a changed draft's dismissal and open their confirmation in the same handler: verified (TokenizerBottomSheet.tsx:704-713, PowerSearchBottomSheet.tsx:1045-1051).
  • The Tokenizer sheet already routes the platform close request to the same confirmation: verified (TokenizerBottomSheet.tsx:286-295, through the sheet's onOpenChange).
  • The confirmation is a Core Dialog that joins the shared dismissal stack: verified (SheetConfirmation.tsx:22, :57).
  • A quarter is the existing peek measure, and one snap point can be a peek: verified (snapOffsets.ts:46, :118-136, :171-183).
  • The wait never shows less than the 24 px grabber band, which matters only for sheets under about 96 px: verified (--spacing-6 is 1.5rem, tokens.stylex.ts:195; the grab bar's band, BottomSheetPanel.tsx:113).
  • The quarter shows about 194, 131, 314, 90 and 74 px at the listed viewports: verified from the tall sheet's 92dvh height (BottomSheetPanel.tsx:85).
  • Header and dialog positions (68, 95, 81 and about 140 px; the dialog box at 71–497 px): consistent with an earlier browser measurement of the shipped sheets; not re-measured.
  • Today the sheet springs back under the dialog, and the refused-release path and its scrim restore already exist: verified (useSheetGestures.ts:576-600, :738-751 on main).
  • Focus after Keep editing stays as each owner returns it: verified (Tokenizer's search field, TokenizerBottomSheet.tsx:384-388; PowerSearch's Add filter, else the panel, PowerSearchBottomSheet.tsx:1052-1061).
  • The hosts keep their existing dialog strings: verified (Tokenizer's discard and keep-editing messages, PowerSearch's sheet discard and keep-editing messages, in source).
  • Tokenizer DEC-4's decider is the author, and the AST-094 and AST-017 owners are as named: verified (DEC-4 and record front matter).
  • DEC-5's decider reads pending: verified (BottomSheet.spec.md:593).
  • No pull request or issue references in the records, 145 authored lines, a clean git diff --check and a clean merge into main: verified.
  • No other open pull request owns this behavior: verified by a title search; open pull requests touch dismissal in other components or the sheet's keyboard rest.
  • The writing rubric results (no narration, three one-line rejected alternatives inside DEC-5, no references, the decided open question removed, unbuilt behavior stated as requirement gaps): verified against the records.
  • No internal context in the records, title, description, branch or commit message: verified.
  • The knowledge check and Prettier are clean: not re-run here.
  • The record owner decided the direction, the non-swipe requests and the wait heights, and the engineering owner agrees with the quarter: not verifiable in the repository; no approval exists at this head.

Files:

  • docs/specs/components/BottomSheet/BottomSheet.spec.md: owner approval needed at this head; no defect.
  • docs/specs/AST-094-touch-presentations/spec.md: clear.
  • docs/specs/components/Tokenizer/Tokenizer.spec.md: clear.
  • docs/specs/components/PowerSearch/PowerSearch.spec.md: clear.

Automated review (maintainer link)

…dialog asks (DEC-5)

When a sheet's owner refuses a dismissal and, in the same update, opens a
modal dialog above it, the sheet waits at its peek while that dialog is
open (FR21-FR24): its own peek detent, or a quarter of its fully open
visible height for a sheet with none, low, with its grabber above the
viewport's edge and the page still dimmed. Keep editing returns it to the
detent it left; Discard lets it leave from the peek. Escape, a scrim tap
and a platform close request wait at the same peek. No new API: Tokenizer
FR27 and PowerSearch FR15c keep their regular discard dialog and gain the
wait; spec:AST-094 FR36 and FR43 point to it.

@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.

This spec change needs an engineering owner's approval at this head before it can be approved. The earlier /approve-spec named a revision that this one changes.

Owner decision needed

  • An engineering owner needs to record the decision on the refused-dismissal wait by commenting /approve-spec <full head SHA> on the head that will merge; the author may do so as an engineering owner. Since the approved revision, component:BottomSheet FR22 has a sheet with no peek detent (such as the Tokenizer and PowerSearch sheets) wait with a quarter of its fully open visible height in view, never less than its grabber band, instead of 96 px. DEC-5 is rewritten and now names its decider, and OQ2 is removed. The approval covers FR21–FR24 and DEC-5, the FR7, FR19 and AR3 amendments, and the AST-094, Tokenizer and PowerSearch sentences.

No record fix is required.

Claims and files checked

Claims:

  • The change is records only, with no prop, type, export or catalog string change: verified. Four Markdown records change, and BottomSheet's compatibility and public-concept sections say so.
  • Tokenizer and PowerSearch already refuse a changed draft's dismissal and open their confirmation in the same handler: verified (TokenizerBottomSheet.tsx:704-713, PowerSearchBottomSheet.tsx:1045-1051).
  • The Tokenizer sheet already routes the platform close request to the same confirmation: verified. Every close the sheet reports goes through one handler (TokenizerBottomSheet.tsx:286-295).
  • The confirmation is a Core Dialog, which joins the shared dismissal stack: verified (SheetConfirmation.tsx:22, :57).
  • A quarter is the existing peek measure, and one snap point can be a peek: verified (snapOffsets.ts:46, :118-136, :171-183).
  • The wait never shows less than the 24 px grabber band, which matters only for sheets under about 96 px: verified. --spacing-6 is 1.5rem (theme/tokens.stylex.ts:195) and is the grab bar's band (BottomSheetPanel.tsx:113).
  • The quarter shows about 194, 131, 314, 90 and 74 px at the listed viewports: verified from the tall sheet's 92dvh height (BottomSheetPanel.tsx:85).
  • The header and dialog positions (68, 95, 81 and about 140 px, and the dialog box at 71–497 px): consistent with an earlier browser measurement of the shipped sheets, whose Tokenizer, PowerSearch and confirmation source is unchanged on main since; not re-measured.
  • Today the sheet springs back under the dialog, and the refused-release path and its scrim restore already exist: verified (useSheetGestures.ts:576-600, :738-751 on main).
  • Focus after Keep editing stays where each owner returns it: verified. Tokenizer returns it to the search field (TokenizerBottomSheet.tsx:384-388); PowerSearch returns it to Add filter, else the panel (PowerSearchBottomSheet.tsx:1052-1061).
  • The hosts keep their existing dialog strings: verified (the Tokenizer discard and keep-editing messages, and the PowerSearch sheet discard and keep-editing messages, in source).
  • Tokenizer DEC-4's decider is the author, and the AST-094 and AST-017 owners are as named: verified (DEC-4 and the records' front matter).
  • DEC-5's decider is the BottomSheet record owner, and its Basis line quotes her answer: verified as written (BottomSheet.spec.md:593-595, front matter owners). That she gave the answer cannot be checked in the repository.
  • The records contain no pull request or issue references; the change is 147 authored lines with a clean whitespace check and a clean merge into main: verified.
  • No other open pull request owns this behavior: verified by searching open pull request titles.
  • The writing rubric results hold (no narration, three one-line rejected alternatives inside DEC-5, no references, the decided open question removed, unbuilt behavior stated as requirement gaps): verified against the records.
  • The knowledge check and Prettier are clean: not re-run here.
  • The record owner decided the direction, the non-swipe requests and the wait heights, and the engineering owner agrees with the quarter: not verifiable in the repository, and no approval exists at this head.

Files:

  • docs/specs/components/BottomSheet/BottomSheet.spec.md: needs owner approval at this head; no defect.
  • docs/specs/AST-094-touch-presentations/spec.md: clear.
  • docs/specs/components/Tokenizer/Tokenizer.spec.md: clear.
  • docs/specs/components/PowerSearch/PowerSearch.spec.md: clear.

Automated review (maintainer link)

@imdreamrunner

Copy link
Copy Markdown
Contributor Author

/approve-spec 2502241

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 2026
@imdreamrunner imdreamrunner reopened this Nov 12, 2026
@imdreamrunner
imdreamrunner merged commit 548f26c into main Nov 12, 2026
67 checks passed

This branch was successfully deployed

1 active deployment
Preview — 25022419 Deployed Nov 11, 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