wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.04k stars 2.67k forks source link

setRoot Animations Do Not Work on iOS #7629

Open karrettgelley opened 2 years ago

karrettgelley commented 2 years ago

🐛 Bug Report

From experimentation with both the playground and my app, it seems that setRoot animations do not work on iOS (on both simulator and physical device). I thought at first it was due to an incorrect implementation in my app, but after cloning master (v7.30.0) of this repo, I was able to reproduce the issue in the playground app (again, on both simulator and physical device on iOS). More specifically, none of the setRootAnimation animations work in playground/src/commons/options/Animations.ts. Instead of showing a slide in/slide out animation as the code intends, the default replace animation is shown

Please see videos below for a demonstration of the issue

To Reproduce

  1. Open the playground app in Xcode (either playground/ios/playground.xcodeproj or playground/ios/playground.xcworkspace)
  2. Run the playground app via npm run start
  3. Build and run the app in Xcode on either a simulator or on a physical device by pressing the play button
  4. Once the app has launched, Click the 'Navigation' bottom tab
  5. Click the 'Set Root' button near the top of the screen
  6. Here you'll be presented a list of buttons that are meant to showcase the various behaviors of the Navigation.setRoot() method, including custom animations. Press any of these options
  7. Observe that no animation occurs when navigation from one root to another

Expected behavior

According to the setRootAnimation variable defined in playground/src/commons/options/Animations.ts. the destination screen should slide in from the right and the source screen should slide out to the left

Actual Behavior

Default replace screen animation is exhibited

Your Environment

*While I observed this issue in both my app and the playground app, the following values refer to those in the playground

Reproducible Demo

The following video demonstrates the issue as shown on physical device. I have also recorded a demo on sim but the file is too large to post here

https://user-images.githubusercontent.com/31458115/200108016-26196255-5852-45bf-bb60-6592c34e75ee.mov

Just clone master and follow the STR above

Are you willing to resolve this issue by submitting a Pull Request?

viper4595 commented 11 months ago

Same issue here. The "setRoot" animation still not working on iOS in the latest RNN version 7.37.2, React Native 0.72

lucasalmeida-mt commented 1 month ago

Same issue here. The "setRoot" animation using translationX still not working on iOS in the latest RNN version 7.40.1, React Native 0.73.9

...
  animations: {
    setRoot: {
      enter: {
        waitForRender: true,
        enabled: true,
        translationX: {
          from: width,
          to: 0,
          duration: 3,00
        },
      },
    },
  },
...