-
Notifications
You must be signed in to change notification settings - Fork 2.7k
RN 77 Upgrade #8018
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
RN 77 Upgrade #8018
Conversation
…dCommandCompletionWithPushedComponentId
…nt lifecycle methods for new architecture
# Conflicts: # package-lock.json # scripts/start.js
* Implemented turbo modules for android * Implemented missing method * Complete Android Turbo module implementation * Complete Android Turbo module implementation * Undo some unneeded fixes * Fixed build on ios
This reverts commit 497ebd6.
* WIP * Update package-lock.json * Fixed ios build * Fixed unit tests * Fixed ios build * Fixed ios build * Revert "Fixed ios build" This reverts commit 3dbd98a. * Fixed ios build * fix tests for ios * Fixed eslint * DO NOT RELEASE THIS COMMIT! * Revert "DO NOT RELEASE THIS COMMIT!" This reverts commit b0e840e. * Fixed build for ios 77
The problem was that when setting a titleView of a navigationItem the normal life cycle flow of a view will not be called so the RNNReactView componentWillAppear and DidAppear need to be implicitly called. This was somehow removed from the TopBarTitlePresenter.mm unit but is present on the current Master branch's file. This PR restores those two lines and also actives the Unit test for that module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the React Native Navigation module in preparation for RN 77, introducing a new TurboModule and updating module registration, test timing, native build settings, and linting configurations.
- Add NavigationTurboModule implementation for TurboModules.
- Update NavigationPackage to register the TurboModule and adjust module info.
- Refactor end-to-end tests and adjust podspec and ESLint configurations.
Reviewed Changes
Copilot reviewed 359 out of 365 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationTurboModule.kt | New TurboModule implementation with lifecycle handling and navigation command support. |
lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationPackage.kt | Updated registration to include the TurboModule and new module info provider. |
index.e2e.js | Minor import and LogBox setup adjustments. |
e2e/StaticLifecycleEvents.test.js | Removed an outdated expectation for static lifecycle events. |
e2e/Stack.test.js | Improved test stability with waitFor timeouts. |
e2e/Modals.test.js | Updated modal test assertions to use waitFor with timeouts. |
ReactNativeNavigation.podspec | Upgraded C++ standard and adjusted dependencies and compiler flags. |
.eslintrc.js | Updated ESLint extend configuration for React Native. |
Files not reviewed (6)
- autolink/postlink/snapshots/appDelegateLinker.test.js.snap: Language not supported
- lib/android/app/build.gradle: Language not supported
- lib/android/build.gradle: Language not supported
- lib/ios/AnimatedImageView.mm: Language not supported
- lib/ios/AnimatedReactView.mm: Language not supported
- lib/ios/AnimatedTextView.mm: Language not supported
Comments suppressed due to low confidence (1)
lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationPackage.kt:30
- [nitpick] Consider using the fully qualified class name (e.g. NavigationTurboModule::class.java.name) for the className field in ReactModuleInfo for improved clarity and consistency.
className = NavigationTurboModule.NAME,
lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationTurboModule.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kochavi-daniel , I left some comments to get to know the code better and the reasoning behind it.
…fecycle (#8019) * Better alignment of willAppear and didAppear events throughout the lifecycle * clean up of logs and polymorphism. * Reverting some changes * Update for NavigationTests. Two tests still fail, RNNCommandsHandlerTest and RNNModalManagerEventHandlerTest, which in this push are disabled.
* Upgraded android to work with rn 77 * Upgraded to the latest version of detox * Added react types. Fixed ios pod file * Updated pod filke * Fixed es lint error * Upgraded reanimated * Fixed ios build * Fixed ios build * Fixed one test in android * Fixed android tests * Fixed android unit tests * Fixed android unit tests * Fixed android tests * Fixed mocked tests * Implemented new arch support for android * Added new version of detox to support new arch * Downgrade to RN 76 * support ios * fixed android screenshot * fixed android screenshot * Reimplemented missing bar style in iOS * Reimplemented missing bar style in iOS * Fixed ios bar styling * Removed unused library * Upgraded roboletric to run on updated sdk * Revert "Upgraded roboletric to run on updated sdk" This reverts commit 1ed449b. * Fixed ios build * Fixed android modal * Removed UI lib from the project and fixed broken tests * Trying to fix android unit tests * Fixing android test * Updated package lock * Ignored android unit tests * Fixed e2e test for android * Fixed tests Change genymotion emulator * Fixed screenshot tolerance * Fixed screenshot tolerance * Fixed screenshot tolerance algorithm * Fixed screenshots for genymotion * Fixed modal test * Update lib/android/app/src/main/java/com/reactnativenavigation/react/ReactView.java Co-authored-by: d4vidi <amit.d4vidi@gmail.com> * Update lib/android/app/src/main/java/com/reactnativenavigation/options/LayoutFactory.java Co-authored-by: d4vidi <amit.d4vidi@gmail.com> * Update lib/android/app/src/main/java/com/reactnativenavigation/options/LayoutFactory.java Co-authored-by: d4vidi <amit.d4vidi@gmail.com> * Update playground/android/settings.gradle Co-authored-by: d4vidi <amit.d4vidi@gmail.com> * Fixes after PR * Fixed android build * Fixed compilation error * Fixed typing issue * RN 77 Upgrade iOS(#8018) * auto renaming * changes * native fixes - passes build with manual change in RCTAppSetupUtils.h * all works still with change in RCTAppSetupUtils * loads the menu - playground works * fixed event receivers * hermes falg * fix side menu pres test * test ot .mm * comment out test that fail linkage * fix testSetRoot_withAnimation and testPush_shouldResolvePromiseAndSendCommandCompletionWithPushedComponentId * fix linking by a hack * remove invalidation * fix Stub in Turbo Module * Fix StaticLifecycleEvents tests * Delay will appear and did appear when component not already mounted * Update RNNReactView to use RCTSurfacePresenterStub and adjust component lifecycle methods for new architecture * Better implementation * Fix buttons * Fix button order test * Another buttons fix * Refactor component lifecycle methods in RNNReactButtonView and RNNReactView * fix snapshot c++ error * fix snapshot refactor mm * fix snapshot c code * view controller factory * moved turbo module spec to async * codegen type * cleanup native sender * Fixed types * adjust interface * fix remaining e2e * another test bites the dust * Disable failing E2E, failing snapshot and Turbo Modules on Android * comment ios test out * wrong test * Fixed android screenshot * Update package.json version to 8.1.0-alpha01 [buildkite skip] * Update package.json version to 8.1.0-alpha [buildkite skip] * Android Turbo Modules (#7999) * Implemented turbo modules for android * Implemented missing method * Complete Android Turbo module implementation * Complete Android Turbo module implementation * Undo some unneeded fixes * Fixed build on ios * WIP (cherry picked from commit c8a2fad) * Revert "WIP" This reverts commit 497ebd6. * Feat/rn 76 to 77 upgrade (#8005) * WIP * Update package-lock.json * Fixed ios build * Fixed unit tests * Fixed ios build * Fixed ios build * Revert "Fixed ios build" This reverts commit 3dbd98a. * Fixed ios build * fix tests for ios * Fixed eslint * DO NOT RELEASE THIS COMMIT! * Revert "DO NOT RELEASE THIS COMMIT!" This reverts commit b0e840e. * Fixed build for ios 77 * Fixed android turbo modules generation and autolinking (#8006) * iOS: RN 77 no lifecycle events for Top Bar Title component (#8015) The problem was that when setting a titleView of a navigationItem the normal life cycle flow of a view will not be called so the RNNReactView componentWillAppear and DidAppear need to be implicitly called. This was somehow removed from the TopBarTitlePresenter.mm unit but is present on the current Master branch's file. This PR restores those two lines and also actives the Unit test for that module. * Better alignment of willAppear and didAppear events throughout the lifecycle (#8019) * Better alignment of willAppear and didAppear events throughout the lifecycle * clean up of logs and polymorphism. * Reverting some changes * Update for NavigationTests. Two tests still fail, RNNCommandsHandlerTest and RNNModalManagerEventHandlerTest, which in this push are disabled. * Fixing pr * More fixes for PR --------- Co-authored-by: yogevbd <yogev132@gmail.com> Co-authored-by: Georgy Steshin <georgys@wix.com> Co-authored-by: undefined <undefined> Co-authored-by: mobileoss <mobileoss@wix.com> Co-authored-by: Georgy Steshin <gosha212@gmail.com> Co-authored-by: markdevocht <50657916+markdevocht@users.noreply.github.com> --------- Co-authored-by: d4vidi <amit.d4vidi@gmail.com> Co-authored-by: Daniel Kochavi <kochavi-daniel@users.noreply.github.com> Co-authored-by: yogevbd <yogev132@gmail.com> Co-authored-by: mobileoss <mobileoss@wix.com> Co-authored-by: markdevocht <50657916+markdevocht@users.noreply.github.com>
No description provided.