Repository navigation
fix(core): a BottomSheet pulled past its top stretches on every pull, on the iOS rubber band #8109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [fix] BottomSheet: a finger's pull up past the top stretches the sheet on every pull, on iOS's rubber band, with no 48 px cap, unless the caller sizes or styles the sheet (an inline block size, any `xstyle` or class name), which keeps it. The sheet keeps enough of its surface below the screen that the page never shows. A pull on the content stretches it too once the content has no room left to scroll: at once for content that fits, and after a long list reaches its end. A mouse or a pen keeps its current stretch. | ||
|
|
||
| @vjeux | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -354,7 +354,10 @@ a measured, sourced difference exists. | |
| the area sits at its edge and the drag moves toward that edge, the | ||
| surrounding surface (a sheet) takes the drag; otherwise the area keeps it for | ||
| the whole gesture and rubber-bands at its edge. The drag MUST NOT change | ||
| hands midway, in either direction. This amends `spec:AST-025` FR14 (scroll | ||
| hands midway, in either direction, with one exception (DEC-28). At a | ||
| sheet's tallest detent, a pull that carries its content past its end | ||
| continues as the sheet's stretch, and a reversal hands it back to the | ||
| content (`component:BottomSheet` FR18). This amends `spec:AST-025` FR14 (scroll | ||
| chaining by default) for touch presentations on every touch platform. | ||
| - **FR15 — Recognizers arbitrate like UIKit's.** Recognizers that see the | ||
| same touch sequence MUST be exclusive by default: the first to recognize | ||
|
|
@@ -804,7 +807,13 @@ under a finger, and a mouse follows `module:DropdownMenu/useMenuPress` FR3 and | |
| - `component:BottomSheet`: a `form` or `required` sheet rubber-bands past its | ||
| resting place under a finger as under a trackpad (FR3, FR43), with the same | ||
| stretch for the same travel; a mouse wheel scrolls its content and never | ||
| moves it. Implementation gap: a finger drags it one for one below rest. | ||
| moves it. Past its tallest detent, every finger's pull stretches it on FR3's | ||
| rubber band with no hold, over a reserve deep enough for the whole stretch | ||
| and the release. A pull on its content does so once the content cannot | ||
|
Comment on lines
+810
to
+812
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking: FR18 stops a sheet the caller sizes or styles at 48 px, so "every finger's pull stretches it on FR3's rubber band with no hold" reads wider than the component record. Adding "unless the caller sizes or styles it (FR18)" makes the two records read alike.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. This head keeps its approvals, so the line gains "unless the caller sizes or styles it (FR18)" in a small follow-up after this merges. |
||
| scroll that way (`component:BottomSheet` FR18). Past its tallest detent, a | ||
| mouse and a pen keep FR18's resisted stretch of at most 48 px, an exception | ||
| to FR43's same rubber band (`spec:AST-017` FR59). Implementation gap: a | ||
| finger drags it one for one below rest. | ||
| - The shared pager (Carousel's paging presentation, Lightbox's viewer): a | ||
| trackpad swipe follows FR43's pager rule in Lightbox's viewer and in | ||
| Carousel's paging presentation, under every pointer (`component:Lightbox` | ||
|
|
@@ -1302,6 +1311,18 @@ checks there. | |
|
|
||
| Rejected: a physical Android phone as a gate or as a follow-up check. | ||
|
|
||
| ### DEC-28 — Sheet stretch at the tallest detent | ||
|
|
||
| **Reference:** `spec:AST-094/DEC-28` | ||
| **Decider:** the owner, `2026-11-03` | ||
|
|
||
| Decided by the owner in a feel check on a phone: at a sheet's tallest detent, | ||
| a pull that carries its content past its end continues as the sheet's | ||
| stretch, and a reversal hands it back (FR14's one exception). | ||
|
|
||
| Rejected: keeping the whole gesture with the content (the strict nested-scroll | ||
| rule). | ||
|
|
||
| ## Open questions | ||
|
|
||
| - **OQ1 — Scroll view bounce-back curve.** What curve brings a scroll view | ||
|
|
||
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"A mouse or a pen keeps its current stretch" holds on the grabber only: a stylus pull on the sheet's body takes the finger's band (
useSheetGestures.ts:1207,:1319-1327), where on the base it moved nothing at the tallest detent. Fix the stylus path, or say "a mouse, or a pen on the grabber".There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stylus path is fixed in c58330c, so the line now holds on the body too.