Skip to content

fix(core): a BottomSheet touch release takes UIKit's sheet values, and turning back cancels - #10234

Merged
cixzhang merged 1 commit into
meta:mainfrom
vjeux:uikit/c17-sheet-touch-landing
Nov 6, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
vjeux:uikit/c17-sheet-touch-landing

Conversation

@vjeux

@vjeux vjeux commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Stack: #8105 → #10234

User impact

On a phone, a short fast flick sprang a BottomSheet back, and a moderate throw from its top snap point closed it.

Problem and solution fit

Expected behavior and authority

component:BottomSheet FR19's touch values, DEC-4 and its compatibility note; spec:AST-094 FR36's BottomSheet sentence and FR37. Owner-gated.

Smallest restoration

The touch release on resolveSnapPoint and three measured sheet values. No public API.

Evidence

  • Reproduction before the change (red-first arm 9d3be18, fix(core): a BottomSheet touch drag's close keeps its speed, and its scrim fades with it #8105's product plus these tests, not for landing): 10 unit cases fail (the flick, short-flick, cancel, slow-drag and gentle-throw cases, and resolveSnapPoint's flickPastProjection), and a 1,200 px/s flick from tall closes the sheet instead of landing on half (Chromium). The release spec imports the new sheet table, so it cannot load on the arm.
  • Result after the change: a 1,200 px/s flick from Snap points' tall detent lands on half, and 2,000 and 4,000 px/s flicks close (Chromium and WebKit).
  • Card 83 carries: its paths measure as at the carded 8bcccb5, within 0.1 ms: flicks at 1,200 and 1,500 px/s from tall land on half; hard flicks at 4,000 and 10,000 px/s close; a 3,000 px/s close plays 534.7, 710.0 and 1055.9 ms at tempo 0.75, 1 and 1.5.
  • Representative unchanged path: a quick mouse drag keeps the sheet open.

Scope

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Writing rubric results

R1–R6 pass for FR19's touch values and its verification row, DEC-4, the compatibility note and AST-094 FR36's sentence.

Testing

Rebuilt on main 010db3f, which has #8105 and the Popover group: this pull request's own diff, unchanged apart from motion/uikit/index.ts's header list, which now names both popover and sheet. Local (Linux), at that head: core tsc; units for BottomSheet, motion, hooks and Popover (2,605); check:motion-roles (36 roles); check:knowledge; ESLint on the changed files (0 errors); Prettier; the Changeset coverage check; pnpm review:pre (0 findings). BottomSheet's a11y specs in Chromium 81 of 81 and in WebKit 54 passed, 2 skipped; its interaction specs in Chromium 16 of 16 and in WebKit 7 passed, 9 skipped. Card 83's paths measure as at the stamped 8bcccb5 product, within 0.1 ms: flicks at 1,200 and 1,500 px/s from tall land on half; 4,000 and 10,000 px/s flicks close in 728.6 and 707.3 ms; a 3,000 px/s close plays 534.7, 710.1 and 1055.9 ms at tempo 0.75, 1 and 1.5, each fade ending with its close.

@vercel

vercel Bot commented Nov 6, 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 6, 2026 4:11pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 6, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 6, 2026
@astracat-bot

astracat-bot Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 6, 2026, 4:26 PM UTC

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 47383e1

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
BottomSheet 59.4 kB (+825 B) · 7.5 kB CSS (0) — ✓ · ✓ · —
PowerSearch 271.8 kB (+815 B) · 23.1 kB CSS (0) — — · — · —
TimeInput 150.5 kB (+813 B) · 15.5 kB CSS (0) — — · — · —
22 more components
Component Size LoC Visual · A11y · RTL
DateTimeInput 195.9 kB (+811 B) · 18.1 kB CSS (0) — — · — · —
DateInput 173.5 kB (+782 B) · 16.4 kB CSS (0) — — · — · —
DropdownMenu 86.1 kB (+1 B) · 16.7 kB CSS (0) — — · — · —
MoreMenu 86.3 kB (+1 B) · 16.7 kB CSS (0) — — · — · —
Popover 78.5 kB (+1 B) · 13.4 kB CSS (0) — — · — · —
lab/CommentComposer 137.6 kB (+1 B) · 1.9 kB CSS (0) — — · — · —
lab/CommentThread 301.4 kB (+1 B) · 2.4 kB CSS (0) — — · — · —
richtext/RichTextEditorToolbar 244.1 kB (+1 B) · 454 B CSS (0) — — · — · —
BottomSheetSwitcher 17.5 kB (0) · 3.4 kB CSS (0) — ✓ · ✓ · —
ContextMenu 90.5 kB (0) · 16.6 kB CSS (0) — — · — · —
Markdown 162.2 kB (0) · 19.5 kB CSS (0) — — · — · —
MultiSelector 88.7 kB (0) · 16.3 kB CSS (0) — — · — · —
Pagination 103.3 kB (0) · 17.3 kB CSS (0) — — · — · —
Selector 93.2 kB (0) · 16.9 kB CSS (0) — — · — · —
Table 100.0 kB (0) · 17.3 kB CSS (0) — — · — · —
TableCell 91.7 kB (0) · 17.0 kB CSS (0) — — · — · —
TableHeaderCell 91.3 kB (0) · 16.8 kB CSS (0) — — · — · —
Tokenizer 84.8 kB (0) · 18.1 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 96.5 kB (0) · 773 B CSS (0) — — · — · —
lab/ChatReactionBar 97.6 kB (0) · 1.1 kB CSS (0) — — · — · —
lab/Comments 306.5 kB (0) · 2.5 kB CSS (0) — — · — · —
lab/TourStep 84.7 kB (0) · 590 B CSS (0) — — · — · —

Package size: @astryxdesign/core 6.79 MB packed (+3.4 kB); no new dependencies.

API changes: none in this pull request

Committed API report behind this build: cli 19 rows, core 24 rows; run pnpm api:report.

Touched components checked; add ci:run-visual or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

@cixzhang cixzhang added ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) labels Nov 6, 2026
@cixzhang

cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 821f7cd

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

#8105 — approve. A sheet that a touch drag closes now leaves at the finger's speed, and its scrim fades on the same clock, as the approved BottomSheet FR19 and spec:AST-094 FR38 require. No blocking findings.

#10234 — approve. A touch release now follows the approved FR19 and spec:AST-094 FR36 values: a short fast flick at the lowest detent closes the sheet, and a moderate throw from the top stops at the next detent. No blocking findings; two optional comment trims are inline.

Whole stack — passes. A pull request lands only when it and every pull request below it are approved, so #10234 lands after #8105.

Approved pending CI: CI has not run on this head yet because the pull request is a draft.

[Automated review]

Comment on lines +1223 to +1226
// A touch release takes UIKit's sheet values, with closed counted as
// one position. A flick lands on the first position at or past its
// projection. A release that moves back toward where the drag began
// cancels to that detent.

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.

Non-blocking (INV29 comment style): the last two sentences restate what flickPastProjection: true and start: baseOffset already say. Suggest keeping only the reason:

// UIKit's sheet counts closed as one more position.

Comment on lines +161 to +162
// The first snap point at or past the projection in the flick's
// direction, or the last one there when the projection passes them all.

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.

Non-blocking (INV29 comment style): this narrates the loop below it, and the file header already states the rule ("a flick lands on the first snap point at or past its projection"). Suggest deleting it.

@vjeux
vjeux force-pushed the uikit/c17-sheet-touch-landing branch from 821f7cd to 48de3c5 Compare November 6, 2026 07:53
@cixzhang

cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 48de3c5

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

#8105 — approve. A sheet that a touch drag closes now leaves at the finger's speed, and its scrim fades on the same clock, as the approved BottomSheet FR19 and spec:AST-094 FR38 require. The title, description and FR19's mouse and pen gap now match the change. No blocking findings.

#10234 — approve. A touch release now follows the approved FR19 and spec:AST-094 FR36 values: a short fast flick at the lowest detent closes the sheet, and a moderate throw from the top stops at the next detent. No blocking findings; the two optional comment trims from the earlier review still apply.

Whole stack — passes. A pull request lands only when it and every pull request below it are approved, so #10234 lands after #8105.

Approved pending CI: the required checks were still running on this head when this review finished.

[Automated review]

@vjeux
vjeux marked this pull request as ready for review November 6, 2026 08:21
…d turning back cancels

A touch drag's release takes UIKit's measured sheet values. It is
projected 0.1 s ahead (measured), with closed counted as one position,
and a release slower than 250 px/s is not projected (measured). A
release at 1,008 px/s or faster is a flick, as UIKit's sheet counts one.
It lands on the first position at or past its projection, and at least
on the next one. So a short fast flick at the lowest detent closes the
sheet instead of springing back. From a higher detent, a flick that
0.1 s of its speed carries past the next detent goes on: a hard flick
closes the sheet, and a softer one stops at the next detent (AST-094
FR36). A faster touch release never travels less than a slower one. A
touch release moving back toward where the drag began cancels to that
detent (AST-094 FR37). The touch release calls the shared release
policy, resolveSnapPoint, whose new flickPastProjection option lands a
flick at or past its projection.

A slow or medium touch throw now travels less than it did, and a slow
touch drag closes the sheet only past halfway from the lowest detent to
closed. A mouse or pen drag keeps its release: the scroll projection
and the dismiss line, with no flick.

The BottomSheet record's FR19 adds these touch values to the release
rule, with the mouse and pen differences as implementation gaps, and
its verification rows merge. AST-094 FR36's BottomSheet sentence names
the touch values. DEC-4 and its compatibility note say so.
@cixzhang
cixzhang force-pushed the uikit/c17-sheet-touch-landing branch from 48de3c5 to 47383e1 Compare November 6, 2026 16:02
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 6, 2026
@cixzhang

cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 47383e1

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

Approve. The BottomSheet touch-release rule (FR19's measured values, DEC-4 and the new spec:AST-094 FR36 sentence) has an engineering owner's /approve-spec for this head, the touch cancel meets FR37, and CI passed on this head. The new release tests fail before the change and pass after, and in Chromium a short fast flick at the lowest detent now closes the sheet while a moderate throw from the top snap point stops at half. No blocking findings.

Optional:

  • Miss: FR19 and the new FR36 sentence say any touch release from 1,008 px/s is a flick, but the code (like DEC-4) also needs more than 8 px of travel, so adding that to FR19 keeps the record exact.
  • Miss: the cancel unit case also passes before the change; a case such as a slow drag to 390 px followed by 10 px back at 100 px/s fails before and passes after.
  • The two comment trims from the earlier inline comments still apply.

[Automated review]

@cixzhang
cixzhang merged commit 6309b0b into meta:main Nov 6, 2026
70 checks passed
@vjeux
vjeux deleted the uikit/c17-sheet-touch-landing branch November 6, 2026 16:47

This branch was successfully deployed

1 active deployment
Preview — 47383e1d Deployed Nov 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) 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