An open source design system that's fully customizable and agent ready
TypeScript
docs(BottomSheet): AST-094 names FR18's caller-sized exception; a comment names the pen (#10023)
Christopher Chedeau5f81c3f3906e
diff --git a/.changeset/bottom-sheet-pen-comment.md b/.changeset/bottom-sheet-pen-comment.mdnew file mode 100644index 0000000000..6860629ea7--- /dev/null+++ b/.changeset/bottom-sheet-pen-comment.md@@ -0,0 +1,7 @@+---+'@astryxdesign/core': patch+---++[docs] A BottomSheet source comment names the pen beside the mouse for the resisted stretch past fully open. Nothing a consumer imports or renders changes.++@vjeuxdiff --git a/docs/specs/AST-094-touch-presentations/spec.md b/docs/specs/AST-094-touch-presentations/spec.mdindex bd805a3380..61c58159b7 100644--- a/docs/specs/AST-094-touch-presentations/spec.md+++ b/docs/specs/AST-094-touch-presentations/spec.md@@ -811,14 +811,15 @@ under a finger, and a mouse follows `module:DropdownMenu/useMenuPress` FR3 anddrag and a mouse wheel never do.- `component:BottomSheet`: a `form` or `required` sheet rubber-bands past itsresting 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. 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- 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.+ stretch for the same travel; a mouse wheel scrolls its content and never 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, unless the caller sizes or styles it (`component:BottomSheet` FR18).+ A pull on its content does so once the content cannot 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): atrackpad swipe follows FR43's pager rule in Lightbox's viewer and inCarousel's paging presentation, under every pointer (`component:Lightbox`diff --git a/packages/core/src/BottomSheet/useSheetGestures.ts b/packages/core/src/BottomSheet/useSheetGestures.tsindex 6229653a0b..b4608fc571 100644--- a/packages/core/src/BottomSheet/useSheetGestures.ts+++ b/packages/core/src/BottomSheet/useSheetGestures.ts@@ -122,8 +122,8 @@ function touchPointerType(touch: Touch): string {return (touch as StylusTouch).touchType === 'stylus' ? 'pen' : 'touch';}-// A mouse's stretch past fully open: a resisted fraction of the drag, capped-// at OVERSCROLL_MAX.+// A mouse's or a pen's stretch past fully open: a resisted fraction of the+// drag, capped at OVERSCROLL_MAX.const OVERSCROLL_RESISTANCE = 0.35;// SYNC: must not exceed MIN_RESERVE in BottomSheetPanel.tsx, the smallest// reserve the sheet keeps below the screen.