diff --git a/.changeset/bottom-sheet-pull-stretch.md b/.changeset/bottom-sheet-pull-stretch.md new file mode 100644 index 0000000000000..a2e1ec45fb988 --- /dev/null +++ b/.changeset/bottom-sheet-pull-stretch.md @@ -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 diff --git a/apps/storybook/stories/BottomSheet.stories.tsx b/apps/storybook/stories/BottomSheet.stories.tsx index e71f25fd23cd3..cfc1437b933b2 100644 --- a/apps/storybook/stories/BottomSheet.stories.tsx +++ b/apps/storybook/stories/BottomSheet.stories.tsx @@ -590,6 +590,71 @@ export const HugHeight: Story = { }, }; +/** + * A sheet whose height the caller sets. It keeps a 48 px surface below the + * screen, so a pull past the top stretches it at most that far. + */ +export const CallerHeight: Story = { + name: 'Caller height (500 px)', + render: () => { + const [isOpen, setIsOpen] = useState(false); + return ( + <> +