omahili / react-native-reorderable-list

A reorderable list for React Native applications, powered by Reanimated 2 🚀
MIT License
115 stars 5 forks source link

Autoscroll not working #4

Closed hirbod closed 2 years ago

hirbod commented 2 years ago

Hi,

I am using your awesome list (the smoothest out there) inside a TabBar (and also do have Statusbar + Nav header) and I've also added ListHeaderComponent to the Flatlist.

I think your lib only works in a plain naked view without any header, bottom tabs and ListHeaderComponent. Autoscroll is not working correctly. Everything else is working super smooth though.

Could you have a look at this? I would love to sponsor this feature if you can fix it quickly.

This is currently on iOS, I haven't tested Android yet but I will.

hirbod commented 2 years ago

@omahili I made you a quick video showing the issue. This example is even without a bottom tab. I think that the area for autoscrolling is not calculated correctly. I also tried changing the provided props tresholds but no success unfortunately.

https://user-images.githubusercontent.com/504909/162582525-5b073915-8deb-43b7-8bfa-991810bc2368.mp4

omahili commented 2 years ago

Hi @hirbod, thank you for the appreciation!

Could you provide a minimum reproducible example of this bug, so I can test it?

hirbod commented 2 years ago

Hi @omahili

thanks for your answer. I will build you an example today.

hirbod commented 2 years ago

Hi @omahili,

sorry for the delay, was caught up in work. I created the repro. https://github.com/hirbod/autoscroll-issue-react-native-reorderable-list

I also created an Expo Snack (with the same requirements as in your README, but this is not even working at all) https://snack.expo.dev/@hirbod/autoscroll-issue

The git reproduction is working as expected but with said auto scroll issue (barely scrolling, sometimes not scrolling/not recognizing when to start scrolling, like in the video).

I've added a README for you inside the repo.

Reproduction

  1. Clone repository https://github.com/hirbod/autoscroll-issue-react-native-reorderable-list.git
  2. Run yarn to install everything
  3. Install expo-cli globally (npm install -g expo-cli)
  4. Run expo start in your Root and scan the QR or search in your network with the Expo Go App (available in Apple and Play Store)

If you prefer to run a bare react-native project, just hit expo eject and it will create iOS and Android folders which you can use with react-native CLI OOTB.

I just added explanation here since I am not aware if you have used Expo before.

The result was always the same. Autoscrolling not working correctly, even without a ListHeaderComponent

FYI: I also tried a JS-navigation stack (instead of the native-stack), but that didn't make any difference.

P.S: It's about iOS, I haven't tested Android yet.

hirbod commented 2 years ago

@omahili i just tested Android and its working great. So this issue is indeed an iOS only problem

omahili commented 2 years ago

Ok, thank you for going deep into it. I'll investigate this!

hirbod commented 2 years ago

Hi mate, any update on this? :)

omahili commented 2 years ago

I'm working on the next version which will include a fix for this. I should release it this week.

omahili commented 2 years ago

Fixed in #7 and released with version 0.4.0

hirbod commented 2 years ago

This are good news!! Going to give it a try today, thanks for your efforts so far :).

hirbod commented 2 years ago

@omahili thanks a ton for this. Working GREAT! Nice.