software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
8.88k stars 1.3k forks source link

SharedElementTransition would transform to the bottomRight a little bit when navigate back #4820

Open chj-damon opened 1 year ago

chj-damon commented 1 year ago

Description

I'm trying to reproduce the gallery example in react-native-reanimated in my project. I find out that every time I navigate to the detail page and then navigate back, the image I clicked will transform to the bottomRight position for a little bit.

Steps to reproduce

  1. press the SharedElementTransitionDemo button
  2. press on image and enter the detail screen
  3. press Go Back Button or the topleft arrow
  4. you'll see the image has been transformed a little bit.

Snack or a link to a repository

https://github.com/thundersdata-frontend/rn-template/tree/animation-repo

Reanimated version

3.4.0

React Native version

0.72.3

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

Iphone 14 Pro (ios16.2)

Acknowledgements

Yes

github-actions[bot] commented 1 year ago

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

chj-damon commented 1 year ago

2023-07-26 17-32-32 2023-07-26 17_33_05 this is how it behaviors like.

chj-damon commented 1 year ago

I also noticed that if I reload my app with command + R, and then the image will disappear after navigate back. just like this: 2023-07-26 17-30-05 2023-07-26 17_31_03

chj-damon commented 1 year ago

@piaskowyk

chj-damon commented 1 year ago

by the way, I also tried react-native-reanimated@3.3.0 on android, the picture I pressed will be transformed to the topLeft when navigate back serveral times. image

jvgeee commented 1 year ago

@chj-damon Don't have a solution for you mate, but have noticed similar myself. I think they mark SharedElementTransitions as an experimental feature that isn't fit for production for just this reason, there are lots of little kinks that need to be worked out.

Latropos commented 1 year ago

@piaskowyk Looks that on some older versions or reanimated (I've tested 38984140ed9dc818ba502295a214a6b751f1e9af) images with sharedTransitionTag tend to persist instead of disappearing. I've also noticed that this bug happens only if you've used hot reload. Screenshot 2023-08-01 at 13 27 02

dohooo commented 1 year ago

+1

chj-damon commented 9 months ago

It's been several months, any progress here?

itsalir commented 3 months ago

Any progress? I have the same issue