magento-react-native icon indicating copy to clipboard operation
magento-react-native copied to clipboard

DrawerScreen component accessible at every Screen

Open sanjeevyadavIT opened this issue 6 years ago • 0 comments
trafficstars

Describe the bug Since react-native-gesture-handler is enabled in the code, dragging left across the screen opens up the Drawer. There are two Drawer used one showing CategoryTree and other showing DrawerScreen for Category component. And as DrawerScreen drawer is the top most Drawer, swiping left across any screen whether Home, Cart, Login etc, it opens up.

Expected behavior

  1. CategoryTree Drawer should be only accessible from HomeScreen, Login or Account (depending upon user is authenticated or not) and Cart. As soon as other screen are added in their respective stacks, swiping left should not open Drawer.

As , SearchScreen is first level of Bottom tab navigator and it also show products which contain filters, CategoryTree Drawer should not open on swiping left

  1. DrawerScreen drawer should only be accessible from Category and SeacrhScreen
  2. From any other screen which are not mentioned here, drawer should remain disabled.

Current Behavior DrawerScreen can be access from any screen, by swiping left across the screen

Steps to Reproduce

  1. Open the app on Android phone
  2. Start swiping left across the screen

Solution First solution(Easy method): Disable gesture Second Solution: Keep only one Drawer Navigator. Remove DrawerScreen as Drawer and make it a screen that render over top of the Category and search screen Third Solution: Properly handle both Drawer state as mentioned in Expected behavior.

Screenshots gif

DrawerScreen accessible from HomeScreen Screenshot_1568895449

Smartphone (please complete the following information):

  • Magento Version: [2.1.0]
  • Device: [Android Emulator Nexus 5X]
  • OS: [PIE]
  • Version [28]

Additional context I don't know whether gestures are enabled on iOS or not, but they are enabled on Android.

sanjeevyadavIT avatar Sep 19 '19 13:09 sanjeevyadavIT