Please do not review, I found some issues with this approach.
The left action panel of ReanimatedSwipeable has an issue, where it's not interactive.
This issue is a result of the StyleSheet.absoluteFillObject styles messing with the hitboxes of the Swipeable's movable part.
The central hitboxes are picking up presses landing on the left action panel, despite the two Views having no overlap,
since they were out of bounds of the swipeable, and blocked from pressing the left action panel, the touch events got lost every time the left panel was clicked.
This PR fixes this issue by separating the action panels from the movable part of the swipeable.
I could not find a more elegant way of resolving this issue - both StyleSheet changes, and structural changes within the individual action panel render functions usually resulted in the onLayout functions returning LayoutChangeEvents with completely zeroed values.
Description
Please do not review, I found some issues with this approach.
The left action panel of
ReanimatedSwipeable
has an issue, where it's not interactive.This issue is a result of the
StyleSheet.absoluteFillObject
styles messing with the hitboxes of theSwipeable
's movable part. The central hitboxes are picking up presses landing on the left action panel, despite the twoView
s having no overlap, since they were out of bounds of the swipeable, and blocked from pressing the left action panel, the touch events got lost every time the left panel was clicked.This PR fixes this issue by separating the action panels from the movable part of the swipeable.
I could not find a more elegant way of resolving this issue - both
StyleSheet
changes, and structural changes within the individual action panel render functions usually resulted in theonLayout
functions returningLayoutChangeEvent
s with completely zeroed values.Closes #3223
Test plan
Collapsed repro
```js import React from 'react'; import { View, TouchableOpacity, Text } from 'react-native'; import Swipeable from 'react-native-gesture-handler/ReanimatedSwipeable'; export default function Example() { return (Potential issue with reanimated
Animated.View
- minimal repoCollapsed code
```jsx import React, { forwardRef, useCallback } from 'react'; import Animated from 'react-native-reanimated'; import { Text, I18nManager, StyleSheet, TouchableOpacity, View, } from 'react-native'; interface SwipeableMethods { close: () => void; openLeft: () => void; openRight: () => void; reset: () => void; } const Example = forwardRef