Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37925
Vectorized animations (XY, Color) are split into multiple animations for each component that execute in parallel. Upon each of these animations completing, a rerender is triggered to sync the state back to the JS AnimatedValue nodes.
The problem with this is that calling update() on AnimatedProps when each animation completes results in potential flickering as all animations that are part of the vectorized animation may not have completed yet. For example, only the animation for the red channel of an animating color may have been completed, resulting in a temporary red color being rendered. So, for now, ignore AnimatedProps that use a vectorized animation.
Follow up will properly address vectorized animations - only call the update() when all animations complete.
Changelog:
[General][Fixed] - Mitigate flickering on color animations
Reviewed By: rshest
Differential Revision: D46778405
fbshipit-source-id: 5ecb0be95a131b22e5081024d4e094b22b57aac4
Summary:
With commit [332be0f](https://github.com/facebook/react-native/commit/332be0f0c84c48e0b0edd373636b0b5538fa3b2b) nightlies were broken due to a wrong update with the method we need to use to download hermes.
This change fixes that issue
## Changelog:
[Internal] - Fix hermes-engine download in Nightlies
Reviewed By: cortinico
Differential Revision: D46800717
fbshipit-source-id: 62ce94b980110f46337ce2520fa3c9fbcfe856cc
Summary:
Just keeping our Gradle version up to date.
Changelog:
[Internal] [Changed] - Bump Gradle to 8.1.1
Reviewed By: yungsters
Differential Revision: D46769069
fbshipit-source-id: b79ae35473f40e821cf6a1b8e094e33d1b1a44d7
Summary:
test_android is currently broken due to us using `toHttpUrl` which is `Deprecated` with
.ERROR severity level in OkHTTP 4. This fixes it by using the HttpUrl.Builder class
which is always accessible in OkHTTP.
Changelog:
[Internal] [Changed] - Unblock test_android by using a non-internal method of OkHTTP
Reviewed By: sammy-SC
Differential Revision: D46799515
fbshipit-source-id: 874194f0d9be6ba48b49a86b1a17836a8310cc8d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37932
`static_cast<Derived &>(*sharedBase)` is preferred over `*std::static_pointer_cast<Derived>(sharedBase)`, since we don't need to copy the underlying shared_ptr to do so. The same applies for `std::const_pointer_cast`.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D46766558
fbshipit-source-id: 5d0b660107b2a60340952e2b5ec2792e3ed1832a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37930
# Changelog:
[Internal] -
Was looking at some [crash report](https://github.com/facebook/react-native/pull/37927) on Github and noticed that error message has a grammar error.
Searching the code revealed three more, all in Animated.
This calms down my OCD :)
Reviewed By: sammy-SC
Differential Revision: D46792795
fbshipit-source-id: 5fcf78e38d5d1540d3699e81bbf4ba036fb5c74d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37918
# Changelog:
[Internal] -
There is no guarantee that `setUpPeformance`, which establishes the `global.performance` object accordingly, will be always called before anything tries to use performance logging.
In fact, there is an example in FB4A with the early initialization of `MobileConfige`, which logs a time span to measure how long does it take to initialize.
This makes the web performance logging code safe from such scenarios.
Reviewed By: NickGerleman
Differential Revision: D46762527
fbshipit-source-id: e189cc3f587ade31a2b5d853634c35da207f5faa
Summary:
This PR migrates ReactCookieJarContainerTest.java to Kotlin as a part of the issue https://github.com/facebook/react-native/issues/37708
## Changelog:
[INTERNAL] [CHANGED] - Migrate ReactCookieJarContainerTest.java to Kotlin
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/37809
Test Plan:
1. Run ./gradlew :packages:react-native:ReactAndroid:test.
2. All tests should pass.
Reviewed By: javache
Differential Revision: D46779169
Pulled By: rshest
fbshipit-source-id: b5caa9397ac1b852fc73d9c58afc4a21caeb8727
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37917
# Changelog:
[Internal] -
The `global.performance` object now has all of the API defined according to the `Performance` API, so we can modify the local RN's flow definition override correspondingly.
Reviewed By: NickGerleman
Differential Revision: D46762326
fbshipit-source-id: 0d0b9ea271a91008e775d8cf59693c35758f71e5
Summary:
This diff introduces ReactSurfaceInterface (as an empty interface).
The goal is to demonstrate that we will be extending interfaces iteratively, meaning we will complete this API as we advance on the Stable API of surface in H2
bypass-github-export-checks
changelog: [internal] internal
Reviewed By: cortinico
Differential Revision: D46770420
fbshipit-source-id: 48b1ee302c157ae3431d61c84322d788d149f881
Summary:
This diff refactors ReactApplication to support ReactHostInterface, the goal is to be able to use this interface to integrate bridgeless in RN Tester app
bypass-github-export-checks
changelog: [internal] internal
Reviewed By: cortinico
Differential Revision: D46770419
fbshipit-source-id: b3e88b12aab6287396b16b277f906026a07acad6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37916
Repos on GitHub should have a top level LICENSE file to make sure GitHub can autodiscover
the correct license for the project.
Once we moved the file inside packages/react-native/ the autodiscovery is not working anymore (it returns a 404).
Changelog:
[Internal] - Re-add the top level LICENSE file
Reviewed By: hoxyq
Differential Revision: D46764347
fbshipit-source-id: cd760c004cf97248490b43f7ba08a47ef2d23c89
Summary:
This is a follow up PR to https://github.com/facebook/react-native/issues/37872 as it was not merged correctly.
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal][Changed]: Add emitObjectProp in parser primitives
Pull Request resolved: https://github.com/facebook/react-native/pull/37904
Test Plan: `yarn test react-native-codegen`
Reviewed By: cipolleschi
Differential Revision: D46753690
Pulled By: rshest
fbshipit-source-id: a1d0a727222066f3721f62427a51ee0317e06f13
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37659
changelog: [internal]
To better align with how BUCK is setup internally, let's make React utils its own pod.
Reviewed By: dmytrorykun
Differential Revision: D46358021
fbshipit-source-id: c2a48a18e9839a508a87d54685115883975f3979
Summary:
To use a native Drawer on iPad, I can override `createRootViewController` to create a `UISplitViewController` instead of a `UIViewController`, but I then need to assign the rootView with
```objective-c
[splitViewController setViewController:mainVC forColumn:UISplitViewControllerColumnSecondary];
```
which I can currently only do by copy pasting the entire `didFinishLaunchingWithOptions` and only replacing the assignment
```objective-c
rootViewController.view = rootView;
```
In an attempt of making it easier for developers to use a native drawer in iOS, being able to override the assignment would make it easier.
bypass-github-export-checks
## Changelog:
[iOS] [ADDED] - added override method with default implementation
Pull Request resolved: https://github.com/facebook/react-native/pull/37873
Test Plan: Tested on iPad iOS 16 simulator
Reviewed By: cortinico
Differential Revision: D46761919
Pulled By: cipolleschi
fbshipit-source-id: c3ece0170d732133edc08f220a2f9a67da93815a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37915
Enable the `prettier-plugin-hermes-parser` in xplat. This plugin enables the use of `hermes-parser` which is significantly faster than the current flow parser prettier bundles (improves formatting time by ~50%) and also brings support for the latest Prettier 3.0.0 printing logic for JS. This upgrade is required in order to enable upcoming Flow features that add new syntax.
Changelog: [Internal]
Reviewed By: SamChou19815
Differential Revision: D46748891
fbshipit-source-id: 3775ef9afa7c04e565fa4fcf8ca5b410f49d35a1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37911
Thanks to [adrianha](https://github.com/adrianha) for spotting a bug in the script that replace the Hermes engine.
I miscopied the variable to check when there is no previous build file.
This change uses the right variable and improves also the messages printed to the user.
## Changelog:
[Internal] - Fix replace_hermes_version script using the right `fileExists` variable
Reviewed By: dmytrorykun
Differential Revision: D46762041
fbshipit-source-id: fdf3da6a598ecc657ee9313a2fa41e71c01d14ce
Summary:
Update the license url on the documentation because it throws 404 page not found
## Changelog:
[General] [Fixed] - License on the documentation throws 404 page not found
Pull Request resolved: https://github.com/facebook/react-native/pull/37909
Test Plan: Click the LICENSE and should open the license page
Reviewed By: GijsWeterings
Differential Revision: D46760941
Pulled By: hoxyq
fbshipit-source-id: f2522c51606ed5776aa6ae325143887749cc4d3a
Summary:
See: https://webkit.org/blog/13936/enabling-the-inspection-of-web-content-in-apps
As of iOS 16.4 and above, JSContexts are no longer inspectable by default. Without this, we cannot attach Safari Web Inspector to the JSContext, AKA, we can no longer direct debug. This is a simple change to re-enable that. I decided to extend the `availability` check to macOS and tvOS as I'm certain both out of tree platform forks will want this fix as well.
## Changelog:
[IOS] [FIXED] - Re-enable direct debugging with JSC on iOS 16.4+
Pull Request resolved: https://github.com/facebook/react-native/pull/37874
Test Plan: I launched RNTester in an iOS 15, and iOS 16.4 simulator. I then verified that we can attach Safari Web inspector to both simulators' JSContexts.
Reviewed By: cortinico
Differential Revision: D46719890
Pulled By: huntie
fbshipit-source-id: 7fa5ae244577b7dbf3c9c16e65ad530cfc3e9cbd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37903
The name "component" in a function type contexts will be banned in future versions of Flow (the same other keywords like typeof are today). This diff renames the offending usages in xplat files.
Changelog: [Internal]
Reviewed By: gkz
Differential Revision: D46748791
fbshipit-source-id: b8a51f63faad3b85232bd17a4bbe6ee7b0e4120f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37893
Changelog: [Internal]
i just noticed we can push more C++ code down into RCTInstance, so let's do that! will make everything easier to test as well
Reviewed By: cipolleschi, RSNara
Differential Revision: D46672345
fbshipit-source-id: fcb878698ebc9a19714ba6ff94a5760efc830958
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37895
Changelog: [Internal]
i'm adding these helpers so we can test that our objects aren't leaking memory
Reviewed By: cipolleschi
Differential Revision: D46625916
fbshipit-source-id: d811336ae3b0ac420b81832c258d5573c20a5bc7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37886
When using the native driver for animations that involve layout changes (ie. translateY and other transforms, but not styles such as opacity), because it bypasses Fabric, the new coordinates are not updated so the Pressability responder region/tap target is incorrect
**This diff:**
- Returning the final values from the native side, at the same place it sets the "finished" flag. This gets sent to JS in `animated/animations/Animation.js`.
Changelog:
[iOS][Changed] - return animated values to JS for natively driven animations
Reviewed By: rshest
Differential Revision: D46709214
fbshipit-source-id: f16f36a05cd052d1120ba6e04ec6dd72eb4a98e5
Summary:
CircleCI was broken because we changed how the `React-Core/DevSupport` pod is installed.
## Changelog:
[Internal] - Restore the installation of React-Core/DevSupport
Reviewed By: cortinico
Differential Revision: D46734714
fbshipit-source-id: 9b8c28837f0485ed0df2f94e417f89b5f0077c7d