Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/bottom-sheet-pen-comment.md
Original file line number Diff line number Diff line change
@@ -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.

@vjeux
17 changes: 9 additions & 8 deletions docs/specs/AST-094-touch-presentations/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -811,14 +811,15 @@ under a finger, and a mouse follows `module:DropdownMenu/useMenuPress` FR3 and
drag and a mouse wheel never do.
- `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. 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): a
trackpad swipe follows FR43's pager rule in Lightbox's viewer and in
Carousel's paging presentation, under every pointer (`component:Lightbox`
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/BottomSheet/useSheetGestures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading