Repository navigation
[Android] Check the overflow ancestor pass against the detector child's bounds - #4605
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
Description
Since #4532 a native detector's frame is widened to cover its transformed child. The orchestrator already checks the detector's own handlers against the child's transform-aware bounds when the child didn't consume the touch (
useChildBounds), so a translated-away child doesn't stay tappable over the area it vacated. The overflow pass right below that check still used the host frame. In an openReanimatedSwipeablethe widened host spans the whole row, so a tap on the action panel passed the "pointer inside the view" test,isViewOverflowingParentwas true andextractAncestorHandlersrecorded the row's pan and the list's scroll handler before the traversal reached the panel.ButtonViewGroup.shouldBeginWithRecordedHandlersthen cancelled the button's handler at record time, soRectButton,PressableandTouchableinside the panel never pressed. Whether a given open row was affected depended on whether a layout pass had run since opening, which is why it looked random.The overflow pass now uses the same bounds as the handler check above it. For every view that isn't a single-child detector host nothing changes. For the host, a pointer over the vacated area skips the early ancestor recording; the ancestors still get recorded in the normal order as the traversal unwinds, since they contain the pointer themselves. Native touch delivery from #4532 is a shadow node change and isn't touched.
Fixes the action buttons of
ReanimatedSwipeablerows on Android (regression from #4532, not in 3.3.0).Test plan
Android emulator,
expo-example, Reanimated Swipeable:Flag/ the Gmail row icon /Archive: the row closes and the press fires. Before: nothing.Switchinside a detector whose child is translated (static transform and Reanimated slide) still toggles, and a triple tap still reaches the detector's gesture.yarn lint:androidpasses.