react-native-scroll-bottom-sheet icon indicating copy to clipboard operation
react-native-scroll-bottom-sheet copied to clipboard

Controlling the drawer not working on example app

Open betoharres opened this issue 5 years ago • 3 comments

Current Behavior

I'm trying to control the drawer position from the ref variable using the snapTo method.

  • What code are you running and what is happening? Running example code from horizontal screen.

Expected Behavior

  • What do you expect should be happening? Pressing X to fully close the drawer.

How to reproduce

  • You must provide a way to reproduce the problem. 1- clone the project 2- run the expo client(I'm running on android) 3- select horizontal screen 4- swipe the drawer up 5- press the X button 6- (the problem) the drawer stucks in the middle(wrong result of action)

Your Environment

System:
    OS: Linux 5.1 Arch Linux
    CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
    Memory: 2.29 GB / 15.59 GB
    Shell: 5.7.1 - /usr/bin/zsh
  Binaries:
    Node: 12.10.0 - /usr/bin/node
    Yarn: 1.17.3 - /usr/bin/yarn
    npm: 6.11.3 - /usr/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    Android SDK:
      API Levels: 16, 26, 28, 29
      Build Tools: 26.0.3, 28.0.3, 29.0.0
      System Images: android-16 | Intel x86 Atom, android-16 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
      Android NDK: 21.0.6113669
  npmPackages:
    react: ~16.9.0 => 16.9.0
    react-native: https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz => 0.61.4
  npmGlobalPackages:
    react-native-cli: 2.0.1

Observations: I also tried to control the drawer in my current project. I've ditched my own component because this one looks awesome(Thanks for the great component)! But I"m having a hard time controlling the drawer. The snapTo is not responding properly to the argument I'm giving it; it only fully opens at first call(even though the argument was to open at middle position) and does not animate to any position in the remaining calls. I've tried to execute the example app and found out that the drawer is not outputting the exact same actions as in the gif in the README is as well.

betoharres avatar Jun 15 '20 19:06 betoharres

Hey @betoharres,

I've spent some time debugging the example project on Android and I am not able to reproduce the issue you are reporting. Btw, instead of cloning locally the repository, you can directly open the example here on Android: https://expo.io/@rgommezz/react-native-scroll-bottom-sheet-example

If it still happens, could you record some short video or provide a reproducible snack? Also, it'd be useful to know the Android phone model and OS version

rgommezz avatar Jun 20 '20 16:06 rgommezz

Since this is a description about the problem that my pr #10 fixed, you can try this snack: https://snack.expo.io/@djorkaeff/bottom-sheet-snap Look at this and how it open at the fully opens snap even we pass the medium point at the snapTo.

djorkaeffalexandre avatar Jun 20 '20 17:06 djorkaeffalexandre

@rgommezz sure, you want me to record the expo or the android emulator?

betoharres avatar Jun 24 '20 04:06 betoharres