Skip to content

Commit b6b2363

Browse files
muukiiclaude
andcommitted
Drop minimumActivationDistance from drag gesture configuration
Bumps the swiftui-scrollview-interoperable-drag-gesture submodule to remove the activation-distance gate. The gate returned early before the scroll-view lock kicked in, letting the inner scroll view rubber-band / scroll during the slop window. UIPanGestureRecognizer's built-in slop is sufficient on its own. Removes the `minimumActivationDistance: 15` argument from both gesture configurations in RideauHostingView and updates spec.md accordingly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c1fb421 commit b6b2363

3 files changed

Lines changed: 12 additions & 13 deletions

File tree

Rideau/Core/RideauHostingView.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ final class RideauHostingView: RideauTouchThroughView {
121121
ignoresScrollView: false,
122122
targetEdges: .top,
123123
sticksToEdges: true,
124-
edgeActivationMode: .onlyAtGestureStart,
125-
minimumActivationDistance: 15
124+
edgeActivationMode: .onlyAtGestureStart
126125
)
127126
)
128127

@@ -220,8 +219,7 @@ final class RideauHostingView: RideauTouchThroughView {
220219
ignoresScrollView: ignoresScrollView,
221220
targetEdges: .top,
222221
sticksToEdges: true,
223-
edgeActivationMode: .onlyAtGestureStart,
224-
minimumActivationDistance: 15
222+
edgeActivationMode: .onlyAtGestureStart
225223
)
226224
}
227225

Rideau/spec.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ its valid range. The implementation should follow this spec.
3939

4040
Configuration:
4141
`edgeActivationMode: .onlyAtGestureStart`, `targetEdges: .top`,
42-
`sticksToEdges: true`, `minimumActivationDistance: 15`
42+
`sticksToEdges: true`
4343

44-
- Consume movement smaller than 15 pt and do not forward it to Rideau.
44+
- Rely on `UIPanGestureRecognizer`'s built-in recognition slop only; do not
45+
apply an additional activation distance on top.
4546
- While `isScrollLockEnabled == true`, fully lock the inner scroll view and send
4647
all translation to the outer drag.
4748
- While `isScrollLockEnabled == false`, activate the outer drag only if the
@@ -102,12 +103,13 @@ ownership is decided by the submodule using `.onlyAtGestureStart`.
102103
- `targetEdges: .top`. No coordination is performed for the bottom edge.
103104
- Horizontal scrolling should always remain free and must not be locked.
104105

105-
### 3.4 The 15 pt Gate
106+
### 3.4 Activation Slop
106107

107-
- The 15 pt threshold is owned entirely by the submodule through
108-
`minimumActivationDistance: 15`.
109-
- Rideau should not apply its own additional gate. Once `onChange` fires,
110-
Rideau can assume the user has already moved at least 15 pt.
108+
- Recognition slop is delegated to `UIPanGestureRecognizer`'s built-in
109+
threshold. The submodule does not add an additional activation distance,
110+
because doing so would let the inner scroll view rubber-band/scroll while
111+
the outer drag is still gated.
112+
- Rideau should not apply its own gate either.
111113

112114
## 4. Snap Resolution on Gesture End
113115

@@ -174,7 +176,6 @@ ownership is decided by the submodule using `.onlyAtGestureStart`.
174176
- dynamic switching of `isScrollLockEnabled`
175177
- configurable `targetEdges`
176178
- `edgeActivationMode: .onlyAtGestureStart`
177-
- configurable `minimumActivationDistance`
178179
- deceleration cancellation when locking and unlocking
179180
- scroll-indicator hiding while locked
180181

0 commit comments

Comments
 (0)