Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APP-703] Android horizontal scroll registers as tap #960

Merged
merged 7 commits into from
Jul 7, 2023

Conversation

ansh
Copy link
Contributor

@ansh ansh commented Jul 3, 2023

After a lot of investigation, it seems as though this issue is caused due to using Touchables from core react-native instead of RNGH

dohooo/react-native-reanimated-carousel#150 (comment)

I have replaced them with the ones from RNGH in the <Link> component. However, this component is used in a lot of places so extensive testing is required as the Touchables from RNGH are not a drop-in replacement.

There are a couple more optimizations that can be done along the same vein (although, they don't have to be part of this PR):

  • improve image tapping behavior (tapping errors here are caused by using onPressIn)
  • improve speed to open PostThread screen on Android. This is very slow, and that is why sometimes the taps register after the horizontal scroll, which is a bad experience for Android users

@ansh
Copy link
Contributor Author

ansh commented Jul 5, 2023

@pfrazee I think this PR can be merged after testing. I can add the two other features in later PRs as they require a lot more work and performance monitoring/debugging.

@ansh ansh marked this pull request as ready for review July 5, 2023 23:37
@ansh ansh requested a review from pfrazee July 5, 2023 23:37
@pfrazee
Copy link
Collaborator

pfrazee commented Jul 6, 2023

Holy moly I had to try ten times to get my iphone to run the build and I'm glad I did

This breaks the post controls on iOS

@ansh
Copy link
Contributor Author

ansh commented Jul 6, 2023

RNGH workaround did not work
New workaround:
// workaround for Android not working well with left/right swipe gestures and TouchableWithoutFeedback
// callstack/react-native-pager-view#424

Copy link
Collaborator

@pfrazee pfrazee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay great this works. We may still need to apply this a couple places (post controls for instance) but let's shipit

@pfrazee pfrazee merged commit df75521 into main Jul 7, 2023
4 checks passed
@pfrazee pfrazee deleted the ansh/app-703-android-home-swipe-gesture-opens-posts branch July 7, 2023 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants