mattermost / mattermost-mobile

Next generation iOS and Android apps for Mattermost in React Native
https://about.mattermost.com/
Apache License 2.0
2.25k stars 1.37k forks source link

Android 10 Gesture Navigation Conflicts with Drawer #4117

Closed jrtberlin closed 1 year ago

jrtberlin commented 4 years ago

Summary

The Android 10 "back" gesture conflicts with the swipe gesture to open the channel drawer. This situation results in accidental app closes. The GIF shows the situation and a workaround (angled swipe):

mattermost_android10_gestures

Environment Information

Steps to reproduce

On Android 10 try to open the drawer with the swipe gesture.

Expected behavior

Swiping from the left edge should open the channel drawer.

Possible fixes

There are two possible improvements:

  1. setSystemGestureExclusionRects for the side where the drawer is.

Use this to tell the system which specific sub-areas of a view need to receive gesture input in order to function correctly in the presence of global system gestures that may conflict. For example, [...] a view such as a navigation drawer container can mark the left (or starting) edge of itself as requiring gesture capture priority using this API.

  1. More recent phones are bigger and have a taller aspect ratio. If it is expected to use the button to open the drawer, the action bar should move to the bottom of the screen. (Users can read text on top, but not reach the top for interaction)
enahum commented 4 years ago

Hi @jrtberlin this is a know issue and sadly so far we haven't been able to do anything about this, would you be willing an try and contribute in order to fix it?

jrtberlin commented 4 years ago

@enahum Sorry, I dislike working with react native. I thought that this should be documented publicly. Can you point into a component where changes are required? Maybe someone else picks this up.

enahum commented 4 years ago

No worries at all @jrtberlin thanks for bringing this up.

Initial work should be done in the dependency library react-native-navigation and then either submit a PR to that repo or patch it locally (preferably the former) then apply the needed changes in the mattermost app (update the dependency or apply the patch / Modify the navigation actions as needed in app/actions/navigation

francislavoie commented 3 years ago

Can another look be taken at this? Mattermost is practically unusable because of this issue when gesture navigation is enabled.

Other apps like Slack allow for the entire content view to be right-awipeable to open the navigation drawer. If mattermost did the same, it would completely resolve the problem. Right now, nothing at all happens when right-swiping in the middle of the screen, so it would only be beneficial.

larkox commented 1 year ago

Closing as this should not be applicable to V2.