Fix left action panel of ReanimatedSwipeable
being non-interactive
#3236
+4
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 two
View
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
Potential issue with reanimated
Animated.View
- minimal repoCollapsed code