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

[Expo SDK 50] [alpha.x] Weird animation issue #590

Open
BrodaNoel opened this issue Apr 21, 2024 · 9 comments
Open

[Expo SDK 50] [alpha.x] Weird animation issue #590

BrodaNoel opened this issue Apr 21, 2024 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@BrodaNoel
Copy link
Contributor

Describe the bug
I had upgraded to Expo SDK 50, and now I'm getting a cosmetic issue.

I'm going to upload a video in the following comment, showing what is happening.

I was using alpha0 with SDK 49 and this issue was NOT pressent.
I tried alpha0 on SDK 50 and alpha10, and in both situations the issue still there.

If you check in the video, there are 2 different Carousels. Here are the implementations:

// first carousel in the video
<Carousel
          ref={ref => (this.carousel = ref)}
          mode="parallax"
          loop={false}
          scrollAnimationDuration={200}
          width={WIDTH}
          height={HEIGHT}
          data={spots}
          renderItem={SpotPreviewWrapper}
          windowSize={2}
          onSnapToItem={this.onIndexChange}
          modeConfig={{
            parallaxScrollingScale: 0.75,
            parallaxAdjacentItemScale: 0.75,
            parallaxScrollingOffset: 80,
          }}
        />
// second carousel in the video
<Carousel
            data={images}
            loop={false}
            scrollAnimationDuration={200}
            renderItem={({ item, index }) => this._renderItem({ item, index }, PHOTO_HEIGHT)}
            width={DEVICE_WIDTH}
            height={PHOTO_HEIGHT + USER_BOX_HEIGHT}
            onSnapToItem={this.onImageChange}
            enabled={images.length > 1}
            windowSize={3}
            onConfigurePanGesture={gestureChain => {
              gestureChain.activeOffsetX([-10, 10]);
            }}
          />

All these carousel were working well since years ago.

Screenshots
Video in the next comment

Versions (please complete the following information):

  • react: 18.2.0
  • react-native: 0.73.6
  • react-native-reanimated: ~3.6.2
  • react-native-reanimated-carousel: 4.0.0-alpha.10
  • react-native-gesture-handler: ~2.14.0

Smartphone:

  • Device: iPhone 13 mini
  • OS: iOS 17.4.1 (latest at this time)
@BrodaNoel BrodaNoel added the bug Something isn't working label Apr 21, 2024
Copy link

dosubot bot commented Apr 21, 2024

Hello @BrodaNoel! 👋 I'm Dosu, a bot here to assist you with bug resolutions, answer your questions, and guide you on becoming a contributor. While you're waiting for a human maintainer, I'm here to help you out. I'm currently reviewing your issue about the animation problem you're facing with react-native-reanimated-carousel on Expo SDK 50 and will get back to you shortly with a more detailed response. Stay tuned!

@BrodaNoel
Copy link
Contributor Author

RPReplay_Final1713740178.mp4

@BrodaNoel BrodaNoel changed the title [alpha.10] Weird animation issue [Expo SDK 50] [alpha.x] Weird animation issue Apr 21, 2024
@BrodaNoel
Copy link
Contributor Author

BTW, yes, my component is wrapper with GestureHandlerRootView.

@BrodaNoel
Copy link
Contributor Author

This issue seems to be quite similar to the one that is being solved in #576

It maaay be fixed after merging it.

Copy link

dosubot bot commented Apr 21, 2024

The issue you're experiencing with the react-native-reanimated-carousel animations after upgrading to Expo SDK 50 seems to be recognized and potentially addressed by the ongoing work in pull request #576. This pull request aims to solve animation-related problems that could be affecting your carousels. It's advisable to monitor the progress of this pull request and test your application once the changes are merged to see if the issue resolves. In the meantime, ensure that all your dependencies are up to date and consider checking if there are any known workarounds or additional configurations required for the new SDK version that might temporarily alleviate the issue.

Details

About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@BrodaNoel
Copy link
Contributor Author

BrodaNoel commented Apr 22, 2024

I'm having the same issue with the minimum version of this Carousel:

  render() {
    const { spots } = this.state;

    if (spots && spots.length) {
      return (
        <Carousel
          // ref={ref => (this.carousel = ref)}
          // mode="parallax"
          // loop={false}
          // scrollAnimationDuration={200}
          width={WIDTH}
          height={HEIGHT}
          data={spots}
          renderItem={SpotPreviewWrapper}
          // windowSize={2}
          // onSnapToItem={this.onIndexChange}
          // modeConfig={{
          //   parallaxScrollingScale: 0.75,
          //   parallaxAdjacentItemScale: 0.75,
          //   parallaxScrollingOffset: 80,
          // }}
        />
      );
    }

    return null;
  }
trim.263A488F-D255-4E36-9F61-CCD15E4649E5.MOV

@BrodaNoel
Copy link
Contributor Author

BrodaNoel commented Apr 22, 2024

@dohooo after implementing the changes on #574 and #576, and creating a patch with them, it looks to be IMPROVED. Not fixed... but the issue got a bit better

And seems like the one who improved it was 574

@BrodaNoel
Copy link
Contributor Author

This is the new behavior after implementing 574 and 576

trim.1234137D-3180-4B3E-8857-F6FF4FB85F9F.MOV

@BrodaNoel
Copy link
Contributor Author

Check the "image indicator" (1/2 photos... 2/2 photos), in the middle, below, inside the photo.

That number is the current index of the carousel. In the video you can see that it doesn't move properly when you swipe the photo to change it. It seems like it's called later or something like that.

trim.7D5AD0B9-4EDE-4AB4-9576-FCD504B980AB.MOV

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants