This introduces the first working version of building React Native apps on iOS using prebuilt RNCore and cocoapods.
- Added React-Core-prebuilt.podspec for installing/consuming XCFrameworks
- Added logic in react_native_pods.rb for switching between build from source and using prebuilts
- Added rncore.rb - utilities for the ReactCore prebuilts
- Updated rndependencies with some extra error handling modelled after rncode.rb
- Added support for hard linking headers and modules in each inner framework in the XCFramework in xcframework.js
Swift:
To enable support for the objective-c types from swift, the swift compiler uses a module map to gather exports from the framework (module.modulemap). This file basically points to an umbrella header file that exports the valid objective-c types (non c++) to Swift. In addition these files are read from the DerivedData and not the project source - so it is a bit hard to control everyting.
I was initially not able to use cocoapods own module definitions (module_name, module_file props) to use a custom module map. I finally found that these files are expected in the deriveddata (build folder) where only the active inner framework is copied - so then I had to hard link both module map and header files for each arch.
Summary:
Following up from https://github.com/facebook/react-native/pull/52064#discussion_r2151906096, this PR removes lint-java and its related files.
The codebase is moving entirely to Kotlin and a Kotlin linter is being setup as well, the usage of the Java linter will become unnecessary.
## Changelog:
[INTERNAL] - Remove lint-java
Pull Request resolved: https://github.com/facebook/react-native/pull/52092
Test Plan: Relying on CI here to be green.
Reviewed By: cortinico
Differential Revision: D76880712
Pulled By: sbuggay
fbshipit-source-id: 2736772e7347f435b17d007e0322e1afc2fb2d7b
Summary:
The alpha channel in the `rgba()` color string format should be a value between [0, 1] instead of [0, 255], as stated in the [React Native Documentation](https://reactnative.dev/docs/colors#red-green-blue-rgb).
## Changelog:
[GENERAL] [FIXED] - Fix the serialization of the alpha channel in the `rgba()` color string format.
Pull Request resolved: https://github.com/facebook/react-native/pull/52087
Test Plan: I didn't find any usage of that function in React Native, but it is part of the public API, and I just wanted to use it in Reanimated.
Reviewed By: fabriziocucci
Differential Revision: D76822560
Pulled By: javache
fbshipit-source-id: 370d9729881c1eda794c1b9fe54d258242fde814
Summary:
This PR allows to interactively close the modal using the swipe down gesture.
It fixes 5 year old issue: https://github.com/facebook/react-native/issues/29319
In short it removes `modalInPresentation` which according to the documentation causes: "UIKit ignores events outside the view controller’s bounds and **prevents the interactive dismissal of the view controller while it is onscreen.**".
It also adds another delegate event to call onRequestClose whenever modal is closed by gesture.
https://github.com/user-attachments/assets/8849ecba-f762-47ec-a28b-b41c1991a882
## Changelog:
[IOS] [ADDED] - Allow to interactively swipe down the modal.
Add allowSwipeDismissal prop.
Pull Request resolved: https://github.com/facebook/react-native/pull/51483
Test Plan: Test if swiping down the modal calls onRequestClose
Reviewed By: rshest
Differential Revision: D75125438
Pulled By: javache
fbshipit-source-id: d4f2c8b59447680f405b725d0809573a937f97cf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52103
## Changelog:
[Internal] -
This got out of sync again, causing the corresponding signal to fail.
Reviewed By: lenaic
Differential Revision: D76893994
fbshipit-source-id: e0e78cd41633972be53aa883c6015588b547b9c2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52101
Changelog: [internal]
`enableAccessToHostTreeInFabric` is enabled by default in tests, so doesn't need to be explicitly set.
Reviewed By: lenaic
Differential Revision: D76894319
fbshipit-source-id: 437a763bd9c557ecbafa53e31410da1120151b86
Summary:
`SafeAreaView` has been marked for deprecation some time ago. The [following discussion](https://github.com/react-native-community/discussions-and-proposals/discussions/827) summarizes some of the arguments for it, but in a nutshell: it is iOS-only, limited in functionality, and incompatible with Android 15's enforced edge-to-edge rendering.
~~The Android/Kotlin classes have also been deprecated.~~ Not anymore, they are internal and might stay as they are.
## Changelog:
[General] [Deprecated] - Deprecate SafeAreaView due to its iOS-only support and incompatibility with Android 15 edge-to-edge behavior; recommend using react-native-safe-area-context instead.
<!-- 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/51896
Test Plan: Access `SafeAreaView` in your code and check that the deprecation warning logs exactly once in the console.
Reviewed By: rshest
Differential Revision: D76816160
Pulled By: cortinico
fbshipit-source-id: 60f539f9425f8ed8e19578a4530cb1f7d9b54488
Summary:
Due to us moving to central.sonatype.com for publishing, we cannot publish and release the Maven repository in 2 distinct invocations.
This consolidates all the publishing job to happen during build_npm_package
Changelog:
[Internal] [Changed] -
Reviewed By: fabriziocucci
Differential Revision: D76888543
fbshipit-source-id: 3cb0db6176ed2221a12b4f3f1f575232aa006a6c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52081
changelog: [internal]
# The problem in Java and Obj-C Native Animated
--------------------
Event based animations in Native Animated have one big problem: detecting when the gesture is completed. This has led to number of bugs over the years that manifest as Pressable's onPress not triggering. The root cause of the problem is disconnect between where a piece of UI is on the screen and where Fabric thinks it is. Fabric is used for hit testing, and other things like intersection observing, and if Fabric does not have up to date values, weird things start happening.
This diff implements completion detection for event based animations. Unlike previous solutions, it does not depend on sequence of events nor it uses React setState to update shadow tree.
# Completion Detection
--------------------
The key mechanism for marking event animations as completed is in the `onRender` method:
- After processing animations, if `onAnimationFrame` returns false - indicating no UI changes, the system assumes all event-driven animations have completed.
- it then:
* Collects all animated value nodes connected to event drivers.
* Updates all nodes connected to these "finished" animations.
* isEventAnimationInProgress_ to false.
* Commits final property values to the UI.
The benefits over the previous solution:
- It works across all platforms without the need to emit "completion events".
- It uses a UI frame that wouldn't animate anything to do syncing work. Using main thread IDLE time towards bookkeeping.
- No need to call into JavaScript for synchronisation.
Reviewed By: zeyap
Differential Revision: D76743467
fbshipit-source-id: b21ab5ef9c71ff93fd0250e6af6b22ded395be8d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52094
Changelog [Internal]:
- LegacyViewManagerInteropComponentDescriptor was initiaizing Module just to get the `Class` for `componentName`. This can cause deadlock issue when we have module that needs mainQueue to initialize.
Reviewed By: RSNara
Differential Revision: D76757706
fbshipit-source-id: 6fc6127b6ff472fda509364f0c3daa13b6a6df1e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52056
This prop should only be used on Views using it in Text is not very intuitive and also would require some unnecessary edge case handling on Android which we now also remove
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D76744972
fbshipit-source-id: 23113789747295ea1a306727f1e29e3ddc078ac4
Summary:
Compile out the legacy c++ core from android.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D72991984
fbshipit-source-id: 56bb6ca1c4797adb9235e982121712b11e85e109
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52073
X-link: https://github.com/facebook/yoga/pull/1820
Fixes https://github.com/facebook/yoga/issues/1819
Yoga has a fast path when measuring a node, if it thinks it knows its dimensions ahead of time.
This path has some eroneous logic, to set both axis to owner size, if *either* will evaluate to zero, while having an `YGMeasureModeAtMost`/`FitContent` constraint. This means that if a node is given a zero width, and Yoga later measures with with `FitContent`, its height will become the maximum allowable height, even if it shouldn't be that large.
We can fix this, by only allowing if both axis are this fixed case, instead of just one.
This bug has existed for about a decade (going back to at least D3312496).
Changelog:
[General][Fixed] - Fix possible invalid measurements with width or height is zero pixels
Reviewed By: yungsters
Differential Revision: D76793705
fbshipit-source-id: ea4c00e688912a58c08801e4a14ddf1b293a5d86
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52069
Noticed an E2E tests against old emulator version showed aliased Text against Facsimile. This is because non-scratch-paint path does not explicitly enable anti-aliasing (like TextView does), older versions of Android don't enable by default, and `updateTextPaint()` no longer sets, after call to `paint.reset()` was removed.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D76780749
fbshipit-source-id: 26f0de6d6558649fe08339f1ac91390bbd4cce3c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52078
This Cmake file is not imported anymore and can be removed now.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D76808417
fbshipit-source-id: 81824c7c46080bc16c891b5c11c3a8946f16c1b9
Summary:
The target needs the HERMES_ENABLE_DEBUGGER flag in debug just like .reactHermes does.
This commit fixes this by adding the define to the reactRuntime target.
## Changelog:
[IOS] [FIXED] - Added HERMES_ENABLE_DEBUGGER to debug configuration for the reactRuntime target.
Pull Request resolved: https://github.com/facebook/react-native/pull/52082
Test Plan: Prebuild React Core
Reviewed By: robhogan
Differential Revision: D76813200
Pulled By: cipolleschi
fbshipit-source-id: cb81a40fb9c5a91ca40c3a27ae4ccdf043186bac
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52083
These headers were removed in D55037569 but we may have some targets still depending on them. Add redirection headers with warnings to help users migrate without this being a breaking change.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D76810433
fbshipit-source-id: 43cddcc69eefbcff0c0140e165fb893bee493c79
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52077
RNTester is currently crashing on release due to a stripped `mHybridData` field.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D76808165
fbshipit-source-id: 049cca49f683c5dc92aa1f9a37dd7b4371dcbfd6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52015
Changelog: [Internal]
Add gflags to fantom_tester so we can pass in data like featureFlags
Reviewed By: cortinico
Differential Revision: D76618409
fbshipit-source-id: a18e642a02c405eef972a7418a606a5980253b6a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52079
After the conversion to Kotlin (D74571782), there seems to be a synchronization issue when iterating on `viewManagers` (see T226095884).
There could a shadowing problem kicking in in a few places due to the fact that we are declaring a `viewManagers` local variable when there is already a `viewManagers` instance variable within `ViewManagerRegistry`.
To remove any ambiguity, here we are renaming the instance variable `viewManagers` as `viewManagersMap` (which also makes more sense).
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D76807070
fbshipit-source-id: 4f598700e04251409ee19b60515639e90699cc9e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52076
Changelog: [internal]
This refactors the implementation of surface creation in Fantom to make the surface ID handled in native, and treated as an opaque type the same way we do at runtime in RN.
Reviewed By: andrewdacenko
Differential Revision: D76744096
fbshipit-source-id: 1b49a1cbdf0a8d6804de3b87ede727207bc662d9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52051
In {D76368959}, I moved `react-native-fantom` from `packages/` to `private/` and missed this reference.
Changelog:
[Internal]
Reviewed By: rubennorte
Differential Revision: D76743071
fbshipit-source-id: f99d3f2ac5e14fd23f7cf208ca030541844dddc6
Summary:
This diff adds snapshot `diff-api-snapshot` script for public JS API breaking change detection.
### Motivation
Detecting if there are any breaking changes introduced in the commit. It is achieved by comparing `ReactNativeApi.d.ts` rollup from the current and previous revision.
This is a naive implementation with a three possible outcomes:
- BREAKING
- POTENTIALLY_NOT_BREAKING,
- NOT_BREAKING
The algorithm analyses exported top-level statements (after inlining) in both rollups and tries to create a mapping between them by name.
The **BREAKING** outcome happens whenever the statement is:
- removed
- renamed
- changed
- not exported anymore (private)
The **POTENTIALLY_NOT_BREAKING** outcome happens if it's not BREAKING and the new statement is added.
The **NOT_BREAKING** outcome happens if public API snapshot doesn't change.
Changelog:
[General][Added] - Add public JS API breaking change detection under `yarn diff-api-snapshot` script.
Pull Request resolved: https://github.com/facebook/react-native/pull/51972
Test Plan:
Signals, added tests.
In `react-native-github` run:
`yarn test scripts/diff-api-snapshot/__tests__/diffApiSnapshot-test.js`
Rollback Plan:
Reviewed By: j-piasecki
Differential Revision: D76430965
Pulled By: coado
fbshipit-source-id: 095a196aa4f643501db0af9262556ddefff5d30d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52054
Changelog: [internal]
This makes `OpaqueNativeObserverHandle` really opaque and fixes the problems in the observer implementation caused by it.
Reviewed By: yungsters
Differential Revision: D76744094
fbshipit-source-id: a8b6fa43ee8a5ee9d15f0171a83fe0badd46d9c3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52055
Changelog: [internal]
This migrates NativeIdleCallbacks to use opaque types now that they're supported in the codegen
Reviewed By: yungsters
Differential Revision: D76744095
fbshipit-source-id: d9d1beea8df7f5635fc531a2cef001ea0aed38b4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52053
Changelog: [internal]
The codegen allows us to do this already! :D
Reviewed By: yungsters
Differential Revision: D76741113
fbshipit-source-id: d460685bc6ad6ba11f7132136e8603bd57488014
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52052
Changelog: [General][Added] - Add support for Flow opaque types in codegen for native modules
This allows us to codegen native modules that expose opaque types, but the implementation sees the type the same way they're visible in the JS spec.
Reviewed By: yungsters
Differential Revision: D76741112
fbshipit-source-id: 100ca9aa7f93d35120c52153f756436c9c380b07
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52062
changelog: [internal]
- update comments to be more descriptive.
- use `#pragma mark -` to better group methods in `NativeAnimatedNodesManager`. It is nicely formatted in VSCode.
{F1979345410}
Reviewed By: mdvacca
Differential Revision: D76737257
fbshipit-source-id: c4b22ca45cd5dec2c72e7931bfec4466cda3070c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52065
1. We can crash when tapping at the boundary between two spans. Previous ReactTextView had some custom heuristic for overlapping ReactTags, assuming they could be nested, which never happens (We only have a single tag per AttributedString fragment), but spans may overlap at a single character, where one is meant to be exclusive, and the other inclusive. We add logic for that.
2. We don't incorporate the offset of the text layout within the view for hit testing, needed for padding or `textAlignVertical`.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D76764051
fbshipit-source-id: 308756c45d8ff574420dfc1c88678bae7e03e767
Summary:
While testing I notice that `types/react` was not updated in some peer depencies
## Changelog:
[GENERAL] [CHANGED] - Bump types/react to 19.1
Pull Request resolved: https://github.com/facebook/react-native/pull/52059
Test Plan: CI should be green
Reviewed By: christophpurrer
Differential Revision: D76763084
Pulled By: sbuggay
fbshipit-source-id: c078c03aa57ca04040c64986dd7957da8a6f2c2d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52043
The `hasTVPreferredFocus` prop is functionally similar to the `focusable` prop. On iOS, the props are identical. The primary difference appears on Android, where the prop attempts to request focus when set to true. Attempting to invoke imperative API calls through declarative means has been [a source of confusion](https://github.com/react-native-tvos/react-native-tvos/issues/237) and we should instead recommend requesting focus through imperative means, like calling `focus()` on a specific view's ref instead. Workarounds presented rely on lifecycle methods to request focus natively.
This change only marks these methods as deprecated on JS. In the following version, they will be removed from the public API.
Changelog: [General][Deprecated] - Deprecate `hasTVPreferredFocus`
Reviewed By: andrewdacenko
Differential Revision: D76732539
fbshipit-source-id: 64912b4dacb76cd40e79148c1082d8ed8f573879
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51949
This code is no longer necessary now that JSC support is offered via
https://github.com/react-native-community/javascriptcore
Instructions for users on how to continue using JSC are available in the README of such library.
Changelog:
[Android] [Removed] - Remove 1st party JSC support
Reviewed By: javache
Differential Revision: D76420382
fbshipit-source-id: f8e61556bb02fe4d5b34f89b40f8e5e38ac1c8d6
Summary:
When trying to implement e2e tests using maestro in a large app I ran into major performance issues. I tracked it down to the generation of recursive accessibility labels.
The maestro iOS driver uses [XCUIElement snapshot dictionaryRepresentation](https://developer.apple.com/documentation/xctest/xcuielementsnapshot/dictionaryrepresentation) [here](https://github.com/mobile-dev-inc/Maestro/blob/96e8c9a2be3430be991c13d033486d52d2001334/maestro-ios-xctest-runner/maestro-driver-iosUITests/Routes/Handlers/ViewHierarchyHandler.swift#L234) to get a representation of the view hierarchy. The problem is that will query the accessibilityLabel for every single view, starting from the root of the app. It goes without saying that this is extremely slow since it traverses the view hierarchy, executing a recursive function on each one.
I think the only way to fix this is to avoid generating these recursive labels when not needed. From my understanding these should only be needed for accessible views.
## Changelog:
[IOS] [CHANGED] - Only generate recursive accessibility label for accessible elements
Pull Request resolved: https://github.com/facebook/react-native/pull/51988
Test Plan:
- Tested using VoiceOver in RN tester to make sure it works exactly the same.
- Tested in an app using Maestro to make sure this fixes the performance issue.
- Tested in RNTester running Maestro e2e test by creating a larger view hierarchy to make the problem more apparent, and simulate a real app. Using [this code](https://gist.github.com/janicduplessis/9f6b302d92b4e22ff5e8462a8a84e237) in RNTesterAppShared.js
Before:
```
❯ yarn e2e-test-ios
yarn run v1.22.22
$ ./scripts/maestro-test-ios.sh
Waiting for flows to complete...
[Passed] flatlist (14s)
[Passed] text (28s)
[Passed] modal (16s)
[Passed] image (8s)
[Passed] button (10s)
[Passed] legacy-native-module (32s)
[Passed] pressable (32s)
[Passed] new-arch-examples (35s)
8/8 Flows Passed in 2m 55s
✨ Done in 180.26s.
```
After:
```
❯ yarn e2e-test-ios
yarn run v1.22.22
$ ./scripts/maestro-test-ios.sh
Waiting for flows to complete...
[Passed] flatlist (7s)
[Passed] text (15s)
[Passed] modal (10s)
[Passed] image (4s)
[Passed] button (6s)
[Passed] legacy-native-module (16s)
[Passed] pressable (16s)
[Passed] new-arch-examples (17s)
8/8 Flows Passed in 1m 31s
✨ Done in 97.53s.
```
Reviewed By: christophpurrer, joevilches
Differential Revision: D76581949
Pulled By: cipolleschi
fbshipit-source-id: 0689c7d43a0c865572c4ee5ea32ee9b2dcb33ad5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51986
"{}" defaults to false on C++ but the prop is not initialized which means that if accessibilityEnablesUserInteraction is set to false it will not be applied on first render. setting the default to true fixes that issue
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D76532158
fbshipit-source-id: 51cba8b89eb239e01db985d412dd2b19e482f068
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51979
Fix type checking that was left out from the last diff; D73224138
We should unify the type checking so remove uses of `java.lang.Boolean` and just use Kotlin version of `Boolean`.
Changelog:
[Internal]
Reviewed By: mdvacca
Differential Revision: D76523674
fbshipit-source-id: 293ae5998c78c98a20c7d6cf962ab7b19087fd9c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52048
This diff exports types defined in RNCodegen to be used by other codegens
changelog: [internal] internal
Reviewed By: christophpurrer
Differential Revision: D76472492
fbshipit-source-id: fa236a254a9a4211d2e00ace436f55978a262a76
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52041
After changing the publishing logic on Maven, the download logic for the artefacts published in a Snapshot was broken, because Maven does not support the redirect anymore.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76725418
fbshipit-source-id: 8bad88915d9bad96355a048486972a55f232d109
Summary:
Static code analysis reports numerous unused symbols across the codebase, which accounts for several static code analysis warnings. I've cleaned up some of them (not all of them because many of them are false positives from testing files)
The cleaned-up symbols are mostly private and from internal classes, so this should not impact users (unless they are used internally at Meta – in that case, let me know so I can revert accordingly)
## Changelog:
[INTERNAL] - Kotlin: clean up some unused symbols
Pull Request resolved: https://github.com/facebook/react-native/pull/52029
Test Plan:
```sh
yarn test-android
yarn android
```
Reviewed By: javache
Differential Revision: D76722313
Pulled By: cortinico
fbshipit-source-id: 8c7dfe204fa7c457b7484a7edd120ae45e1d604d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52035
Fixes https://github.com/facebook/react-native/issues/52014
Some OSS library is still returning null for `getViewManagerNames` especially if they're
implementing the `ViewManagerOnDemandReactPackage` in Java.
I'm adding a try-catch here so that we prevent the NPE for those scenarios.
Changelog:
[Android] [Fixed] - Fix crash on ReactInstance due to null returned for getViewManagerNames
Reviewed By: javache
Differential Revision: D76723826
fbshipit-source-id: cc159dee389257c6877b03a67840a45ee5bec165
Summary:
The OSS CI for iOS is broken because of a couple of commit that landed:
- Commit 05a61e8161 : dynamic frameworks are broken
- Commit abc8fe1c92 : pod donwload is broken
This change fixes both of them
## Changelog:
[Internal] - Fix OSS CI
Pull Request resolved: https://github.com/facebook/react-native/pull/52042
Test Plan:
Tested locally by building RNTester with Dynamic frameworks
```
USE_FRAMEWORKS=dynamic bundle exec pod install
```
Reviewed By: rshest, lenaic, GijsWeterings
Differential Revision: D76730331
Pulled By: cipolleschi
fbshipit-source-id: 71cca1f50763d24773dedcd8267130df261b01dc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52012
changelog: [internal]
On iOS, once a prop on a view is controlled by animated, the control is never released to Fabric or React. That's why it is important to use direct manipulation to commit even final value.
Reviewed By: lenaic
Differential Revision: D76601913
fbshipit-source-id: ea02219e158f28977018b34ac7152b899723b35a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52033
This change fixes the download of the artefacts for the nightlies of Hermes and React Native Dependencies after we changed the publishing logic for Maven
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76723289
fbshipit-source-id: 6b0ea6a6c35125e6fb03cecc6be893bd02abdad8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51946
This change simplified the setp disallowing to use JSC from core.
As a side effect, it simplified the setup by always falling back to hermes if the users decides not to use the third party JSC
## Changelog:
[iOS][Removed] - remove the option to use JSC from core
Reviewed By: cortinico
Differential Revision: D76342625
fbshipit-source-id: c925ab4fab1e171e289a1c5f75890c92da1b3f08
Summary:
I am not sure exactly why, but I've been getting this error when running RNTester on iOS, when it tries to build hermesc from source. We're clearing the env using `env -i` which seems to cause the issue. If I add PATH to the env we set then it builds fine.
```
++ hermesc_dir_path=/Users/janicduplessis/Developer/react-native/packages/rn-tester/Pods/hermes-engine/build_host_hermesc
++ shift
++ jsi_path=/Users/janicduplessis/Developer/react-native/packages/rn-tester/Pods/../../react-native/ReactCommon/jsi
+++ xcode-select -p
++ SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
++ env -i SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /opt/homebrew/bin/cmake -S /Users/janicduplessis/Developer/react-native/packages/rn-tester/Pods/hermes-engine -B /Users/janicduplessis/Developer/react-native/packages/rn-tester/Pods/hermes-engine/build_host_hermesc -DJSI_DIR=/Users/janicduplessis/Developer/react-native/packages/rn-tester/Pods/../../react-native/ReactCommon/jsi
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
Command PhaseScriptExecution failed with a nonzero exit code
```
## Changelog:
[INTERNAL] [FIXED] - Fix RNTester hermesc build issue on iOS
Pull Request resolved: https://github.com/facebook/react-native/pull/51989
Test Plan: Build RN tester locally
Reviewed By: cortinico
Differential Revision: D76606335
Pulled By: cipolleschi
fbshipit-source-id: f442b77aefb3afacd6d9fb1f3d515b8d63c526ba
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52020
Aligns the type exports of `ReportFullyDrawnView` across platforms, so that they are resilient to any changes made to `View` itself.
Changelog:
[Internal]
Reviewed By: lunaleaps
Differential Revision: D76638685
fbshipit-source-id: 612b2bcd76e70751aec691a24f31beca453cea35
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52016
Upgrade the React Native monorep to use `eslint-plugin-react-hooks@6.1.0-canary`, which includes support for Flow's Component Syntax.
This does not affect production users of `eslint-config-react-native`.
Changelog:
[Internal]
Reviewed By: NickGerleman
Differential Revision: D76627448
fbshipit-source-id: 19e95e5d7f1bcd4fb6bead4e94d268d0c36a4817
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51425
# Problem
React native's new architecture will allow components to do sync render/events. That means they'll makes synchronous dispatches from main thread to the js thread, to capture the runtime so that they can execute js on the main thread.
But, the js thread already as a bunch of synchronous calls to the main thread. So, if any of those js -> ui sync calls happen concurrently with a synchronous render, the application will deadlock.
This diff is an attempt to mitigate all those deadlocks.
## Context
How js execution from the main thread works:
* Main thread puts a block on the js thread, to capture the js runtime. Main thread is put to sleep.
* Js thread executes "runtime capture block". The runtime is captured for the main thread. The js thread is put to sleep.
* Main thread wakes up, noticing that the runtime is captured. It executes its js code with the captured runtime. Then, it releases the runtime, which wakes up the js thread. Both the main and js thread move on to other tasks.
How synchronous js -> main thread calls work:
* Js thread puts a ui block on the main queue.
* Js thread goes to sleep until that ui block executes on the main thread.
## Deadlock #1
**Main thread**: execute js now:
* Main thread puts a block on the js queue, to capture the runtime.
* Main thread then then goes to sleep, waiting for runtime to be captured
**JS thread**: execute ui code synchronously:
* Js thread schedules a block on the ui thread
* Js thread then goes to sleep, waiting for that block to execute.
**Result:** The application deadlocks
| {F1978009555} | {F1978009612} |

## Deadlock #2
**JS thread**: execute ui code synchronously:
* Js thread schedules a block on the ui thread
* Js thread then goes to sleep waiting for that block to execute.
**Main thread**: execute js now:
* Main thread puts a block on the js queue, to capture the runtime.
* Main thread then then goes to sleep, waiting for runtime to be captured
**Result:** The application deadlocks
| {F1978009690} | {F1978009701} |

# Changes
This diff attempts to fix those deadlocks. How:
* In "execute ui code synchronously" (js thread):
* Before going to sleep, the js thread schedules the ui work on the main queue, **and** it posts the ui work to "execute js now".
* In "execute js now" (main thread):
* This diff makes "execute js now" stateful: it keeps a "pending ui block."
* Before capturing the runtime, the "execute js now" executes "pending ui work", if it exists.
* While sleeping waiting for runtime capture, "execute js now" can wake up, and execute "pending ui work." It goes back to sleep afterwards, waiting for runtime capture.
## Mitigation: Deadlock #1
**Main thread**: execute js now:
* Main thread puts a block on the js queue, to capture the runtime.
* Main thread then then goes to sleep, waiting for runtime capture
**JS Thread**: execute ui code synchronously:
* Js thread puts its ui block on the ui queue.
* ***New***: Js thread also posts that ui block to "execute js now". Main thread was sleeping waiting for runtime to be captured. It now wakes up.
* Js thread goes to sleep.
The main thread wakes up in "execute js now":
* Main thread sees that a "pending ui block" is posted. It executes the "pending ui block." The block, also scheduled on the main thread, noops henceforth.
* Main thread goes back to sleep, waiting for runtime capture.
* The js thread wakes up, moves on to the next task.
**Result:** The runtime is captured by the main thread.
| {F1978010383} | {F1978010363} | {F1978010371} | {F1978010379} |

## Mitigation: Deadlock #2
**JS Thread**: execute ui code synchronously:
* Js thread puts its ui block on the ui queue.
* ***New***: Js thread also posts that ui block to "execute js now". Main thread was sleeping waiting for runtime to be captured. It now wakes up.
* Js thread goes to sleep.
**Main thread**: execute js now
* Main thread sees that a "pending ui block" is posted. It executes the "pending ui block" immediately. The block, also scheduled on the main thread, noops henceforth.
* Js thread wakes up and moves onto the next task.
**Result:** Main thread captures the runtime.
| {F1978010525} | {F1978010533} | {F1978010542} |

Changelog: [Internal]
Reviewed By: javache
Differential Revision: D74769326
fbshipit-source-id: 854b83ce4e482a4030dc711834ea6c5613091537
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52000
Fixes https://github.com/facebook/react-native/issues/50338
The current JS FPS value is incorrect because the frame skipping logic hasn't been reimplemented in Fabric.
As we're looking into moving this into the performance panel, I've discussed with huntie
and agreed we'll just remove the value for now to don't show inaccurate informations.
Changelog:
[Android] [Changed] - Hide JS FPS on performance overlay as not accurate
Reviewed By: huntie
Differential Revision: D76590909
fbshipit-source-id: 90b0d9c84f9aefa9197243ebb57f4e86107d6c01
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52003
Changelog: [Internal]
This is a react common dep check that we can build and run tester.
Reviewed By: christophpurrer
Differential Revision: D76531041
fbshipit-source-id: 0a43fdb91aa61f7e6461ff8a94ea6e2732b55dbb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51982
This class should not be accessed externally. I'm making it internal.
On top of this, it was not fully reimplemented on NewArch so is not working consistently.
This is gonna break one library which is unmaintained and not properly udpated to work with NewArch
https://github.com/hannojg/react-native-performance-stats
Changelog:
[Android] [Breaking] - Cleanup and internalize FpsDebugFrameCallback
Reviewed By: huntie
Differential Revision: D76531175
fbshipit-source-id: 25598eb7c1ecf476b69bb6a2f2f8088a57b9fbc2
Summary:
This PR fixes RNTester system bars background color to match the app one (not solid black).
## Changelog:
- [Internal] [Changed] - Fix RNTester app system bars color when edge-to-edge is enforced
Pull Request resolved: https://github.com/facebook/react-native/pull/51929
Test Plan:
https://github.com/user-attachments/assets/8be0b721-6514-408f-81cd-2106ae7a17c4
Rollback Plan:
Reviewed By: javache
Differential Revision: D76352950
Pulled By: alanleedev
fbshipit-source-id: 474a81564570764a597aa995a0677617263338be
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51941
Changelog:
[Android][Fixed] - Extract out FBReactNativeSpec's core components including Unimplemented from auto-generated registry
Extracting out `FBReactNativeSpec`'s core components including `UnimplementedNativeView` from auto-generated registry. Using this `libraryName` to skip merging those modules
Reviewed By: RSNara
Differential Revision: D76371796
fbshipit-source-id: 4cfee0fe80a661f159a5f17e0d4abc60f601ea74
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52004
This is necessary because the snapshots are now going to be published on a different repository:
central.sonatype.com.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D76596802
fbshipit-source-id: 424fb1134e41502d53b76209fba325c895c79ba8
Summary:
Static code analysis shows that there are several redundant visibility modifiers across the codebase. These are most likely remnants after making different classes internal.
## Changelog:
[INTERNAL] - Kotlin: clean up redundant visibility modifiers
Pull Request resolved: https://github.com/facebook/react-native/pull/51960
Test Plan:
```sh
yarn android
yarn test-android
```
Reviewed By: javache
Differential Revision: D76503015
Pulled By: cortinico
fbshipit-source-id: e60e7aa141fc35ca2fd76335fbee791c86589e4e
Summary:
We found out that the XCFramework that is generated in CI is missing the headers.
This is happening because we run the setup script, the responsible to prepare the folder structure with the heaeders in the right place, only in the job that builds the slices. However, the headers are copied by the job that composes the XCFramework.
This change stores the header folder as an artifact in the build job and retrieves it in the compose job, so that the files are available to the XCFramework
## Changelog:
[Internal] -
Pull Request resolved: https://github.com/facebook/react-native/pull/52010
Test Plan:
Check the generated artefact in CI
<img width="292" alt="Screenshot 2025-06-13 at 15 32 02" src="https://github.com/user-attachments/assets/437333da-5848-4657-a9b3-e87fc79c69b2" />
Reviewed By: cortinico
Differential Revision: D76599834
Pulled By: cipolleschi
fbshipit-source-id: 44d74b5f8df545a825ecfe3df2e1898effe41261
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51693
This moves React Native to use the Central Portal URLs rather than the legacy OSSRH ones.
See https://github.com/gradle-nexus/publish-plugin for more context.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D75673984
fbshipit-source-id: 1de6746809eed72f232eac0c3fb4d809c2046620
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51991
This diff introduces a new parameter to customize libraryGenerators used in the codegen, since I'm adding a default object, this diff shoulnd't change any behavior
changelog: [internal] internal
Reviewed By: christophpurrer
Differential Revision: D76472495
fbshipit-source-id: 50b9095c7c554e368f65e4c0b5539be0cca51a51
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51990
In this diff I'm limiting visibility of internal objects of codegen, these objects are being exported but they are unused, let's avoid exporting them
changelog: [internal] internal
Reviewed By: christophpurrer
Differential Revision: D76470809
fbshipit-source-id: 0e168558d2d3211ab5a3a3de05e2495d7c1ae4f5
Summary:
FIXED Add index.js.flow to npm package files for Flow support
Currently, the distributed npm package for react-native does not include the index.js.flow file, which causes all exports to be typed as any when using Flow. This commit adds index.js.flow to the "files" array in package.json, ensuring Flow users receive proper type definitions out of the box. This addresses issues where type checking with Flow fails in React Native projects.
## Changelog:
[General][Added] Publish top-level Flow types for `react-native`
Pull Request resolved: https://github.com/facebook/react-native/pull/51908
Reviewed By: huntie, necolas
Differential Revision: D76292301
Pulled By: robhogan
fbshipit-source-id: e56360d3f35af30ef160470181349aac1812e7c1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51966
This starts off mechanically, but needed a couple changes:
1. Some null handling changes to `TextTransform` internals
2. We type MapBuffer keys as `Int` instead of `Short`, because Kotlin does not allow the implicit widening cast that Java does. I also made these internal
3. Some shifts around casting
4. Mark TextLayoutManager internal, and remove usages of `UnstableReactNativeAPI`
I verified that there were no usages of the Java side of TextLayoutManager throughout `react-native-libraries`, so marking TextLayoutManager internal is unlikely to break 3p libraries.
Changelog:
[Android][Breaking] - Make Java Side TextLayoutManager Internal
Reviewed By: javache
Differential Revision: D76444163
fbshipit-source-id: aabb1c498c731598559f0df5c12e0ecdc266339f
Summary:
This diff adds macros around the legacy architecture core.
To compile out the legacy architecture, simply set: -DRCT_FIT_RM_OLD_RUNTIME=1.
* RCTBridge: interface kept around
* RCTRootView: interface kept around
* RCTSurface: interface kept around
* RCTModuleData: interface kept around (used by RCTProfile)
* RCTProfile: Kept around (doesn't work in bridgeless...)
* RCTCxxBridge: interface kept around
* c++ bridge: removed
* legacy components in core: kept around (for now)
## Details
I added comments to each of the #else, and #endif directives. That way, we can more easily codemod this code in the future.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D72582307
fbshipit-source-id: 018d11cc488e97e60040bebf647f24f2437a57ce
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51977
This will help the Kotlin migration of ReactDelegate.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D76518840
fbshipit-source-id: 8a24c20705aa6b04af693a6229235b11f30e0bc8
Summary:
Static code analysis shows that there are a lot of unresolved KDoc references. Also, there are a lot of functions incorrectly linked in the comments that were using `[.yourFunction]` instead of `[yourFunction]` – this diff addresses many of them.
## Changelog:
[INTERNAL] - Kotlin: fix up several KDoc annotations
Pull Request resolved: https://github.com/facebook/react-native/pull/51961
Test Plan:
```sh
yarn android
yarn test-android
```
Reviewed By: fabriziocucci
Differential Revision: D76481171
Pulled By: Abbondanzo
fbshipit-source-id: dd55e8fc3abfeaefc9c3762632a05fb7baf63530
Summary:
I've done a pass and cleaned up the changelog for 0.80 ahead of the release
Changelog:
[Internal] -
bypass-github-export-checks
Reviewed By: fabriziocucci, cipolleschi
Differential Revision: D76511997
fbshipit-source-id: 3872f9adbf16767c466e4dbb72d70fdaf2defde3
Summary:
This parameter can be null and is causing failures on some tests. This fixes
it.
Changelog:
[Internal] [Changed] -
bypass-github-export-checks
Reviewed By: lenaic
Differential Revision: D76505211
fbshipit-source-id: a23fca21daf5292bc7375e7d025d1202cc591b86
Summary:
This is to enable consuming RCTImage pod in mixed ObjC/Swift codebase. W/o this option set I get following error when building the library:
```
Installing RNScreens 4.11.1
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `RNScreens` depends upon `React-RCTImage`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
```
I've noticed that there is also a precedent in the form of https://github.com/facebook/react-native/commit/c8fcac2765e0f79f0e7bb3a422a65698aec62536, which handled very simlar case but for `React-jsc` pod.
## 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
-->
[IOS] [FIXED] - Allow for consuming RCTImage in Swift codebase by enabling "Defines Module" option
Pull Request resolved: https://github.com/facebook/react-native/pull/51974
Test Plan: RNTester should build & run correctly
Reviewed By: cortinico
Differential Revision: D76505478
Pulled By: cipolleschi
fbshipit-source-id: bcce93ffc7e1c917da7f07db83a710575c659f45
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51965
Changes the error handling in `cli.js` scripts for `rn-tester` and `helloworld` so that the original error stack traces are preserved.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D76458284
fbshipit-source-id: 491b2bacc4becb8676a2ed4f1181192632bd808f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51962
Changelog: [Internal] - Migrate debug feature flag to be accessed in both native and JS
Reviewed By: yungsters, mdvacca
Differential Revision: D76381273
fbshipit-source-id: d4071abeb9769821e236c444f89044165cf83d92
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51944
Ahead of more refactoring, this cleans up a couple feature flags, already on by default, the newest of which added on 5/1, since these should all be validated by significant production usage at this point, so it is unlikely we would want to turn off.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D76412970
fbshipit-source-id: a2612583c060ed3f6fc559864e481d5b5a33fef2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51939
ReactRootView already reliably assigns itself a fresh root tag from its constructor. Assuming this `FabricUIManager.startSurface` method is called with a valid `ReactRoot` instance, we can just re-use the existing tag without minting a new one. This makes some native initialization that depends on root tag assumptions easier to setup.
## Changelog
[Internal]
Reviewed By: javache
Differential Revision: D76370069
fbshipit-source-id: ad9bb91eee374c911f65ebcdd395716c77881e96
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51958
There is a copy and paste mistake, from dependencies to core, when uploading artefacts to maven.
This change fixes it.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76435336
fbshipit-source-id: a829b90ba3d4cbfc5528fc9f21dcee7be6a358ff
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51893
This diff adds `--validate` flag that runs snapshot validation to determine if the `ReactNativeApi.d.ts` rollup has been changed (if JS public API has been touched). There was also an issue with `sortProperties` that reordered some properties (ex. in ImagePropsBase) after removing one of them (ex. accessible) which had negative impact on the displayed result.
### Motivation
Compare previous snapshot with the one built on the current revision to determine the impact of made changes on the public API surface. Display differences in human readable format using `diff` method from the `jest-diff` library.
For now `--validate` flag is not useful on its own. It should be used with `--withSnapshot` flag (which will be removed shortly and generating snapshot will be a default mechanism).
Changelog:
[General][Added] - Add `--validate` flag to `build-types` script for JS API snapshot validation.
Reviewed By: huntie
Differential Revision: D76135158
fbshipit-source-id: 53f5b142c66e3e3931961f741c3f2fab8ccdc228
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51957
We need to rename the artifacts correctly for Sonatype to pick them up.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76428060
fbshipit-source-id: 83f1da75fbbdd4317ec791a6e782bbaa5c05fa5c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51956
While working on landing the prebuild for React Native core in CI, I forgot to add a strong dependency between the build_npm_package job and the prebuild_react_native_core job in the workflow.
It was still technically working, because there are other jobs that are slower than building react_native_core that will delay built_npm_package for enough time, but this fix will make it more robust.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76423766
fbshipit-source-id: 76d91901d63e95add62f26bbff4de0278e8609e3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51948
TSAN is showing a data race in RuntimeScheduler_Modern::updateRendering.
# Changelog:
[Internal] - Use atomic to unblock broken tests. eventTimingDelegate_ is only set once during startup, so the real fix here would be to delay runEventLoop until setEventTimingDelegate has been set.
Reviewed By: javache
Differential Revision: D76415742
fbshipit-source-id: 995d2a68d671c555f990b4f8d85ac9419ae2734c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51923
This diff publishes the Reactcore prebuilds to Maven central so that apps can use it when integrating with React Native
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76338793
fbshipit-source-id: 777c91805573b90ef15209e196cd66801908a5ce
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51921
Implemented the CI jobs that builds React Native core in CI and uploads the artifacts for the Debug and Release XCFrameworks and dSYMs
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76338031
fbshipit-source-id: 713fd82f3823c992c3b0fa5cf24952b793834c68
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51919
Implement signing for the React Native core XCFramework
The implementation follows the same approach we used for the ReactNativedependencies archive
## Changelog
[Internal] -
Reviewed By: cortinico
Differential Revision: D76337972
fbshipit-source-id: 74f61c087b31e4087752cd60bea59db15f00321b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51920
Introduce the BuildFlavor typeand refactor the build scripts to use 'Debug' and 'Release'.
For iOS we always use capitalized Debug and Release and it will make it easier to work with CI too.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76338034
fbshipit-source-id: ae1acc740b47692ec5eee94c897b49a0e1673b93
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51931
This cleans up the whole `JSEngineResolutionAlgorithm` and all the API related to it.
As now we offer support only for Hermes and JSC is provided via a community package.
This is breaking as it affects Expo, but I'll reach out to Kudo to make sure this is integrated properly.
No other breakages other than this.
Changelog:
[Android] [Removed] - Remove and cleanup JSEngineResolutionAlgorithm
Reviewed By: mdvacca
Differential Revision: D76337620
fbshipit-source-id: e43d5d1164f368f5fa395971bca9c05821492dfe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51940
We are seeing some reports of badf00d fads (stalls), meaning we are likely doing too much work here. `accessibilityElements` gets called a lot, and is often cached so lets add that in.
Changelog: [Internal]
Reviewed By: jorge-cab
Differential Revision: D76371136
fbshipit-source-id: f9e3423e8135a47a24291b04150c4dc54afbda82
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51937
Updates the `set-versions` script to also update workspace packages in `private/*`. Unlike with packages in `packages/*`, this does not change their `"version"` fields, though. It only updates their dependencies.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D76358273
fbshipit-source-id: d0e0557d17c355828020a218083b98dd177a6732
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51922
changelog: [internal]
fix existing C++ Animated tests and align with Android on how to go from current time to applied frame.
On iOS [floor](https://fburl.com/code/7zy5e5ul) is used to decide which frame to apply. On Android, [round](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/FrameBasedAnimationDriver.kt#L65) is used.
In D75813200 I chose to use `std::ceil` as I wanted to have a predictable behaviour in tests. This is not wrong but it is better to align at least with one of the existing implementations. Let's go with Android as it strikes the balance of what we want to see in tests (an animation that is running for 1000ms should finish after 1000ms, not 1000ms + one frame) and C++ Animated is closer to at least one of the existing implementations.
Reviewed By: christophpurrer
Differential Revision: D76337384
fbshipit-source-id: 444c94d88c2fa60bb4f0649f57e0e42f5cd27626
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51859
Moves `tools/apis` to `private/cxx-public-api` and cleans up a few things:
- Clean up the `BUCK` file a bit.
- Deduplicate relative paths in scripts.
- Prefix the private package name with `react-native/`.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D76091765
fbshipit-source-id: 6fac7423f9d205085b0b21465f65075a850b61e2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51858
Creates a new private package for the ESLint rules that are defined in the `facebook/react-native` repository for linting the monorepo itself: `react-native/eslint-plugin-monorepo`
It resides in a new `private/` directory that will be used for all private packages. I plan to move private packages over from `packages/` and `tools/`.
This also eliminates the need for the `eslint-plugin-lint` dependency in open source.
Changelog:
[Internal]
Reviewed By: cortinico
Differential Revision: D76088698
fbshipit-source-id: 697d5d91421cda4ef3f96d0497a96954cd047296
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51881
Switches the suppression of ESLint for the generated `sort-imports` lint rule definition to using in-file comments instead of `.eslintignore`.
This makes the suppression more portable. If the path to the lint rule definition changes, we don't have to remember to update `.eslintignore`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D76152973
fbshipit-source-id: 7cc41282931788c9e347712e7ce8bf7fefb53858
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51880
Updates the `sort-imports` lint rule.
The main change is that it enforces newlines after the last import statement.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D76149902
fbshipit-source-id: 928871655c5de0613b18334d6fc0d71b3a971a18
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51904
Replaces `chalk` with Node's `util.styleText` in `scripts/build/` and `scripts/build-types/`.
Will follow up with replacing across the entire repo at a later point.
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D76037191
fbshipit-source-id: c28352853f22d455a709f4b752f566626e6fb3fe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51907
changelog: [internal]
fixes a crash that is described by the two tests. The two tests cover both changes made to Differentiator.cpp. If you revert either of the change, a test will crash.
Reviewed By: christophpurrer
Differential Revision: D76231984
fbshipit-source-id: c32ab1851844121095f1dec953befb2e77c83fd4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51875
This diff raises the logLevel of assertion LegacyArchitecture classes when minimizing of legacy architecture is enabled
Reviewed By: rshest
Differential Revision: D76080325
fbshipit-source-id: 75c92ba7fc54cfbc76bbc2fa3c3dc6a72a376c8f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51876
This diff raises the logLevel of LegacyArchitecture classes when minimizing of legacy architecture is enabled
Reviewed By: cortinico
Differential Revision: D76080324
fbshipit-source-id: 3764c0657b912db81e0dc46b6eb57cbb02b335ba
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51872
This converts to Kotlin and internaline MountingManager.
The only usage in OSS is react-natve-live-markdown:
https://github.com/Expensify/react-native-live-markdown/issues/693
They're using reflection to access Mounting Manager, which they shouldn't.
Other than them, I wasn't able to find meaningful usages of `MountingManager`
Changelog:
[Android] [Breaking] - Convert to Kotlin and internalize MountingManager
Reviewed By: rshest
Differential Revision: D76126338
fbshipit-source-id: 5ab491f86d697a82b8e5b02b031877020dfa3e9e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51836
Currently, `community-cli-plugin` loads the user config and then overrides parts of it - specifically `resolver.resolveRequest` and `serializer.getModulesRunBeforeMainModule`, making it impossible for a user to modify this config.
Instead, treat the CLI's resolver and serializer customisations as "Framework defaults", layered on top of `react-native/metro-config` defaults but beneath a user's `metro.config.js`.
This allows the user to obtain (via `react-native/metro-config`'s `getDefaultConfig`) and extend or override them, if they need to.
This is technically breaking because users who currently have a custom `resolveRequest` or `getModulesRunBeforeMainModule` in their `metro.config.js` will have that config respected from this change, whereas currently they won't have any effect.
Changelog:
[General][Breaking] Community CLI users: user-defined `resolver.resolveRequest` and `serializer.getModulesRunBeforeMainModule` Metro config now takes precedence over CLI defaults
Reviewed By: huntie
Differential Revision: D74811395
fbshipit-source-id: c250caf798fdaedb0822bea3d6e65c0c3ae4d691
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51844
These just redefine the existing `receiveCommand` from the ViewManagerDelegate which already has this codegen'ed
Changelog: [Internal]
Reviewed By: cortinico, rshest
Differential Revision: D75869325
fbshipit-source-id: c8ba482075c2586caf33f46a871b5b5e16fda213
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51890
changelog: [internal]
Fixing possible build failures when targets are built in different context:
- Adding includes to used std functions.
- Using explicit jsi namespace.
- Declaring dependency.
Reviewed By: javache
Differential Revision: D74878821
fbshipit-source-id: 9dfd7ba94651280331be6c9fe6948fce50955589
Summary:
Minor Typo correction.
## Changelog:
[INTERNAL][FIXED] updated description of Maestro E2E Android.
<!-- 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/51887
Test Plan: NA
Reviewed By: cipolleschi
Differential Revision: D76253803
Pulled By: cortinico
fbshipit-source-id: 16e8b793de4f7bb4eba03f20e09c3cf3d05115b9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51806
Correct the type of args, which is always non-null. This is backwards-compatible as subclasses can override this method with a more permissive nullable type and still be substitutable.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D75869317
fbshipit-source-id: 8f6c9119140794447eca55be24483a35450d7bb6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51873
After [51865](https://github.com/facebook/react-native/pull/51865), the path were the apk are generated changed. That broke the e2E tests in ci and the local script to test E2E, because the artefacts were not uploaded to CI properly.
This change should fix it
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76133191
fbshipit-source-id: 70d8567dee8dc2a8bcc656cca7e94ad19101fe28
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51850
This change refactors the last compose-xcframework step to intgrate with the cli.js script to coordinate the build process.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76046443
fbshipit-source-id: 4740bb0869c688611a03d5085771aa6222132e7e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51845
This change refactors the build step of SwiftPM to use the cli.js script to coordinate it.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76046444
fbshipit-source-id: 7aa4ba55e46c2e4502687f035ba1e7bf772b3079
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51848
This change refactors the script by moving the step to setup the repo properly in a separate `setup.js` file.
This allows to simplify the main script by using the cli task.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76046441
fbshipit-source-id: 1da6f8dabf75640e455fcb2f543164c6a242abe0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51849
This simple change refactors the code of reactNativeDependencies to have more accurate logging when the step fails in CI
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76046440
fbshipit-source-id: 2a1105285b0b1d5208a99c30d6ec2859bb8a0187
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51846
This change introduces a cli script to simplify handling of tasks when building React Native with Swift PM
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76045574
fbshipit-source-id: 334d0502e781710f3744d9a3585ccfe7f2fa0038
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51847
This change introduces a types.js to add some useful flow types to build React Native with Swift PM.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D76045454
fbshipit-source-id: 352e9f1a2845106c49461c3ac66188f49b520eb3
Summary:
This commit adds support for building XCFrameworks from the prebuild-script
- Added build script to help build xcframeworks
- Added full header file structure
- Added calling the build script from the main prebuild script
TODO: We need to add resources / privacy bundles
## Changelog:
[IOS] [ADDED] - Added building XCFframework from the prebuild script
Pull Request resolved: https://github.com/facebook/react-native/pull/51596
Test Plan: Run prebuild script and verify that XCFrameworks are successfully built.
Reviewed By: cortinico
Differential Revision: D75869879
Pulled By: cipolleschi
fbshipit-source-id: 7da1dfe2bea34966b88bdb0c31bf7c6ada420c57
Summary:
This commit adds building the swift package from the prebuild script:
- Added swiftpackage.js for building the swift package
- Added calling building from the main script
- Added configurable build type from the main script.
- Removed params in jsdoc from the link method
## Changelog:
[IOS] [ADDED] - Added building swift package from the prebuild script
Pull Request resolved: https://github.com/facebook/react-native/pull/51595
Test Plan:
Run prebuild script and verify that the Swift package is successfully built.
Rollback Plan:
Reviewed By: cortinico
Differential Revision: D75865275
Pulled By: cipolleschi
fbshipit-source-id: d4d9f26c817eb15c16f6be52ffa4b9f060e789da
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51840
Bumps the minimum version of Node.js in React Native to the current active LTS release (22.x, upgraded from 18.x which is now out of support).
- CI configurations are reduced from `[22, 20, 18]` to `[24, 22]`.
{F1978909878}
See https://nodejs.org/en/about/previous-releases.
Changelog:
[General][Breaking] - Our new minimum Node version is Node.js 22
Reviewed By: yungsters, cortinico
Differential Revision: D76037015
fbshipit-source-id: b6e4b3ee279a9a93d716a13297420bba73f45250
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51866
We're not really running those tests in OSS. They would require an emulator in OSS CI which
is costly and flaky. I'd rather remove the build logic for them and rely on Fantom for those kind
of tests in the future.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D76050039
fbshipit-source-id: 29789a9c7db5c7108c4536db620d83640819874f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51865
As in 0.81 we're stopping 1st party support for JSC, we can now cleanup the RNTester
flavor for JSC and simplify the setup here.
Changelog:
[Internal] [Changed] -
Reviewed By: rshest
Differential Revision: D76051319
fbshipit-source-id: 79b01cc64af2466a0be47ceaa0cd211cb6b02f53
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51854
AGP 8.10.x comes with a source breaking change:
https://issuetracker.google.com/issues/416890061
This shoudl fix it and unblock us for the 0.81 release.
Changelog:
[Android] [Changed] - Bump AGP to 8.10.x
Reviewed By: huntie
Differential Revision: D76053989
fbshipit-source-id: b0fe19544c79d65002127176f2722cdfd85f0a3c
Summary:
PR https://github.com/facebook/react-native/issues/51078 Implemented finding disabled libraries but the code (below) didn't actually filter any libraries out because destructured name is `undefined`. This pr adds the name to codegenEnabledLibraries so filtering would work.
```js
const libraries = codegenEnabledLibraries.filter(
({name}) => !disabledLibraries.includes(name),
);
```
## Changelog:
[IOS] [FIXED] - Skip codegen for selectively disabled libraries in react-native.config.js
Pull Request resolved: https://github.com/facebook/react-native/pull/51838
Test Plan:
1. Install a library that has the componentProvider field set in the codegen config (for example: react-native-safe-area-context and react-native-screens or see [reproducer](https://github.com/aattola/rn-codegen-exclude))
2. Exclude library with react-native.config.js
3. install pods / run codegen
4. Check that codegen actually excluded the specified dependencies from: `ios/build/generated/ios/RCTThirdPartyComponentsProvider.mm`
Rollback Plan:
Reviewed By: cortinico
Differential Revision: D76044622
Pulled By: cipolleschi
fbshipit-source-id: 9e70c2a263c750edb1ea95305c9e5e178e2ce8d8
Summary:
When building Android in cloud environments, it turns out that in some of the environments, `sdkmanager` is not in any of the paths checked in `packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts`, so the build fails.
I have added the path for the Linux cloud build environments I have been using (EAS).
I have also added the ability to insert a custom value for the path, in case this problem occurs again in future.
## Changelog:
[Internal][Fixed] - Allow more sdkmanager paths in hermes-engine Android build.
Pull Request resolved: https://github.com/facebook/react-native/pull/51829
Test Plan: Tested the changes in CI builds in EAS.
Reviewed By: rshest
Differential Revision: D76117000
Pulled By: cortinico
fbshipit-source-id: 2c8aff1ba4f03dbe77935992a774ed71f85264a3
Summary:
Part of https://github.com/facebook/metro/issues/1480
This PR adds a check in `HMRClient.js` that prevents processing `registerBundle` calls coming from different origin than the one declared in HMR `setup()`.
This is useful in a Module Federation setup, where we have multiple HMRClients present in runtime - when Host loads external remote, the requestURL will have different origin, but it will be processed by the HMRClient from the Host which in turn causes a runtime error.
## 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
-->
[GENERAL] [ADDED] - Process HMR registerBundle calls from the same origin only
Pull Request resolved: https://github.com/facebook/react-native/pull/51821
Test Plan: TBD
Reviewed By: christophpurrer
Differential Revision: D76044353
Pulled By: huntie
fbshipit-source-id: 3928347b1e9a90355d02b87b07fde812479bcb67
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51808
Pull Request resolved: https://github.com/facebook/react-native/pull/50292
## This diff
Generates types via `yarn build-types` and verifies them on the basis of react-native/types/__typetests.
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D71902007
fbshipit-source-id: 43cb2321e9feea11b0caa4362140c86b1847db85
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51856
Enables the `enableEagerAlternateStateNodeCleanup` feature flag in the open source React Native renderers that are currently targeting React 19.1, by manually patching them in the React Native repository.
This feature flag has been found to significantly improve memory management of parent alternate fibers in persistent modes (i.e. Fabric), and we want this to be available to open source users of React Native before the next scheduled public version release of React.
For more details about the fix, see: https://github.com/facebook/react/pull/33161
Changelog:
[General][Changed] - Reduces memory usage, by improving memory management of parent alternate fibers. (Previously, a parent fiber might retain memory associated with shadow nodes from a previous commit.)
Reviewed By: rickhanlonii
Differential Revision: D76073900
fbshipit-source-id: 6779ea0862d4a1e25354b12ef3d1363dc12d26cc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48783
## Overview
This is the final boss of the new owner stacks feature. With owner stacks, we don't need to parse message strings to find the component stack for logbox. Instead, we can access the component stack directly with `captureOwnerStack`.
This means we don't need to install the LogBox console.error patch and can greatly simplify the process of handling errors and make it more reliable.
To do this, we rely only on adding LogBox to the ExceptionManager:
- `reactConsoleErrorHandler` -> `LogBox.addConsoleLog`
- `reportException` -> `LogBox.addException`
Changelog:
[General][Fixed] - Remove LogBox patch, de-duplicating errors
## Benefits
As a side effect, this removes a lot of duplicate errors. For example, currently if a component throws, you get 2 errors:
{F1974436906}
After this, there's just the one you expect:
{F1974436908}
## Followups
After this lands and doesn't need reverted for some reason, we can delete a ton of code from logbox for finding and detecting stacks from errors.
Reviewed By: javache
Differential Revision: D68380668
fbshipit-source-id: 68112f1e3992fada4d6aaffdf9bd618ce1834f7b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51843
Changelog: [Internal]
To avoid corrupting the React fiber tree when committing from multiple threads this diff only updates shadow node references within the fiber tree for commits originating from React.
This guarantees that during the update of the references no React render will start or is running, making the update of the shadow node reference safe to execute.
S527994
Reviewed By: sammy-SC
Differential Revision: D76043845
fbshipit-source-id: bfcbeaae7fc8b976a1c2db6682330cef9ca25ab8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51725
This change builds upon the focus/blur portion showcased in ViewExample but showcases several more components all in one spot. This can be shared with additional platforms or expanded to include more component examples like Image, but the goal is to target Android and not distract from the primary use cases.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D75747410
fbshipit-source-id: 7d53366d9f32192ca6b3da45dd127836fb6efdf6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51724
Moves focus change listener logic from `ReactViewManager` to `BaseViewManager` so all view managers that extend the class can get focus/blur event dispatching for free. This does so by applying event listeners where `addEventEmitters` is called, so any extending classes must try to call `super.addEventEmitters` or implement it themselves. In the case of TextInput, this logic is re-implemented because the component emits an additional event when the text input is blurred and I wanted to avoid duplicate calls to get the event emitter for the view instance.
In addition, I've added logic and a test case to ensure that any preexisting focus change listeners set on the view instance are called. There can only ever be one focus change listener tied to a view instance, so this ensures that ones created during view instantiation are retained. However, this does not guarantee that events are emitted for downstream users who overwrite the focus change listener later in the view's lifecycle (i.e. in response to a prop change or an extending view manager that doesn't call `super.addEventEmitters`). There is no clean way to enforce that the `BaseViewManager` focus change listener is always set without changing the generics and introducing a significant breaking change.
Changelog: [Android][Added] - Adds support for onFocus/onBlur event dispatching logic to all native views that implement `BaseViewManager`
Reviewed By: NickGerleman
Differential Revision: D75579321
fbshipit-source-id: 02e1e6d0e78e9d05e4ec5bb59789f3097b73b3f8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51791
On iOS the <Image> shadow node was expecting a layout call for every clone. With `passChildrenWhenCloningPersistedNodes` <Image> components may have the image source updated without layout being called on it due to the re-use of the previous layout data thanks to the improved handling of layout invalidation.
This diff triggers the image request as soon as possible if the cloned shadow node has a clean layout. The request will be made as soon as the image manager is set on the shadow node.
Changelog: [iOS][Fixed] - Fix RCTImageComponentView image loading after source props change with no layout invalidation
Reviewed By: NickGerleman, sammy-SC
Differential Revision: D75919671
fbshipit-source-id: 8b92a9c63b6ff4a62c7eb7b0dbe18dd2be989b81
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51827
TextLayoutManager has an optimization today, where it reuses a scratch TextPaint throughout layouts.
This is not safe in Facsimile, since the paint is included as part of `Layout`, and the `Layout` escapes the TextLayoutManager, to later be drawn. I.e. every `PreparedLayoutTextView` right now is sharing this same scratch Paint.
This change makes it so that we only ever use a scratch paint for the purpose of measurements, where the layout is short-lived.
A simpler approach could be to just abandon the scratch TextPaint, since they do not seem wildly expensive at a glance (though not trivial).
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D75987605
fbshipit-source-id: 3fe3519c6164828a25cb4e2b0ee6eded73695a95
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51853
While testing D75988059 with D76047973, I noticed a few opportunities to improve the script used by `yarn lint-ci`:
- The exit code does not currently propagate, meaning `lint-ci` will succeed when it shouldn't.
- The shell script uses some non-idiomatic practices, so this improves it.
Changelog:
[Internal]
Reviewed By: kassens, cipolleschi
Differential Revision: D76049502
fbshipit-source-id: ebefddf0909edc89cd97de756b93bfaaa3d7cdef
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51670
As the title suggests, forwards `onBlur`/`onFocus` props into the Pressability config that the component creates
Changelog: [Internal]
Reviewed By: rozele
Differential Revision: D75238328
fbshipit-source-id: ebc955ab603012362b6fd021333ab61c54ef3f72
Summary:
https://github.com/facebook/react-native/pull/49927 introduced a regression where a Ruby script would read compilation artifacts and fail, when the user has relative build directories set in XCode.
After successful compilation `build/` dir and `DerivedData/` dir have `.plist` files that aren't in UTF-8 encoding and shouldn't be read by the script. If the user tries to reinstall pods at this point, he gets the following error:

This is how you enable relative build directories in XCode.

## Changelog:
[IOS] [FIXED] - Ignore `build/` and `DerivedData/` directories when reading `.plist` files.
Pull Request resolved: https://github.com/facebook/react-native/pull/51833
Test Plan: After applying this patch the problem doesn't occur anymore on my machine.
Reviewed By: cortinico
Differential Revision: D76030133
Pulled By: cipolleschi
fbshipit-source-id: 7ae8c2d0ce28b6925245a9172154e3dcafee126f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51826
changelog: [internal]
To make this possible, we "fake" a UI tick whenever `flushMessageQueue` is called. This was, after every JavaScript task a UI tick happens.
Result:
- Animations are setup right after mounting automatically.
- Animation happens after Fantom.scrollTo is called.
Reviewed By: lenaic
Differential Revision: D75899915
fbshipit-source-id: 1ccb86df6741ff9124f16073c6d61ba716d7cfe6
Summary:
Migrate com.facebook.react.views.text.ReactTextViewManager to Kotlin.
In this diff, `ReactTextAnchorViewManager` is made public again as it's extended by `ReactTextViewManager`.
## Changelog:
[INTERNAL] - Migrate com.facebook.react.views.text.ReactTextViewManager to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/51721
Test Plan:
```bash
yarn test-android
yarn android
```
Reviewed By: mdvacca
Differential Revision: D75829457
Pulled By: NickGerleman
fbshipit-source-id: 425e9ec14f17de5470677b73d68873647bf28675
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51824
Configures ESLint to require `flow` (or `noflow`) annotations for JavaScript files in the React Native repository. This ensures that we uphold a high bar for type safety and correctness, or intentionally deviate when it makes sense.
Changelog:
[Internal]
Reviewed By: NickGerleman
Differential Revision: D75985490
fbshipit-source-id: 56f9fe7666a02c796ceb9cf076677e81b164b65e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51822
Adds `flow` to the remaining files without it, in React Native.
After this, every `*.{flow,js}` file in React Native will have either `flow` or `noflow`.
Changelog:
[Internal]
Reviewed By: NickGerleman
Differential Revision: D75980238
fbshipit-source-id: 84cd88e4eb0b0b1dc69df247de79a75c2119bf96
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51759
Builds upon the changes in the last diff, to let Facsimile support `ReactTextViewManagerCallback`. We use the same new mechanism, of using `RCTTextViewManager` as the callback, if present, instead of relying on view manager measure function.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D75830964
fbshipit-source-id: 435798e6be08f579579eb0f2d30a67d4b1fcaf10
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51758
ViewManager’s may implement a measure function (using MapBuffer, or ReadableMap). This isn’t used automatically, but may instead be used, by calling into FabricUIManager via JNI, and passing the component name of the view manager to use.
This is only ever called manually, through specific C++ ShadowNodes. Confusingly, for some cases, like `TextInput`, we use the measure function on `RCTText` instead, because this call to FabricUIManager is hidden behind `TextLayoutManager`. This ends up really breaking Facsimile, since we want to measure these in a different way, while still measuring `TextInput` without preparing a layout.
This mechanism is also used to inject `ReactTextViewManager` from the Text View Manager, into the measurement process, for both Text, and TextInput.
I think we would ideally remove and replace the current View Manager measurement mechanism entirely. The interface doesn’t do what it claims to, and requires calling private Java methods via JNI, which we shouldn’t be encouraging external libraries to do. Only a single 3p librar (react-native-picker) uses this, but we have a lot of internal usages, and the current facility is valuable, for translating surface ID into a context. Ie we could not deprecate it without a well thought out replacement.
Instead, this change:
1. Removes the "generalized" version of this for MapBuffer, only ever used by Text
2. Given ourselves a `measureText` function, that will use a spannable processor provided, but go through TextLayoutManager, instead of trying to use this generalized path
3. Documents some of the weirdness of the current setup, without yet deprecating it
This will let the Facsimile View Manager:
1. Provide a ReactTextViewManagerCallback, like the previous version allowed, that influences measurement of both Text, and TextInput (which is... strange, but... not trying to boil the ocean here)
2. TextInput can now measure text, even if Facsimile View Manager doesn't implement this traditional measure interface
Changelog:
[Android][Breaking] - Remove FabricUIManager.measureMapBuffer() and MapBuffer measure functions on ViewManager. Please use ReadableMap variant.
[Android][Breaking] - Remove FabricUIManager.measure overload which accepts attachment positions
Reviewed By: javache
Differential Revision: D75826792
fbshipit-source-id: 6739b1e2e214351b9b95ba782d73cf4278211ab8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51692
The original algorithm for accessibilityOrder on Android had unexpected bugs. For some reason `.traversalAfter()` and `traversalBefore()` have unexpected behaviors when dealing with ancestor/descendant relationships getting more and more unexpected the further apart they are.
So we are ditching that approach entirely.
Now we have the view with accessibilityOrder create a virtual view hierarchy. We create a virtual node for each child that is in the order, and set the virtual node's position to be the same as the View it is trying to represent.
We then also populate that node with the same stuff we populate regular ax nodes with the `populateAccessibilityNodeInfo()` function and the content description of the view it is backing so we get matching descriptions with what would otherwise be the normal announcement.
**We have no way to exhaustively check every accessibility use case so we'll have to fine tune this as bugs come up, I'm expecting there to not be many issues since we populate the node the exact same way we populate every other node but anything that happens before React Native handles the node might miss some things**
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D74766296
fbshipit-source-id: 5e77c17bed1644bc5fbf5c1e19c3c6908cc1e3e9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51762
Apple requires Xcode 16 or later to submit to the app store. Let's bump the minimum checked for in build logic as well. https://developer.apple.com/news/upcoming-requirements/?id=02212025
GHA is already only testing against 16.2.0 as of D73924819
Changelog:
[iOS][Breaking] - Bump min Xcode to 16.1
Reviewed By: cipolleschi
Differential Revision: D75835304
fbshipit-source-id: a7ce22f958be3a5448a279439e27b615e9b20a2f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51794
Adds `flow` to the remaining mocks and tests that are lacking it in the `packages/react-native` directory.
This required adding numerous type annotations and suppressions.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D75930095
fbshipit-source-id: ebb1280adc656680e00fd579701e31521826b55c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51792
Adds `flow` to the remaining files that are lacking it in the `packages/react-native/Libraries/Alert` directory.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75921478
fbshipit-source-id: e277cf8241b136da1409af2592fda6ec1f7e9502
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51790
Adds `flow` or `noflow` to the remaining files that are outside of `packages/react-native/{Library,src}`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75904614
fbshipit-source-id: cb2c0969065cf443c3a6e74da0fa3708fda67d18
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51789
Adds `flow` or `noflow` to the remaining files that are lacking it in the `packages/helloworld` directory.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75899853
fbshipit-source-id: 43990adb0827f35a8ca8c49c1787140ff47b8abb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51788
Adds `flow` to the remaining files that are lacking it in the `packages/rn-tester` directory.
This also adds any necessary type annotations and fixes lint warnings.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75899307
fbshipit-source-id: 27a74ed0007b3b754446a45931c2c148312d5e3a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51785
Adds `flow` to the remaining files that are lacking it in the `packages/virtualized-lists` directory. In one of the Jest tests, there are so many failures that for now, I just added `noflow`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75888514
fbshipit-source-id: 29d96292f3d59fd5cf2f5ba09b58fdfb9eabab2e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51784
Adds `flow` to the remaining files that are lacking it in the `packages/react-native-fantom` directory.
This also adds any necessary type annotations (using comment syntax).
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75886119
fbshipit-source-id: 6045b4037da21791db2a8960fbdb83aa2fb5bbf2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51782
Adds `noflow` to a test in `packages/react-native-compatibility-check`.
In the future, this file should be migrated to use `flow strict-local` or `flow strict`. However, it currently has way too many type errors. Adding `noflow` makes it explicit that this is known to not be typechecked.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75885038
fbshipit-source-id: d0eccda52d39e7cb1938d395c44e4441918f7fcb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51781
Adds `flow` to the remaining files that are lacking it in the `packages/react-native-codegen` directory.
This also adds any necessary type annotations (using comment syntax).
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D75884727
fbshipit-source-id: 69e880b2dc63c3d6430f841652506e57436544a8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51780
Adds `flow` to the remaining files that are lacking it (or `noflow`) in the `scripts` directory.
This also fixes what I believe to be a typo in one of the files.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75883851
fbshipit-source-id: 928b7a12a08269b6643379d46de888f2c61dcb29
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51779
Adds `noflow` to a bunch of Node.js script files.
In the future, these files could be migrated to use `flow strict-local` or `flow strict` using comment syntax for type annotations. But for now, adding `noflow` makes it explicit that these are known to not be typechecked.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75883703
fbshipit-source-id: a8fed3aaa9c55ecda919a705940f8b34504cb07c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51778
Adds `noflow` to a bunch of ESLint and Babel files that are expected to be evaluated using Node.js without Babel. Additioanlly, these files tend to depend on ESLint and Babel type definitions that are not currently readily available.
In the future, these files could be migrated to use `flow strict-local` or `flow strict` using comment syntax for type annotations. But for now, adding `noflow` makes it explicit that these are known to not be typechecked.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75883642
fbshipit-source-id: 54236d123ca8773de42bce81189dfb5c0671563e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51777
Just adding `flow` to these two libdefs that aren't sourced directly from `flow-typed/flow-typed`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75877692
fbshipit-source-id: 0ee0ec08e2046fdba38480cddca3686109e8ca45
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51814
changelog: [internal]
introduce Fantom.unstable_getDirectManipulationProps to make it possible to inspect what is changed by C++ Animated module before animation finishes.
Reviewed By: zeyap, rubennorte
Differential Revision: D75816105
fbshipit-source-id: 681829ca9d3f77e57213e9f88f4f24b340a982ed
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51680
Right now there are 2 flavors of vertical text alignment: `verticalAlign` and `textVerticalAlign`. Both do the same thing currently. For Facsimile, we actually want to "properly" implement `verticalAlign` so that it matches the web version, while leaving `textVerticalAlign` the same. That will take some time, however, so for now we are just going to implement the way it currently works, while fixing some issues with inline View's
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D75475915
fbshipit-source-id: ba6ff7c831bf769e9e60831ed215ab64faf143a4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51712
This prop only works on top level text components, yet it is stored as a TextAttribute. It should be a ParagraphAttribute, so I moved it there.
Changelog: [Android] [Breaking] - Move textAlignVertical to paragraph attributes instead of text attributes
Reviewed By: NickGerleman
Differential Revision: D75684576
fbshipit-source-id: 8ad2496f8a043a6a64924a6c43c7bad4593cf1db
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51711
This is needed to support textVerticalAlign as we are storing that offset in the prepared layout and need to read it from the new text view
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D75643360
fbshipit-source-id: 03620ecf09f525c45d0a60daad1dc1d9a5937362
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51810
Tweaking the visiblity of some of the fields `NativeModuleRegistry` after the Kotlin migration
of that class.
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D75959962
fbshipit-source-id: b3d53fc29af3b0fe32a7bd6a61898814acf90123
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51807
Remove unneeded deps from the build graph. Especially `//xplat/folly:logging_logging` ends up adding 418KB in development which is unused here.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D71316272
fbshipit-source-id: 39a73e26728cee23d4ffbdd5e4760de2029e671b
Summary:
There is an edge case in the codegen `findRCTComponentViewProtocolClass` function where the parsing of the Component Class will fail if there is another `.class` call in the same file after the `Class<RCTComponentViewProtocol>` function. This ends up resulting in a `RCTThirdPartyComponentsProvider.mm` file that looks like the image bellow
<img width="1052" alt="image" src="https://github.com/user-attachments/assets/26ce93be-0370-4852-a949-9da21762ff7f" />
You can reproduce this with the following
```
Class<RCTComponentViewProtocol> XYZCls(void)
{
return XYZ.class;
}
// this comment breaks codegen .class
```
## Changelog:
[IOS] [FIXED] - Fix codegen extracting `.class` from complex component classes
Pull Request resolved: https://github.com/facebook/react-native/pull/51813
Test Plan: Run codegen locally, use this patch in the expo/expo repo and CI should be green
Reviewed By: cipolleschi
Differential Revision: D75964424
Pulled By: cortinico
fbshipit-source-id: 50e45aa2ac6e43c75ee6fdd76791c591d81d4df7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51811
changelog: [internal]
after a bit of discussion it was clear the name of this method was confusing. Let's rename it to `produceFramesForDuration` to make it more obvious what happens under the hood.
Reviewed By: rubennorte
Differential Revision: D75953355
fbshipit-source-id: a62933894f9d42fbb3692134d117c05208c62699
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51800
Changelog: [internal]
This adds support for printing the cause of errors thrown in tests in Fantom, if available.
Reviewed By: lenaic
Differential Revision: D75946044
fbshipit-source-id: 579a2fc547cae92d2a65a4023ba1fb2e34a1f735
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51805
changelog: [internal]
this overload of transferRuntimeShadowNodeReference is only used within ShadowNode, let's make it private.
Reviewed By: lenaic
Differential Revision: D75903646
fbshipit-source-id: 1ea86b6d0771cdffaff2d425d591f1e58da330ca
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51803
The `flow strict` annotation was accidently removed in D74574293. This diff brings it back and fixes flow errors caused by this change. This makes generated TS types for `composeStyles` more relaxed but the main idea of inferring inputs base on output type annotation is preserved.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D75945388
fbshipit-source-id: c24ff8ad5d286e16bca3522e82f02e14f660c0dd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51802
changelog: [internal]
avoid conversions when dealing with time in C++ Animated. This makes tests more predictable.
Reviewed By: christophpurrer
Differential Revision: D75813200
fbshipit-source-id: b8934848237e5ea7c350d9a5f0175ac0f9202ffd
Summary:
Migrate com.facebook.react.bridge.NativeModuleRegistry to Kotlin.
In this diff, `JavaModuleWrapper` and some of its functions/properties had to be made public again as they are exposed by the migrated class – and if the functions are kept internal, there are crashes in legacy arch due to the C++ usages.
## Changelog:
[INTERNAL] - Migrate com.facebook.react.bridge.NativeModuleRegistry to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/51734
Test Plan:
```bash
yarn test-android
yarn android
```
Reviewed By: rshest
Differential Revision: D75938404
Pulled By: cortinico
fbshipit-source-id: 088286d4b100d1013cff43b81db39c6aec10f4e1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51653
Changelog: [Internal]
Adds a transform that ensures no types and interfaces named `Props` end up in the generated TypeScript definitions. Those are not descriptive and cause duplicate types in the rollup.
Reviewed By: huntie
Differential Revision: D75508800
fbshipit-source-id: 8d64ec19cbabe57495d6462df9d372ba42cda618
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51797
Changelog: [internal]
Fantom tests are generally very reliable, but a source of flakiness seems to be coming from `result.stderr` being `undefined` and throwing in this callsite. We just add a check to work around it, hoping it's just being set to `undefined` because there really are no errors.
Reviewed By: rshest
Differential Revision: D75942405
fbshipit-source-id: d8920cc2573f029de6bb108310c31f1992e74301
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51774
Changelog: [internal]
Just a small refactor to remove some unnecessary `using namespace` directives for code in the `facebook::react` namespace.
Reviewed By: javache
Differential Revision: D75874213
fbshipit-source-id: e63a91b412b2865eb05961d2174b14230ff35e88
Summary:
This is similar to https://github.com/facebook/react-native/issues/51590, but way better as it improves indirectly the flakiness for tests in the API tab. When the logbox is shown in debug mode, it interferes and sometimes makes that test fail, so this prevents that.
Android also takes more advantage of the improvement with this change, the previous PR only improved significantly iOS.
All the screens inside the RNTester seem to have a deeplink, which makes it easier to open the tests as the test cases are intended to check mostly specific behaviour of RN, and it is not necessary to have a middle step to find the specific components.
Maybe it would be good to run this a few times in CI to see if there are no side effects or flakiness added by opening deep links on CI builds.
## Changelog:
[INTERNAL] - Improve e2e times by using deep links to open examples
Pull Request resolved: https://github.com/facebook/react-native/pull/51786
Test Plan:
```sh
yarn e2e-test-android
yarn e2e-test-ios
```
iOS:
| Before | After |
|--------|-------|
| <img width="387" alt="image" src="https://github.com/user-attachments/assets/03ccd957-d401-4944-bb5c-d3e7db957b2e" /> | <img width="364" alt="image" src="https://github.com/user-attachments/assets/40a14c95-63f8-441d-b718-b5f57a506393" /> |
Android:
| Before | After |
|--------|-------|
| <img width="455" alt="image" src="https://github.com/user-attachments/assets/c71da8d0-df69-44af-b1b2-580995ce55c7" /> | <img width="449" alt="image" src="https://github.com/user-attachments/assets/7357e670-3510-4bbe-8543-68d3bd8c4bea" /> |
Reviewed By: cipolleschi
Differential Revision: D75938844
Pulled By: cortinico
fbshipit-source-id: c7d4063af561e7b0e583eddefcbb289786f3805a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51776
changelog: [internal]
testing animation must be predictable.
When animation takes 1 second and test calls `unstable_advanceAnimationsByTime(1000)`, the expectation is that the animation would have completed.
Previously it was necessary to wait for at least 38ms over the time it took to complete animation. This diff reduces the delta to 22ms.
Reviewed By: andrewdacenko
Differential Revision: D75813087
fbshipit-source-id: 1a27e5c227a0f3f1183ebdf41dc8c18149d68be0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51757
These both have a boolean flag `hasBeenMeasured_` which is never set to true, so the cached measurement is never used, but it would be wrong if it was used, since the cache doesn't respect the content, or measure constraints. Delete the broken code.
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D75817999
fbshipit-source-id: eb062f523840bbac7099b28f7e9b25cf9ad302aa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51773
Changelog: [internal]
(This isn't a public API yet so not marking it as a bugfix).
This fixes a crash in the `offsetParent` DOM API when called on a node whose parent is the `documentElement`.
Reviewed By: andrewdacenko
Differential Revision: D75876349
fbshipit-source-id: d90fcc3cb98f592c396cb0f5ee6ec80c9570745a
Summary:
This PR makes sure React Native still builds with USE_HERMES=0.
## Changelog:
[IOS] [FIXED] - make RNTester build with USE_HERMES=0
Pull Request resolved: https://github.com/facebook/react-native/pull/51772
Test Plan: CI Green
Reviewed By: andrewdacenko
Differential Revision: D75876484
Pulled By: cipolleschi
fbshipit-source-id: 72f3a7d33c19063b52c4c3e577ad2c5eae049d90
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51771
This made build_android fail because the parameter name mismatched between class and one of the implementation.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D75869827
fbshipit-source-id: a40dd1fb914e0694f1958c8b19eb9672de683c75
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51748
Changelog: [Internal]
Implements the first RNDT shell-specific feature based on https://github.com/facebook/react-native-devtools-frontend/pull/168 - namely, the ability for RNDT to foreground itself when certain events occur. This is most noticeable when pausing on a breakpoint.
Reviewed By: huntie, vzaidman
Differential Revision: D75795689
fbshipit-source-id: a073bf8ea96ba70d835007f5af6069d49a693d81
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51767
This is going to convert the last class inside `com.facebook.react.views.view` to Kotlin.
I still need to assess if this is going to be breaking or not for our users. Potentially some
breakages for Kotlin consumer could happen (see changes on ReactViewManager).
I'll follow-up with an investigation on that one.
Changelog:
[Android] [Changed] - Convert ReactViewGroup to Kotlin
Reviewed By: mdvacca
Differential Revision: D75797215
fbshipit-source-id: 5d58faa651d5959909a4b0237aad9c4209895083
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51752
changelog: [internal]
Introduce a way to test animations: `unstable_advanceAnimationsByTime`. An API that fakes passage of time and triggers UI ticks to simulate how animations are run on iOS and Android.
The API is marked as unstable because it might evolve as we write more tests for C++ Animated.
Reviewed By: mdvacca
Differential Revision: D75787082
fbshipit-source-id: 24e29732bbbf581871e7868289257ab60d891ddf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51751
changelog: [internal]
these asserts are not correct with C++ Animated or anything that overrides pull transaction. When pull transaction is overriden, the modified mounting instructions are not stored in shadow tree. Therefore, these asserts fail.
Reviewed By: rshest
Differential Revision: D75787083
fbshipit-source-id: ac08b96f6dea89a9f127b179a5d05e351b281c35
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51750
changelog: [internal]
inline call `onRender()` instead of calling it from `startRenderCallbackIfNeeded`. This has identical functionality but allows to use Fantom to test C++ Animated. In Fantom, there is only one thread the existing mechanism in C++ Animated uses thread locals to capture which thread in the UI thread. Therefore, some assumptions are broken. This is just an easy workaround around the problem.
Reviewed By: javache, zeyap
Differential Revision: D75787084
fbshipit-source-id: 8d70ef2d13e4ab14807deb7ca4cb0844980f5901
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51749
changelog: [internal]
Make it possible to inject time via `now` argument to C++ Animated. This will be used in testing.
Reviewed By: javache
Differential Revision: D75710463
fbshipit-source-id: 2d6da875c7379c4b229f8b7af0fa665cebc2ca8b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51726
Previously we were spreading the searchPath on the FBLazyVectorPath everywhere, but that's not needed.
This change ensure that only the targets that nedds visibility over the FBLazyVectorPath depends on them.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D75756304
fbshipit-source-id: 41abe073bf271fd5059f9cb8536cc4a8948a03dd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51727
Previously we were spreading the searchPath on the ReactFBReactNativeSpecPath everywhere, but that's not needed.
This change ensure that only the targets that nedds visibility over the ReactFBReactNativeSpecPath depends on them.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D75756302
fbshipit-source-id: 41680b98dd07ea1abb09cebb1a1b8321f08929a0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51728
Previously we were spreading the searchPath on the CallInvoker everywhere, but that's not needed.
This change ensure that only the targets that nedds visibility over the CallInvoker depends on them.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D75756303
fbshipit-source-id: d6fe70e43f65d8e9da5f1d18dc58491217575734
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51729
Previously we were spreading the searchPAth on the Runtime Executor everywhere, but that's not needed.
This change ensure that only the targets that nedds visibility over the runtimeExecutor depends on them.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D75756305
fbshipit-source-id: e54f1939d72049e7f4e8d3d14f7a33eacd5ac46f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51730
This change cleans up the header search paths that are now mostly computed starting from other informations of the target.
There are still some execptions, for example for header only target for which we can't have a SwiftPM target. Therefore targets that depends on header only targets need to specify them in their search path.
Plus there are a small number of other exceptions, such as some circular dependencies on header only files.
We will fix them later on, by introducing separated targets
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D75756307
fbshipit-source-id: 53f24dcb08947648c8fce5c520a949b3b896c2fa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51731
With this change, we are computing the headerSearchPaths starting from the path, and the source's path. In this way we can greatly reduce the amount of searchPaths we have to manually specify, making it much easier to maintain the SwiftPM package in the long run.
## Changelog:
[Internal] -
## Facebook:
The next diff in the stack proceeds with the cleanup.
Reviewed By: cortinico
Differential Revision: D75756306
fbshipit-source-id: 411ba6b598e568648488921c3ee62b8111f76749
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51691
In cocoapods infrastructure, Scrollview is part of ReactFabric.
In the SwiftPM implementation we erroneously moved that to reactFabricComponents. However, the new view culling features in reactFabric imports scrollview and that was broken in Swift PM.
This change fixes it.
## Changelog:
[Internal] - move scrollview to reactFabric
Reviewed By: lenaic
Differential Revision: D75638510
fbshipit-source-id: 00828956093aaa87e15c22d15ca3a647876182f5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51760
This API is evil.
Yoga's public API never allows a dirty node to become clean again, until its laid out, but this API requires doing that, since we will otherwise automatically dirty by default.
Let's replace it with `YogaLayoutableShadowNode::shouldNewRevisionDirtyMeasurement()`, which lets individual ShadowNodes represent whether a new revision's state and props should cause dirtying, defaulting to true.
Changelog:
[General][Removed] - Remove `YogaLayoutableShadowNode::cleanLayout()`
Reviewed By: lenaic
Differential Revision: D75479902
fbshipit-source-id: a40aa531522a76dc49feb7d12bae5a8d877c6c06
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51719
When `Animated` traverses props for instances of `AnimatedNode`, it flattens `props.style` before traversing it so that we correctly ignore any `AnimatedNode` instances that may be shadowed by static values:
```
{
style: [
{transform: [{translateX: new Animated.Value(0)}]},
{transform: [{translateX: 100}]},
],
}
```
However, there is a bug that occurs when *every* `AnimatedNode` instance is shadowed. In this case, `AnimatedProps` assumes that there are *no* `AnimatedNode` instances in the entire `props.style`.
It then incorrectly operates on the unflattened `props.style`, which *does* have `AnimatedNode` instances. When this is passed to `View`, the `AnimatedNode` instances are encountered and can cause a crash in `processTransform`, as reported by: https://github.com/facebook/react-native/issues/51395
The fix for this was originally attempted by riteshshukla04 in https://github.com/facebook/react-native/pull/51442. This diff reuses the same unit test case, but it applies a different fix that does not involve re-traversing the `props.style` object.
The fix is gated behind a feature flag, `alwaysFlattenAnimatedStyles`. This will enable us to validate correctness of the new behavior before enabling it for everyone. (Beyond fixing the bug described above, this also causes styles to flatten more aggressively, so production testing is important to ensure stability.)
Changelog:
[General][Changed] - Creates a feature flag that changes Animated to no longer produce invalid `props.style` if every `AnimatedNode` instance is shadowed via style flattening.
Reviewed By: javache
Differential Revision: D75723284
fbshipit-source-id: 504f63e8edf836243d615783e119137a920ad271
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51718
## what
the current removing listeners code is not working. in prod, when removeScrollListener is called, it creates a new weakReference of the scroll listener and it would never match any existing weakreference listeners in the list. The remove action would end up removing nothing from the list.
This diff fixes the issue by iterating through the list and compare the obj
reference: https://stackoverflow.com/questions/6296051/how-to-remove-a-weakreference-from-a-list
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D75716993
fbshipit-source-id: af9eed218deb44e87317c19ffca7d227b96de8e2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51716
Adds a feature flag to experiment with different `prerenderRatio` values from the `VirtualView` native component. Notably, this is the first time that the a feature flag has a non-boolean type.
Changelog:
[Internal]
Reviewed By: mdvacca
Differential Revision: D75713594
fbshipit-source-id: ff3feb8d8bb3292fea6e04a4cfccd87e8249144e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51713
Changes the React Native Feature Flags system so that numeric feature flags are represented in native languages as double instead of int, in order to avoid loss of precision for non-integral JavaScript numbers.
Changelog:
[Internal]
Reviewed By: mdvacca
Differential Revision: D75709111
fbshipit-source-id: d4b2d553ce1e719a5f4b136a4f8d2e46446ef8d8
Summary:
Following up the announcement made at AppJS, this change stops testing the legacy architecture in our CI
## Changelog:
[Internal] - Stop testing the legacy architecture in CI
Pull Request resolved: https://github.com/facebook/react-native/pull/51738
Test Plan: waiting for GHA
Reviewed By: cortinico
Differential Revision: D75791359
Pulled By: cipolleschi
fbshipit-source-id: cb3159338835f49589fa6f495cfb9f47750825fe
Summary:
I'm writing some tests for some APIs/components, and I see some opportunity for improvement in the way how we can write e2e cases for the RNTester.
This diff improves two things:
1. e2e execution times: right now as we are using the `scrollUntilVisible` functionality, it takes quite some time *for some cases*, as some of the items are not very up in the lists and getting to them it's not always very fast.
2. Flakiness: I ran the tests multiple times locally, and in multiple occasions, the `scrollUntilVisible ` did not find anything as the scroll was too fast so the test ended up failing.
Instead of using `scrollUntilVisible` for all cases, we can simply use the search bar which we have in both Components and APIs tabs. This runs faster and we can also share the search flow across multiple test cases, so writing the tests becomes a bit simpler as well.
Initially, I did this for all cases but not all cases benefit from this change as some of them are easier to find than others – the improvement was most notable in iOS (keyboard visibility seems to make a big difference), but I still think it is a good baseline to use the search as if more test cases are added, likely, many of them are not going to be so easy to find.
## Changelog:
[INTERNAL] - Improve e2e times and flakiness by using the search
Pull Request resolved: https://github.com/facebook/react-native/pull/51590
Test Plan:
These are the differences in the time it takes to pass the tests locally.
iOS:
| Before | After |
|--------|-------|
| <img width="336" alt="image" src="https://github.com/user-attachments/assets/6bc80de6-5a10-4c0c-b6b0-f7850d746781" /> | <img width="329" alt="image" src="https://github.com/user-attachments/assets/de47a7ff-84cf-4916-abce-9b3df96a03e1" /> |
<details>
<summary>Android (no significant difference):</summary>
| Before | After |
|--------|-------|
| <img width="328" alt="image" src="https://github.com/user-attachments/assets/73023669-af8e-410c-aee2-529d1cce7acf" /> | <img width="336" alt="image" src="https://github.com/user-attachments/assets/3fb868a9-36f5-43c3-9261-6f2753e28e5f" /> |
</details>
Reviewed By: cortinico
Differential Revision: D75389138
Pulled By: cipolleschi
fbshipit-source-id: cf9d11ab0f84c91eaa20ee5c4441766729925571
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51746
I observed that when continue-on-error is set to true, Github reports the outcome of a job as success even if it fails.
With this change, we should ensure that when an E2E test fails, the pipeline fails, so that we can retry the jobs properly.
## Changelog:
[Internal] - Remove continue-on-error from e2e tests in GHA
Reviewed By: cortinico
Differential Revision: D75796284
fbshipit-source-id: 0e769f53d7355ae6c985aace334b23205780673a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51745
Changelog: [Internal]
1. Updates debugger-frontend's sync-and-build script to include a simple Markdown changelog inline and -mention authors who are Meta employees.
2. Also adds a `--no-build` flag that is mainly helpful for iterating on changelog generation logic.
Reviewed By: hoxyq
Differential Revision: D75789680
fbshipit-source-id: b30b49a9c50e93e7161a2dad012b92ef124a3a16
Summary:
- This is similar to https://github.com/facebook/react-native/pull/43566, but include also updated `StackFrame` type.
The current `Devtools.d.ts` doesn't match the `parseErrorStack.js` and `symbolicateStackTrace.js` implementations.
I've tried to run `build-types`, but only `symbolicateStackTrace.d.ts` was generated. I've not checked why.
## 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
-->
[GENERAL] [FIXED] - Devtools TS Types
Pull Request resolved: https://github.com/facebook/react-native/pull/51737
Test Plan: Call `parseErrorStack` and `symbolicateStackTrace` in TS.
Reviewed By: rshest
Differential Revision: D75782013
Pulled By: huntie
fbshipit-source-id: 91fe560f079731af2a5834c8de8eafb723d00bf9
Summary:
## Changelog:
[General] [Changed] - Remove native animation fabric sync in JS and infinite animation loop workaround, when cxxNativeAnimated is enabled
when cxxNativeAnimated is enabled, we'll sync native animation props back to Fabric in native, when that happens we can remove the code in JS for same purpose
Reviewed By: sammy-SC
Differential Revision: D75789100
fbshipit-source-id: 966e2b187f43e8743ccbf7ba97b8e8a27273fe0c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51743
Noticed some of these were missing, which may lose us useful test signal, or prevent tests from being ran at all.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D75789456
fbshipit-source-id: 75645866c672c77d3dac34383105955ef6d25e60
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50317
`rncore`, `FBReactNativeSpec` and `FBReactNativeComponentSpec` contain the same symbols, which leads to conflicts when we try to merge them into a single shared library. Cleanup the duplication and standardize on `FBReactNativeSpec` everywhere. I've left the Android OSS targets names as is, to avoid breaking deps.
This aligns react-native's package.json with the codegen tooling supported across iOS and Android, which is a single target for all all type-derived codegen.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D55037569
fbshipit-source-id: dbf3c0a427c9d0df96e439b04e5b123cd1069c51
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51708
Changes `yarn featureflags` to default to `--update` when no options are supplied.
Provides a way to display the available options with a new `--help` option.
Changelog:
[Internal]
Reviewed By: sammy-SC
Differential Revision: D75692119
fbshipit-source-id: 50d25c5f12c7646159872661c93ebe8c42f44788
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51707
Currently, the feature flag system does not properly support non-boolean feature flags. The type definitions and generated code make assumptions about the value type being `boolean`.
This diff fixes these assumptions so that non-boolean feature flags are supported.
Changelog:
[Internal]
Reviewed By: sammy-SC
Differential Revision: D75690997
fbshipit-source-id: 870063ff979d0650ce6d0a2f6b340d97c28d7d0b
Summary:
After testing the latest RC and nighly builds, crash appeared when emitting events from turbo modules on 32bit Android devices. The crash is always reproducible only on 32bit devices on signed production builds. Fore more details and the crash log, check the [related issue](https://github.com/facebook/react-native/issues/51628#issue-3094045077).
From what I found, the variadic functions like CallVoidMethod are unsafe on 32bit due to not type checking the passed arguments at compile time. As far as I understand the 64bit cpus and ABIs are more forgiving with alignment and calling conventions. On 32bit the ABIs are strict as arguments are passed on the stack and if there is type/size/alignment issue it reads the wrong memory, which causes the SIGEGV crashes.
## Changelog:
[ANDROID] [FIXED] - emitting event from turbo module crashes on 32bit android
Pull Request resolved: https://github.com/facebook/react-native/pull/51695
Test Plan:
1. Pull the [reproduction demo](https://github.com/vladimirivanoviliev/rn079eventcrash), install the dependencies (v `0.80` is on PR)
2. Run codegen on android
3. Build signed apk. To create it you will need to create new demo key-store.
4. To install the build apk in 32bit mode you can use `adb -s YOURDEVICE install --abi armeabi-v7a android/app/release/app-release.apk`
5. Run the app, create key, save it. Than update the key and save it again. The app crashes when try to emit event from the turbo module.
6. Patch the related `JavaTurboModule.cpp` file with the changes from this PR and enable build from source.
7. Rebuild and reinstall the apk and test again - the issue is now fixed
## Additional notes:
I have tested the app on android using the `rn-tester` demo app, everything works as expected. I also patched our production app and tested more complex scenarios and they works as expected. I have run the tests and linter and they passed.
One thing that I didn't able to setup and run is the iOS `rn-tester` app, due to Hermes engine error `Command PhaseScriptExecution failed with a nonzero exit code`. I haven't found any information how to fix it. I have followed [this guide](https://github.com/facebook/react-native/blob/main/packages/rn-tester/README.md) and installed node modules using yarn and started the `yarn prepare-ios`. I also haven't found any information with what node version and ruby version the react native package is build on CI so I use the same versions locally. If you provide me with updated instructions for those I can contribute by updating the related guides and including `.npmrc`, `.ruby-version` files.
Reviewed By: cortinico
Differential Revision: D75782377
Pulled By: javache
fbshipit-source-id: b94998be6dd51e90ad4137b1d2e38a6850bc3cb2
Summary:
Fixes https://github.com/facebook/react-native/issues/51548
## 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
-->
[General][ADDED] Added more Pending Decleration for ScrollView
Pull Request resolved: https://github.com/facebook/react-native/pull/51613
Test Plan: Can be tested on RNTester with ScrollView
Reviewed By: cortinico
Differential Revision: D75516801
Pulled By: rshest
fbshipit-source-id: 87d6f68ab0a3ffd50af57b5eeaf313da4bf7ed98
Summary:
The retry mechanism introduced in [this commit]() works for iOS e2e failures but it is skipped if android e2e tests fails.
This change should fix that
## Changelog:
[Internal] - Fix retry for Android E2E tests
Pull Request resolved: https://github.com/facebook/react-native/pull/51684
Test Plan: GHA
Reviewed By: rshest
Differential Revision: D75719890
Pulled By: cipolleschi
fbshipit-source-id: 0c2a22268bb655617eaf27f61227a46650878b4e
Summary:
D75596329 disabled many, many rules that we previously explicitly enabled over the codebase, due to a specific rule causing crash in linter when specifically linting some files like RCTDeviceInfo.mm.
Let's revert the change, and remove the specific problematic rule from our list of manually enabled rules instead.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D75734557
fbshipit-source-id: 9d6ee401bfa5d1efc8de993d366839c740aa0bdc
Summary:
The Image component in Android now supports the same cache control behaviour as in iOS, the examples needed to be separated in the past because the support was not the same for iOS and Android, but now that it is, we can unify the example.
## Changelog:
[INTERNAL] - Unify RNTester Cache Policy Image example
Pull Request resolved: https://github.com/facebook/react-native/pull/51580
Test Plan:
<details>
<summary>RNTester Screenshots</summary>
| iOS | Android |
|--------|-------|
|  |  |
</details>
Reviewed By: yungsters
Differential Revision: D75538812
Pulled By: Abbondanzo
fbshipit-source-id: 7705c8f824cb18cebc39e84b6f48979035dc104c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51705
changelog: [internal]
use if/else instead of unordered_map to map types of nodes/drivers from string to a class. This is faster and improves binary size.
Reviewed By: javache
Differential Revision: D75676701
fbshipit-source-id: be9b8b646ebd9472382e6f692768b8fe9703d88f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51704
Changelog: [internal]
If you create a Fantom test that throws an error during its setup (not during the execution of specific tests), Fantom fails with an error saying there are no tests defined, which isn't useful.
This fixes the problem and shows where the error in the test setup happened exactly.
Reviewed By: javache
Differential Revision: D75689283
fbshipit-source-id: 54dd2382868dda0d284f46743ed94ba94aa3afdc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51702
We have no need for C++ bridging in this TurboModule, as the generated code matches the base codegen exactly.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D75681901
fbshipit-source-id: 4b6caafe0bcd08a06686e0a44112bdb99a64a1cf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51699
Re-expose **all `"./src/*"` paths via `package.json#exports`.
Follows D72228547 — as we'd attempted to be proactive with hiding `src/`, but are now reverting — essentially reducing this change as much as possible (read: most defensive/safer effect on OSS).
**Motivation**
Mitigates a warning emitted by Metro that may surface in new bare React Native template projects.
{F1978757796}
This is due to a 1P reference to `'react-native/src/private/featureflags/ReactNativeFeatureFlags` in `react-native/virtualized-lists`.
This is enough motivation to undo part of our change with introducing `"exports"` on `react-native` in 0.80.
**Especially**, to avoid confusion with other warnings we've intentionally introduced in 0.80 around subpath imports.
- The key difference is the above screenshot is from Metro and covers **any** import from any `node_modules` file — as opposed to just the immediate project.
Changelog:
[General][Changed] - Re-expose `src/*` subpaths when not using the Strict TypeScript API
The net breaking change for 0.80, once picked, is simply the presence of `"exports"` (only very edge case effects on expanding per-platform extensions, which we've mitigated). **All exported paths equivalent**.
Reviewed By: robhogan
Differential Revision: D75682566
fbshipit-source-id: f90c7298279c6be3a4eab70f2dfdc618ffcf1124
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51696
Changelog: [internal]
I realized that the Fantom module was being initialized before the execution of the test module itself (as part of the code generated by the runner), which could have problems if the test sets up the global environment that Fantom consumes. For example, if Fantom needs to use the `EventTarget` type from the global scope, it needs to wait until the initialization of the runtime so it can use it safely.
This refactors all the code calling into Fantom as part of our infra to always initialize it lazily, so the first thing that runs as part of the test execution is the test itself (apart from our test setup, which is supposed to be side-effect free).
Reviewed By: sammy-SC
Differential Revision: D75681181
fbshipit-source-id: 91e4b903a49fcee59c5875e73db314cde0adea03
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51697
changelog: [internal]
as a general rule of thumb, do not call outside of your class when holding a mutex. It is easy to cause a deadlock because the outside code may end up trying to acquire the mutex down the stack, leading to deadlock.
Here, it happens because `startRenderCallbackIfNeeded` may end up calling onRender and in onRender, we try to acquire the mutex again
Reviewed By: javache
Differential Revision: D75675465
fbshipit-source-id: 46168ee154a54ae5cccaa74728b41f027519db59
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51694
Changelog: [Internal]
D74820232 was missing an `exports` entry for `debugger-shell/package.json`, which is needed for some of our build tooling.
Reviewed By: hoxyq
Differential Revision: D75679347
fbshipit-source-id: 8deaf55ce354afcff410104948cad1b9a30093b7
Summary:
This React Native Android fix hardens the Fabric `InteropUiBlockListener` against `ConcurrentModificationException` crashes in `willMountItems` and `didMountItems`. By iterating over a shallow copy of the UI‐block lists and catching any mid‐iteration mutations, we ensure the listener never throws during a UI frame and always clears its pending blocks.
The issue was first reported in [React Native Issue https://github.com/facebook/react-native/issues/49783](https://github.com/facebook/react-native/issues/49783), and although [React Native PR#50091](https://github.com/facebook/react-native/pull/50091) was closed and not merged, the work in that PR did make it to React Native in [commit 17da3cb](https://github.com/facebook/react-native/commit/17da3cbbf4687f86226c4a80297c4d8abfc9c4f5). However, the fix didn't go far enough. We saw intermittent examples of this exception being thrown when swiping through a carousel from `react-native-reanimated-carousel`. This fix goes right to the exception site itself.
## Changelog:
[ANDROID] [FIXED] - Hardened the Fabric `InteropUiBlockListener` against `ConcurrentModificationException` crashes in `willMountItems` and `didMountItems`
Pull Request resolved: https://github.com/facebook/react-native/pull/51631
Test Plan:
The only way to test this is to develop a standalone app that emulates what we've been seeing in our commercially available RN app. We have done extensive testing of before (intermittent crashes) and after the fix (no crashes) and things have been standing up very well for us.
Here is a the Red Box we see right at the time of the crash, before this fix:
<img width="414" alt="image" src="https://github.com/user-attachments/assets/8d1b6c6d-42f7-48a0-9574-2f05436547d4" />
And here is the beginning of the logcat crash log:
```
2025-05-07 16:01:49.212 unknown:BridgelessReact com.aura.suite W ReactHost{0}.handleHostException(message = "null")
2025-05-07 16:01:49.212 unknown:ReactNative com.aura.suite E Exception in native call
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1111)
at java.util.ArrayList$Itr.next(ArrayList.java:1064)
at com.facebook.react.fabric.internal.interop.InteropUIBlockListener.willMountItems(InteropUiBlockListener.kt:72)
at com.facebook.react.fabric.FabricUIManager$MountItemDispatchListener.willMountItems(FabricUIManager.java:1235)
at com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchMountItems(MountItemDispatcher.java:184)
at com.facebook.react.fabric.mounting.MountItemDispatcher.tryDispatchMountItems(MountItemDispatcher.java:122)
at com.facebook.react.fabric.FabricUIManager$3.runGuarded(FabricUIManager.java:820)
at com.facebook.react.bridge.GuardedRunnable.run(GuardedRunnable.java:29)
at com.facebook.react.fabric.FabricUIManager.scheduleMountItem(FabricUIManager.java:824)
at com.facebook.react.fabric.FabricUIManagerBinding.reportMount(Native Method)
at com.facebook.react.fabric.FabricUIManager$MountItemDispatchListener$1.run(FabricUIManager.java:1282)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8592)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
```
All of this goes away with this fix. We're using React Native 0.79.2 and this is the first time we've open a PR for react-native. I hope this is enough info as far as testing goes.
Can we see a 0.79.x release with this fix, please?
Reviewed By: Abbondanzo, cortinico
Differential Revision: D75594791
Pulled By: javache
fbshipit-source-id: 982ae27e89756fdb290a24b0bdfa67c2e47c04e3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51688
Changelog: [Internal]
# Context
See D74904547.
## This diff
Creates the `react-native/debugger-shell` package, containing a basic implementation of an Electron-based shell for React Native DevTools. At this point, there is no direct dependency on the new package from the rest of React Native - it's designed to be used as part of a Meta-internal experimental rollout of the new debugger shell via the `BrowserLauncher` interface in `dev-middleware`.
Reviewed By: huntie
Differential Revision: D74820232
fbshipit-source-id: cb06ea9e2ed8c8822019cad8296cc19e69f9db0b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51687
Changelog: [Internal]
# Context
This is the first of several commits that aim to implement a **standalone shell for React Native DevTools**. This will be a lightweight desktop app designed to host the debugger frontend, in much the same way as we currently use Chrome or Edge. The launch flow will otherwise remain **very similar** to the one that exists today.
## What's changing for users?
1. With this commit, nothing; we're merely setting up an experiment flag (for stage 1 - Meta-internal testing) and will make separate plans for open source rollout, coordinated with our framework maintainer partners.
2. If the experiment is successful, we aim to *eventually* phase out the use of Chrome/Edge in React Native DevTools and ship the standalone shell as standard to all React Native developers. This is to enable further improvements that will rely on the standalone shell to work.
3. The first iteration of the standalone shell aims to solve some concrete pain points such as the "dead window problem" - the fact that opening DevTools multiple times for the same target will leave behind a now-dead window (that would ideally have been reused).
## This diff
We amend the `unstable_experiments` and `unstable_browserLauncher` APIs in `dev-middleware` to add basic support for launching a standalone shell based on a frontend URL and a *window key* - the latter being an opaque string that the shell process can match against previous launches in order to reuse and foreground existing windows.
We leave it up to `BrowserLauncher` implementers ( = frameworks) to provide a working implementation of `unstable_showFuseboxShell`, and do not provide one with `DefaultBrowserLauncher`. This will effectively allow us to dependency-inject the actual shell implementation at stage 1 so we don't increase the download size of React Native unnecessarily.
Reviewed By: rickhanlonii, robhogan
Differential Revision: D74904547
fbshipit-source-id: fbc6eac97923062bda8892bc130b39051845ea82
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51679
## Problem
I noticed that clang-tidy was crashing in some of our native modules.
This diff fixes the crash. And it blocklists all the warnings that got raised when I ran clang tidy for react native.
## Fix
This rule would crash clang tidy:
```
cppcoreguidelines-avoid-const-or-ref-data-members
```
I disabled it in the .clang-tidy file via:
```
-clang-analyzer-*,
```
## Why disable existing warnings?
We need to double check which checks make sense to enable for react native github. Until we have that understanding, I don't think we should prompt people to adjust their code. After we have that understanding, it should be really easy to enable the checks: just run the linter on react native, and fix the code.
Reviewed By: lunaleaps
Differential Revision: D75596329
fbshipit-source-id: 757a8d38f203d7fb4403bbda3703fda7b44923b0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51676
Changelog: [internal]
This replaces all existing usages of `shadowNodeFromValue` (previously defined in `primitives.h`) to use the new bridging method to automatically convert `ShadowNode::Shared` from and to JS.
It also deletes the old method.
Reviewed By: javache
Differential Revision: D75597543
fbshipit-source-id: ab4e307dad80c7507b7ebd1cfa6621d020473d89
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51675
Changelog: [internal]
This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.
Reviewed By: javache
Differential Revision: D75597542
fbshipit-source-id: 37c0c43cbde0f4de9a740d9da910f215ae50efbd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51660
We should be able to clean this up as we're not using it directly.
It would be used via the NDK logging utilities from Android, that we don't use.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D75531640
fbshipit-source-id: e96932b6e77b159683728194ac2e856cb868e06f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51671
Adds `flow` (or `noflow`) to all files in this directory and ensures that Flow succeeds (by adding type annotations, using minor refactors, or suppressing errors due to intentionally dynamic logic).
This will help improve type safety when making changes both in these files as well as files that these depend on.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75581879
fbshipit-source-id: 6dcd8cc55d0021973eeae2670c1ebceb6d69fa8f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51669
Refactors the default mocks initialized in `packages/react-native/jest/setup.js` so that each mock is defined in its own file.
This provides several benefits, including:
- The ability to use `import` statements without worrying about eager initialization of dependencies before `globals` is setup.
- The ability to verify mocks export the same types as the actual module, using a new Flow-typed `mock` helper function.
- The ergonomic of implementing mocks with more complex logic, without having to split them out into a separate module (e.g. `mockModal`, `mockScrollView`).
As part of this migration, I also fixed any minor discrepancies to match the actual type definition. For more involved discrepancies (e.g. missing methods), I added type suppressions for now to minimize breaking changes.
Changelog:
[General][Changed] - Improved default mocking for Jest unit tests.
Reviewed By: javache
Differential Revision: D75575421
fbshipit-source-id: 98d60e10b753f1505ffdccf5f12f5d3ef306ebb5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51674
changelog: [internal]
just a clean up of code in AnimationDriverUtils and removal of unused headers.
Reviewed By: mdvacca
Differential Revision: D75549612
fbshipit-source-id: a8ad63622478d06318b6304b886554478b43d19b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51673
Fixes a lint warning that seems to inconsistently fire, by improving the code that it complains about.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D75583443
fbshipit-source-id: b6df191e2e51dee688df3f3c960704dea28a4ece
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51634
Creates an example in the ViewExample setup for how onBlur/onFocus behave when using keyboard navigation
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D75238317
fbshipit-source-id: e69122ca17727fc7f71e9bb7a09098a2771b098e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51570
As the title suggests: adds support strictly to `View` components on Android for `onFocus` and `onBlur` events. This is especially helpful for apps that respond to controller or remote inputs and aligns with existing support for the `focusable` prop.
In order to make this change cross-compatible with text inputs, `TextInputFocusEvent` has been deprecated in favor of the `BlurEvent`/`FocusEvent` types now available from core. Their type signatures are identical but `BlurEvent`/`FocusEvent` should be the type going forward for all views that intend to support focus/blur. Text inputs intentionally do not forward information about their state upon focus/blur and docs specifically call out `onEndEditing` as a means of reading state synchronously when blurring. Therefore, the changes to the native side to remove the event type specifically for text inputs is not breaking.
Changelog: [Android][Added] - Support for `onFocus` and `onBlur` function calls in `View` components
Reviewed By: mdvacca
Differential Revision: D75238291
fbshipit-source-id: b991d1f24fc094ba9d5d466201ecd058f59258e9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51666
The platforms handle this in pretty different ways right now. Let's add a test showing the differences.
Android also adds a bunch of unicode zero width spaces in there...
Changelog: [Internal]
Reviewed By: mlord93
Differential Revision: D75567210
fbshipit-source-id: 98cac7d3fd23451868b55b69478e2667a2de3716
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51654
Facsimile may or may not use a global measure cache. Adding flags to let us run experiment, to understand real-world performance impact, now that we have fixed some (but not all) of the issues which may lead to measurement invalidation in Fabric.
Also does some quick cleanup th `SimpleThreadSafeCache` to remove the cache key as part of the lambda, which is never used, and makes this change mildly less efficient, and to accept lambda by generic type instead of repacking into std::function which has runtime overhead.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D75509799
fbshipit-source-id: 165c08d626ab1f2758f0203d3a0d527a1a5106a7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51627
This cdhanges are inspired by https://stackoverflow.com/a/78314483 and they should help with the stability of E2E tests on main.
Most of the time, those tests fails because of flakyness in the E2E infrastructure on GHA. Usually, rerunning the tests manually makes the workflow pass.
These couple of jobs automatically reruns the workflow up to 3 times in case one of the E2E tests fails
## Changelog:
[Internal] - improve CI by rerunning the workflow if the E2E tests fails
Reviewed By: cortinico
Differential Revision: D75449445
fbshipit-source-id: d9c235c76007a3bda048ec76b62710ca930cf252
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51662
## Changes
DeviceInfo: Deafult fontScale to 1 when accessibility manager isn't available
# Analysis
**The problem:** For reasons that we don't understand, accessibility manager is sometimes nil, when deviceinfo needs it. This is a long-standing issue in react native.
```
_constants = @{
@"Dimensions" : [self _exportedDimensions],
// Note:
// This prop is deprecated and will be removed in a future release.
// Please use this only for a quick and temporary solution.
// Use <SafeAreaView> instead.
@"isIPhoneX_deprecated" : @(RCTIsIPhoneNotched()),
};
```
```
- (NSDictionary *)_exportedDimensions
{
RCTAssert(!_invalidated, @"Failed to get exported dimensions: RCTDeviceInfo has been invalidated");
RCTAssert(_moduleRegistry, @"Failed to get exported dimensions: RCTModuleRegistry is nil");
RCTAccessibilityManager *accessibilityManager =
(RCTAccessibilityManager *)[_moduleRegistry moduleForName:"AccessibilityManager"];
if (!accessibilityManager) {
return nil;
}
CGFloat fontScale = accessibilityManager ? accessibilityManager.multiplier : 1.0;
return RCTExportedDimensions(fontScale);
}
```
**The crash:** When accessibility manager is nil, device info tries to insert nil into an NSDictionary, and crashes.
We found a possible repro of this issue: [launch facebook, log out, and log back in](https://www.internalfb.com/diff/D72020801?transaction_fbid=982516293994114).
**Why this surged now:** Recently, we started initializing device info during react native init. That means this code-path just runs much more often.
# Mitigation
Remove the return nil in `[self _exportedDimensions]`. Instead, just default the fontScale to 1 when the accessibility manager isn't available.
**This should be safe:** If we assume that accessibility manager eventually becomes available, the fontScale will eventually become correct. Device info will send the updated fontScale to js when it becomes available: [native](https://www.internalfb.com/code/fbsource/[ec6fd664a9cd]/xplat/js/react-native-github/packages/react-native/React/CoreModules/RCTDeviceInfo.mm?lines=231-232), [js](https://www.internalfb.com/code/fbsource/[ec6fd664a9cd]/xplat/js/react-native-github/packages/react-native/Libraries/Utilities/Dimensions.js?lines=120-125).
# Long-term fix
Understand why accessibility manager is nil.
Changelog: [Internal]
Reviewed By: fkgozali
Differential Revision: D75537894
fbshipit-source-id: 921cc573fdfd7e5c340ac3a4ada268caadb9e382
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51549
This is copied from `ReactTextView`, with a comment explaining the shenanigans.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D75248328
fbshipit-source-id: b325cf05e0000ee0b0c5fb82f0e7412a680e5d01
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51575
Before we were relying on absolute focus direction to determine the next focusable view inspired by Recycler View's implementation. This turned out to be inaccurate since FocusForward and FocusBackward do the ordering differently.
For FocusForward and FocusBackwards the children of the root node are ordered first from top to bottom then, row groups are created by getting views with the same vertical position and then everything else is sorted left to right.
Android creates an array with this order and then just focuses the next or previous element of this list. We don't do this but now FocusForward and FocusBackward follow the some comparisons used to build this array on Android.
Also, there was an issue with nested children within an accessible view, this just needed a bit of refactor on the focusSearch function so that we can tell when we actually need to trigger our custom focus search
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D75301251
fbshipit-source-id: 93b708092299afa778ba5938b093c2c38209b497
Summary:
Adds `flow` (or `noflow`) to all files in this directory and ensures that Flow succeeds (by adding type annotations, using minor refactors, or suppressing errors due to intentionally dynamic logic).
This will help improve type safety when making changes both in these files as well as files that these depend on.
Changelog:
[Internal]
Pull Request resolved: https://github.com/facebook/react-native/pull/51652
Test Plan:
Ran Flow and Jest tests successfully:
```
$ yarn flow
$ yarn test
```
Ran a Jest unit test internally to make sure they work with our internal environment setup:
```
$ cd ~/fbsource
$ js1 test /View-test.js
```
Reviewed By: javache
Differential Revision: D75488160
Pulled By: yungsters
fbshipit-source-id: 536cef9699acfa1edcd3dcf61c53ebcd92f560f9
Summary:
This PR adds a new cloning method, allowing for updating multiple nodes in a single transaction. It works in two phases:
1. Find which nodes have to be cloned (i.e. nodes given on input and all their ancestors)
2. Clone nodes in the bottom up order - so that every node is cloned exactly once
So the idea is that when we want to update all the red nodes in this picture, we first find the nodes in the green area and the clone only them in the correct order (children are cloned before parents):

Adapting this method [brought a huge performance gain to reanimated](https://github.com/software-mansion/react-native-reanimated/pull/6214). I want to upstream it, so that:
1. we can optimize it further, because making it a part of the `ShadowNode` class gives us access to the parent field in `ShadowNodeFamily` so we can traverse the tree upwards, allowing for a optimal implementation of the first phase (in reanimated we repeatedly call `getAncestors`, which revisits some nodes multiple times)
2. the community can use it
A naive approach that calls `cloneTree` for every node is much slower, as it has to repeat many operations.
## Changelog:
[GENERAL] [ADDED] - Added `cloneMultiple` to `ShadowNode` class.
Pull Request resolved: https://github.com/facebook/react-native/pull/50624
Test Plan:
I tested it with the following reanimated implementation and everything works fine:
<details>
```c++
const auto callback =
[&](const ShadowNode &shadowNode,
const std::optional<ShadowNode::ListOfShared> &newChildren) {
return shadowNode.clone(
{mergeProps(shadowNode, propsMap, shadowNode.getFamily()),
newChildren
? std::make_shared<ShadowNode::ListOfShared>(*newChildren)
: ShadowNodeFragment::childrenPlaceholder(),
shadowNode.getState()});
};
return std::static_pointer_cast<RootShadowNode>(
oldRootNode.cloneMultiple(families, callback));
```
</details>
I would like to add tests for it, but I'm not sure what's the best approach for that in the repo.
Reviewed By: mdvacca
Differential Revision: D75284060
Pulled By: javache
fbshipit-source-id: 0704c4386c3041eb368adf6950d46de197479058
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51657
changelog: [internal]
Introduce a new ShadowNodeTraits: `Unstable_uncullableView` and `Unstable_uncullableTrace`. As the name suggests, this is not stable API yet.
When a shadow node sets this trait, it will be opted out of view culling together with its ancestors all the way to the root.
The trait is propagated to its parent in 4 different places:
1. When node is first created.
2. When node is cloned.
3. When child is appended.
4. When child is replaced.
we can safely do it only in those places because React constructs nodes from bottom up. We are leveraging this implementation detail here but if that changes in the future, a traversal will be required.
Alternative solution considered here was a traversal of shadow tree during commit phase to propagate `Unstable_uncullable` trait. This could be done in a separate traversal or as part of layout phase where layout information is copied out of Yoga tree. Leveraging the fact that React is cloning bottom up makes the implementation simpler.
If React changes its cloning approach in the future, this will be caught by tests.
Reviewed By: lenaic
Differential Revision: D75476847
fbshipit-source-id: f1e98804565c140c64945662af0247b1bd0e1882
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51656
This fixes an issue with the internal networking layer when `enableModuleArgumentNSNullConversionIOS` is enabled, as we'd try to pass `NSNull` as trackingName instead of omitting it.
`
Changelog: [Internal]
Reviewed By: fabriziocucci
Differential Revision: D75516619
fbshipit-source-id: 91a3bba32772fdd66edde1e24b7edd977918f727
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51639
changelog: [internal]
### Fix Crash in View Culling
This diff fixes a crash that occurs when a view is unflattened or flattened in a deep hierarchy where each node has a top offset.
The problem is that nodes passed to *calculateShadowViewMutationsFlattener* via argument *unvisitedOtherNodes* have their positions calculated in a different coordinate space and the view culling algorithm does not have the correct data to determine visibility of a node. To fix this, we pass another argument to *calculateShadowViewMutationsFlattener* which does have original view culling context with which these nodes had their position calculated.
Reviewed By: javache
Differential Revision: D75455704
fbshipit-source-id: 925f14dfdc6c2b669c89e100629291921f27cd1e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51622
We currently support an optional 3rd params for `target_compile_reactnative_options` which allows to specify a LOG_TAG macro.
No one is actually reading that Macro. The only usage would be logging from the Android SDK which we don't explicitely use.
Here I'm updating our build to specify a LOG_TAG as `ReactNative` for all the targets without allowing to customize it as it just complicates our build setup.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D75445577
fbshipit-source-id: a426ce77ba6d1dfd0800e874d9f7838bfdc5b877
Summary:
RuntimeExecutor.h has sync ui thread utils:
* executeSynchronouslyOnSameThread_CAN_DEADLOCK
The ios platform has js -> ui sync calls. This util, when it executes concurrently with those sync calls, deadlocks react native.
On ios, we're going to resolve these deadlocks, which'll involve customizing this util: D74769326. Therefore, this diff forks an implementation of these sync ui thread utils for ios.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D74901907
fbshipit-source-id: f502df4216e9ba57f458435c696a2f086becf24f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51633
To fully support props diffing for a component, the component's Props implementation needs to implement the prop diffing for the derived class.
Because all Props classes extend the ViewProps, all Props classes implement the `getDiffProps` function. To support testing that the props diffing implementation support all properties of the derived Props class for the component being mounted, this diff adds the virtual function `getDiffPropsImplementationTarget` which returns the `ComponentName` that the `getDiffProps` function supports.
This removes the need for a hard-coded list of components that support props diffing and enables the use of codegen to conditionally enable props diffing.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D75465020
fbshipit-source-id: 2850a76f1036cfe930c3c69b98d478ef86a2d457
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51650
This diff adds support to diff props with Point type
changelog: [internal] internal
Reviewed By: mlord93
Differential Revision: D75469451
fbshipit-source-id: a6844b691d8e32326d04c2bd51e6509980feb611
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51642
This diff asserts that ImageRequest won't be used as prop type
changelog: [internal] internal
Reviewed By: mlord93
Differential Revision: D75469453
fbshipit-source-id: e9e46bc8806e00c104b76825445fe72779106220
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51551
This allows hit RN's hit testing to find nested spans, and click them.
This mechanism is fully separate from the one used by a11y virtual views, and ClickableSpan, such as those added for links via dataDetectorType (and also the `link` role).
When we do have a link accessibilityRole, that ClickableSpan hit test seems to prevent the React one, and we only activate the onPress once (but then add keyboard interaction, press visual, and add to the a11y tree).
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D75257326
fbshipit-source-id: 0c693f581ec121cf4b4e3e2040d141985118224f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51635
Enables a feature flag by default, that reduces the memory usage of`Animated`. For more details, see: https://github.com/facebook/react-native/pull/49184
Changelog:
[General][Changed] - Enabled a feature flag that optimizes `Animated` to reduce memory usage.
Reviewed By: jehartzog
Differential Revision: D75466724
fbshipit-source-id: 3fdb57f394448bbd0530dcb558a58958010d0edd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51514
This util can execute arbitrary runtimeWork, which can throw.
In the future, we'll also make these utils execute ui blocks posted from the javascript thread. And those will be able to throw.
Therefore, let's remove the noexcept. Otherwise, if an exception bubbles up to this util, it will just crash this app.
Changelog: [General][Changed] - RuntimeExecutor: Remove noexcept from sync ui thread utils
Reviewed By: javache
Differential Revision: D75183993
fbshipit-source-id: 6c3a319fe3a76165a265815e6343220cf9db6fde
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51429
If we use promises, I believe the code is just easier to understand.
Changelog: [Internal]
Reviewed By: javache, yungsters
Differential Revision: D74941734
fbshipit-source-id: a9bc5ac715c84a5a92f8f1c6635ebef9fe538377
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51626
This just migrates the `MapBuilder` file to Kotlin.
Users on Kotlin should still use the built-in collection extensions rather than using this class that will go away at some point in the future.
Changelog:
[Internal] [Changed] -
Reviewed By: fabriziocucci
Differential Revision: D75448739
fbshipit-source-id: 2bfa24ad9bd37bd571ea4551bd9a10e848841e0a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51629
Changelog: [internal]
The native module will never be defined in tests, so there's no point in logging this warning there.
Reviewed By: rshest
Differential Revision: D75451414
fbshipit-source-id: cdc1f674d01fcaf58c1c2342c994d95e6b3b6847
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51623
This fix relaxes some dependencies on React-hermes that should not be in the code.
## Changelog:
[Internal] - Remove dependencies from React-Hermes when they are not needed.
Reviewed By: cortinico
Differential Revision: D75447910
fbshipit-source-id: 6d7695f0e2b6c936b4c5ed9e70261f1d3b28a3d0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51625
This just migrates this class to Kotlin, which is also the last class in this package.
Changelog:
[Internal] [Changed] -
Reviewed By: rshest
Differential Revision: D75448161
fbshipit-source-id: d5457dd8017fd459d166d2945ff440c303943db2
Summary:
As I reviewed some examples, I noticed that this one's dark mode could be improved, and the code could be modernised a bit as well by converting its classes into functional components.
## Changelog:
[INTERNAL] - Fix InputAccessoryView example in dark mode and convert to functional components
Pull Request resolved: https://github.com/facebook/react-native/pull/51583
Test Plan:
<details>
<summary>Screenshots</summary>
| Dark | Light |
|--------|-------|
|  |  |
</details>
Reviewed By: fabriziocucci
Differential Revision: D75404561
Pulled By: cortinico
fbshipit-source-id: 3318e9869919e99055e47b59c89de0b22976f142
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51619
RNTester Android is currently instacrashing in OSS due to 3rd-party packages not having the `RN_SERIALIZABLE_STATE` definition.
That's because the `INTERFACE` definition is not properly propagated on the prefab boundaries.
This was happening for `react-native-popup-menu-android` and `react-native-test-library` and will also happen for Codegen libraries.
This fixes it. 3p developers with custom CMake files will also have to use the `target_compile_reactnative_options` functions to make sure the compilation flag are properly populated.
Changelog:
[Android] [Breaking] - Correctly propagate RN_SERIALIZABLE_STATE to 3rd party CMake targets. Users with custom CMake and C++ code should update to use `target_compile_reactnative_options` inside their CMakeLists.txt files. See the 0.81 release notes for more information.
Reviewed By: cipolleschi
Differential Revision: D75441245
fbshipit-source-id: 3855fdf11cbe7f4b01f68e0dde68b63b3240ad35
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51616
changelog: [internal]
doesn't seem to be used by anything. let's delete it.
Reviewed By: javache
Differential Revision: D75218695
fbshipit-source-id: eeb3a826f06456be8de6941fa95d6ffc7917dcf8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51615
changelog: [internal]
rename methods to reflect that they are getters and mark them as noexcept const
Reviewed By: rshest
Differential Revision: D75217535
fbshipit-source-id: c7d77060d0f54f8043a7552eec7e2b231cb5b7bf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51618
Changelog: [internal]
This sets the argument to `pullTransaction` to `true` in the cases where the call is done from the JS thread and the transactions are mounted asynchronously in the UI thread (basically platforms using the push model for mounting coordinator).
It was missing on an experiment for Android (compatibility mode for Props 2.0)
Reviewed By: lenaic
Differential Revision: D75439105
fbshipit-source-id: a106a3a674e44b0cf2603782302343f60ee5450e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51620
The spirit of "Decouple Hermes from JSI nd simplify dependencies" is good, but the problem is that when we ships prebuilds of hermes-engine, it tries to load `libjsi.dylib` and that library is not available.
{F1978594163}
I'll have to investigate more how to properly decouple Hermes prebuilds and how to pass jsi to Hermes and react-native. We might have to decouple it further and have a separate job that builds jsi and feed it to hermes.
This problem will go away with SwiftPM, though, so probably not worth solving this.
## Changelog:
[Internal] - Fix nightlies with a backout
Reviewed By: cortinico
Differential Revision: D75442056
fbshipit-source-id: f1085be8247c0974854254c6bd631ca258488beb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51614
`JSEventLoopWatchdog` is not used in react-native package. This diff moves it to rn-tester which previously deep imported it from react-native (which we want to avoid).
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D75410548
fbshipit-source-id: d4996742578e3b068e7acad9479394388b1907ac
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51603
In `rn-tester` TextAncestor was used to create a inlineView wrapper:
```js
function InlineView(props) {
return (
<TextAncestor.Provider value={false}>
<View {...props} />
</TextAncestor.Provider>
);
}
```
however, it is already done in View.js and TextAncestor shouldn't be used outside of react-native package:
```js
if (hasTextAncestor) {
return <TextAncestor value={false}>{actualView}</TextAncestor>;
}
return actualView;
```
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D75408231
fbshipit-source-id: 7f12278296dcfe56246f6b7065f5a094e4099f7a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51602
Changelog: [GENERAL][FIXED] - Fixed the generated type definitions for `Animated.FlatList` and `Animated.SectionList` to correctly infer item types.
Current definitions for animated list components cast away their generic definitions, preventing the types to be inferred from usage. This diff addresses that.
Reviewed By: huntie
Differential Revision: D75407762
fbshipit-source-id: c86f20298ded707971c05a78d025a63e82fe2a64
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51611
changelog: [internal]
AnimationDriver does not use enable_shared_from_this, let's remove it. Also mark a few methods as noexcept and const.
This helps with C++ binary size.
Reviewed By: rshest
Differential Revision: D75172851
fbshipit-source-id: d6552cd577371a51c3fa3b394b451d7ed2b61e44
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51610
changelog: [internal]
No need to store uiManagerBinding in a shared_ptr. Let's just get it, pass it to classes that need it and not store it.
This helps with C++ binary size a little bit.
Reviewed By: rshest
Differential Revision: D75174567
fbshipit-source-id: 1d4e5a9f89ba2f2d2eb733eac9d103ee97550d0f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51609
changelog: [internal]
NativeAnimatedNodesManagerProvider is not subclassed. Let's remove virtual methods and make it a final class.
Reviewed By: lenaic
Differential Revision: D75169108
fbshipit-source-id: 32121cf372ba94c8a7b86c61fd96efd75560f789
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51517
The Props 2.0 implementation for ScrollView added two missing props which were Android specific.
This diff moves these to a separate HostPlatformScrollViewProps class so that other platforms wouldn't include them
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D75183132
fbshipit-source-id: 44d0e0aa974e69f8584ad6bd681fad100c3493d8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51605
changelog: [internal]
folly::dynamic can be constructed with nullptr and it creates a null folly::dynamic. Let's use that to indicate missing value instead of std::optional to lower C++ binary size.
Reviewed By: rshest
Differential Revision: D75174590
fbshipit-source-id: f2dfef00975686f6ac4c14b42539e700e967075b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51606
changelog: [internal]
When native module is destroyed, ui queue is also torn down.
this helps with C++ binary size a little bit
Reviewed By: rshest
Differential Revision: D75149437
fbshipit-source-id: 1df061db26b4fb5026114e00bbc6846bf38d83a9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51600
The `infoLog` is a `console.log` wrapper to separate ad-hoc console debug logging, however console logs are already used in some files in rn-tester (ex. RNTesterAppShared.js). The same applies to files in react-native package.
Changelog:
[General][Changed] - Removed `infoLog` from react-native package
Reviewed By: huntie
Differential Revision: D75402930
fbshipit-source-id: 1a14a9122552130415f058d3647d715225321ab8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51591
This change decouples Hermes from JSI and simplify the dependency graph.
Prior to this change, Hermes was building and providing JSI to React Native.
Hermes and React Native shares the same version of JSI, so that's was not a problem, but this choice added an unnecessary dependency on hermes-engine for some pods. For example, `React-utils` was depending on hermes, although it only needs JSI.
## Changelog:
[Internal] - Decouple hermes-engine from jsi
Reviewed By: cortinico
Differential Revision: D75374285
fbshipit-source-id: 3af6846032e81b6461420dd4f4a9c34b741f31ae
Summary:
Running `yarn prepare-ios` creates some build artifacts folders, which can be added to the .gitignore as they are generated.
## Changelog:
[INTERNAL] - Update iOS RNTester build artifacts in .gitignore
Pull Request resolved: https://github.com/facebook/react-native/pull/51579
Test Plan: N/A
Reviewed By: cortinico
Differential Revision: D75389176
Pulled By: cipolleschi
fbshipit-source-id: ecb59051f5bb25b6be8fca9ac2ebf408adc5c7b7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51599
Adds `deprecated` to 2x API exports via `index.js.flow`. This will flag these APIs appropriately to the developer under TypeScript.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D75403796
fbshipit-source-id: 670c4bd0c262a58413e7703f09d6db2927d51408
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51261
Cleanup to use the new public type / API exports from `metro` landed in Metro 0.82.3, which is RN's minimum as of D74181990 / [PR](https://github.com/facebook/react-native/pull/51122), in preference to deep imports.
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D74141939
fbshipit-source-id: 9405f88a85e248abe8a92be1dd5a5f1ea6ceeb87
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51124
Metro 0.82.3's `runBuild` API now supports retrieving assets and passing through `unstable_transformProfile`, and fine control of output paths via `bundleOut`/`sourcemapOut`, so we can use it directly in the implementation of `community-cli-plugin`'s `bundle` command with no loss of function or API change.
This simplifies the implementation by re-using Metro's, and removes use of Metro internal APIs.
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D74151840
fbshipit-source-id: 3dcadaf8d38e7e77d21bacdf29e5d40467139d88
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51497
It removes `prepare-flow-api-translator` which is no longer needed as `flow-api-translator` version was bumped already and it blocks `build-types` script from running on CI (due to reference to `flow-api-translator` source). It also removes "Experimental" annotations.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D75138541
fbshipit-source-id: 897009c91adeeeaae21603dbf90020b52b61c5d5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51589
changelog: [internal]
With D75140890, there is a guarantee that `startOnRenderCallback_` won't be called after the owning class is destroyed.
There shouldn't be any events flowing through Fabric when the RN instance is torn down. Passing this to eventEmitterListener_ should be safe.
This helps with C++ binary size a little bit.
Reviewed By: rshest
Differential Revision: D75148616
fbshipit-source-id: 5110736c2ddcff738fce395bd0b9844d44e8dcb2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51588
changelog: [internal]
AnimatedNode never outlive NativeAnimatedNodesManager. We can safely use raw pointer here instead of shared_ptr.
This improves a C++ binary size a little bit.
Reviewed By: rshest
Differential Revision: D75148487
fbshipit-source-id: 4c2f6dc6e4de670be37dd3b65dc3a8d63d546150
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51587
changelog: [internal]
use unique_ptr instead of shared_ptr to manage memory of activeAnimations_.
Active animations are only owned by NativeAnimatedNodesManager and their ownership isn't shared with any other class.
This saves a little bit of C++ binary size.
Reviewed By: rshest
Differential Revision: D75142643
fbshipit-source-id: c09753b68e70e95fedcb7b2b8fb19a0fd7010059
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51586
changelog: [internal]
using shared_ptr here is not necessary because AnimatedNodes are not shared between multiple entities, they are only owned by NativeAnimatedNodesManager.
This saves a little bit C++ binary size.
Reviewed By: rshest
Differential Revision: D75148952
fbshipit-source-id: 18b8231061cda970ad96842ee6ca3135c2ec5d68
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51566
changelog: [internal]
Expose [revision](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.h#L229) of shadow node in Fantom tests. This makes it possible to write tests verifying that shadow nodes are only cloned when they should.
Even though excessive cloning does not usually lead to bugs, it may lead to performance problems.
Also introduce a test showing a performance problem where changing height of "Sibling" view from 1 to 2 will lead to component `D` being cloned by Yoga. Component D is not affected by the size change of Sibling and the clone is unnecessary.
```jsx
<ScrollView>
<View id="Sibling" style={{ height: 1 }} />
<View id="A">
<View id="B">
<View id="C">
<View id="D" ref={ref} />
</View>
</View>
</View>
</ScrollView>
```
Reviewed By: rshest
Differential Revision: D75287261
fbshipit-source-id: ea5acb2f5d7ba6e1e5bf895d8f82a16471122ec5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51576
This is causing some internal test failures for now, so disabling the behaviour to prevent further rollout.
Changelog: [iOS][Removed] Disable fix for #51103 until more testing can be done.
Differential Revision: D75320842
fbshipit-source-id: 39c115afd11e5b1aca6cdc1fc18ec7e83eb10382
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51508
For now, we are opting to not auto-focus `PreparedLayoutTextViews` if they have links. The reason being this would not work well with Text nested in a View which is also accessible. If that Text had links, and was set to focusable, then TalkBack would individually focus that Text, which users may not want.
So this diff removes that link detection, and fixes up accessibility in general. Since this isn't a TextView, we need to explicitly set the `text` on the `AccessibilityNodeInfo` object in the delegate so TalkBack know what to annouce.
In the future we aim to bring back auto-focusing with links, but only if a screen reader is not on, so that keyboard users can benefit from this.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D75103779
fbshipit-source-id: 05e17f4eb8d5d79ed1d84458f6d5fc6d1571e382
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51563
changelog: [internal]
Throwing errors in C++ is expensive and slow. Let's replace it with logging.
This is to reduce binary size of C++ Animated.
Reviewed By: mdvacca
Differential Revision: D75140875
fbshipit-source-id: 32909572141d8e1b51b60f317716f783aa760265
Summary:
Fixes https://github.com/facebook/react-native/issues/51083. Turbo stripped out the dictionary when the value is null. The old architecture transforms null to NSNull. The null seems useful in cases like #51803 for removing the storage of the key. cipolleschi can you please help to review?
## Changelog:
[IOS] [FIXED] - Turbo module: Fixes dictionary stripped out when value is null
Pull Request resolved: https://github.com/facebook/react-native/pull/51103
Test Plan: Repro please see https://github.com/facebook/react-native/issues/51083.
Reviewed By: rshest
Differential Revision: D74208525
Pulled By: javache
fbshipit-source-id: 53d630c265fba15d25309a3e1deb19dca24f298c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51558
changelog: [internal]
we must call stopRenderCallbackIfNeeded to prevent UI tick from being called when
`NativeAnimatedNodesManager` is deallocated.
Reviewed By: mdvacca
Differential Revision: D75140890
fbshipit-source-id: 9ad32956a877f9ee8256790ba32cb5982a5b0c2f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51519
# Changelog: [Internal]
Hermes Sampling Profiler doesn't require debugger to be enabled - we can use it in fallback Hermes Runtime target delegate. That's probably the last thing to make Hermes really run in `opt` mode.
When Hermes Target is compiled with no Debugger support, we can still define implementation for sampling profiler methods and call them on Hermes Runtime.
Reviewed By: huntie
Differential Revision: D75188276
fbshipit-source-id: e3e0dccd09e0870264e8abc65f96052735d63ad8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51556
Excludes `packages/react-native/flow/` from being published to npm.
**As far as I know**, we already axed open source Flow support with a similar change in D46313482 (Jun 2023).
Changelog:
[General][Breaking] - The `react-native` package no longer ships with the `flow` directory
Reviewed By: cipolleschi
Differential Revision: D75060845
fbshipit-source-id: 3cb81820499383bf095abc97a9ab7e9061c870d6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51559
Changelog: [internal]
Improves the support for multi-config benchmarks in Fantom by printing the Fantom configuration summary in the header of the table with the benchmark results for each variant.
Reviewed By: rshest
Differential Revision: D75281972
fbshipit-source-id: 80caf2e668a30ea1454cb932e91dac91192323bf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51541
Changelog: [internal]
Now that we have support for tests with multiple configurations in Fantom, we can configure the test for IntersectionObserver to run with all the flag configurations that affect its behavior, and make sure it doesn't break for anyone while we're rolling out the changes.
Reviewed By: rshest
Differential Revision: D75231300
fbshipit-source-id: e7addf51cffad8c94bb3bf34e99272ee1dd9da2a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51543
Changelog: [internal]
For `ReactFabricPublicInstance-itest` we used a specific pattern to be able to run the same test with different feature flags (having multiple entrypoints with the configuration and a single implementation file). We can simplify this now that we have support for multiple configurations per test file in Fantom.
Reviewed By: rshest
Differential Revision: D75231301
fbshipit-source-id: ffd047b23217c06b1b15ba07da8b5c191cc652e7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51542
Changelog: [internal]
This adds support for Fantom to run specific test suites with different combinations of options/flags, using wildcards as values.
See the new documentation for this feature in this diff for more details.
Reviewed By: rshest
Differential Revision: D75231299
fbshipit-source-id: 0e953e6de68f004944ee29206af49770c8b7dd9b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51528
Changelog: [internal]
This adds some logic to the Fantom runner to display the test configuration with the test results.
Reviewed By: lenaic
Differential Revision: D75063176
fbshipit-source-id: 8371e90247c1a0c24f29a13ead25fa5dbf98ec10
Summary:
ReactPerfLogger target now has an include file that wasn't in the search path.
This commit fixes this by adding "ReactCommon" as search path to the target.
## Changelog:
[IOS] [FIXED] - Added missing search path to swift package
Pull Request resolved: https://github.com/facebook/react-native/pull/51555
Test Plan: No tests yet.
Reviewed By: cortinico
Differential Revision: D75279320
Pulled By: rshest
fbshipit-source-id: b4d217bdcdb45d4b2decee0aeee155b829cdec9d
Summary:
I've been digging into memleaks in RN for some time and noticed that instances of `FabricUIManager` are leaking on reload action even on an empty app. I managed to pinpoint it to [ContextContainer](https://github.com/facebook/react-native/blob/36df97f500aa0aa8031098caf7526db358b6ddc1/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp#L522) (which holds `FabricUIManager` on the cpp side) not being deallocated after reload. After much much digging (since contextContainer is passed around in many places) I found that destructor of `ImageFetcher` never runs on reload, and its instance holds `contextContainer`. It turns out that `ImageManager`, which holds `ImageFetcher`, was calling `free` instead of `delete` and the former does not call destructor. After applying it, `contextContainer` does not leak making `FabricUIManager` instances not to leak too 🎉.
## Changelog:
[ANDROID] [FIXED] - Change `free` to `delete` to call destructor of `ImageFetcher` and release `contextContainer`.
Pull Request resolved: https://github.com/facebook/react-native/pull/51492
Test Plan: Run empty RN app in AS, do reload multiple times and see in AS profiler that instances of `FabricUIManager` are kept in memory without this change.
Reviewed By: Abbondanzo
Differential Revision: D75141983
Pulled By: javache
fbshipit-source-id: f13eea96cb7b614c1d6b53184498ef6294614986
Summary:
This PR removes extraneous blank space at the bottom of multiline `TextInput` when using nested `Text` with different font sizes on iOS with the New Architecture enabled.
| Before | After |
|:-:|:-:|
| <img width="283" alt="Screenshot 2025-05-15 at 12 16 05" src="https://github.com/user-attachments/assets/47256267-86ff-45f9-9e60-162d444a4b9d" /> | <img width="286" alt="Screenshot 2025-05-15 at 12 01 32" src="https://github.com/user-attachments/assets/43ce4b0b-6410-4ca5-be37-59c6374ea15c" /> |
The proposed solution is to call `RCTApplyBaselineOffset` separately for each line of text.
Ideally, we would call it separately for each part of text with different font size.
## Changelog:
[IOS] [FIXED] - Fixed blank space at the bottom of multiline TextInput on iOS
Pull Request resolved: https://github.com/facebook/react-native/pull/51344
Test Plan:
```tsx
<TextInput
multiline
style={{borderWidth: 1, width: 300, fontSize: 20}}
ref={ref}
placeholder="Type here...">
First line{'\n'}
<Text style={{fontSize: 30, lineHeight: 60}}>Second line</Text>
{'\n'}Third line{'\n'}Fourth line
{'\n'}
Fifth line
</TextInput>
```
Reviewed By: NickGerleman
Differential Revision: D74802648
Pulled By: j-piasecki
fbshipit-source-id: 30f02ae8af66264c1776d241ed8542899e9cdf99
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51550
`adjustsFontSizeToFit` will adjust font size so that given text fits in both veritcal and horizontal bounds. The algorithm to mutate text to fit is executed during TextLayoutManager during layout creation for Fabric, and then re-executed in `TextView.onDraw()`. See D56134348 which introduced the logic.
In Facsimile, we were not seeing font size adjusted when text is too tall. This is because we are only incorporating the height constraint during Spannable mutation during draw, but not the original layout, which Facsimile uses directly.
This could potentially fix other bugs, where width may not corredpond to the final font size we settle on during drawing.
Changelog:
[Android][Fixed] - Fix missing height constraints when creating Fabric layout for `adjustsFontSizeToFit`
Reviewed By: mdvacca
Differential Revision: D75251391
fbshipit-source-id: 77d90c49d48911e63131f9f088cfce13946c67d6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51546
A bit of housekeeping: this constructor is deprecated and unused as the class is internal
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D75233988
fbshipit-source-id: 8272ef4a9465c447d04b377b42071f9834092709
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51484
In this diff I'm avoiding a reflection call to ReactInstanceManager.handleCxxError when MINIFY_LEGACY_ARCHITECTURE is enabled, to help proguard to compile-out this method when MINIFY_LEGACY_ARCHITECTURE is enabled
changelog: [internal] internal
Reviewed By: mlord93
Differential Revision: D75085524
fbshipit-source-id: c80246fdb5940c549cc1d310f7ad042cc0482f0f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51540
The view culling `CullingContext` depends on the ScrollView component. This adds the dependency to the mounting target in CMakeLists
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D75233669
fbshipit-source-id: 8342ed791082174ac6d5c6f21270b0cd0adcc95f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51539
Follow up to D70322032. Relocates some of our newly added Flow library definitions into the package level `flow/` directory, to help disambiguate their use.
**Types directories after changes**
`packages/react-native/`
- `flow/` — Longstanding location for Flow package/global library definitions. Not imported by source code.
- `src/types/` — Contains public typedefs useful to 3P consumers (TypeScript) (today, just `globals.d.ts` as one module). Not imported by source code.
- `src/private/types/` — Source type modules **in Flow**, that **are imported** by other files in `src/private/`.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D75060846
fbshipit-source-id: 750a31e11b8f65579ce0831273df4d3b86335bdc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51512
Pull Request resolved: https://github.com/facebook/react-native/pull/50585
# Changelog: [Internal]
Replaces `DOMHighResTimeStamp` alias completely in `ReactCommon` with `HighResTimeStamp`.
`DOMHighResTimeStamp` as a type is now expected to be used only in JavaScript.
I didn't update places where we explcitly use `std::chrono::high_resolution_clock`, since it is platform-specific and there is no guarantee that `std::chrono::high_resolution_clock` == `std::chrono::steady_clock`.
Also, places that are isolated and not part of the Web Performance APIs, such as Telemetry for Fabric, are not updates as part of this diff. Although these subsystems are also using `std::chrono::steady_clock` as a low-level representation, they are not sharing it with other parts of the React Native core.
Reviewed By: rubennorte
Differential Revision: D75185613
fbshipit-source-id: 889719368de163e6f529689df6cc16d816fde66c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51511
# Changelog: [Internal]
There are multiple changes:
1. `PerformanceTracer` class, `TraceEvent` struct are moved to `tracing` namespace. These are parts of the Tracing subsystems of the jsinspector, this should bring more clarity and make things more explicit.
2. Added `Timing.h` class which defines conversion logic from `HighResTimeStamp` to absolute units that are expected by CDP.
3. `PerformanceTracer` will receive timestamps for Performance Web API entries in `HighResTimeStamp`.
Also, we will explicilty define a Tracking Clock time origin that will be epoch of the `steady_clock`. This aligns with the approach in Chromium and saves us from aligning custom DOMHighResTimeStamps that can be specified in performance.mark / performance.measure calls: these should not extend the timeline window. I've confirmed that this is the current behavior in Chromium.
Reviewed By: rubennorte, huntie
Differential Revision: D75185467
fbshipit-source-id: 37444392f12e8c9c4479c47c42b2c4badca7ecfd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51532
This change adds documentation to the SwiftPM structure to simplify changing it, especially if we have to port some changes from the cocoapods infra to the Swift PM implementation.
## Changelog:
[Internal] - Add docs
Reviewed By: cortinico
Differential Revision: D75217331
fbshipit-source-id: 153e87883d10ceed5a899c9a7dc362b4d2b7e510
Summary:
To reduce reduntant code by repeating the logging functionality in each JS module, this commit introduces a factory for creating a logger with a given prefix.
- Create factory `createLogger`
- Remove redundant log implementations
- Changed to use factory in hermes.js and ios-prebuild.js
bypass-github-export-checks
## Changelog:
[IOS] [CHANGED] - simplified logging in prebuild scripts
Pull Request resolved: https://github.com/facebook/react-native/pull/51527
Test Plan: No tests so far.
Reviewed By: cortinico
Differential Revision: D75213656
Pulled By: cipolleschi
fbshipit-source-id: 8403cfb8ed76ca3a30cfaaeabcd61ac790e7f0a1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51534
Aims to give us CI coverage of React Native's Jest preset, preventing future bugs like https://github.com/facebook/react-native/pull/51525.
Changes:
- Add a basic "it renders" Jest test to helloworld
- Add "Run Helloworld tests" step to `test-ios-helloworld` job in CI
- Also convert helloworld's `App.tsx` to TypeScript, as easiest way to unblock Jest JSX behaviour.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D75218901
fbshipit-source-id: 601155c59c4483696971df4c29d51549d97f49f2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51533
Motivation:
- These fail, when ran from `packages/helloworld/` with the available `jest.config.js` file.
- These aren't currently run in CI.
- Don't seem high value (only covers `set-version` behaviour).
In the next diff, I will be adding a missing basic ReactTestRenderer test.
{F1978505710}
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D75218694
fbshipit-source-id: b22f725aeea49deac069a3268bcf30d4981d44b6
Summary:
The current `URLSearchParams` is missing the readonly `size` property defined in the [whatwg spec](https://url.spec.whatwg.org/#interface-urlsearchparams), and attempting to use it returns `undefined`. This PR adds it.
## Changelog:
[GENERAL] [FIXED] - Added size property to URLSearchParams implementation
<!-- 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/51507
Test Plan: I've modified the [tests](packages/react-native/Libraries/Blob/__tests__/URL-test.js) to assert the `size` property is correct.
Reviewed By: cipolleschi
Differential Revision: D75205273
Pulled By: rshest
fbshipit-source-id: 4b773dfc95693a5e084663258de50d161d6facff
Summary:
Sometime ago Fabric specific root view tag allocator was added to the codebase: https://github.com/facebook/react-native/commit/7dec625ecabdc23cbae37e0034d29bb7bff17755 This PR makes sure to use it on iOS. It removes the need for additional conversions.
## Changelog:
[INTERNAL] [CHANGED] - use getNextRootViewTag() on new architecture
Pull Request resolved: https://github.com/facebook/react-native/pull/51522
Test Plan: CI Green
Reviewed By: javache
Differential Revision: D75204499
Pulled By: rshest
fbshipit-source-id: 12927887ae229c9fe89fa680f2bd55b5e378f9ae
Summary:
On windows, not all PlatformColors are convertible directly into colorComponents. For PlatformColors, the Color.isColorMeaningful may need to do something other than check the alpha component of the color.
Here I'm moving the implementation of isColorMeaningful into the HostPlatformColor implemantion to allow the host platform to customize the implemenation of isColorMeaningful.
## Changelog:
[INTERNAL] [ADDED] - Allow platforms to override isColorMeaningful
Pull Request resolved: https://github.com/facebook/react-native/pull/51478
Test Plan: No behavior change in core. -- Will be used in react-native-windows to fix https://github.com/microsoft/react-native-windows/issues/14006
Reviewed By: NickGerleman
Differential Revision: D75088378
Pulled By: javache
fbshipit-source-id: 0a456bfe6be93098e3d8fa22390a971e14a4312b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51530
Alternative to https://github.com/facebook/react-native/pull/50784.
`__mocks__` (and other underscored dirs) are correctly excluded from our npm package via `package.json#files`. But in this instance, this is a source file for the `jest/` directory (Jest preset within `react-native`), and should be included — fix by relocating.
Changelog:
[General][Fixed] - Fix missing RefreshControlMock source in Jest preset
Reviewed By: rshest
Differential Revision: D75215731
fbshipit-source-id: 1240344c4236288f31b16513f4df16766ad1e571
Summary:
# Changelog:
[Internal] -
Based on review discussions in on a previous PR, it's a better style to use native Kotlin's `.isNaN` instead of `java.lang.Float.isNaN()`.
This makes sure that we uniformly do so throughout the codebase.
Reviewed By: fabriziocucci
Differential Revision: D75215199
fbshipit-source-id: 3c73638caa26717feb6bf0b08d1d79df6a6c58b2
Summary:
When checking if we should download hermes artifacts, the path to the folder we're checking was wrong, causing hermes to always be downloaded.
This commit fixes this by renaming it from `Libraries` -> `Library`
bypass-github-export-checks
## Changelog:
[IOS] [FIXED] - fixed wrong path in prebuild hermes check
Pull Request resolved: https://github.com/facebook/react-native/pull/51526
Test Plan: Test to run the prebuild script twice with the same hermes version. Hermes should only be downloaded the first time.
Reviewed By: rshest
Differential Revision: D75213331
Pulled By: cipolleschi
fbshipit-source-id: 6eab6befa8f6a15b2215ec5ec9446063ec395ef7
Summary:
Added missing module React-RCTSettings to the Swift package.
This was found when testing intergrating with a bare bones React Native project.
## Changelog:
[IOS] [FIXED] - add missing React-RCTSettings to Swift package
Pull Request resolved: https://github.com/facebook/react-native/pull/51523
Test Plan: Run against a bare bones React Native project (not available in repo yet)
Reviewed By: rshest
Differential Revision: D75204445
Pulled By: cipolleschi
fbshipit-source-id: d9fcb27cc532846eece591152462ff9c88f82302
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51505
to simplify how we download and manage the `ReactNativeDependencies.xcframework`, we added a script that is specular to the `hermes.js` script to handle the download of ReactNativeDependencies.
## Changelog:
[Internal] - Add script to automate the download of ReactNativeDependencies
Reviewed By: mdvacca
Differential Revision: D75151884
fbshipit-source-id: 2938c2919a24e496f5287e7ba31f87970c923d5d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51504
This change simplify testing building React Native core using SwiftPM.
It let you use the HERMES_VERSION env var to automatically fetch the latest nightly.
To do so, just call:
```
HERMES_VERSION=nightly node script/ios-prebuild
```
## Changelog:
[Internal] - Handle the `HERMES_VERSION=nightly` case for iOS prebuilds
Reviewed By: rshest
Differential Revision: D75146936
fbshipit-source-id: 1933979b12d80eff005c9a1349df52602b254978
Summary:
Calls to create timers should return sequential ids (integers greater than zero in the spec's words). This regressed in the `TimerManager` implementation, which instead starts at zero inclusively.
This has two side-effects for code assuming a spec-compliant implementation of `setTimeout` and `setInterval`:
- Calls to `clearTimeout(0)` or `clearInterval(0)` will potentially cancel scheduled timers, although it's supposed to be a noop
- Predicates like `if (timeoutId)` will fail since they assume non-negative ids
The change in this PR is to align with WHATWG HTML 8.6.2 (Timers): https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers
> otherwise, let id be an [implementation-defined](https://infra.spec.whatwg.org/#implementation-defined) integer that is **greater than zero** and does not already [exist](https://infra.spec.whatwg.org/#map-exists) in global's [map of setTimeout and setInterval IDs](https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#map-of-settimeout-and-setinterval-ids).
Specifically,
- we should return `0` to indicate that no timer was scheduled
- we should start generating timer IDs at `1` instead of `0`
This was previously raised in review comments here: https://github.com/facebook/react-native/pull/45092/files#r1650790008
The spec-incompliant behaviour was raised in an issue here: https://github.com/apollographql/apollo-client/issues/12632#issue-3075269978
This PR does not,
- add bounds checking on `timerIndex_` and add a search of an available id that isn't in the unordered map
- exclude `0` from being an accepted `TimerHandle` in `TimerManager::createTimer` or `TimerManager::deleteTimer` since the above bounds checking hasn't been added either
## Changelog:
[GENERAL] [FIXED] - Align timer IDs and timer function argument error handling with web standards.
Pull Request resolved: https://github.com/facebook/react-native/pull/51500
Test Plan:
- Run `setTimeout` / `setInterval`; before applied changes the timeout for the first timer will be `0`
- Run `setTimeout(null)`; before applied changes the timer ID will be non-zero
- Run `setInterval(null)`; before applied changes an error will be thrown rather than `0` being returned
Reviewed By: cipolleschi
Differential Revision: D75145909
Pulled By: rshest
fbshipit-source-id: 6646439abd29cf3cfa9e5cf0a57448e3b7cd1b48
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51496
Fixes problem with generics passed to `VirtualizedSectionList` in generated types. The `flow-api-translator` creates a re-declaration for `export default` variables which shadows generics.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D75141051
fbshipit-source-id: 260ef066038320eee3ffa93692f77f1eff5c9205
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51524
Links in error suppressions will point to the announcement post in Flow FYI.
Changelog: [Internal]
drop-conflicts
Reviewed By: marcoww6
Differential Revision: D75188177
fbshipit-source-id: 27ea1fbee848e9371e679cf423e30bc9608edea0
Summary:
The Flow team is improving the way Flow infers type for primitive literals. This diff prepares the codebase for the new behavior by adding type annotations, or annotations of the form `'abc' as const`.
Changelog: [internal]
Reviewed By: marcoww6
Differential Revision: D75188179
fbshipit-source-id: be50990f23f79cf2d8dae7576af5190218adcafe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51502
While working on a case for Editor on mac, it took me a while to figure out what enum was the root cause:
{F1978470518}
Adding the blaming enum name in the error message would have made my life much easier.
## Changelog:
[GENERAL][Added] - Improve error messages when enum members are missing
Reviewed By: rshest
Differential Revision: D75141414
fbshipit-source-id: 3625d817b218788891252add225f8fffb99e3145
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51481
# Changelog: [Internal]
This is replaced by `HighResTimeStamp::now()`, which is available in a dedicated smal `react/timing` module.
Reviewed By: lenaic
Differential Revision: D75006354
fbshipit-source-id: d41bf73238e9c6bf5c5a9509d60713ce11e6ea4a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50585
# Changelog: [Internal]
Replaces `DOMHighResTimeStamp` alias completely in `ReactCommon` with `HighResTimeStamp`.
`DOMHighResTimeStamp` as a type is now expected to be used only in JavaScript.
I didn't update places where we explcitly use `std::chrono::high_resolution_clock`, since it is platform-specific and there is no guarantee that `std::chrono::high_resolution_clock` == `std::chrono::steady_clock`.
Also, places that are isolated and not part of the Web Performance APIs, such as Telemetry for Fabric, are not updates as part of this diff. Although these subsystems are also using `std::chrono::steady_clock` as a low-level representation, they are not sharing it with other parts of the React Native core.
Reviewed By: rubennorte
Differential Revision: D72649815
fbshipit-source-id: 96bcfaf909d4a7a5bb2ecfdd76f9939f1645fb69
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51454
# Changelog: [Internal]
There are multiple changes:
1. `PerformanceTracer` class, `TraceEvent` struct are moved to `tracing` namespace. These are parts of the Tracing subsystems of the jsinspector, this should bring more clarity and make things more explicit.
2. Added `Timing.h` class which defines conversion logic from `HighResTimeStamp` to absolute units that are expected by CDP.
3. `PerformanceTracer` will receive timestamps for Performance Web API entries in `HighResTimeStamp`.
Also, we will explicilty define a Tracking Clock time origin that will be epoch of the `steady_clock`. This aligns with the approach in Chromium and saves us from aligning custom DOMHighResTimeStamps that can be specified in performance.mark / performance.measure calls: these should not extend the timeline window. I've confirmed that this is the current behavior in Chromium.
Reviewed By: rubennorte
Differential Revision: D74892330
fbshipit-source-id: 514ca23dde8e23fbe07faf673e765674f328f60e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51455
# Changelog: [Internal]
The main idea is that subsystems who might use a different time origin (the starting point of the whole timeline of events), can use `toChronoSteadyClockTimePoint` method to get raw `std::chrono::steady_clock::time_point` and then offset it by some arbitrary epoch: be it unix time origin or `std::chrono::steady_clock::epoch`.
`fromChronoSteadyClockTimePoint` can be used to convert time stamps from external systems, like Hermes.
Reviewed By: rubennorte
Differential Revision: D74892329
fbshipit-source-id: 70f34ce99aead6e0552d87d310c4d6ea4653b8fe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51506
ReactRawTextManager is not used in new architecture, this diff marks it as so
changelog: [internal] internal
Reviewed By: mlord93, cortinico
Differential Revision: D75150100
fbshipit-source-id: 868420e87dc80185d5a51299736ce2ed6a855fe9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51488
The Flow team is improving the way Flow infers type for primitive literals.
Announcement: https://fb.workplace.com/groups/flowlang/permalink/1725180268087629/
This diff prepares the codebase for the new behavior by codemoding `as const` annotations.
## Repro steps
1/ Used steps in D73610163 to produce the code changes.
2/ Reverted files where `flow` errored:
```
flow status --show-all-errors > errors.log
node ~/fbsource/fbcode/flow/facebook/error-analyzer.js errors.log |
awk -F':' '{ print $1 }' | sort -u | grep -v 'Total Error Count' |
xargs hg revert --rev .
```
3/ Reverted files that did not improve error count in new Flow mode
```
# Run Flow before change
~/fbsource/fbcode/flow/facebook/flowd status --show-all-errors > errors-0.log
# Run Flow after change
~/fbsource/fbcode/flow/facebook/flowd status --show-all-errors > errors-1.log
# Compute error counts before and after
node ~/fbsource/fbcode/flow/facebook/error-analyzer.js errors-0.log | sort > errors-counts-0.log
node ~/fbsource/fbcode/flow/facebook/error-analyzer.js errors-1.log | sort > errors-counts-1.log
# Revert files with no change in error count
comm -12 errors-counts-0.log errors-counts-1.log | awk -F':' '{ print $1 }' | xargs hg revert --rev .~1
```
## Note to code owners
Due to the large number of errors involved in this rollout, adding `as const` was the most feasible large-scale automated solution. Ideally, a lot of these errors would be fixed by adding other appropriate type annotations. For example instead of annotating
```
type Shape = {type: 'circle', radius: number} | {type: 'square', side: number} | ...;
type ShapeKind = 'circle' | 'square' | 'triangle';
const circle = {
type: "circle" as const, // <-- annotation added here
radius: 42,
};
shape.type as ShapeKind;
takesShape(circle);
```
a more appropriate annotation would be
```
const circle: Circle = { type: "circle"; radius: 42 };
...
```
Changelog: [Internal]
drop-conflicts
Reviewed By: SamChou19815
Differential Revision: D75114154
fbshipit-source-id: 67ee5673816da9625431e2a2466a1e0038386151
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51487
The Flow team is improving the way Flow infers type for primitive literals. This diff prepares the codebase for the new behavior by adding type annotations, or annotations of the form `'abc' as const`.
Changelog: [internal]
Reviewed By: SamChou19815
Differential Revision: D75114156
fbshipit-source-id: e3175af85cdd2388c3b45af4beb314f334e3f9b5
Summary:
Running with
```
DEBUG=Metro:InspectorProxy DEV=1 js1 run --no-tty-print
```
When a message larger than 100kb is send over the cdp, log it.
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D75000887
fbshipit-source-id: 6f426ed4db7ac1996c4f26461a6e0d13c096e5cd
Summary:
As next step of the JSC deprecation, we are removing the CI testing for the JSC engine
## Changelog:
[Internal] -
Pull Request resolved: https://github.com/facebook/react-native/pull/51475
Test Plan: GHA
Reviewed By: NickGerleman
Differential Revision: D75089216
Pulled By: cipolleschi
fbshipit-source-id: 3839914cb58e872ddd82089bd7cb1391ddda20c1
Summary:
Migrate com.facebook.react.views.text.TextAttributes to Kotlin.
`TextTransform` is exposed in the `textTransform` var setter, and there doesn't seem to be a clean way to avoid having to make the `TextTransform` class public again. I have limited its companion to keep it internal as much as possible.
## Changelog:
[INTERNAL] - Migrate com.facebook.react.views.text.TextAttributes to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/51448
Test Plan:
```bash
yarn test-android
yarn android
```
Reviewed By: cortinico
Differential Revision: D74978129
Pulled By: rshest
fbshipit-source-id: ea0594f01738b8c8f4696434fe76974bbb9ff661
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51486
Original commit changeset: 5b313a5e8c07
Original Phabricator Diff: D74198568
Fix the issue that dropdown menus in HSR worlds menu are not clickable.
Reviewed By: xieswufe
Differential Revision: D75108344
fbshipit-source-id: d134ff9287929f8e1fc0995acf2b884d6a67131c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51428
Just refactoring the control flow in these functions (in a separate diff). So, that the logic in subsequent diffs is easier to read: D74769326.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74940681
fbshipit-source-id: 7aabc722948666a13993a1feff7eeca8ef1403cf
Summary:
In https://github.com/facebook/react-native/pull/50734, `LayoutAnimationController` was migrated to Kotlin and all of its methods are now marked as final.
However, this class is used and extended by `react-native-reanimated` in order to provide Layout Animations for Android on the Old Architecture. With all its methods being marked as final, the builds are failing.
This PR restores the possibility to extend `LayoutAnimationController`.
## Changelog:
[ANDROID] [FIXED] - Restored the possibility to extend `LayoutAnimationController`
Pull Request resolved: https://github.com/facebook/react-native/pull/51479
Test Plan: I've checked that this PR fixes build errors caused by `LayoutAnimationController` in react-native-reanimated.
Reviewed By: cipolleschi, mdvacca
Differential Revision: D75079557
Pulled By: cortinico
fbshipit-source-id: beeb700cbad87362dda4b60941124562c4753815
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51477
changelog: [internal]
when using C++ Animated, no need to send events to Objective-C Native Animated.
Reviewed By: lenaic
Differential Revision: D75066259
fbshipit-source-id: 224d15ba2f707f2272a4fec56e5b2685694c7809
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51379
Changelog: [General][Fixed] Fix incorrect flattening / non-rendering of views with backgroundColor set to `rgba(255, 255, 255, 127/256)`
Fixes#51378.
## Context
When testing some unrelated things with Fantom is realized that the color for some text that I wasn't explicitly defining was being set to `rgba(255, 255, 255, 127)`, like here:
https://github.com/facebook/react-native/blob/249a24ac756275eadbe3b4df1ff9c974af1671d2/packages/react-native-fantom/src/__tests__/Fantom-itest.js#L540-L542
When digging a bit more about why, I realized that was actually the value for `UndefinedColor`. When looking a bit deeper, I saw that the value for that constant was being set like this:
```
using Color = int32_t;
namespace HostPlatformColor {
static const facebook::react::Color UndefinedColor =
std::numeric_limits<facebook::react::Color>::max();
}
```
I'm not sure what the logic could've been here:
- Defining it as a value out of bounds for all valid colors? In this case, it's a 32 bit value so all the range of values are actually valid RGBA colors.
- Defining it as a fully opaque white? Seems dangerous for a default because you wouldn't be able to distinguish a explicitly set white color from a non-set color, relevant if you're seeing a white background color in a view on top of another view with any other background color.
The result of this existing logic was actually setting `UndefinedColor` to `rgba(255, 255, 255, 127)` because the alpha channel is defined in the first bits of the value, and `Color` being a signed int with 32 bits, the largest value is `01111....1`, so extracting the first 8 bits, you get 127.
## Changes
This changes the value set for the `UndefinedColor` constant (which is used, among other things, to determine if a view sets a background color, or otherwise could potentially be flattened).
The new value, instead of white with a 127/256 opacity, is black with 0% opacity (or simply the number 0 in `int32_t`).
Reviewed By: javache
Differential Revision: D74869311
fbshipit-source-id: 5582b4803b0b5c72cb3c1b33720c4542c5e3f1de
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51476
Changelog: [internal]
When we added integration of IntersectionObserver in the event loop by default, we changed the timing of the observer notification:
- Before, it was scheduled synchronously from the `observe` call. That means that, if you schedule another task immediately after the observe call, the order is IO callback then task.
- After, it was scheduled at the end of the current event loop tick. That means that, if you schedule another task immediately after the observe call, the order is task then IO callback.
This change in order wasn't accounted for in the tests for IO (which it's added here) and made a test for `structuredClone` break because it was using incorrect assumptions.
This fixes that test.
Reviewed By: rshest
Differential Revision: D75073118
fbshipit-source-id: 38ad2d03686891daf4caa836e1f597917910ddd0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51337
changelog: [internal]
When C++ Native Animated is used, we can't be using TurboModuleAnimated native module. This diff just add the check to make sure that if C++ Native Animated is used, it will be correctly referenced from JS.
Reviewed By: lenaic
Differential Revision: D74490166
fbshipit-source-id: 1b6de3227707168618052ff4ca6a02ca11337607
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51470
changelog: [internal]
To support C++ Native Animated and prevent unnecessary conversion between `folly::dynamic` <-> and `NSDictionary`, a method to apply `folly::dynamic` changes needs to be exposed on RCTMountingManager.
Previously I tried to change existing method `synchronouslyUpdateViewOnUIThread` to take folly::dynamic instead of `NSDictionary`. However this requires a change where we would expose C++ API to Objective-C class only, breaking build system in open source. This approach was backed out in D74881580.
In this diff, I take an alternative approach and expose two methods to apply animation changes:
- Keep the existing API `synchronouslyUpdateViewOnUIThread` as is. This way, Objective-C Native Animated does not need to change.
- Introduce new method for `[RCTSurfacePresenter schedulerDidSynchronouslyUpdateViewOnUIThread]` which accepts `folly::dynamic`. This is used by C++ Native Animated only
Reviewed By: javache
Differential Revision: D74885607
fbshipit-source-id: 124b8800c01deeb6d57af8f4c47bea46cc1bcd66
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51472
Changelog: [internal]
This enables the integration of `IntersectionObserver` with the Event Loop by default.
Reviewed By: rshest, javache
Differential Revision: D74991641
fbshipit-source-id: 7f12d7d5413d12a6a7de53e9d6701195d48996dc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51452
Changelog: [internal]
This implements a long planned refactor of `IntersectionObserver` to have a proper integration with the Event Loop, which unblocks `FragmentRef` in React Native.
The existing integration doesn't integrate with the Event Loop, so the intersection determination doesn't happen as a step in the event loop but in 2 different moments:
1. When you start observing a new target, we check if there are any pending transactions for that target, and otherwise determine the intersection immediately and queue the notifications.
2. Using mount hooks, when a transaction for a surfaceId is mounted, we check intersections for all the observers in that surface.
This has an important problem:
* If you attach a observer on a target before the target is attached to the tree (something that `FragmentRef` will start doing soon), we don't have a pending transaction so we determine intersections immediately. In that case, it's always "not visible" because it's not attached, and then we immediately trigger a transition when mounted in the same tick.
To fix this, we can implement a step in the Event Loop the same way that `IntersectionObserver` does on Web. We would still wait for pending transactions to be mounted to determine intersection timing (the same way we do now, but now checking at the end of the current Event Loop tick), but the dispatch of initial notifications for target that won't change is done at the end of the tick instead of synchronously.
It also refactors the list of active observers as a list of shared pointers to `IntersectionObserver` objects, instead of as list of `IntersectionObserver` objects directly. This is necessary to build the list of pending observers (with stable references) while making sure the ownership stays in the list of active observers.
Reviewed By: javache
Differential Revision: D74883214
fbshipit-source-id: 24accf1dba48d13b5773950a5cbf9ea38f4a1745
Summary:
This PR improves `RCTScreenSize` to handle horizontal orientations. This was causing a flicker whenever opening a Modal in horizontal orientation. Currently, `RCTScreenSize` is used to supply initial state for `ModalHostViewState`:
https://github.com/facebook/react-native/blob/f1697544cd720df21bd7dc8ca993d95a41321e3f/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewState.h#L31
This works great in portrait mode, but causes onLayout the be called twice in horizontal orientation (first with screen size and then with actual size..)
## Changelog:
[IOS] [FIXED] - make RCTScreenSize take horizontal orientation into account
Pull Request resolved: https://github.com/facebook/react-native/pull/51444
Test Plan: Open modal in horizontal orientation
Reviewed By: cipolleschi
Differential Revision: D74978651
Pulled By: rshest
fbshipit-source-id: f026e727b3529766de38dd31059c51b255f33e78
Summary:
Hermes build-type was hardcoded to 'release' in the previous version of the prebuild scripts.
This commit fixes this so that we can provide a build-type for hermes when downloading prebuilt tarballs.
- Cleaned up parameters in hermes.js
- Updated with buildType parameter when suitable
- Fixed some function names
- Updated version file so that it contains build type
- Removed version file when using a local tarball
## Changelog:
[IOS] [FIXED] - Fixed resolving build type when downloading hermes artifacts
Pull Request resolved: https://github.com/facebook/react-native/pull/51283
Test Plan: No test-plan yet
Reviewed By: cortinico
Differential Revision: D74882001
Pulled By: cipolleschi
fbshipit-source-id: cfeed934023712e70f7d04c137e8611164120cec
Summary:
Our Cocoapods config has a list of defines that are used mostly when setting up pods:
- RCT_FABRIC_ENABLED
- USE_HERMES
- RCT_AGGREGATE_PRIVACY_FILES
- RCT_NEW_ARCH_ENABLED
- APP_PATH
- REACT_NATIVE_PATH
- RCT_SKIP_CODEGEN
- SWIFT_ACTIVE_COMPILATION_CONDITIONS
- USE_FRAMEWORKS
- USE_THIRD_PARTY_JSC
- HERMES_ENABLE_DEBUGGER
- REACT_NATIVE_DEBUGGER_ENABLED
- REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY
Out of these, only the following are used in objective-c/c code:
- USE_HERMES
- HERMES_ENABLE_DEBUGGER
- REACT_NATIVE_DEBUGGER_ENABLED
- REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY
This commit adds the required defines to the correct targets.
## Changelog:
Pick one each for the category and type tags:
[IOS] [FIXED] - fixed defines in package.swift
Pull Request resolved: https://github.com/facebook/react-native/pull/51284
Test Plan: No test-plan yet
Reviewed By: cortinico
Differential Revision: D74872272
Pulled By: cipolleschi
fbshipit-source-id: 5d9a68c1d819409bc7400ade622f62bb332d0896
Summary:
When running the prebuild script:
`node scripts/ios-prebuild.js`
The script will now try to resolve and download a prebuilt version of hermes:
1. Hermes artifacts will be extracted to the `./build/artifacts/hermes` folder to ensure that Package.swift can find a version to link against.
2. The script checks the environment variable `HERMES_ENGINE_TARBALL_PATH` and tries do expand the tarball into the artifacts folder from 1
3. If not found, the script reads the hermes version from either the hidden environment-variable `HERMES_VERSION` and tries to download a release-tarball or a nightly tarball for this version. If the version does not exist, the script will fail.
Also added some extra logging features to the script.
bypass-github-export-checks
## Changelog:
[IOS] [ADDED] - Added downloading of hermes artifacts when pre-building for iOS.
Pull Request resolved: https://github.com/facebook/react-native/pull/51216
Test Plan:
1. Delete the `packages/react-native/.build` folder
2. Run the build script (provide a valid HERMES_ENGINE_TARBALL_PATH or a valid Hermes version (or nightly version)
3. Verify that the script successfully exits
4. Build the Package.swift in Xcode and verify that it finds and links the relevant Hermes files, verifying is done by the build succeeding.
Reviewed By: NickGerleman
Differential Revision: D74565936
Pulled By: cipolleschi
fbshipit-source-id: 5bd231999da24cfcce446150ac0fc1b5a4b6a4ae
Summary:
Found an issue with the legacy native module calls in old architecture (https://github.com/facebook/react-native/issues/51443) and got the idea of adding some simple e2e tests for the native modules so regressions like this can be captured moving forward.
This doesn't cover all methods, as not all of them are available for both Android and iOS, and also some of them are currently crashing, so it makes no sense to cover them all yet – but this can be used as a good starting point to increase coverage for essential APIs.
## Changelog:
[INTERNAL] - Legacy Native Module e2e test
Pull Request resolved: https://github.com/facebook/react-native/pull/51449
Test Plan:
```sh
cd packages/rn-tester && maestro test .maestro/legacy-native-module.yml -e APP_ID=com.facebook.react.uiapp
```
<img width="594" alt="image" src="https://github.com/user-attachments/assets/6237613d-f5dc-4d8a-9b12-0980177793eb" />
<img width="740" alt="image" src="https://github.com/user-attachments/assets/8bdef368-13ac-494c-a506-88fff01dc8d6" />
Reviewed By: cortinico
Differential Revision: D74978093
Pulled By: rshest
fbshipit-source-id: f9c7ba3ca5177eb3d3863d2b8252ac17f3d07aa0
Summary:
I noticed the link to networking in new app screen is wrong. So correcting it here
## Changelog:
[GENERAL][FIXED] - Fix Networking URL in New app screen
Pull Request resolved: https://github.com/facebook/react-native/pull/51396
Test Plan: Click on the link to open
Reviewed By: arushikesarwani94
Differential Revision: D74886240
Pulled By: cortinico
fbshipit-source-id: 19ccf63e64f0e40df4a0ab4082299c654926e35d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51465
Prior to D63303709 AttributedString could not represent formatting on an empty string, and so some text content was forcefully added to empty strings during measurement.
This is problematic in combination with Facsimile, where we directly render the layout we used during measurement, since empty text now has a random "I" in it.
Android's TextLayoutManager already knows how to interpret `baseTextAttributes`, and the placeholder is not needed. Other platforms should be updated to do the same, but that may be non-trivial to validate everywhere.
This diff removes logic from ShadowNodes to always inset a placeholder, and instead shims it in platform TextLayoutManagers which have not yet been updated to use `BaseTextAttributes`. That way, we don't force placeholders during measurement, and different platforms can incrementally unjank their code.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D74770916
fbshipit-source-id: 7cf19db1a9a5cf68137bbff81b14ce5288235b2b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51464
Add a module of shared examples, like `TextInputSharedExamples`, to avoid copy/paste between these.
Modifies the empty test example a bit and adds an E2E test.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D74780847
fbshipit-source-id: 30c2830ef0b638680fe75b4bcf9f138f5c01e190
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51389
# Changelog: [Internal]
This is the pre-requisite for the diff on top, which migrates performance-related classes to start using `HighResTimeStamp`.
We should be throwing `SyntaxError` if the specified mark name is not buffered. Like Chromium does:
{F1978032319}
In this diff:
- `PerformanceEntryReporter::getMarkTime` is now public, ca be called by `NativePerformance` and returns `std::optional`.
- `NativePerformance` is responsible for validating that marks are present in the buffer, if their names are specified in `.measure()` call.
- Mark names take precedence over `startTime` and `endTime` values, so if they are specified and not available, then we will throw Error over `jsi` that will be catched on JavaScript side in `Performance.js`.
Reviewed By: rubennorte
Differential Revision: D74837812
fbshipit-source-id: ca2ba198c4c9e6e2d8d37f852affea667f1c174c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51461
We are trying to minimize the amount of non-determinism in flushing Animated operation queues. Initially the `ReactNativeFeatureFlags.animatedShouldSignalBatch` handled non-determinism on the native side, eliminating the use of native mount hooks to trigger operation batch flushes in the native module. However, there is additional non-determinism introduced by JS, where the set of pending Animated operations may be flushed as a result of an effect.
This change eliminates the flushing of Animated operations in the `useEffect` for `createAnimatedPropsHook.js`.
## Changelog
[Internal]
Reviewed By: yungsters, zeyap
Differential Revision: D75003751
fbshipit-source-id: 73c7bb02355b5f634f4a800f46ca5f529cd15ebd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51459
When using `animatedShouldSignalBatch` in combination with `animatedShouldUseSingleOp`, we were seeing an issue where the queue is not flushed deterministically. It would be flushed in an ad-hoc manner by `createAnimatedPropsHook.js`, but this was only if a mount happened to occur in the same frame.
Adding a deterministic queue flush mechanism to the logic handling `animatedShouldUseSingleOp` appears to resolve the issue.
## Changelog
[Internal]
Reviewed By: javache
Differential Revision: D75002657
fbshipit-source-id: 51f50af0f22becf152da15a720ba70dfc158cdbf
Summary:
I noticed a missing debugging text while working on https://github.com/facebook/react-native/issues/50496. It was a typo. I though I might as well send a PR.
## Changelog:
[Android] [Fixed] - Fixing a typo in InterpolationAnimatedNode for debug text.
<!-- 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/51460
Reviewed By: cortinico, shwanton
Differential Revision: D75005096
Pulled By: javache
fbshipit-source-id: 390452b2b0c6eabfa003b9c95719649c79444d3a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51390
# Changelog: [Internal]
Ideally, these should not be optional, but these values are set at runtime.
Assertions added to validate that these values are set before reporting to `PerformanceEntryReporter`.
Reviewed By: rshest
Differential Revision: D74811439
fbshipit-source-id: 5e95931848263a58d977c07bac0eb18e53b91140
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51420
The checked and unchecked state of the accessibility state property has to be serialized as `{ "checked": true }` and `{"checked": false}`.
This diff updates the serialization of the `accessibilityState` prop for the prop diffing on the View component.
This fixes the e2e test selectors for radio buttons.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D74910744
fbshipit-source-id: 212b78e29a007744ac9283c7ec9b96ce80fd5681
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51451
This diff adds the `fantom_hermes_variant` pragma which can be set to:
- `hermes` for the default Hermes runtime used by RN
- `static_hermes` for the stable version of Static Hermes
- `static_hermes_trunk` for the "trunk" version of Static Hermes
Each variant will set up the correct build options for the runner and the correct compiler to use for the bundle.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D74959718
fbshipit-source-id: 5d30c8e15ab052eb5686f26632f08ab42b5e68c7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51393
In D74738548 we copied RCTFollyConvert to Follyconvert and we moved it to a separate file.
The problem is that when we build react native, we now might have duplicated symbols, especially with prebuilds where the symbols are "flattened" together.
To fix this, we can have the old file point to the new file in order not to break our suers and have a single symbol anyway.
## Changelog:
[Internal] -
Reviewed By: sammy-SC
Differential Revision: D74883143
fbshipit-source-id: 98361307286cdc19c57b8f5c9f066aebea992896
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51441
Refactors `RNTesterPlatformTestEventRecorder` so that it does not use `useMemo` from an instance method.
Instead, this diff changes the module to export a hook by the same name, `useRecorderTestEventHandlers`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74950333
fbshipit-source-id: 6cb222a6ec077abadbdc7008e822645aba3d07f6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51439
Migrates the `BackHandler` mock to use ESM to mitigate the existing lint warning.
I'm actually not sure this is even used anywhere… and the unmocked `BackHandler` is already using ESM.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74949885
fbshipit-source-id: 7f37212db2125bb7afdbd342175e3beae6c7c14f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51438
The `ReactNativePrivateInterface` module needs to continue using `module.exports` in order to lazily import dependencies.
For now, we just suppress the `lint/no-commonjs-exports` lint rule.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74949839
fbshipit-source-id: 295853be7fb988b879b6fd0b15ef31dd6e47cf85
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51434
Migrates files to use ESM to mitigate the existing lint warning.
I am suppressing `RelativeImageStub` to preserve compatibility with the dynamic asset exports generated by Metro (i.e. not ESM with `default` exports).
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74943031
fbshipit-source-id: ac4b2afd96fe5446acb4452395d7cb42bb5a6c17
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51433
This `ErrorUtils` mock is dead code.
There is no `ErrorUtils` module in React Native. (Maybe there was once upon a time...)
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74942884
fbshipit-source-id: 893458c4bc6f9ed29452579ce81915a52e6cd649
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51426
Fixes a bunch of ESLint warnings across the codebase.
The only remaining warnings are from the `lint/no-commonjs-exports` rule.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74942686
fbshipit-source-id: 384de34c7297f7f7fcff1827c8b2e46714a5cda7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51415
Adds the `format` annotation to all files that were missing them.
Also, adds `noformat` to generated files, and removed it from files that no longer need them.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74901034
fbshipit-source-id: 7e0b85ca8ee2de41278f3aa23cb03e9c266d9c28
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51413
Prefers using this as a destructured import instead of as a member expression of `React`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74895841
fbshipit-source-id: c1d3af40134a3721c9a7b676ee1f2c4a18612e4d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51409
Prefers using this as a destructured import instead of as a member expression of `React`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74895837
fbshipit-source-id: b9d6082e4882d95f0d2aa1eed13b725edeb854cd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51410
Prefers using this as a destructured import instead of as a member expression of `React`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74895844
fbshipit-source-id: 67f334981a1effce051c89e3d4643232aa22b4e9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51411
Prefers using this as a destructured import instead of as a member expression of `React`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74895840
fbshipit-source-id: 0a3d78d2871c3334b6e1b570744962a4d0168a9e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51408
Prefers using this as a destructured import instead of as a member expression of `React`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74895838
fbshipit-source-id: 2cc369e168a7ee10aa4374717f817636841c372c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51412
Prefers using this as a destructured import instead of as a member expression of `React`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74895839
fbshipit-source-id: 9ab9fc8bdee6d1764ad86fa2165da32cb266174e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51407
Prefers using this as a destructured import instead of as a member expression of `React`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74894324
fbshipit-source-id: 7179f27f8ff1fb1b67745650b38d87cb2ea982b2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51406
Prefers using this as a destructured import instead of as a member expression of `React`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74894207
fbshipit-source-id: 00286b3dbaa6ce1e4d8d0f0f6c0dfef6505824c5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51405
Prefers using this as a destructured import instead of as a member expression of `React`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74894042
fbshipit-source-id: 93fbadb32e4a1225836db9d729d7bf502ebddd84
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51404
Prefers using this as a destructured import instead of as a member expression of `React`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74893440
fbshipit-source-id: 9032f1e867a34b9cfa808f920a38f2630046eed7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51403
Prefers using this as a destructured import instead of as a member expression of `React`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D74891875
fbshipit-source-id: 981e85b5da84950c9e66e8d6b6496019e536711d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51401
Prefers using this as a destructured import instead of as a member expression of `React`.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D74889277
fbshipit-source-id: 0d42921758c5d6e108a4c82dbd52b7de89fbef00
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51400
Prefers using this as a destructured import instead of as a member expression of `React`.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D74888314
fbshipit-source-id: 9224c7c371471fe1fc42c8d42d4b37a4edadcacf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51399
Prefers using this as a destructured import instead of as a member expression of `React`.
Changelog:
[Internal]
Reviewed By: rubennorte
Differential Revision: D74888097
fbshipit-source-id: a22ca4b791153ff0c2f4ab34ff8e3ce5e9280e0d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51252
# Changelog: [Internal]
Removes usage of `DOM_HIGH_RES_TIME_STAMP_UNSET` stub contstexpr.
Instead, all events that were using it will now declare timestamps as optional. This is the pre-requisite before migrating these raw `double` values to `HighResTimeStamp`.
Reviewed By: javache
Differential Revision: D74248998
fbshipit-source-id: 9ef223420823d036db815f956e91ff3a712c9833
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51251
# Changelog: [Internal]
Replaces `RuntimeSchedulerClock`, which was an alias for `std::chrono::steady_clock` with previously defined single timestamp abstraction.
Reviewed By: rubennorte
Differential Revision: D74246459
fbshipit-source-id: 2f5e31eb2299856e7eb69f3915fec6597963a3b8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51253
# Changelog: [Internal]
Defines bridging template for `HighResTimeStamp` and `HighResTimeDuration`.
When these values are passed to JavaScript over bridge, they will be converted to [`DOMHighResTimeStamp`](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp).
Also the other way around, when we list `HighResTimeStamp` or `HighResTimeDuration` as a type of TurboModule spec, it will expect number value from JavaScript.
Reviewed By: rubennorte
Differential Revision: D74506516
fbshipit-source-id: b5893cef4525793eb6fb6326055c261c7b84a724
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51254
# Changelog: [Internal]
Defines single timestamp abstraction that will be used in C++ layer of React Native core:
Key primitives include:
- `HighResTimeStamp`: A class representing a specific point in time with high precision.
- `HighResDuration`: A class representing a duration of time with high precision.
Right now, all these just encapsulate `std::chrono::steady_clock` with no extra custom logic. We might revisit this in a future, once we decide to add support for [`Performance.timeOrigin`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/timeOrigin).
This diff also adds a `README.md` documentation file with a brief summary of the `react/timing` module.
Reviewed By: rubennorte
Differential Revision: D72796412
fbshipit-source-id: 7a92b61202f5e527e020edea2b756b0063971242
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51397
Changelog: [Internal]
Fix order of ancestor titles.
Due to reverse being applied to the title order it flipped order on even contexts.
Reviewed By: rubennorte
Differential Revision: D74886550
fbshipit-source-id: c556af977f1abee633527151a5896c7d69bd0b48
Summary:
Expo is using the backingmap to be able to update properties in a fast and performant way in two overridden view manager subclasses (ViewGroupManager subclass is one of them).
This diff exposes the backing field via JvmName using the `internal_` prefix.
So Expo can keep on accessing the field as they were doing before. In the long run we should prevent them from accessing this property altogether but this would require a different API.
## Changelog:
[INTERNAL] -
Pull Request resolved: https://github.com/facebook/react-native/pull/51386
Test Plan: Build with Expo modules
Reviewed By: cipolleschi
Differential Revision: D74884533
Pulled By: cortinico
fbshipit-source-id: e76673c794a6a125059633d29445d991d867b770
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51383
This diff is a set of alignments/improvements in generated TS types. It includes:
- extending `AppStateStatus` with `extension` and `unknown`,
- exporting `AnimatedProps` under `Animated` namespace,
- resolving issue with discriminated unions in `ProgressBarAndroidTypes`,
- fixing `StyleSheet.create` type to accept only specified style properties,
- extending `TextProps` with `AccessibilityProps`,
extending Fn Args generic with `$ReadOnlyArray` in `ErrorUtils`,
- small `__typetests__` adjustments,
- removing type test `styleDimensionValueValidAnimated` as `DimensionValue` no longer accepts `AnimatedNode`,
- removing `styleDimensionValueInvalid` as `DimensionValue` accepts any string now - template literal types in Flow are not supported,
- changing `overlayColor` type to `ColorValue` to align with manual types,
- fixing `AnimatedPropsAllowList` type which wasn't correct in TS because index signature type was different from style type,
- using `DeviceEventEmitter` instead of `DeviceEventEmitterStatic` in type tests which is equivalent in both new and old types - `DeviceEventEmitterStatic` was only a type of `DeviceEventEmitter`,
- removing type test for checking forwarded key type - doesn't work with new types and that shouldn't be supported,
- removing `Animated.legacyRef` type test - not included in new types,
- adding `DOMRect` from "dom" lib to `globals.d.ts` to not include "dom" lib in the tsconfig - tries to compare globals with `lib.dom.d.ts` and produces many errors,
- exporting `SectionListData`,
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D74807552
fbshipit-source-id: c5254ea0f701f3602b9d716faeb50ca1ab21b013
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51366
We inherited this from the legacy native module infra, where we didn't have access to the module instance. Instead we can use the simpler `methodSignatureForSelector` which works correctly with OCMock (needed in D74815079).
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D74817191
fbshipit-source-id: 6f3f741e9a78dea967a7654e6410ddacfad6d8a3
Summary:
This folder should have been added to the .gitignore.
Gradle is placing some build file over there in the latest version. This prevents it.
Changelog:
[Internal] [Changed] -
bypass-github-export-checks
Reviewed By: cipolleschi
Differential Revision: D74884379
fbshipit-source-id: 7da9682589c2bc161c1b0e3d741d1049b94505e4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51382
This diff replaces `dtslint` which is obsolete and [It is not intended to be used on its own, but as part of the definitelytyped set of packages](https://github.com/microsoft/dtslint) in favor of `tsc` type tests.
It's probably not necessary to have `test-typescript-offline` as tsc does that out of the box but doesn't test with multiple TS versions.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D74804967
fbshipit-source-id: 4c581ba5debf6fd0bb8dcddbb95f3c85b05082d4
Summary:
Expo inherits from the DevServerHelper class, and needs it to be declared as open, the same goes for its public interface.
Expo is using this in `DevLauncherDevServerHelper` and overrides the methods:
- getDevServerBundleURL
- getDevServerSplitBundleURL
- getSourceUrl
- getSourceMapUrl
- isPackagerRunning
This PR fixes this by adding the open to the class and to the methods that should be open
## Changelog:
[ANDROID] [FIXED] - Made DevServerHelper and its method open so that they can be overridden.
Pull Request resolved: https://github.com/facebook/react-native/pull/51323
Test Plan: Verify that we can build against Expo.
Reviewed By: cipolleschi
Differential Revision: D74876479
Pulled By: cortinico
fbshipit-source-id: 0037d6f7cee190a690ec3ec59896df04f46797b2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51381
Changelog: [General][Fixed] Fixed codegen breaking when a subset of `modulesConformingToProtocol` fields was specified or when the value was string
D70822061 introduced a new way of defininf modules and components in codegen, but accidentally introduced two breaking changes to the legacy syntax:
- before that diff, in case of 1:1 mapping, the value of the fileds could be a string, while after, it required it to be an array
- before that diff, not all of the fields on `modulesConformingToProtocol` had to be defined in `package.json`, while after, it required all fields to be defined even if unused
Reviewed By: cipolleschi
Differential Revision: D74875251
fbshipit-source-id: 610103b508f1462b4de01725f9b0a87341571197
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51362
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74814465
fbshipit-source-id: 7264e137040381621dddc2641fb31114273cfb28
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51369
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74815336
fbshipit-source-id: b45f563ee73bd53794319b0d9886d3214caf0544
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51374
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74808387
fbshipit-source-id: e724130f88018b2cbe581dfd7a700cfbb0700bb9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51365
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74814123
fbshipit-source-id: 5f9410df1710f6a9c59fea7ce1f225b04b67d664
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51364
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74814121
fbshipit-source-id: b9b9f09577da1ba59a4b858b538140ab34bdc60d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51367
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74810113
fbshipit-source-id: cb841ab71ef582f10f478f2094837cf52d9cdf68
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51372
I got notified that a recent change I made was causing a crash. This would happen when the endOffset of the link is larger than the end offset of the line. This can be repro'd with
```
/**
* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
*
* flow strict-local
* format
*/
import {useState} from 'react';
import {Platform, StyleSheet, Text, View} from 'react-native';
export default function Playground() {
const [state, setState] = useState(false);
function toggle() {
setState(old => !old);
}
return (
<View style={styles.container}>
<Text
style={[styles.paragraph, state && {backgroundColor: 'red'}]}
numberOfLines={3}>
<Text>Bacon Ipsum{'\n'}</Text>
<Text>Dolor sit amet{'\n'}</Text>
<Text>{'\n'}</Text>
<Text accessibilityRole="link" onPress={toggle}>
http://www.google.com
</Text>
</Text>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
paddingTop: 24,
backgroundColor: '#ecf0f1',
padding: 8,
},
paragraph: {
margin: 24,
fontSize: 18,
fontWeight: 'bold',
textAlign: 'center',
},
});
```
This was encountered already by NickGerleman in D46206673 (https://github.com/facebook/react-native/pull/37050) and the fix is fairly straightforward. I modified that fix to check for the endOffset as well.
Changelog: [Internal]
Reviewed By: zeyap
Differential Revision: D74823458
fbshipit-source-id: 08fe81893f1c41d1934215515f88a6e0e546e705
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51363
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74814122
fbshipit-source-id: 88a184f84b811ad527e004edf0eb2344db8fe266
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51368
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74813682
fbshipit-source-id: c6bb9e286049c8ed16375c3bbb674b26a34459ca
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51371
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74815987
fbshipit-source-id: 1f19757d0219f1d62deb263edfa2a0cc562dd9d2
Summary:
## changelog
[iOS][Deprecated] - RCTFollyConvert.h is deprecated please use /ReactCommon/react/utils/platform/ios/react/utils/FollyConvert.h instead
Pull Request resolved: https://github.com/facebook/react-native/pull/51348
move RCTFollyConverter to utils module so it is more accessible and delete RCTCxxUtils (which only held that one file). Also align on naming and drop RCT prefix.
Reviewed By: cipolleschi
Differential Revision: D74804476
fbshipit-source-id: 9a702b4823a986ed9849707cbb62d024e589bc1d
Summary:
After conversion to Kotlin we could no longer override the removeView function since it is no longer open. The rest of this class can be overridden as before, but since functions are final by default this doesn't work for the new `removeView` function.
Expo is overriding the `removeView` functions in `GroupViewManagerWrapper.kt` (a lot of other ViewManager methods are also overridden here, but the `removeView` is introduced in `ViewGroupManager` and needs to be open as well. `GroupViewManagerWrapper.kt` is a replacement view manager that adds support for a delegate that will receive callbacks whenever one of the methods in the view manager are called.
This commit fixes this by making the removeView function explicitly open.
## Changelog:
[ANDROID] [FIXED] - Made function `removeView` open in Kotlin class
Pull Request resolved: https://github.com/facebook/react-native/pull/51322
Test Plan: Verify that Expo can build against this class.
Reviewed By: javache
Differential Revision: D74807744
Pulled By: cortinico
fbshipit-source-id: 55f4b9deccb7d82ceb78be1d56c2b99a6f7e3ce9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51361
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74810512
fbshipit-source-id: 0f902da8b487db353609b8de14f46a4cec23a46b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51358
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74812747
fbshipit-source-id: 7ded547ff62ca59d28abfc46a2f57466e2486acd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51338
There was some problems removing this feature flag earlier in that, on older android versions, we would try to focus the top most text input whenever any other text input would try to blur. This was ultimately and issue with how Android implements `clearFocus`. To fix this, lets block the focusability of all views while we clear the focus, then re-enable.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D74760594
fbshipit-source-id: 2811c08ad6ed0855da0a4d7fca89fb08f84905c2
Summary:
Original commit changeset: 4682cf709aa2
Original Phabricator Diff: D73954790
I want to pick this into 0.80 so users can enable the feature flag so this doesn't break older versions
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D74754010
fbshipit-source-id: 75dc96516b00035984741b43814d6fc7df6be0ac
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51336
Original commit changeset: 12dcaf0c9c35
Original Phabricator Diff: D74678847
I plan on reverting this so that we can in turn revert the diff that this diff fixed so we can pick it into RN 0.80 so that users have some fix on all versions. Right now 0.80 will be broken for older android devices
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D74754164
fbshipit-source-id: fda17da3e9b61ca13f68f6681726ffb3f4f4f6c0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51357
This adds a `prepareNative3pDependencies` Gradle task that downloads and prepares all the 3p dependecies.
This will be needed before we download native deps for Fantom.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D74812436
fbshipit-source-id: 85796d0bcffaeef05d3a21d50f39954ef39ae92c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51360
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74812991
fbshipit-source-id: 9df7247bcdaed7a880ed0a75a5dcc33fce6f1d86
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51345
Changelog: [internal]
I just realized there were some tests where we didn't migrate to the new recommended pattern.
Reviewed By: rshest
Differential Revision: D74803018
fbshipit-source-id: b74468f1be35fba8d20d3b96ea2b55452a8175ee
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51343
Changelog: [internal]
This implements `setNativeProps` as a method in the `NativeDOM` C++ TurboModule, so we can replace usages of the method from `FabricUIManager`.
Reviewed By: javache
Differential Revision: D74800815
fbshipit-source-id: cf3c2d4b75c8d30e2528f96d4d63318e1366096a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51342
Changelog: [internal]
Adding a test for `setNativeProps`, as it was missing because we couldn't test this when this test suite was implemented.
Reviewed By: fabriziocucci
Differential Revision: D74800816
fbshipit-source-id: 5f4721e61d1fb41a1898f56be35e6e3b12c9537e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51341
Changelog: [internal]
`measure`, `measureInWindow` and `measureLayout` have been defined in the `NativeDOM` C++ TurboModule for a while, but we didn't migrate the callsites in the DOM APIs to use them. This does that migration so we can remove a few `$FlowFixMe`s and use a cleaner API.
Reviewed By: javache
Differential Revision: D74800814
fbshipit-source-id: 117e4a8798036f2266e25cfc0931e91c148eaf52
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51356
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74808564
fbshipit-source-id: 68f55d31c07ceaf7282833bd4b04039e35987935
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51355
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74810588
fbshipit-source-id: e979e8fb59d46be6dabc4327b47b20d635864aa9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51353
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74809899
fbshipit-source-id: aaa4ef65ea4d4a20c9d9315ae95957e67484c2d8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51354
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74808349
fbshipit-source-id: a359278b5d516eb04fc88ea14c21b628f1053fec
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51347
The new warnings on RNTester for the imports are covering the New Architecture list item, as you can see from the video.
This prevents maestro from clicking on the list item, and therefore the test fails.
{F1977997600}
## Changelog:
[Internal] - Fix E2E Tests
Reviewed By: cortinico
Differential Revision: D74803709
fbshipit-source-id: 747af57d04c96ba9b0ee642eb70ebf84bca3a3fa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51352
Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74808254
fbshipit-source-id: 2f5f8d8dbe1bd5fcaba179bea5deed1592dc900c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51346
Changelog: [internal]
I saw that this test was logging errors to the console, which is considered a bad practice in Jest tests.
This prevents the logs from being printed in the test output and also adds assertions to verify what should be logged.
Reviewed By: rshest
Differential Revision: D74803463
fbshipit-source-id: 9c840a51e0e616a6bb15b7a40b3a6937fcb88b64
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51082
Introduces the `IHermesRootAPI` interface and a class implementation.
This root API will contain the previously static methods on
`HermesRuntime`.
The root API will serve as an entry point for users to create the Hermes
runtime and invoke methods that do not necessarily require a runtime.
Diff also moves all usages of the static methods on `HermesRuntime` to
getting the methods from the root API.
Multiple places are depending on Hermes, Hermes snapshot, and Shermes,
so this diff will also update all of these verions of Hermes at once.
Changelog: [Internal]
Reviewed By: neildhar
Differential Revision: D71132855
fbshipit-source-id: fddda83517682779b4aef062efe84e29fd027fae
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51182
Wires up the logic to use Facsimile View Manager when flags for prepared layout enabled.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D73161911
fbshipit-source-id: dc8824ecf8a712d5ff52cb8e2d63e85646297d40
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51301
The type of the state we pass has changed, since the original prototype. Need to update the Java side to reflect this.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D74417253
fbshipit-source-id: 9159689e07d6f00504b5116a647c7afdf79005f4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51184
This change adds prepared layouts to `ParagraphState` on Android, for us to send to the client when gating is enabled
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D74356128
fbshipit-source-id: bd1dd5a457869075c561173de398ae1954a20ab5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51185
Was running into issues with split Android ParagraphState, because a lot of code is tied to `#ifdef ANDROID`, which also builds for react-native-cxx.
This does that spliitting, and also introduces `RN_SERIALIZABLE_STATE` to replace previous ANDROID checks related to state serialization, so we can cofine that to just the Android platform. These changes are dependent on each other.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D74374376
fbshipit-source-id: ffb246ea2e16773f85de12209f2d88a95f8bb792
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51305
tsia, there is a lot of TextView specific API calls and instance checks in the delegate that need to be modified. Additionally, facsimile has some custom focusing logic we do not need if we have a delegate
I opted to just do a lot of instance specific logic using `is` . That seems easier for the time being with this text view that should replace our other text view over time.
I also expose a new way of focusing a span on facsimile, which may not be the best way to do that, lmk
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D74104419
fbshipit-source-id: 87c2259bb1698d93afad88ed91cb6322b90714f0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51324
This diff just renames the mutexes, so that the method is more understandable.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D74692506
fbshipit-source-id: 3e928ee0465ebed90f9c95ba3eaf28ea148b0e60
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51081
After introducing the interfaces, runtime should be managed through a
shared pointer instead of a unique pointer.
This diff will change the usage in JSI testlib. Later diffs will
actually change the HermesRuntime usages.
Changelog: [Internal]
Reviewed By: lavenzg
Differential Revision: D70113190
fbshipit-source-id: ea831dd8f79750851fd626afe0f1f5550142ac05
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49604
Add JSI castInterface API. This provides a structured way to provide
optional APIs that may or may not be supported in all engines.
Every interface will have its own set of APIs. For instance, Hermes
will provide an interface (`IHermes`) containing Hermes-specific
APIs. In the future, an interface may be created to expose optional
APIs.
A runtime will inherit the interfaces of which the APIs are supported by
the runtime. Users who want to access a specific API may call
castInterface with the UUID of interface containing the API.
For backwards compatibility, the current `jsi::Runtime` will remain as
an object, and its functionalities will not be described by an
interface. However, this may be revisited later.
Changelog: [Internal]
Reviewed By: tmikov
Differential Revision: D68964360
fbshipit-source-id: 3efe61c5bc1a0fa113a192f4abad6d0f135b4301
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51328
RCTSurface is a legacy class. We might be able to kill it off.
Let's decouple RCTSurfaceView from RCTSurface.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D72582309
fbshipit-source-id: 0ffb6c2d08c5ee1eda6ae90955ccbc14f57036b7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51327
RCTModuleData is a legacy class. We might be able to kill it off.
Let's deocuple bridgeless from RCTModuleData.
Changelog: [ios][Breaking] - Migrate RCTDisplayLink's API from RCTModuleData
Reviewed By: cipolleschi
Differential Revision: D72582306
fbshipit-source-id: 3e06f8b2036e1f65425c8312644cc92c076e958e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51304
A potential source of truncation we previously experienced with D65171352 is difference in how TextView calculates line spacing with StaticLayout.
As of Android 13, this also appies to how TextView creates the metrics of BoringLayout. Oddly, this is not also applied to `BoringLayout.make()` (I think it ends up only impacting metrics), so we don't pass the flag there. See https://cs.android.com/android/_/android/platform/frameworks/base/+/78c774defb238c05c42b34a12b6b3b0c64844ed7
This could cause some theoretical truncation of simple single line text, so let's match TextView expectations.
Changelog:
[Android][Fixed] - Include fallback line spacing in BoringLayout
Reviewed By: javache, joevilches
Differential Revision: D74694483
fbshipit-source-id: 76dd980b827824f19ac755b3a9a1ec8912cd6ff1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51098
# Changelog: [Internal]
Depending on the sampling rate, there could be lots of samples recorded. Right now, React Native requests the rate to be 10kHz. In reality, Hermes will be slower. How exactly slower will depend on the platform, because sampling profiler implementation is platform-specific. Windows peaks at ~500Hz, whereas iOS and Android that are using signals can reach up to 5kHz, based on my observations. This means that we could record sample approximately every 0.5ms.
For 30 seconds of sampling, we can get around 150k samples, every one of which may have up to 500 call frames (it is a custom limitation on Hermes side). Previously, every call frame could have a unique copy of function name string and url string.
This diff changes the approach to deduplicate strings, keeping a single copy for every unique string. A new abstraction `StringEntry` is added that will keep a const pointer to the string storage and an offset to the entry in this storage.
On React Native side, we are going to re-use these `std::string_view` and keep Hermes' `Profile` alive as long as they are used. We are going to achieve this by keeping unique pointer to the Hermes' `Profile` in React Native's Profile abstraction - `RuntimeSamplingProfile`, which is agnostic to the runtime.
Reviewed By: fbmal7
Differential Revision: D73106068
fbshipit-source-id: bdc7026e19c2677e39e20f14c8532080c5842026
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51264
## Changelog:
[General] [Changed] - Remove native animation fabric sync in JS and infinite animation loop workaround, when cxxNativeAnimated is enabled
when cxxNativeAnimated is enabled, we'll sync native animation props back to Fabric in native, when that happens we can remove the code in JS for same purpose
Reviewed By: lenaic
Differential Revision: D74198568
fbshipit-source-id: 5b313a5e8c07058f939134e9a6d60dcfa3b45842
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51269
This adds an E2E Tests for the fabric interop layer in RNTester, so we can make sure that we don't break the mechanism to add children after the view is rendered
## Changelog:
[Internal] - Add E2E test for FabricInteropLayer
Reviewed By: sammy-SC
Differential Revision: D74590458
fbshipit-source-id: 9483d1ac648d923a8494d6402b9b2f971b9b2547
Summary:
See https://github.com/facebook/react-native/issues/51212 - children aren't updated correctly in an old arch native view using the interop layer under Fabric.
This is caused by the mountChildComponentView method not updating the view, only adding the new view to a list that will be used on the next update to mount the child.
This commit fixes this by adding the same pattern as in unmountChildComponentView where children are inserted directly if the underlying paperview is available in the adapter - otherwise it uses the mounting list as before.
#Closes 51212
bypass-github-export-checks
## Changelog:
[IOS] [FIXED] - fixed adding child views to a native view using the interop layer
Pull Request resolved: https://github.com/facebook/react-native/pull/51213
Test Plan:
**Previous output**:
<image src="https://github.com/user-attachments/assets/472b95e7-0921-46c9-be6a-f31759c0cd26" width="200px" />
**After fix**:
<image src="https://github.com/user-attachments/assets/554387cd-c264-483e-9c52-d9cd40b42601" width="200px" />
Reviewed By: sammy-SC
Differential Revision: D74471278
Pulled By: cipolleschi
fbshipit-source-id: 798f9e7be389359bd6e3aa1b6a6e9fb799fcb369
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51260
This is a preparatory change that adds an example to RNTester for the Fabric interop layer on iOS.
This example is needed to create a Jest E2E tests that will make sure that the Fabric Interop Layer can properly add views as subviews.
We discovered the bug thanks to react-native-maps.
## Changelog:
[Internal] - Add Example for the Fabric Interop Layer to RNTester iOS
Reviewed By: cortinico
Differential Revision: D74579737
fbshipit-source-id: 0c1bbb06790b01313cd98aa4b7152d8aba0cded3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51225
We process a number of props by default in View, so we can provide some amount of compatibility with web API's. The way we then pass these to React means we end up setting a number of props with 'undefined' values. These props need to be diffed, sent to native (so string keys copied via JSI) and serialized to folly::dynamic (on Android) which is just wasteful.
Instead we can mutate the destructured props object and update/insert keys only as necessary to reduce the props payload size.
Changelog: [General][Breaking] View no longer sets any default accessibility props, which should not result in visible changes in behaviour but may affect snapshot tests.
Reviewed By: yungsters
Differential Revision: D74472767
fbshipit-source-id: 462a4495c0672d4bf1752a532acff49b14598e8e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51307
D72228547 added the `exports` field to the main `react-native` package, in which all imports from `./src/*` are explicitly disallowed. This was expected to be a breaking change and to limit the surface area of it, this diff will allow using all imports in jest tests.
Changelog: [General][Added] Added a custom Jest resolver to opt out from handling "exports" in tests
Reviewed By: huntie
Differential Revision: D74708701
fbshipit-source-id: 9a2714f4e6f78ffbad9e56b5bb92657c9ea908ef
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51285
The `composeStyles` function should correctly determine the type of the input styles (`ViewStyle`, `ImageStyle`, `TextStyle`) base on the output type:
```ts
const combinedStyle8: StyleProp<ImageStyle> = StyleSheet.compose(
// ts-expect-error
composeTextStyle,
composeTextStyle,
);
```
This diff adds generic type checking for `compose` function and fixes `ImageStyle` overflow prop type which accepted `scroll` property (which wasn't previously accepted in manual types) and which enables type system to distinguish `ImageStyle` from `ViewStyle` and `TextStyle`:
previous:
```ts
overflow?: 'visible' | 'hidden' | 'scroll'
```
current:
```t
overflow?: 'visible' | 'hidden'
```
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D74574293
fbshipit-source-id: 751a44f2d3cd43055d93031343995f16ef87b185
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51312
The nativeID and testID prop mapping on the native Java side use full caps `ID` in the setter mapping. Fixing the props diffing result to use the right key in the result for both.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D74724759
fbshipit-source-id: 4291a72cd3081981f4a25f16f8f2bef17230da54
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51311
changelog: [internal]
add a test case for view culling to cover a crash observed in production.
Reviewed By: lenaic, rubennorte
Differential Revision: D74720814
fbshipit-source-id: ed1246ccbaa0d0ab51a6073f20642c1c78872f30
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51310
Changelog: [internal]
Just a bit of separation between these and Fantom own tests.
Reviewed By: lenaic
Differential Revision: D74717487
fbshipit-source-id: f9d8667c823fcda7b1f3222803367c6b15d9309d
Summary:
Resolved a build error [issue https://github.com/facebook/react-native/issues/51297](https://github.com/facebook/react-native/issues/51297) caused by assigning a Boolean to a Property<Boolean>.
Switched from direct assignment to using .set(...) to correctly configure allWarningsAsErrors from project properties.
## Changelog:
- Gradle fix: assign allWarningsAsErrors using .set() for Property<Boolean>
<!-- 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] - [ANDROID] [FIXED]
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/51300
Test Plan:
Fixes build failure with React Native v0.79.2 and Gradle v8.0.
```
npm run start
npm run android
```
no more build errors
Reviewed By: cortinico
Differential Revision: D74706741
Pulled By: rshest
fbshipit-source-id: 31ec923f49a6da63fb5abb464bc38b99b1e8650a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51299
## Resubmit
This change was backed out, due to the WinUI Fabric TextLayoutManager not respecting minimum size constraints, causing early debug assert. D74494087 was confirmed to fix this.
For more safety, we limit fatal debug assertsions to `ParagraphShadowNode`, and only log a native error for other ShadowNodes.
## Original
Android's TextLayoutManager may return widths greather than the max measure constraint.
Yoga will clamp these, but this sort of issue points to a logic bug, and creates issues when we are looking at caching text measurements based on constraint reuse.
Let's debug assert that we don't do that, and fix a case of rounding up at a pixel boundary, to ensure that it doesn't go above max width. This should theoretically be safe, since Yoga is already doing this clamping, which is what dictates final size of the TextView.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D74674460
fbshipit-source-id: 807d6629bb799a3b1a55e378a3243065055ce219
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51303
We do a lot of incorrect `cei()` in text measurement, compensated later by other incorrect bits.
There are a couple of interesting bits here:
A "desired width" is how large a hypothetical text layout would like to be. It is a floating point value, and to avoid truncation, a container must be larger than the desired width. So ceiling this is correct.
We are also passed available width, which may be an exact specification, not at a subpixel boundary. Ceiling this is totally incorrect, since Yoga will disregard our ceiled version, and we just created a layout, larger than our actual measure will be.
We must instead floor `availableWidth`, and we create our layout based off of that, to not give an extra physical pixel, that may not be given to us, if later layout rounding doesn't go our way. We then ceil `desiredWidth` earlier.
Finally, when we have an exact measuremode, we create the layout so that it uses guaranteedWidth`, but act as if it takes the full available space, per-contract, which may be a subpixel size larger. This means we cannot create layouts which cause truncation.
I used this change as an opportunity to clean up `createLayout()`, since we are gating anyways, to remove the duplicated paths, and to avoid the unnecessary `TextDirectionHeuristic` work for BoringLayout case, and since `StaticLayoutBuilder` already defaults to the heuristic we are manually setting.
Changelog:
[Android][Fixed] - Fix more text rounding bugs
Reviewed By: joevilches
Differential Revision: D74685353
fbshipit-source-id: 3700df657958c6efb46bfbbe674051d16a2b7c26
Summary:
X-link: https://github.com/facebook/yoga/pull/1811
Pull Request resolved: https://github.com/facebook/react-native/pull/51298
## Resubmit
This was backed out due to being up the stack from another change that was backed out, but should be safe by itself.
## Original
We want to know if an artifact created during measurement can fully be reused after final layout, but the final layout is allowed to be slightly larger due to pixel grid rounding (while still allowing reuse). It's hard to tell after the fact, whether it is larger because of this rounding (though the measure is used), or if it may be a pixel larger for valid reasons.
We can expose the unsnapped dimensions of a node to give us this information, and to correlate measurement artifacts.
This is most of the time the same as the layout's measured dimension, though I don't think it's safe to use this, since anything else measuring the node after could clobber this (I think `YGNodeLayoutGetOverflow` may also be prone to this as a bug).
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D74673119
fbshipit-source-id: 06d2eb21e28b76458ec88f4dfcaec809707d0390
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51302
We got https://github.com/facebook/react-native/issues/51072#issue-3035616801 which demonstrates that if we have 2 text inputs on a screen we cannot blur them. If you try to blur any, focus jumps to the first one.
This seems to be a bug with Android's `clearFocus` per https://developer.android.com/reference/android/view/View#clearFocus(), this behavior is intended when we are not in touch mode, yet it happens regardless of what mode we are in on this version.
I modified this a bit to swallow `requestFocus` calls if we are in touch mode. This should be fine as no JS focus calls will go through this path. On hardware keyboard focus and focus from `clearFocus`
Changelog: [Android] [Fixed] - Fix bug where focus would jump to top text input upon clearing a separate text input.
Reviewed By: mlord93
Differential Revision: D74678847
fbshipit-source-id: 12dcaf0c9c350d3ed697ff81e8dfb205b7942119
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51257
Changelog: [internal]
Fixes the semantics for `structruredClone` when dealing with platform objects (cloning the supported ones and throwing exceptions for the rest).
Reviewed By: hoxyq
Differential Revision: D74574857
fbshipit-source-id: 71b99e9659cf3fb4bed8f431e9b54d2f9f514706
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51256
Changelog: [internal]
This is just in preparation for `structuredClone` handling the cloning (or not) of platform objects correctly.
It marks all existing Web platform objects in RN as such, and defines the clone method for `DOMRectReadOnly`, `DOMRect` and `DOMException`.
Reviewed By: hoxyq
Differential Revision: D74574856
fbshipit-source-id: 9e9647fcaafcc1d32fb36e5ee40167871572c544
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51255
Changelog: [internal]
Just a small refactor of how we handle non-serializable built-ins in structuredClone
Reviewed By: hoxyq
Differential Revision: D74398113
fbshipit-source-id: 26211920fcd4cf11c5da278e213eaa2b6b9aa1b5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51248
Changelog: [internal]
This implements an initial version of `structuredClone`, but only to be used internally (not exposed as a global yet).
The goal is to use this implementation to fix the semantics of the `detail` field in performance entries, which is meant to be cloned.
Reviewed By: hoxyq
Differential Revision: D71407320
fbshipit-source-id: c7ec1229f9c3414d8b95110da6f65828d74b8c8e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51247
Changelog: [internal]
This implements an initial version of `DOMException`, but only to be used internally (not exposed as a global yet).
The goal is to make this available to `structuredClone`, which will be added after this.
Reviewed By: hoxyq
Differential Revision: D71407318
fbshipit-source-id: b28f11542749ceef6485ff934a712eed941a4545
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51267
Changelog: [Internal]
This diff exposes the corresponding target ShadowNodeFamily to a RawEvent through a weak pointer. This is necessary for the upcoming move of pointer event interception from the JS to main thread.
Reviewed By: javache
Differential Revision: D74500630
fbshipit-source-id: 3bcf32855a004e091be64b6171dc65127375534c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51286
This bog action is not really useful. It's currently buggy and spams the user twice + we agreed it provide little value for the user.
Therefore we're removing this message for the time being.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D74645716
fbshipit-source-id: a6b8aa6aa3f3f101ad649d2590bbcb2dc80ee30a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51293
# Changelog:
[Internal] -
Indirect consequence of https://github.com/facebook/react-native/pull/50484, TSAN started to detect a data race in some configurations.
It's possible to have the data race between the `ShadowTreeRevisionConsistencyManager` being set in `RuntimeScheduler` and it being already used in the executor thread (as these things are generally done from different threads).
Differential Revision: D74651070
fbshipit-source-id: bda49371d541815119f119e6986de39c21f9b374
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51074
While working on this class I noticed there are a number of warnings. Let's clean them up.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D74001269
fbshipit-source-id: 7e86ffdaf9c82ff5a165618813fa700f8e850a74
Summary:
Follow up from https://github.com/facebook/react-native/pull/51170, static code analysis shows androidx.core.content.res.use as unused, it looked pretty harmless to remove it as there was no context about its usage, but it caused some crashes.
I'm suppressing the warning here, plus adding an explanation on why it is needed to prevent a future developer from touching this file and causing the same regression.
## Changelog:
[INTERNAL] - Suppress unused androidx.core.content.res.use warning
Pull Request resolved: https://github.com/facebook/react-native/pull/51272
Test Plan: Static code analysis should not show the import as unused.
Reviewed By: cortinico
Differential Revision: D74642726
Pulled By: rshest
fbshipit-source-id: 14cec4fe92f06827636410df4b88a3b7088abe52
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51289
Because NaN is always different from NaN, these Float props were always included in the diff when set to NaN. This checks for the specific case where both the current and the prev prop value is NaN.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D74647582
fbshipit-source-id: 7941dcc6a96bed13c2e43232606bd1f9a9179606
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51277
The number of lines prop diffing was not being updated when enabling Props 2.0 and when set through the paragraph attributes. This diff fixes the typo that was causing the bug.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D74619497
fbshipit-source-id: 2ad7d1629106ff16d511760694dcef0cafd9a96e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51276
This diff adds the Android specific props to the `getDiffProps` implementation and enables `TextInput` components for Props 2.0 use in the Fabric mounting manager
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D74610303
fbshipit-source-id: c45abf2b272f5dfb50f4f1bad256e9130a808900
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51227
Standardize error messages thrown from inspector proxy when connection is closed to debugger and link to where they are used in `react-native-devtools-frontend`
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D74484316
fbshipit-source-id: 7885bc5ea41397539814f97d764c9a376ef50eaa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51271
Deletes the feature flag that was gating the new logic to invoke Hermes GC when iOS emits a memory pressure warning.
Changelog:
[iOS][Changed] - Hermes GC is now triggered in response to iOS memory pressure warning.
Reviewed By: fkgozali
Differential Revision: D74605206
fbshipit-source-id: b0753b15f5a30f37ed17bfebff0b491c7e7a6b59
Summary:
This PR refactors the entire ReactAndroid package to replace manual `Arguments.createMap()…` and `Arguments.createArray()…` calls with the new Kotlin DSL helpers `buildReadableMap { … }` and `buildReadableArray { … }`. All eligible call sites have been migrated to the DSL, except in functions whose signatures explicitly declare or return WritableMap or WritableArray.
No runtime behavior changes are introduced; existing functionality and tests continue to pass unchanged.
## 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
-->
[ANDROID] [CHANGED] Apply Collections DSL on ReactAndroid package
Pull Request resolved: https://github.com/facebook/react-native/pull/51145
Test Plan:
```
yarn android
yarn test-android
```
Reviewed By: rshest
Differential Revision: D74401357
Pulled By: cortinico
fbshipit-source-id: 0f7b7dfbb7b495675bc4730bdf018666e9041884
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51270
I was informed that we could not reference ourselves with accessibility order when using `useID`. The reason for that ended up being because of this if statement which uses `==`. Note this worked with a normal string like `"foo"` but `useID` has ids like `"<<r0>>"` so I imagine the < and > made this break.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D74601689
fbshipit-source-id: 25adc84248fbfcaff36607d18c170e6c8000cffb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51224
Changelog: [Internal]
We have a bunch of places where we rely on implicit conversion operators of `jsi::Value` and return some primitive type.
This doesn't work well with Bridging, because currently it doesn't take into account these implicit operator conversions: primitives won't be treated as primitivies, but rather as generic `jsi::Value`, which could be many things.
We should be explicit about return type in `toJs`, because it affects the type checking logic.
Reviewed By: javache
Differential Revision: D74478571
fbshipit-source-id: 0633159c5af3a02aafe14e2b137c133d4554a5f8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51223
Changelog:
[General][Added] - Added support for bridging Class methods return types
Previously, this wouldn't work, unless you define your C++ implementation of the TM to have primitive return type that can be converted to JavaScript's type.
Reviewed By: javache
Differential Revision: D74478572
fbshipit-source-id: 75c7f589559394704446be1ebac245d38a5c4b2b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51234
Since `createAnimatedPropsHook-test.js` no longer needs to override feature flags, clean up some of the extra logic.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D74535116
fbshipit-source-id: 09dd4c5085f6ee1cbf7d87ab2b7c320119e69651
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51259
Changelog: [internal]
We recently added `Playground-itest` as a quick way to test things with Fantom without committing them.
This does the same for benchmarks, so we can quickly answer questions like:
> is `key in obj` faster than `obj[key]`?
Without having to create a new benchmark manually.
Reviewed By: yungsters
Differential Revision: D74578297
fbshipit-source-id: d86604d459f15652d0c2e1ad16a99d011a1324ca
Summary:
- Convert View implementation to React 19:
- Remove legacy `forwardRef` in favor of built-in `ref` prop.
- Use `use` API instead of `useContext`.
- Drop the extraneous `.Provider` for `TextAncestor` context.
- Remove `displayName` in favor of component name. I'm not 100% sure this is a full fallback but it is valid according to `react/display-name` eslint rule—https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md
- Based on discussion with Nicola Carti and Riccardo Cipolleschi.
- I tried using flow `component` keyword but it's not enabled in this project. Given the `react-native` package is shipped untranspiled, it's probably safer to avoid newer flow types.
- Overall matched the component style of LogBox.
- It's unclear the exact right way to type a ref since it should be optional for external users of the component but required inside the component. Erring on the side of caution and using optional types so users don't get type errors when `ref` isn't defined.
## Changelog:
[GENERAL] [BREAKING] Upgrade `View` component to React 19.
<!-- 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/51023
Test Plan: - Type checks should pass.
Reviewed By: rshest
Differential Revision: D74546184
Pulled By: yungsters
fbshipit-source-id: b8257e3a75477c1117b19cd3f8e0843947b092ca
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51246
Changelog: [General][Fixed] Fix generated types in react-native/virtualized-lists being used without opt-in
D71969602 introduces `exports` field to `package.json` files in `react-native` and `virtualized-lists`. In that diff, the `types` in `virtualized-lists` by default pointed to the new generated types without requiring the opt-in.
This fixes that by requiring the opt-in before using the generated types.
Reviewed By: huntie
Differential Revision: D74573321
fbshipit-source-id: fe05b0204a7200c1c91aac2614aa786bbbced2a5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51222
The size parameters are flattened in the source object in the Android image component. This diff converts the `size` object to `width` and `height` props directly set on the source object, fixing image source setting more than one image source.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D74477884
fbshipit-source-id: f6064b4222d5eeafd5d74f9a2044babedd1e291b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51217
Add helper method to build the prop diffing based on the BaseTextProps which are used by the Text and Paragraph props.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D74473004
fbshipit-source-id: 0ae8c0c033ee136da3b8376bd485f8926310dcd4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51230
react-native-exit-app last commit is from 2 years ago.
Removing it as it is broken with our nightly integration
## Changelog:
[Internal] - Remove react-native-exit-app from nightly testing
Reviewed By: cortinico
Differential Revision: D74527792
fbshipit-source-id: 0974b2d857aa6f76c59b0411204798a5fe48cffe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51233
Migrates internal operational and experimental feature flags to React Native's feature flag system, in order to simplify integration of other infrastructure features (e.g. Fantom).
Changelog:
[Internal]
Reviewed By: lunaleaps
Differential Revision: D74534921
fbshipit-source-id: 1559cba4f208a554bb043a203f331062036c60de
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51220
Changelog: [internal]
Just a playground file to do quick tests in the Fantom environment.
For example, I just used it to know if Hermes supports `AggregateError`, which does:
```
it('...', () => {
console.log('AggregateError', global.AggregateError);
});
```
{F1977824992}
Reviewed By: lenaic
Differential Revision: D74474870
fbshipit-source-id: cbe8a287738b09afe336ae479cc3105d1474e58b
Summary:
Flag was removed in {D74196673}, this cleans up the dynamic flag.
bypass-github-export-checks
Changelog: [internal]
Reviewed By: jackpope
Differential Revision: D74493584
fbshipit-source-id: 6ade542b7e1bd9c4367b7dbef4d2f1ec2d79d0df
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50197
Adds `setRuntimeData` and `getRuntimeData` JSI APIs. This provides a
convenient way for users to store some custom data associated with an
UUID.
For the default implementation of this feature, store the runtime data
in the global map that is shared between all VMs. This is done to keep
JSI lightweight and stateless, instead of adding data members.
Changelog: [Internal]
Reviewed By: neildhar
Differential Revision: D71579532
fbshipit-source-id: 553e28fbf80c93e268d475860197a00d2c5bacf7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50270
Add UUID struct to JSI. This will be used in the incoming changes, such
as identifying JSI interfaces and storing custom runtime data.
Changelog: [Internal]
Reviewed By: tmikov
Differential Revision: D71826382
fbshipit-source-id: e0d9bc20fb0f0e75407b9c88e731623e6a9975dd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51206
When we create a layout from measure constraints, we do some processing of the width, to return a different one, potentially smaller than the layout width, sometimes using line width, and sometimes using the container width.
This logic has gotten spooooky over time, and after a series of changes, and bugfixes, now effectively does nothing!
1. Way back in 2020, yungsters made D21056031 introducing this logic to "shrink wrap" text which is wrapped.
2. "Shrink wrapping" is not how web works when text is wrapped, (though it is how it works when there is explicit newline), and https://github.com/facebook/react-native/pull/47435 later undid this change
3. https://github.com/facebook/react-native/pull/37790 made changes specific to the case of trailing newline, because the logic to "shrink wrap" did not handle correctly.
After D74366936, which changes width used for layout creation to correctly respect `Layout.desiredWidth`, we should be back to multiline layouts, with no paragraph whose lines take up more than container width, being "shrink wrapped", while not doing so when there is wrapping or ellipsization, like current behavior. The desired width also excludes the non-visible trailing whitespace.
It means we can remove all of this logic, while preserving the same behavior. Mismatched measure widths from those used in the intermediate layout may also result in issues for Facsimile (see example in last diff of stack).
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D74368513
fbshipit-source-id: df5d7b773ad1888ebca1966ee4020a5c2ce7fd64
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51221
In the case of an empty root node, we don't need `buildStubViewTreeWithoutUsingDifferentiator` to create the initial `StubViewTree`
When testing with Fantom, this caused an additional unnecessary clone of RootShadowNode.
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D74472766
fbshipit-source-id: 076e859a6c5795e9026c7a5f8246a5658db4a94b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51214
D74381864 caused a series of crashes to spike due to .IncompatibleClassChangeError: Class 'android.content.res.TypedArray' does not implement interface 'java.lang.AutoCloseable'
This fixes it.
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D74468593
fbshipit-source-id: 70c14bdba4f229d4f59a01da3b56cd4fec29752f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51070
Changelog: [General][Internal][Breaking] When a bundle is failing to load throw an error of special type.
### Breaking
`didCompleteNetworkResponse` now throws an Error instead of throwing a string.
In dev, we use [lazy bundling](https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0605-lazy-bundling.md#__loadbundleasync-in-metro) which allows us to re-build only the parts of the app that are changed.
However the function that loads these lazy bundles in `loadBundleFromServer.js` for requests that reach `didCompleteNetworkResponse` with an error **throws a string representing the error message** which makes debugging very inconvenient because it lacks stack trace and error type. Throwing strings is not a standard practice. We better throw an error in these cases so it can be handled better.
Why a special type of error?
* As you can see in the "after", in the test plan below, even with a stack trace, it might be hard to know where this error originates from
* Also so extra information can be added on it. Currently adding "url"
* Also to support error handling based on the type of error
Reviewed By: hoxyq
Differential Revision: D73925027
fbshipit-source-id: a0f98d283ec8842696f1b87864fb63cb30c0c028
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51210
Changelog: [internal]
This adds a safety mechanism to Fantom tests to prevent LogBox from swallowing errors.
Now we validate that LogBox isn't installed when running tasks, so we can properly fix error reporting in tests.
Reviewed By: rshest
Differential Revision: D74464749
fbshipit-source-id: ef5e814b14aedbc681a4c7f9f8f60f454b239b6d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51211
Changelog: [internal]
This modifies the setup for Fantom so:
1. We don't inject "InitializeCore" by default.
2. We define a default environment setup module for Fantom with good defaults (LogBox, etc. disabled).
We also migrate all existing tests to use the new module.
The goal of this is to prevent LogBox from being used in tests so we can properly fix error propagation in the work loop (so they're not intercepted by it).
Reviewed By: rshest
Differential Revision: D69003812
fbshipit-source-id: 00353b5055e3700943a08ea67f698d49e068555b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51209
Changelog: [internal]
This refactors `InitializeCore` to extract the initialization logic to a separate configurable module.
By default, this does the same thing it does now, but the new module could be used without `InitializeCore` to set up the environment forcing disabling developer tools (e.g.: for testing in Fantom in development environments).
Reviewed By: rshest
Differential Revision: D69003811
fbshipit-source-id: ab85b10e4f21adccd8844a848d3272c407832031
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51208
Changelog: [internal]
Adding a few more test cases to make sure error handling is fixed considering these use cases.
Reviewed By: rshest
Differential Revision: D74459974
fbshipit-source-id: 9a5865a9a09dd64535b4d38307db6c30f213b45f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51197
This change adds the Package.swift file that can finally build React Native core using SPM
## Changelog:
[Internal] - Add Swift PM file to uild React Native Core using SwiftPM
Test Plan:
prepare the repo with
```
node packages/react-native/scripts/ios-prebuilds.js
```
and by downloading the ReactNativedependencies from the CI
Then open the Package.swift file in Xcode. I successfully built:
- iOS
- iOS Simulator
- Mac Catalyst
Reviewed By: lenaic
Differential Revision: D74393435
Pulled By: cipolleschi
fbshipit-source-id: 7d61ad1d09444a0c16e865062ae448ec1e7ef5ad
Summary:
After unobserve is called, the shadow node actually isn't deleted from the `targetToShadowNode` WeakMap. So, if the element is kept around, the shadow node will leak.
We suspect this doesn't happen in practice. But, still it's good to just do this cleanup, just in case.
Changelog: [General][Fixed] Fix potential leak inside IntersectionObserver
Reviewed By: lunaleaps, yungsters
Differential Revision: D74361644
fbshipit-source-id: 1a5ccce1486aa200fc7318c689bfa887f713c284
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51148
Intersection observer should not be holding on to shadow nodes.
This diff migrates the javascript infra to instead use families.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74262804
fbshipit-source-id: cc090be54f7312ce32b853ddf86567bb43e676b8
Summary:
IntersectionObserverManager now uses families to manage IntersectionObservers.
This diff just migrates its apis to family too.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D74263375
fbshipit-source-id: d2e5fda327dfc75f0f711932626643d49cb3322f
Summary:
X-link: https://github.com/facebook/yoga/pull/1809
Pull Request resolved: https://github.com/facebook/react-native/pull/51181
We want to know if an artifact created during measurement can fully be reused after final layout, but the final layout is allowed to be slightly larger due to pixel grid rounding (while still allowing reuse). It's hard to tell after the fact, whether it is larger because of this rounding (though the measure is used), or if it may be a pixel larger for valid reasons.
We can expose the unsnapped dimensions of a node to give us this information, and to correlate measurement artifacts.
This is most of the time the same as the layout's measured dimension, though I don't think it's safe to use this, since anything else measuring the node after could clobber this (I think `YGNodeLayoutGetOverflow` may also be prone to this as a bug).
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D74292949
fbshipit-source-id: 05011c66a9a9480544313eb1dfe2c46bf7742bac
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51183
D58818560 tried to deduplicate some code, but introduced an error, where we no longer correctly incorporate the width MeasureMode into the text layout that we create, instead, passing `YogaMeasureMode.EXACTLY`.
In effect, this means the Android layout created always takes up the maximum allowable space, even if content is smaller. This is later masked, because our returned measure when `AT_MOST` is based on maximum line length, and the layout is then recreated when drawing a TextView, but means:
1. Attachments may not be positioned correctly, when using a non-left-aligned paragraph alignment
2. Directly drawing the layout shows the wrong thing
Changelog:
[Android][Fixed] - Fix TextLayoutManager MeasureMode Regression
Reviewed By: rshest
Differential Revision: D74366936
fbshipit-source-id: 3eda8c716ba9790a61c2da19023e140afbb6971d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51180
Android's TextLayoutManager may return widths greather than the max measure constraint.
Yoga will clamp these, but this sort of issue points to a logic bug, and creates issues when we are looking at caching text measurements based on constraint reuse.
Let's debug assert that we don't do that, and fix a case of rounding up at a pixel boundary, to ensure that it doesn't go above max width. This should theoretically be safe, since Yoga is already doing this clamping, which is what dictates final size of the TextView.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D74291373
fbshipit-source-id: 44166f2e47323384cb00f3cf4c32f398e298a63e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51195
This change adds a script that prepares the repository by creating hard links to the header files in the `.build` folder that is also gitignored
## Changelog:
[Internal] - Add sdcript to setup the repository so that we can build it properly.
Test Plan:
run:
```
node packages/react-native/scripts/ios-prebuilds.js
```
observe the folder `.build` being created with all the files.
Reviewed By: cortinico
Differential Revision: D74393116
Pulled By: cipolleschi
fbshipit-source-id: 4951e61b49db83fbebbcc265ae025f53185fec81
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51194
This change adds an utils script to set up folders when needed.
## Changelog:
[INTERNAL] - Add utils script
Test Plan: This is tested in the next diff of the stack.
Reviewed By: cortinico
Differential Revision: D74393298
Pulled By: cipolleschi
fbshipit-source-id: db3db61ec938d2ebe5c0bf5ae0a42aa20c673bb0
Summary:
- Added multiple targets to Package.swift
- WIP: Builds up untill we need to touch files in React/Base
## Changelog:
[INTERNAL] - WIP: prebuilding using Swift packages
Pull Request resolved: https://github.com/facebook/react-native/pull/50766
Test Plan: This will be tested in a diff in the stack.
Reviewed By: cortinico
Differential Revision: D74386522
Pulled By: cipolleschi
fbshipit-source-id: 7bac3c21a362c4ef79d0104727cdd3494419012f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51174
Allows the start and end of the scrollview to be faded to different values independently by passing an object containing a "start" and "end" value to the fadingEdgeLength prop.
To support non-uniform edge lengths we use the [FadingEdgeStrength](https://developer.android.com/reference/android/view/View#getTopFadingEdgeStrength()) api to set different values for the start/end of the scrollview. The FadingEdgeStrength value is multiplied by the FadingEdgeLength value [internally by Android when drawing the view.](https://cs.android.com/android/platform/superproject/+/android15-qpr1-release:frameworks/base/core/java/android/view/View.java;l=25007)
Because the value of FadingEdgeStrength is required to be between 0 and 1, we set setFadingEdgeLength to the max value and set the smaller side as a percentage of that value.
Changelog: [Android][Added] Allow fadingEdgeLength to be set independently on the start and end of the scrollview
Reviewed By: martinbooth
Differential Revision: D74222606
fbshipit-source-id: 7010ca803cc48450ab98c2a457fdc72ff47c29d7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51167
Adding the ScrollView properties that are android specific to the common ScrollView props so that they can be diffed in a getDiffProps implementation.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D74327335
fbshipit-source-id: 8e5683d4bf7fe0f6d54d4b97f535731721c60292
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51192
The `build-types` script cannot currently resolve `react-native/assets-registry` and `react-native/js-polyfills`. This diff moves imported types from these packages to `react-native` to include them in generated types.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D74392568
fbshipit-source-id: cbce977b710f54dc53ce1b0fc080704b420490d4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51096
**Problem:** `Activity.onBackPressed()` has been deprecated and with targetSdk 36, predictive back will be enforced and the API no longer called. We need to migrate to backward compatible AndroidX `OnBackPressedCallback`.
- https://developer.android.com/about/versions/16/behavior-changes-16#predictive-back.
**Solution:**
`OnBackPressedCallback` is registered conditionally only if it is `targetSdk` 36 or greater.
If the callback in enabled, `onBackPressed()` is not called and callback is used regardless of `android:enableOnBackInvokedCallback` property in <application> or <activity> set in AndroidManifest.xml.
As a workaround callback is manually calling existing `onBackPressed()`.
This is done rather than removing onBackPressed() completely and using only `OnBackPressedCallback` as we are not sure of the impact of removing the implementation entirely. Once we determine it is safe to do so then, we should remove the workaround and fully transition to `OnBackPressedCallback`
* I also surveyed child classes extending ReactActivity for overridden `onPressedBack()` usage and found only one usage which will be handled later.
NOTE: `ReactDelegate.onHostResume()` sets up the `DefaultHardwareBackBtnHandler` using `ReactActivity` (https://fburl.com/ul47tbeo) and will be called from JS `BackHanderl.exitApp` (https://fburl.com/code/a4l2pjsw). Calling `BackHanderl.exitApp` enables predictive back to work.
Changelog:
[Internal]
Reviewed By: mdvacca
Differential Revision: D74161428
fbshipit-source-id: 2e081ba6922b315e9d1746e83a41bab5277fa62e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51136
This diff attaches doc block to ProgressBarAndroid copied from the manual TS types.
Generated types result:
```ts
import * as React from "react";
import type $$IMPORT_TYPEOF_1$$ from "./ProgressBarAndroidNativeComponent";
type ProgressBarAndroidNativeComponentType = typeof $$IMPORT_TYPEOF_1$$;
import type { ProgressBarAndroidProps } from "./ProgressBarAndroidTypes";
export type { ProgressBarAndroidProps };
declare let ProgressBarAndroid: (props: Omit<ProgressBarAndroidProps, keyof {
ref?: React.Ref<React.ComponentRef<ProgressBarAndroidNativeComponentType>>;
}> & {
ref?: React.Ref<React.ComponentRef<ProgressBarAndroidNativeComponentType>>;
}) => React.ReactNode;
/**
* ProgressBarAndroid has been extracted from react-native core and will be removed in a future release.
* It can now be installed and imported from `react-native-community/progress-bar-android` instead of 'react-native'.
* see https://github.com/react-native-community/progress-bar-android
* deprecated
*/
declare const $$ProgressBarAndroid: typeof ProgressBarAndroid;
declare type $$ProgressBarAndroid = typeof $$ProgressBarAndroid;
export default $$ProgressBarAndroid;
```
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D73855212
fbshipit-source-id: c6c09ea68c9f61f305f96c0954370bb938fc59d9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51135
In generated types default exported variables are re-declared which shadows attached tags and doc blocks. This transform moves necessary comments on top of re-declarations to keep them accessible.
Example output for SafeAreaView:
```ts
import type { ViewProps } from "../View/ViewPropTypes";
import View from "../View/View";
import * as React from "react";
declare const exported: (props: Omit<ViewProps, keyof {
ref?: React.Ref<React.ComponentRef<typeof View>>;
}> & {
ref?: React.Ref<React.ComponentRef<typeof View>>;
}) => React.ReactNode;
/**
* Renders nested content and automatically applies paddings reflect the portion
* of the view that is not covered by navigation bars, tab bars, toolbars, and
* other ancestor views.
*
* Moreover, and most importantly, Safe Area's paddings reflect physical
* limitation of the screen, such as rounded corners or camera notches (aka
* sensor housing area on iPhone X).
*/
declare const SafeAreaView_DEFAULT: typeof exported;
declare type SafeAreaView_DEFAULT = typeof SafeAreaView_DEFAULT;
export default SafeAreaView_DEFAULT;
```
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D74249424
fbshipit-source-id: 5cdd1c746e7fed99e3d3427d6ebf4c0e7ba3f3fd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51189
Changelog: [Internal]
Adds a Github action that validates that the typegen script can successfully translate every necessary Flow file to TypeScript.
Reviewed By: huntie
Differential Revision: D74390916
fbshipit-source-id: 8c6d554c8681a2b92a8b182244a329ee538d9e53
Summary:
Selectively disabling autolinking of a native dependency with components registered in the codegen configuration in react-native.config.js causes builds to crash upon launch on iOS. This is because the generated `RCTThirdPartyComponentsProvider.mm` file contains references to the excluded library using `NSClassFromString` causing the returned NSDictionary from `+[RCTThirdPartyComponentsProvider thirdPartyFabricComponents]` to be populated with nil values and therefore crashing the app. This has been confirmed in 0.78.2 and 0.79.2 but probably exists in 0.77.x as well.
The issue has been further described in https://github.com/facebook/react-native/issues/51077.
## Changelog:
[IOS][FIXED] - Skip codegen for selectively disabled libraries in react-native.config.js
Pull Request resolved: https://github.com/facebook/react-native/pull/51078
Test Plan:
1. Install a library that has the componentProvider field set in the codegen config (see reproducer) and install the iOS pods.
2. Build the app.
3. App should run successfully without any crashes.
Reviewed By: cortinico
Differential Revision: D74248371
Pulled By: cipolleschi
fbshipit-source-id: 1ff7b477ed3d94ca45616ae243d3d2d30bd897db
Summary:
Follow up from https://github.com/facebook/react-native/issues/51061 – Static code analysis detected several redundant constructs across the codebase. Most of the ones fixed here are marked as warnings/weak warnings, likely code smells post-migration from Java.
Doing another small round to clean up some of them.
## Changelog:
[INTERNAL] - Kotlin: Clean up redundant constructs
Pull Request resolved: https://github.com/facebook/react-native/pull/51170
Test Plan:
```sh
yarn android
yarn test-android
```
Reviewed By: rshest
Differential Revision: D74381864
Pulled By: cortinico
fbshipit-source-id: 25244cdf384875f7cc4e2d091c8b247710de5ecf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51162
We specify the java target version to 17 for ReactAndroid but not for hermes-engine.
This is causing it to be the default (8) which will cause our build to fail on JDK 21.
This fixes it.
Changelog:
[Internal] [Changed] -
Reviewed By: alanleedev
Differential Revision: D74325107
fbshipit-source-id: 39ba745be4fa754fb0b0408160202940a61fcd94
Summary:
Enables `DEFINES_MODULE` in `React-jsc.podspec`
After upgrading app to RN `0.79`, when installing pods with JSC enabled there is an error being thrown that
`The following Swift pods cannot yet be integrated as static libraries`
`The Swift pod 'RNFlashList' depends upon 'React-jsc', which does not define modules. ...`
when installing packages that use Swift
## Changelog:
[IOS] [CHANGED] - enable `DEFINES_MODULE` in `React-jsc.podspec`
Pull Request resolved: https://github.com/facebook/react-native/pull/51160
Test Plan: RNTester runs and builds correctly
Reviewed By: huntie
Differential Revision: D74325357
Pulled By: cipolleschi
fbshipit-source-id: b994b7e678633440d5e362ae6965b2d5188d34f1
Summary:
Switches to use the version imported through diff train for `eslint-plugin-react-hooks`. This should allow us to finally use component syntax in RN.
bypass-github-export-checks
Changelog: [internal]
Reviewed By: yungsters
Differential Revision: D74203162
fbshipit-source-id: d9ea17e5c6533e8df0889404a7f7798f6f5061c0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51138
The co-opting logic failed to account fo the case where the entire text view as a link and therefore turns off ax. In this case I think it makes sense to re-focus that element again so the user can interact with the link.
Changelog: [Internal]
Reviewed By: jorge-cab
Differential Revision: D74262675
fbshipit-source-id: c8d11cdff76cd92170581d167d5a8df64d0dd101
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51155
changelog: [internal]
we have experienced breakages where we stopped propagating accessibility prop to the mounting layer. These tests should catch it.
Reviewed By: fabriziocucci
Differential Revision: D74317767
fbshipit-source-id: 72c6d8c788afe3a9d4d41f7cfc0aa37605b20b6a
Summary:
Static code analysis detected several missing `ReplaceWith` on deprecated methods. This diff addresses some of them by adding the most accurate suggestions based on the implementations.
## Changelog:
[INTERNAL] - Add missing ReplaceWith on deprecations
Pull Request resolved: https://github.com/facebook/react-native/pull/51144
Test Plan:
```sh
yarn android
yarn test-android
```
Reviewed By: fabriziocucci
Differential Revision: D74327121
Pulled By: javache
fbshipit-source-id: 5b338531210bef104208d14cbd0e3320dc566b8e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51157
test-js jobs are failing because the codegen snapshot tests generates a Podspecs withan hardcoded version that does not matches the version we are about to release.
This fix updates the script that set the RN version to make sure it also updates the Codegen snapshots.
This is a porting to `main` of [this PR](https://github.com/facebook/react-native/pull/51156).
## Changelog:
[Internal] - Fix set-rn-version to account for codegen snapshot test files
Reviewed By: fabriziocucci, cortinico
Differential Revision: D74321590
fbshipit-source-id: 6837e60a0a2834030680f7ec0c7584bf2622f33e
Summary:
When testing the release by running the `test-e2e-local` for RNTester on iOS, the script sometimes fails because it expect to have codegen properly built before running the app.
This fix makes sure we build the codegen package.
## Changelog:
[Internal] - Fix building the codegen
Pull Request resolved: https://github.com/facebook/react-native/pull/51130
Test Plan: Tested locally
Reviewed By: fabriziocucci
Differential Revision: D74248031
Pulled By: cipolleschi
fbshipit-source-id: 319f3332c616f7118b673fb7acb63c2e15946b2c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51151
changelog: [General][Deprecated] - deprecate type aliases ShadowNode::Unshared and ShadowNode::Weak in favour of std::shared_ptr<ShadowNode> and std::weak_ptr<ShadowNode>
migrate away from using these type aliases to avoid confusion.
It is unclear from ShadowNode::Unshared what it means. This can be avoided by using std::shared_ptr<ShadowNode> directly. The same applies to ShadowNode::Weak.
Reviewed By: rubennorte
Differential Revision: D74245228
fbshipit-source-id: f22a18e87f170e46f5079e0ee7678700a3f5f623
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51149
Changelog: [internal]
This replaces the use of `ShadowNode` with `ShadowNodeFamily` in the `MutationObserver` logic to prevent retaining stale subtrees of the nodes being observed.
It refactors some existing logic so we don't need to keep track of the shadow nodes in JS. It was only used to be able to find the node for a target after unmounted, so we could "unobserve" it, but `MutationObserver` doesn't support unobserving individual targets anyway, so we removed that use case and implemented a more general `unobserveAll` method that doesn't require the shadow nodes in the first place.
Reviewed By: javache
Differential Revision: D74240834
fbshipit-source-id: 6d4c43a561780962874c76615fb53369c0c68cf7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51128
Changelog: [internal]
Just a minor refactor of a method in `MutationObserver` which was doing some redundant work that could be avoided.
Reviewed By: javache
Differential Revision: D74247437
fbshipit-source-id: 510d26f2a315582df9cddc215bf516d3d4ebd341
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51133
Changelog: [internal]
Having a single native module with all the test-specific functionality that we need in native in Fantom is just more convenient.
Reviewed By: rshest, huntie
Differential Revision: D73997209
fbshipit-source-id: 5d3aa69a2c799166a1351fbff3e80e4396cec9c6
Summary:
Static code analysis shows that there are a lot of unresolved KDoc references. This is just another round addressing several of them.
## Changelog:
[INTERNAL] - Fix unresolved KDoc references
Pull Request resolved: https://github.com/facebook/react-native/pull/51142
Test Plan: Verify that the comments link the classes correctly using Android Studio.
Reviewed By: rshest
Differential Revision: D74305933
Pulled By: javache
fbshipit-source-id: f512a33fa5da46fb828bb76bd95d9502261ea08a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51141
This diff introduces ReactSoftExceptionLogger.CategoryMode to limit categories used on soft errors, the limiation will only create a lint warning but won't create a compilation error.
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D74263367
fbshipit-source-id: 56fb2ef0ad3d24810172af300e43ecc1f479464f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51089
Currently, `IntersectionObserver#observe` retains a reference to the `ShadowNode` of the view that is supplied as an argument, which is used to compute intersection whenever a shadow tree is committed.
However, the `shadowNode` includes all of child nodes and state at the time that `IntersectionObserver#observe` is called. This means that an active `IntersectionObserverEntry` will retain references to memory that would otherwise be deallocated (e.g. if children of the observed view are unmounted after `IntersectionObserver#observe` is called).
This diff refactors `IntersectionObserver` to instead retain a reference to the `ShadowNodeFamily`, which does not retain references to child nodes and still eanbles `IntersectionObserver` to compute intersections.
Changelog:
[General][Changed] - Fixed `IntersectionObserver#observe` to avoid retaining memory for unmounted child nodes of observed views.
Reviewed By: RSNara
Differential Revision: D74130479
fbshipit-source-id: 6b581f73f06b93e6463d5004c181c39aae13896a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51118
changelog: [internal]
1. `ConcreteState` and `State` were taking shared_ptr to family even though they only use weak_ptr.
2. `ConcreteState` was taking a const& to `data`. It unconditionally takes ownership of data, make it obvious in the interface.
Reviewed By: lenaic
Differential Revision: D74024980
fbshipit-source-id: 22401d4153588861f3edd04af0bdc7213a8056ac
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51121
Previously could match via the `"./*"` subpath when `"react-native-strict-api"` is not set. Only the entry point `./types_generated/index.d.ts` should be exposed.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D74242716
fbshipit-source-id: 232c90f34fafe8fdf1a5a7ef1fec4acc191525b4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51101
TS LSP suggests importing/using components from `types_generated` directory which are exported under slightly different name than root exports. Prefixing default exports with `$$` fixes the issue.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D74177107
fbshipit-source-id: 86a6869c2aa7a113915184e4857a7882710b1db4
Summary:
When building the RNDependencies XCFrameworks we saw some errors in the CI servers about rsync failing:
`rsync(3031): error: poll: hangup on nonblocking write`
We decided to fix this by changing from using rsync to cp.
This commit fixes this by replacing rsync with cp, and adding a cleanup step after copying the XCFramework files.
## Changelog:
[INTERNAL] [FIXED] - Replacing rsync with cp, and adding a cleanup step after copying the XCFramework files.
Pull Request resolved: https://github.com/facebook/react-native/pull/51095
Test Plan: Run RNDependencies scripts on CI and verify that they're working as expected.
Reviewed By: fabriziocucci
Differential Revision: D74236114
Pulled By: cipolleschi
fbshipit-source-id: accd84abf7601919cfdbc1b6a8681a61d4293ca5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51112
Throw if getCatalystInstance() is executed when running on bridgless mode + legacy arch minification
This should be safe given that all the methods of BridgelessCatalystInstance throw exceptions
changelog: [internal] internal
Reviewed By: alanleedev
Differential Revision: D74200099
fbshipit-source-id: a888061250f19348a22895c3684aa2333280c916
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51111
BridgelessCatalystInstance is unused in bridgeless, any usage will lead to an exception / crash.
This diffs marks BridgelessCatalystInstance as LegacyArchitecture and removes DoNotStrip annotation to enable further optimizations
changelog: [internal] internal
Reviewed By: alanleedev
Differential Revision: D74200097
fbshipit-source-id: f99b6fa74c30bdf0e1cd6758e223601b3ce5826c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51088
Creates `ShadowNodeReferenceCounter`, a module with utilities for writing Fantom tests that make assertions about the reference count for a `ShadowNode` object.
Changelog:
[Internal]
Reviewed By: lunaleaps
Differential Revision: D74131710
fbshipit-source-id: a949a402ee52f40445ce99c712540e80c8a05065
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51065
This adds infrastructure to let us start storing cached Android text layouts as part of a `ParagraphShadowNode`. After this, we will clear them out, and propagate them to state. Right now, the flag doesn't do much, apart from extra work.
This is done by adding `TextLayoutManagerExtended::supportsPreparedLayout()`, and `TextLayoutManager::PreparedLayout` types, to shim between platforms, then on Android, we add a `PreparedLayout`, which is for now just an Android layout, with extra field (`maxNumberOfLines`, for some reason not exposed on recent versions).
Android `TextLayoutManager` java side is split a little bit, so that we reuse all the existing logic for prepared layouts. I tried to set up the boundary, so that we don't reserialize a MapBuffer after preparation, and for simplicity, this means source of truth for attachment count, and attachment sizes, now lives on the layout. This means we need to change boundary a bit, where we are no longer able to pass in a buffer to fill from C++ side of attachment positions.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D73970149
fbshipit-source-id: ff71c227e062c16fe52a4eb3ba2acbebf3d96e56
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51107
Changelog: [iOS][Deprecated] Deprecate loadImageForURL in favor of new signature which uses completionHandlerWithMetadata
Updating the signature of completionHandlerWithMetadata to allow passing metadata through the completionHandlerWithMetadata in order to enable better instrumentation of image loading.
Reviewed By: philIip
Differential Revision: D73162738
fbshipit-source-id: 8e7e4ac35c9685a362a2efe08ebebbf0dd249ff9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51108
We calculate the width of text to be the full width of the container, if the text overflows the bounds of the container, instead of the wrapped width, to match the behavior on web.
Incorporating line count into layout defeats this logic, since the final layout never overflows. We need to also check to see if we are ellipsized (had overflow) instead.
Changelog:
[Android][Fixed] - Assume full container width when ellipsizing line
Reviewed By: joevilches
Differential Revision: D74204041
fbshipit-source-id: 1c2a7fc50f101bd4c9ed2f979534731992b5310b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51106
There was a strange bug reported to us with `accessibilityOrder` where an OCR model would announce text on the screen sometimes. This would happen if a focused `View` without a label would wrap `Text` that was was not included in the `accessibilityOrder` array. What happens under the hood is we have a focused `View` trying to coopt a label. It finds no accessibility nodes under it (because the `Text` has `importantForAccessibility` set to `NO`) so it falls back to this weird TalkBack behavior. It both reads the text from the TextView and announces an OCR announcement - leading to repeating the text.
To fix this we just check if we are going to coopt text and if we do then we do not set `importantForAccessibility`. Behavior here changes a bit. Links are not accessible without having to reference the Text, setting `accessible={true}` on non-referenced `Text` will lead to be focusable.
These are both less bad than what we had before though, so I think this tradeoff is fine.
Changelog: [Internal]
Reviewed By: jorge-cab
Differential Revision: D74101530
fbshipit-source-id: 0678915efdc46a6273f79927b87f22bc9017814a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50997
In some apps, we spend a non-trivial amount of time calling ShadowNode destructors on the UI thread.
A simple way to avoid stalling the UI thread is to move the `baseRevision_` instance to a data structure that is cleared on a background thread, so it's tree of ShadowNode shared_ptrs are released (and in most cases destroyed) on the background thread.
Rather than using std::thread, this change introduces the LowPriorityExecutor abstraction that should be supplied by host platforms. The implementation of this LowPriorityExecutor for each platform is as follows:
- iOS: uses dispatch_async to a low priority dispatch queue
- Android: uses a pthread with SCHED_OTHER and priority = 19
Moving the ShadowTreeRevision into a lambda capture and punting the lambda to the LowPriorityExecutor moves the destructor calls of the ShadowNodes to the host platform implementation of the LowPriorityExecutor.
This change is also guarded by a feature flag so we can keep an eye out for potential memory leaks.
## Changelog
[Internal]
Reviewed By: NickGerleman
Differential Revision: D73688009
fbshipit-source-id: 6a66da248e6fe5c38375bf026499346e8381e75a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51018
`ReactNativeTypes` deep imports `MeasureOnSuccessCallback`, `PublicInstance`, `PublicRootInstance` and `PublicTextInstance`. The `MeasureOnSuccessCallback` type is already root exported, `PublicInstance` is exported as `HostInstance` and there are two types left to export to root import all of them from react-native. This is needed for `simpleResolve` to properly resolve and build types located in `ReactNativePrivateInterface`.
This cannot be fixed on the resolver level because that would also involve change in the `exports` field in `package.json` to enable types resolution for deep paths which should be strict by design.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D73926160
fbshipit-source-id: 3a711a0f002ea42d9ad538c07ec00f22cc4afb6b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51091
Fix for top padding with Android edge-to-edge (default for current version of the RN template). We add a `statusBarHeightOffset` explicitly, since this is not covered by the builtin `SafeAreaView`.
{F1977676990}
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D74142357
fbshipit-source-id: 6d70db43d8b80b7e3d2d4b598e29560efa046b5c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51066
Splits up some of the `measureText` code in Android TextLayoutManager, ahead of D73970149, which adds `measurePreparedLayout` to reuse most of this logic. Most significant change, is we pull out logic to iterate and retrieve metrics for attachments, since `measurePreparedLayout`, needs to also return dimensions, and fill into ArrayList, instead of received buffer.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D74035246
fbshipit-source-id: 2a0f5b171c4343e26ffa5b2538a0018939b06773
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51055
When clipping to the padding box without a background or border set, we should default to clipping to the drawing rectangle.
This ensures accurate clipping behavior when there is no background or border set. This is because it seems bounds accommodates the contents of the drawables but when no content is present (either a background or a border) the bounds are 0. In which case we want to rely on the drawing rect instead of the bounds for this edge case.
Changelog: [Android][Fixed] - Fix incorrect clip to padding box on new Background and Border drawables
Reviewed By: NickGerleman
Differential Revision: D74014372
fbshipit-source-id: bd5a496db6de44c4185760ed72b3013d9f2faa00
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51039
We added a feature flag in case this broke things. Its been about 4 months now with now issues, I think we can clean this up.
Changelog: [Android][Fixed] - Can now focus TextInput with keyboard
Reviewed By: NickGerleman
Differential Revision: D73954790
fbshipit-source-id: 4682cf709aa2f34ba69e76a35d07a908edb28f23
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51053
unstable_hasComponent(component) first registers the component with react native, if possible. Then, it returns you whether registration succeeded.
## Problem
For unregistered components, the initial call returns false. But, all subsequent calls return true.
The reason why: After the initial call fails, react native registers unimplemented view under that component name. So, all subsequent calls return true.
## Solution
Just record the initial loopup result. And always return that initial lookup result from this method.
Changelog: [iOS][Fixed] Fix bug: unstable_hasComponent(*) = true for unregistered components for n > 1th call.
Reviewed By: yungsters, cipolleschi
Differential Revision: D73949864
fbshipit-source-id: ac5b6fc373cb1b2436045ae1f78391f0712bca17
Summary:
This is an automatically generated fixup patch to bring fbsource back into sync with
facebook/react on GitHub. Please land this patch as soon as possible, as the difference
reflected on here is already on GitHub and future changes may depend on these
changes!
Changelog: [Internal]
<< DO NOT EDIT BELOW THIS LINE >>
diff-train-skip-merge
Generated by: https://www.internalfb.com/intern/sandcastle/job/22517999956752681/
GitHub Repo: facebook/react
Reviewed By: kassens
Differential Revision: D73844457
fbshipit-source-id: 840a8448839992538427cd52501cdfaf0a2e82da
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51062
Document logic implemented in ComponentDescriptorRegistry when a component is not found
changelog: [internal] internal
Reviewed By: arushikesarwani94, cortinico
Differential Revision: D74036572
fbshipit-source-id: 20a5d182e0308538cdfa3f5e97957d488f010f0d
Summary:
This PR introduces a concise Kotlin DSL for constructing `ReadableMap` and `ReadableArray` in Android native modules:
- Adds `buildReadableMap { … }` and `buildReadableArray { … }` functions, modeled after Kotlin’s `buildMap`/`buildList` APIs.
- Wraps `Arguments.createMap()` / `Arguments.createArray()` in a type-safe, nested DSL to reduce boilerplate and prevent errors.
- Improves readability and maintainability when assembling nested map/array structures for React Native bridges.
Current code like:
```kotlin
val map = Arguments.createMap().apply {
putString("name", user.name)
putInt("age", user.age)
// …
}
```
can now be written as:
```kotlin
val userMap = buildReadableMap {
put("name", user.name)
put("age", user.age)
put("scores") {
user.scores.forEach { add(it) }
}
}
```
This feature proposal also written in [[Android] Support Collection DSL](https://github.com/react-native-community/discussions-and-proposals/issues/899)
## Changelog:
[Android] [Added] - Collections DSL functions for Kotlin(`buildReadableMap`, `buildReadableArray`)
Pull Request resolved: https://github.com/facebook/react-native/pull/51042
Test Plan:
### Run Unit Test
```shell
cd packages/react-native/ReactAndroid
./gradlew :ReactAndroid:unitTest
```
Ensure all tests in `src/test/java/.../ReadableMapBuilderTest.kt` and `ReadableArrayBuilderTest.kt` pass.
Reviewed By: javache
Differential Revision: D73986390
Pulled By: cortinico
fbshipit-source-id: b9f94327646bcb6e0190cdd06dfb9bb5eaa6375c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51079
This test was not using AssertJ. I've updated it then.
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D74065455
fbshipit-source-id: 2393340fd75aaf9599ba789237c29bb91e0192ae
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51025
(Sparsely) wires up reporting of Network events to the Web Performance subsystem.
Our plan is to report to the Web Performance APIs (lightweight timing metadata, here) for all build flavours, and report to CDP (more costly full metadata/previews) in dev/profiling builds.
**Notes**
- Introduces `PerformanceEntryReporter::unstable_reportResourceTiming` — this will become "stable" when further network events/fields are fully hydrated on Android and iOS.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D73922341
fbshipit-source-id: bcfc03c3d8a9a286ae72ba00a3313602fb2adea8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51046
This small change improves the cleanup script for ios, which is now not deleting the workspace and that it might be keeping an outdated version of the codegen for OSS.
## Changelog:
[Internal] - Improve yarn clean-ios script
Reviewed By: cortinico
Differential Revision: D73988442
fbshipit-source-id: 6de5d6ab08812ba7fdb19b0cc955a38840d82f89
Summary:
Static code analysis detected several redundant constructs across the codebase. Most of the ones fixed here are marked as warnings/weak warnings, likely code smells post-migration from Java.
Doing a small round to clean up some of them.
## Changelog:
[INTERNAL] - Kotlin: Clean up redundant constructs
Pull Request resolved: https://github.com/facebook/react-native/pull/51061
Test Plan:
```sh
yarn android
yarn test-android
```
Reviewed By: rshest
Differential Revision: D74056259
Pulled By: javache
fbshipit-source-id: 04f7ce7ce7b4f6063c8e1712840a44fd91d3b9e1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51073
Currently the SampleLegacyModule screen is not loading in OldArch for RNTester.
That's because we gate adding a `SampleLegacyModule` to the BaseReactPackage
only if NewArch is enabled.
This shouldn't be the case as we can still build RNTester in oldarch and we
should be able to visualize the SampleLegacyModule example.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D74009245
fbshipit-source-id: 55eae3dc6063343f57261af2742e643a8e5c2b50
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51050
Gate network event reporting on iOS (inputting into the network reporting subsystem), now that this is load-bearing with the Performance API.
Changelog: [Internal]
Reviewed By: vzaidman
Differential Revision: D73995864
fbshipit-source-id: 65a15485cdae445eadff6c57148f3682af6de215
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50995
Refactors our previous single-struct representation for `PerformanceEntry` ([see MDN](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry)) as a `std::variant`.
This maps closely to the `PerformanceEntry` type inheritance in the web spec, and makes this type substantially cleaner to extend and work with in D73861431.
Changelog: [Internal]
Reviewed By: rubennorte, rshest
Differential Revision: D73860532
fbshipit-source-id: f3b7a7444d2456370620c1a1ba9a43f118cb9730
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51044
This change prevents RN from accessing the MainBundle every time a NativeModule is registered by caching the `legacyLogEnabled` property in a static variable.
## Changelog:
[Internal] - Prevent multiple access to mainBundle
Reviewed By: javache
Differential Revision: D73992070
fbshipit-source-id: a14aada43f367314b7f868a0b5e30b9f92d0971a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51064
This is pretty much just checked in printf debugging. Let's clean it up, before we duplicate some code which has the logs.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D73975310
fbshipit-source-id: d2b936ad62a17aef20903fd2ca0defc23c647aa0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51040
## Resubmit
We were previously only checking for `maxNumberOfLines` of `ReactConstants.UNSET` (-1), but it may also be `0` to signify unset from other checks (wut), and different versions of Android would handle this case of `maxLines={0}` differently.
The resubmission adds an explicit check for zero here as well.
```
if (ReactNativeFeatureFlags.incorporateMaxLinesDuringAndroidLayout()) {
if (maxNumberOfLines != ReactConstants.UNSET && maxNumberOfLines != 0) {
builder.setEllipsize(ellipsizeMode).setMaxLines(maxNumberOfLines);
}
}
```
## Previous
Right now, we fully layout text, then use max lines to determine a metric to use when calculating size.
Android API 23+ which we fully target allows incorporating ellipsization and maxlines directly into the layout. This will let us directly draw the layout when using maxLines later. This may also let Android optimize line-breaking a bit, when we hit truncation.
Special care is taken not to set this when we are in `adjustsFontSizeToFit` path, so that line count will flow over, signifing overflow.
I think the main user-facing change is that `onTextLayout` events will have measures post-ellipsization.
Changelog:
[Android][Changed] - Incorporate maxLines and ellipsization into text layout
Reviewed By: lenaic, joevilches
Differential Revision: D73953691
fbshipit-source-id: 2e08faab5bb9eda90a126545571bb441ea1ece39
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51037
## Changelog:
[Android] [Changed] - Make mHybridData in CxxReactPackage protected
In some cases subclass needs to override it in constructor
Reviewed By: javache
Differential Revision: D73894471
fbshipit-source-id: 7958f9b88841a0201d39e49fba09af76927e5737
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51019
Follows D72228547 and D73770609.
This diff internalises (moves files from fbsource+GitHub to fbsource only) a number of RNTester examples which referenced `'react-native/src/private/'` subpaths.
In future, new components/APIs should be exported from index as `unstable_`, or added to `RNTesterListFbInternal` if they are exported from `src/fb_internal/`.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D73777092
fbshipit-source-id: d9fb0833c56f2ae580b6db62ddbbbeae774a0004
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51043
The call to the mainBundle to read the `RCTLegacyWarningsEnabled` key can sometime deadlock in prod.
However, these are development logs that we don't want to run in Prod.
This change should disable the logs in prod, skipping the access to the `mainBundle`, and avoid the deadlock completely.
## Changelog:
[Internal] - Fix deadlock at startup to read `RCTLegacyWarningsEnabled`
Reviewed By: philIip, javache
Differential Revision: D73987454
fbshipit-source-id: 014410266733fdfa1e7b29d41fab5f7112b1ddb4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50914
The URL spans generated by Linkify are not actually accessible because we do not update the delegate's virtual views.
I also had to change how AccessibilityLinks get generated, since it does not work well if it includes spans that are not `ReactClickableSpans`
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73612119
fbshipit-source-id: 0c6028a7473e0484216300863f2d7a043fb2ea85
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50887
There is currently a bug with the recent changes to keyboard accessibility with Text and nested links. If something with nested links has a `dataDetectorType` prop then we have 2 different selections when we navigate with arrow keys since the drawing behind the 2 are separate.
Removing LinkMovementMethod is not possible since it allows for clicking the links it detects
As a result, lets just allow it to take precedence over the delegate when handling link navigation in the cases its present.
Changelog: [Android][Fixed] - Double selection with dataDetectorType and links
Reviewed By: NickGerleman
Differential Revision: D73549839
fbshipit-source-id: bbe37470e78841bb119fa68e197b327023031c7e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51029
# Changelog: [Internal]
Instead of exposing vector of samples / call frames directly, we will share pair of iterators that would allow iterating over them in a specified order.
Reviewed By: dannysu
Differential Revision: D73448002
fbshipit-source-id: 16c476453e943a71403b375b168b30da7d261cfa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51028
# Changelog: [Internal]
There is a way to implement the trie without allocating `ProfileTreeNode` on the heap. The serialization logic (`RuntimeSamplingProfilerTraceEventSerializer.cpp`) remained mostly the same, the only new limitation is that we can only use pointer to `ProfileTreeNode` until the next push into a `children` container, when all pointers are invalidated. Not sure if we can avoid this invalidation, since we don't know the potential size of `children` vector, it has to be dynamically allocated.
Main changes are in `ProfileTreeNode`:
- Instead of receving already created instane that will be check if it should be added as a child, it will expose predicate to check if such node already exists - `getIfAlreadyExists`. If not, then caller can use `addChild` to register it and receive a pointer.
Reviewed By: huntie
Differential Revision: D73213284
fbshipit-source-id: 385be884bcc5feb61b3a8cbd0ff36402e3b20c6c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50847
# Changelog: [Internal]
We have different types of call frames, right now we defined 4 of them. Previously, they would descend from `ProfileSampleCallStackFrame`, which has `kind_` field that can be used for determining the type of the call frame.
We were using polymorphism later on React Native side to cast from base type to derived.
Instead of this, and instead of doing heap allocations for potentially tens of thousands of objects, we will use std::variant for storing frames in a single container and them distinguishing them.
This fixes memory leaks caused by new-ing objects and not clearing out when Profile is destroyed.
Reviewed By: dannysu
Differential Revision: D72803934
fbshipit-source-id: a279c6d68c7c2628f0eab585f33137222ad9e3f1
Summary:
The `Object.assign` support is [inherently unsound](https://github.com/facebook/flow/issues/3392), carries a lot of tech debt, and we want to error on them.
This diff pre-suppresses errors that will be added in the next version of Flow, to make the next release easier.
Changelog: [Internal]
Reviewed By: panagosg7
Differential Revision: D73963639
fbshipit-source-id: ebefc82c123588eb0b72ab48a24e45c42be33267
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51035
This is causing some problems with older versions of Android. Let's back out for now.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D73950625
fbshipit-source-id: 424dfc1216ae811e1e287774c6ac5d0c9ba5aa17
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51004
It would be very convenient if `accessibilityOrder` could reference itself. Meaning the View with the `accessibilityOrder` prop can include its own `nativeID` in the array. This makes sense API wise - we allow for referencing parents and their descendants, so long as they are treated as an element and not a container. This is pretty nice since you no longer have to wrap everything in a View who's sole purpose is `accessibilityOrder`.
Under the hood things get a bit garbled, however, since iOS only lets you have UIViews that are either accessibility elements or accessibility containers - and we need to support both at the same time for this to work. To do this, we make use of the `UIAccessibilityElement` class and just forward all of the logic to the View with the `accessibilityOrder` prop. This View will also not be an accessibility element from the point of view of iOS.
Changelog: [Internal]
Reviewed By: jorge-cab
Differential Revision: D73792934
fbshipit-source-id: b0810277c8e410319639b863b59e4e60782bffca
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50925
This crashes without this change, now it does not!
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73626930
fbshipit-source-id: 37fd99372d1781a9e895e854e8b2f75c568ef9c0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51027
Simple change to make the host of `experimental_accessibilityOrder` include the view that hosts the property in its order.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D73808337
fbshipit-source-id: 441329a6ca0cd4b0aba08bddb15143215d337e01
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51014
Starting from the [24th of April](https://developer.apple.com/news/upcoming-requirements/?id=02212025a), Apple only accepts app built with Xcode 16.0 or greater
This change bumps our CI to ensure that everything works with Xcode 16.
## Changelog:
[Internal] - Bump CI to Xcode 16.2
Reviewed By: javache
Differential Revision: D73924819
fbshipit-source-id: 82cdca5e12cee505de6e97513c07678776642d88
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51022
As per title, it bumps maestro to 1.40 in CI
## Changelog:
[Internal] - Bump Maestro to 1.40
Reviewed By: cortinico
Differential Revision: D73929936
fbshipit-source-id: 7dfd974a0d1227520c5a6892ff4f157633fdbd54
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51013
There's no need to use a singleton pattern here, we can just use a Kotlin object.
Changelog: [Android][Removed] Deprecated `ResourceDrawableIdHelper.instance`
Reviewed By: Abbondanzo
Differential Revision: D73923281
fbshipit-source-id: f46e125ce595fe4506b9fb5aa471109f5ba150f0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50998
I'm reverting this as this change is too disruptive for the OSS ecosystem.
It will break ALL the apps written in Kotlin and it's coming too close to the branch cut which is in less than one week.
We need to re-do this migration in a non breaking manner after the branch cut as this is highly disruptive for little benefit at this point
Changelog
[Android][Changed] - Back out "[RN][Kotlin] Migrate ReactActivity"
Original commit changeset: 936263100ca9
Original Phabricator Diff: D73507044
Reviewed By: mdvacca
Differential Revision: D73864144
fbshipit-source-id: 264921b1f1cd38301e66364de4b619807272bd27
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51006
Moves a bit of code, reading spans that we may not control, to query for `Spanned`, instead of `Spannable`, since some code (see last diff around ellipsization) may wrap intermediate Spannables.
Changelog: [internal]
Reviewed By: joevilches
Differential Revision: D73820368
fbshipit-source-id: e107bcf1f2f7d5555fca68fb2209c12c3f99c099
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51007
Right now, we fully layout text, then use max lines to determine a metric to use when calculating size.
Android API 23+ which we fully target allows incorporating ellipsization and maxlines directly into the layout. This will let us directly draw the layout when using maxLines later. This may also let Android optimize line-breaking a bit, when we hit truncation.
Special care is taken not to set this when we are in `adjustsFontSizeToFit` path, so that line count will flow over, signifing overflow.
I think the main user-facing change is that `onTextLayout` events will have measures post-ellipsization.
Changelog:
[Android][Changed] - Incorporate maxLines and ellipsization into text layout
Reviewed By: joevilches
Differential Revision: D73811573
fbshipit-source-id: df83295d0902ae8b043ce57b06cbb9c8f0c194fc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51005
We need to get a context corresponding to the root being passed, to be able to resolve things like theme to use. RIght now that's a TODO, that's been around since new arch. Let's pass the real data along.
Changelog:
[Android][Fixed] - Correctly Pass SurfaceID to TextLayoutManager
Reviewed By: javache
Differential Revision: D73819640
fbshipit-source-id: 1ae2505b59b8577d35a4dc5bb2a524663f3bd47f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50889
This effectively reverts D67064488
We are trying to smash together functions, variables, virtual or non-virtual, all required by different platforms, into a single header, often using #ifdefs that are not what we want (apart from a bad editor experience, `#ifdef ANDROID` may or may not be compiled into the react-native-cxx platform, and we cannot use it for the Android platform reliably).
For Facsimile, we are going to be introducing more potential divergence, with the idea of `PreparedText`, where we can generate intermediate products as part of the layout process to be reused later. I'm planning to design that in a way which can be eventually reused across platforms, but not everywhere.
I think the best path for this is going to be to allow each platform to have their own headers, instead of the current messiness, then allow shared code (e.g. in `ParagraphShadowNode`) to pick how to interact at compile time. I added an example of this as part of `TextLayoutManagerExtended`, to customize how we act if a `TextLayoutManager` chooses not to implement `measureLines`.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D73557126
fbshipit-source-id: 9851ebba691b0d123f6a355126f2d5b003aceba0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50970
__onAnimatedValueUpdateReceived is called from 2 places.
It is called from the onAnimatedValueUpdate subscription where the source of the values comes from here: https://fburl.com/8v2cwd2x with getValue() returning the offset + value components combined.
It's also called from in the animation end callback here: https://fburl.com/h36xy2nw where the source of this value comes from https://fburl.com/sud7m7st. In this case it's accessing `nodeValue` directly rather than calling getValue() and so it only includes the value component.
In this diff we pass both the value and offset in both onAnimatedValueUpdate callbacks as well as endCallback.
This allows us to separate the value from the offset on the JS side and ensures we have the latest offset value from native
Changelog: [Android][Fixed] - Sync offset and value from native -> js in separate fields
Reviewed By: zeyap
Differential Revision: D73795619
fbshipit-source-id: e8ed234497e3fcaf9d2a137aa1e17ca8d0f76d97
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51000
changelog: [internal]
# Why so many tests?
Differentiator has two modes: regular and reparenting. The reparenting one is almost a completely separate Differentiator, effectively doubling the complexity. It handles quite a few different special cases and is not covered by any reasonable tests, so here I am adding the tests to make sure every branch of the reparenting Differentiator is traversed.
Reviewed By: lenaic
Differential Revision: D73845746
fbshipit-source-id: 27a9fd72a5f8111b84e231cf8f495e278037a323
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50971
This feature flag enables a fix of double measurement on a subset of android components
changelog: [internal] internal
Reviewed By: yungsters
Differential Revision: D73804996
fbshipit-source-id: 3271deb8a8bf4c132cbfb6819f72cab556c6253c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50985
# Changelog: [Internal]
There may be tens of thousands of samples stored, so we should avoid copying it. I don't think we should restrict it from being copied, though, but we don't need it to copy in this case.
Reviewed By: huntie, dannysu
Differential Revision: D73106950
fbshipit-source-id: 45c027ea8bfc3424fe3428f5578d5bed3d1cdda9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50984
# Changelog: [Internal]
We are only using these struct to define how they will be serialize before sending over CDP, no need for custom constructors.
Also updated the naming of the serialization method to align with other parts of the project: `asDynamic()` -> `toDynamic()`.
Reviewed By: huntie
Differential Revision: D73774114
fbshipit-source-id: d0371cf3dee7584daa77054f73aced440550e674
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50988
Changelog: [internal]
This fixes a potential bug where we coalesce unique events with non-unique ones of the same type and target.
Not marked as a bug fix in the changelog because this wouldn't happen in practice, as we always dispatch events of a given type the same way (all unique or all non-unique).
Reviewed By: sammy-SC, javache
Differential Revision: D73849222
fbshipit-source-id: 6f387d63b3a68dccc81c110287d42e15e31c181e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50987
Changelog: [internal]
This adds a new `isUnique` option in `RawEvent` to determine if it's unique (whether it should be coalesced with other unique events of the same type and target).
This effectively makes `dispatchUniqueEvent` redundant, as we can use `dispatchEvent` with a `RawEvent` marked as unique.
This will allow us to fix the bug we found in the new tests for event dispatching, where non-unique events of a given type where being coalesced with non-unique events of the same type.
Reviewed By: javache
Differential Revision: D73849220
fbshipit-source-id: ce89623aee509071ab6a86654ee25d9614863a8a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50989
Changelog: [internal]
Just adding a test suite to verify the behavior of event dispatching in Fabric (especially around event priorities, automatic determination based on ContinuousStart/ContinuousEnd and unique events).
This also surfaced a bug where we incorrectly batch unique and non-unique events together (see the disabled test).
Reviewed By: javache
Differential Revision: D73849218
fbshipit-source-id: 404172822d6985283a161c8a56575e0b5658a5cc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50986
Changelog: [internal]
This just exposes some enum values and methods that we forgot to expose in a few interfaces.
Reviewed By: javache
Differential Revision: D73849221
fbshipit-source-id: 19014d53216e67c77b0c31e5ade8f86de071b001
Summary:
This PR aims to migrate ViewGroupManager to kotlin as part of https://github.com/facebook/react-native/issues/50513
## Changelog:
[ANDROID][CHANGED]Migrate ViewGroupManager to kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50895
Test Plan: Tested with RN tester with old and new arch
Reviewed By: javache
Differential Revision: D73770843
Pulled By: cortinico
fbshipit-source-id: 45959a8bf512b3590ca8bc64dac281e13fa41ca3
Summary:
With the redesign of the new app screen, the E2E tests against the template started failing because we don't have a `Step One` string anymore.
This change should fix them.
## Changelog:
[Internal] - Fix Template E2E tests
Pull Request resolved: https://github.com/facebook/react-native/pull/50990
Test Plan: tested by running the E2E tests on this PR
Reviewed By: huntie
Differential Revision: D73855988
Pulled By: cipolleschi
fbshipit-source-id: d0d72e5a07cd88923e310767eae27f5df376d637
Summary:
As part of the work to integrate libraries with our nightlies, we want to receive a message when the libraries are failing to build on discord. This will help us catch breaking changes early on and onboarding library maintainer as soon as possible.
## Changelog:
[Internal] - Integrate with Discord when nightly fails
Pull Request resolved: https://github.com/facebook/react-native/pull/50979
Test Plan: GHA
Reviewed By: cortinico
Differential Revision: D73845810
Pulled By: cipolleschi
fbshipit-source-id: c6cfdf16b29642b1c3ad3872096c0e815fa88a0a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50992
shouldnt happen but when it does it shouldnt crash some more
fix for P1798860939
Changelog: [Internal] - fix crash when onHostPause is called and mCurrentActivity is null
Reviewed By: cortinico
Differential Revision: D73852655
fbshipit-source-id: 19ee4ada1c71a34a6115882e9a558b4ea9f9d8c7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50965
While D72228547 has recently disallowed all `./src/*` subpath imports from React Native (functionally, `./src/private/*`), we have a number of APIs that are imported from Meta product code legitimately — e.g. as part of validating under-development React Native features internally in real Meta apps.
This diff defines a new, exported `./src/fb_internal/*` subpath via `package.json#exports`, which will allow us to expose select entry points for this purpose.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D73770609
fbshipit-source-id: 397019669e565b95a86302ef30f80b65a17dcc0d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50976
This is the second part of the migration of `rn-tester` package to use root imports. In this diff the `CodegenTypes` namespace is used to define Codegen primitives.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D73780584
fbshipit-source-id: c13c2dfcfa4d023978a9463af1d2a3bf7b72476c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50975
Re-defining types in `AnimatedExports.js.flow` shadows their documentation located in `AnimatedImplementation`. Moving them to the `AnimatedExports` fixes the issue for generated TS types.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D73840908
fbshipit-source-id: 2648498a53660b483c70be647716accc11e96d82
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50967
In some cases we may want to check this only if the prop exists
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73793783
fbshipit-source-id: b498f82414edf63d8644b90bb3932298eb37b43c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50941
Without doing this, using Animated.event to update a value with an offset causes the value to revert to not having an offset because the native side doesn't even know about the offset if it hasn't been synced.
Don't think there's a better place to sync this for the cases where an animation is kicked off entirely from the native side
Changelog: [Android][Fixed] - Ensure latest offset value is synced to native
Reviewed By: javache
Differential Revision: D73622302
fbshipit-source-id: 7e67a7f41d900cc225af410af94ccdfd33c170c8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50850
This prop will be used to enable screen reader focusability without allowing keyboard focus. Mostly a quality of life prop for product engineers and maps 1:1 to Android
Changelog: [Android][Added] - Expose Android's screenReaderFocusable prop
Reviewed By: javache
Differential Revision: D73382051
fbshipit-source-id: 8171b9d24a735dd42d54abe4537fb487bdd011b7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50962
OSS is affected by https://github.com/facebook/react-native/issues/49694 and it is endangering the migration of multiple apps to the New Architecture.
We fixed the issue but it is hidden behind feature flag while we are experimenting with it internally, to make sure it does not causes regressions.
However, the fix has been verified for the reproducer code and the OSS will be beneficial for the community.
We are overriding the featureFlag, enabling it for OSS.
## Changelog:
[Internal] - Enable `updateRuntimeShadowNodeReferencesOnCommit` for OSS
Reviewed By: lenaic, cortinico
Differential Revision: D73771648
fbshipit-source-id: 4394a2370d9edd9699c8e03293868defd465853c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50909
Enables and maps the `types_generated/` directory for `react-native` and `react-native/virtualized-lists` — exposing the new Strict TypeScript API entry points to React Native.
**New `"exports"` conditions**
- `"react-native-strict-api"` — The Strict TypeScript API opt in, exposing the `index.d.ts` entry point only.
- `"react-native-strict-api-UNSAFE-ALLOW-SUBPATHS"` — Opts into the new from-source generated types, but allows accessing subpaths (unsafe).
- We intend for this unsafe condition to be an escape hatch for Frameworks only (i.e. Expo).
Note: In the case of `virtualized-lists`, we simply use the `"types"` condition — since this package did not expose any TypeScript API previously.
NOTE: Should we need to roll back JS Stable API phase 1, **this is the single diff to revert**.
Changelog:
[General][Added] - Configure the "react-native-strict-api" opt in for our next-gen TypeScript API
Reviewed By: cipolleschi
Differential Revision: D71969602
fbshipit-source-id: 291182cc826db8b33f21fc79698e6096876d17ef
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50964
Address/supress ESLint warnings across the codebase, currently flagged on every PR via GitHub's "Unchanged files with check annotations" check.
{F1977480883}
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D73778510
fbshipit-source-id: 91bed86877eae74fa3b9ebea71e26cdcaeee1761
Summary:
Rewrite of the Inspector class from Java to Kotlin in scope of https://github.com/facebook/react-native/issues/50513
## Changelog:
[ANDROID] [CHANGED] - Migrated Inspector to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50947
Test Plan: Tested using RNTester app, on both old and new arch, and tested by navigating to multiple pages
Reviewed By: cortinico
Differential Revision: D73767386
Pulled By: javache
fbshipit-source-id: e0098568aa0ed9863503e206a88d3b171c8f9966
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50958
In rn-tester package there are many react-native deep imports which will be deprecated in the future. It is a starter for migrating rn-tester to using root imports instead. Only deep imports that are already root exported are changed. This diff avoids using `CodegenTypes` as it causes build errors and will be resolved in next stages.
Besides import changes, `PointerEvent` type is now also exported from the root.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D73656526
fbshipit-source-id: 5814a3d9c6a04b1236581dbbe291cd109e2c71c0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50957
Changelog: [internal]
Now we can use the higher level API for event dispatching in this test.
Reviewed By: javache
Differential Revision: D73663626
fbshipit-source-id: 961af26f62128f093c71ad14f457ac8544348415
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50903
For now we do not change the way this module is exported to prevent breaking changes (due to high usage in external packages). It is a tentative mitigation - this case requires more discussion and what could be sufficient. The `no-deep-imports` rule and plugin shouldn't emit a warning when encountered.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D73590627
fbshipit-source-id: 6f85c52373ee6c7c538c632b55cd9e0b9357f2a3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50932
Add a warning for LegacyArch users that are providing a ViewManager with a corresponding shadow node that implements the `YogaMeasureFunction`.
For those users, we know that the ViewManager is most likely not working on the NewArch (unless they have a backward compat ViewManager with a C++ shadow node implementation).
Changelog:
[Android] [Added] - Warn Legacy Arch users if they use a Component with a ShadowNode with `YogaMeasureFunction.measure()` function. That Component will stop working on NewArch.
Reviewed By: javache
Differential Revision: D73654273
fbshipit-source-id: 70d232434f94bc2a6970379d566b276f73850fce
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50939
Redesigns React Native's `NewAppScreen` component, and moves it into a new `react-native/new-app-screen` package with a single component export. Deletes the old New App Screen under `'react-native/Libraries/NewAppScreen/'`.
{F1977434404}
**Motivation**
- **Reduces our public API** (see https://github.com/react-native-community/discussions-and-proposals/pull/894)
- Separates this screen from the main `react-native` package, where it was a number of subpath exports.
- Reduces the size of the main `react-native` package, including image assets — which are redundant for consumers like Expo.
- **Updated visual treatment**
- Replace outdated logo, update to a responsive tablet/windowed layout.
- Removes outdated guidance (e.g. "use cmd+R to reload"), and generally simplifies the layout (with the aim of reducing future maintenance).
- **Simplifies template boilerplate**
- `NewAppScreen` is now a fully encapsulated screen layout, avoiding the cruft of the previous modular design.
**Integration plan**
When we cut the `0.80-stable` branch, we'll update [the template](https://github.com/react-native-community/template/blob/main/template/App.tsx) to import and use `<NewAppScreen />`.
- This will cause an extra runtime dependency in the template `package.json`, which will require user cleanup. We are happy with this tradeoff, given the self-evident package name, reduction of template boilerplate, and size reduction on the main `react-native` package.
Changelog:
[General][Breaking] - The `NewAppScreen` component is redesigned and moved to the `react-native/new-app-screen` package
Reviewed By: cipolleschi
Differential Revision: D73657878
fbshipit-source-id: 9ca07afa9fbdd6f32015eafa2f27d52ed182918e
Summary:
This PR makes sure that monitor-new-issues runs only in the main repo. It was failing on my fork and spamming notifications.
## Changelog:
[INTERNAL] [FIXED] - run monitor-new-issues only in the main repo
Pull Request resolved: https://github.com/facebook/react-native/pull/50951
Test Plan: CI Green
Reviewed By: cipolleschi
Differential Revision: D73763006
Pulled By: cortinico
fbshipit-source-id: cbb22f8804448b41de970d3d11930110b353994f
Summary:
For real this time, the change was lost due to some merge conflict
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D73726167
fbshipit-source-id: 1e0cef75f59a166d795922266365b2b7b060472e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50872
NOTE: Resubmission of D71968187.
Define `"exports"` field on the main `react-native` package.
**Notes**
Module resolution should be equivalent to the previous implicit `"main"` field (backwards compatible).
- Exports all module subpaths to JavaScript (Flow) source files, with and without `.js` suffix (unchanged ✅)
- These are restricted to the `flow/` and `Libraries/` subdirectories (ℹ️ this should be unchanged, matching any JS imports apps may have today)
- Still includes 3P integration scripts such as `./jest-preset.js` and `./rn-get-polyfills.js` (unchanged ✅)
- Exports `./package.json` (unchanged ✅)
- TypeScript should:
- fall back to the `"types"` field (unchanged ✅)
- OR to `"."`,`"./*"` when Package Exports support is enabled via `compilerOptions`, and use the *adjacent `.d.ts` file* (unchanged ✅)
Changelog:
[General][Breaking] - The `react-native` package now defines package.json `"exports"`.
- While these expose existing JavaScript and TypeScript modules, this change may affect deep imports of non-JS files via Node in third party tools.
- Jest mocks to a `react-native` subpath will need to be updated to match the import path used in your code.
- Imports from `src/` and `src/private/` directories are disallowed.
Reviewed By: robhogan
Differential Revision: D72228547
fbshipit-source-id: d50d6e556d32a9cf2f90855a562e61549853acb9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50855
This diff addresses a crash caused by view duplication in React Native Android. The issue occurred when a view was not already clipped and was laid out again, resulting in duplicated views.
This problem was particularly noticeable when using nested FlatLists, which triggered a custom focus search with an incomplete and buggy duplicated FlatList container view.
The fix involves preventing the duplication of views by checking if a view is clipped already before laying it out again. Additionally, this diff includes two other improvements:
- Preventing clipping issues: When a view is nested within a non-ReactClippingViewGroup ancestor, focus searching would fail due to the needUpdateClippingRecursive logic only running on instances of ReactClippingViewGroup. By excluding these ancestors, we ensure that the next focusable view can be properly excluded from being clipped.
- Minor fix: A minor fix was made to prevent potential issues in deeply nested cases.
- Add a Kill switch with a feature flag and mobile config combo.
Reviewed By: joevilches
Differential Revision: D73471780
fbshipit-source-id: efbb968600f21b24ab1fa32222d555f346fb336e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50936
D63141469 introduced an option to use HSR Core's trace macros for profiling react. I believe this was to enable Tracy support. However, the consequence of this is that hsr core is statically linked twice into Worlds, once in libclient_server_android.so and once into libxplat_js_react-native-github_packages_react-native_ReactCxxPlatform_react_profiling_profiling.so.
It isn't obvious that this causes any problems, but it does result in some weirdness with regard to symbol interposition between the two shared libraries. Some tracing categories are registered twice in hz_tracing, for example.
Since the HSR Core macros call directly through to hz_tracing, this change simply replaces the HSR Core dependency with an equivalent hz_tracing dependency.
Reviewed By: javache
Differential Revision: D73532803
fbshipit-source-id: 56d4b62873aabcbf0a92cebd7a0f720fed616158
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50908
This diff removes the usages of ShadowNodes in the new architecture by fully releasing disableShadowNodeOnNewArchitectureAndroid() feature flag.
changelog: [internal] internal
Reviewed By: cortinico
Differential Revision: D73519567
fbshipit-source-id: e222e3b4fab371c8bc5480950da005d2a12a8619
Summary:
We landed a PR that was importing a file available only in the New Architecture also when the app was running in the old architecture.
This was creating a corrupted bundle for rntester.
This PR fixes the issue
bypass-github-export-checks
## Changelog:
[Internal] - Fix RNTester on Android
Pull Request resolved: https://github.com/facebook/react-native/pull/50940
Test Plan: Tested locally by setting `newArchEnabled` to false in the gradle.properties file
Reviewed By: javache, cortinico
Differential Revision: D73663049
Pulled By: cipolleschi
fbshipit-source-id: c8d6e4190adee7388e51901360a811b0007ee3a5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50938
Changelog: [internal]
No more `maybeNode`s. Using ref objects makes the tests cleaner and the JSX easier to read than injecting lambdas.
This speaks for itself:
* 617 lines added
* 1393 lines removed
{F1977434870}
Reviewed By: lenaic
Differential Revision: D73659018
fbshipit-source-id: d1c23e6457bb1d351ce02b9f6fa8778b06ee0e55
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50935
Those classes are internal and deprecated since a while.
It should now be safe to fully remove them.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D73655877
fbshipit-source-id: cdca8f032fe865f9a08c40e4a0145945c7e25a85
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50931
This removes all the `OSS_LEGACY_WARNINGS_ENABLED` infrastructure from LegacyArchitectureLogger. We'll instead pivot to use ad-hoc functions for scenarios that don't work in LegacyArch + Interop Layers (see D73654273).
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D73654272
fbshipit-source-id: d10eac2ded92f2c0191503e64f0c1d9db688d6e9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50930
Due to D73591315, we don't need to specify the `legacyWarningsEnabled` for RNTester anymore as it's effectively ignored.
Changelog:
[Internal] [Changed] -
Reviewed By: rshest, cipolleschi
Differential Revision: D73654270
fbshipit-source-id: 9428634fb8374024940e4041de60d679b6f352a2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50929
We decided to change the warning model for LegacyArch/NewArch.
I'm currently removing the infra to read the `legacyWarningsEnabled` Gradle property if provided.
Warnings will be enabled by default for all Legacy Arch users in the new model.
This change was never shipped in a numbered version, so that's not breaking.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D73591315
fbshipit-source-id: a46fade91b46fcc9b81984577161c046dc0939b6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50928
This broke in D72979663, since we relied on the object identify of `native` changing to correctly reset the native state back to the controlled JS state.
Changelog: [General][Fixed] Fixed switches correctly reverting to controlled state
Reviewed By: vzaidman
Differential Revision: D73653323
fbshipit-source-id: d6ca8a31d9f08a339c7acf6bba264137690dd794
Summary:
Rewrite of JSBundleLoader from Java to Kotlin in scope of https://github.com/facebook/react-native/issues/50513
## Changelog:
[ANDROID] [CHANGED] - Migrated JSBundleLoader 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/50911
Test Plan: Tested using RNTester app, on both old and new arch, and tested by navigating to multiple pages
Reviewed By: cortinico
Differential Revision: D73649145
Pulled By: javache
fbshipit-source-id: 7ef1fc1ea1c53a8b914ae1aada1966e64b4c3d80
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50899
changelog: [internal]
making things clearer in the docs for Fantom.
Reviewed By: rubennorte
Differential Revision: D73580305
fbshipit-source-id: 0e5edaa3baf57fc54f7a0c454fe4d2fa81627f66
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50906
Annotation to mark classes or functions that are part of the interop APIs that provide support for legacy architecture APIs in the new architecture of React Native .
changelog: [internal] internal
Reviewed By: shwanton
Differential Revision: D73407613
fbshipit-source-id: 887a14ca4dea891b50e7df01e0ffff5064cd43ea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50888
This is shared between platforms using a very strange pattern. Let's just extract this into its own function. Not considering breaking, since TextLayoutManager is internal interface.
Changelog: [internal]
Reviewed By: rshest
Differential Revision: D73555465
fbshipit-source-id: ea99fbebd9db44efd1dc56c2cad68b5b56e77ad1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50890
With Facsimile, we are introducing some new concept of `PreparedText`, where platform TextLayoutManager which implement, can lead to additional optimizations.
`#ifdef ANDROID` is not a workable pattern for this. Apart from react-native-cxx getting hooked into it, and all of the existing bugs there, it is bad for editor environment, and hard to reason about.
This splits up `ParagraphState`, so that we can control platform specific bits more easily. We do not split `ParagraphShadowNode`, which will use concepts (e.g. `TextLayoutManagerWithPreparedText`) to control which paths it takes, based on platform capaibilities.
Changelog: [internal]
Reviewed By: rshest
Differential Revision: D73555441
fbshipit-source-id: fd585eb99d26b0b6966efb1867d03fbd5cc7e7e2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50923
This implements the view manager for `PreparedLayoutTextView`, originating by taking the view managers composing `ReactTextView`, converting to Kotlin, and removing everything no longer needed.
In Facsimile, anything influencing text appearance is applied earlier, when creating the Fabric layout, so there are many less setters here. Most visual attributes are instead present in the state we are presenting.
We have tasks for some of these, that need to be reimplemented, as they do not currently influence the Spannable being measured. That includes e.g. `ReactTextViewManagerCallback`, used for injection, and `dataDetectorType` for linkifying Spannable.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D73287706
fbshipit-source-id: 938b57d4e443f6b8bb127e17b47cc371f31a416d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50922
This forms the basis for a replacement of `TextView`.
This started off with Litho's [`RCTextView`](https://github.com/facebook/litho/blob/master/litho-rendercore-text/src/main/java/com/facebook/rendercore/text/RCTextView.java), which is a simple view, for rendering a text layout, and providing some built-in keyboard navigation and a11y support. Many changes were made to it, including:
1. Removing many parts not relevant to RN, or which will be replaced by other RN infra. E.g. we will reuse existing a11y delegates, have existing ways of creating Spannables and text layouts, inline views, etc
2. Converting to Kotlin
3. Adding back in some changes required for RN's drawing, and expected view manager APIs (e.g. overflow/clipping customization)
4. Making it target a ViewGroup instead of a View, for correct inline view support down the line
Because we rely on drawing text layout, with the same Spannable as before, most things "just work", because they are part of the layout we are drawing, generated by TextLayoutManager on the Fabric side. We don't offer much customization to what can be drawn, forcing it to have happened in the layout we are showing already.
There are quite a few bits not implemented yet. Some of these are cases, like `textAlignVertical`, were previously incorrectly implemented just at the ReactTextView layer, so Fabric layout was unaware of them. Another similar class to this is any non-default fonts which we must load. `adjustsFontSizeToFit` (stubbed out in later diff) will also need some tweaking with the new assumption we don’t want to mutate Spans/layouts set in State.
Fine grained selection support is the largest tbd.
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D73282649
fbshipit-source-id: abe3a30461095d2d0ddbc6c939704f3982f44771
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50921
This adds the ability to represent Fabric State sent to Java View managers as a raw JNI reference. This is used by Facsimile to tell a component to mount a layout, previously generated during measurement.
This API is consciously well hidden (in comparison to MapBuffer which is fairly public). To use it:
1. The concrete state data representation must implement a method named `getJNIReference()` that returns an fbjni ref
2. The Java view manager must cast the `StateWrapper` to an internal `ReferenceStateWrapper` type, not exposed outside of React Native internals
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D73159146
fbshipit-source-id: b7602bf7717bff28d2f3b259073bc47606fd76e4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50920
We construct this from JNI, which doesn't care about visibility, and then only want to expose `StateWrapper` as the public interface.
Changelog:
[Android][Removed] - Make StateWrapperImpl Internal
Reviewed By: Abbondanzo
Differential Revision: D73161592
fbshipit-source-id: b787e31e190dc52a02d73cadfa77b1c1defb9703
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50912
Changelog: [Internal] - Update IntersectionObserver Fantom tests to use the new `scrollTo` api which didn't exist when I first wrote these tests. As well, do clean up between tests
Reviewed By: rubennorte
Differential Revision: D73551695
fbshipit-source-id: 9625328879230d178f23a089436f2a3c7b8323bd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50905
Subtle compiler differences cause this to fail, but we can just `Class<*>` here instead.
Changelog: [Internal]
Reviewed By: cortinico, rshest
Differential Revision: D73593304
fbshipit-source-id: ea3996fc0641ae5d12a6923bd78645e21232afe7
Summary:
Resolves https://github.com/facebook/react-native/issues/50778
### Problem Description
Implement the crossOrigin property for Image in RNW Fabric when only source.uri is passed and not src/ srcSet.
For reference, check the public API documentation: https://reactnative.dev/docs/image#crossorigin
Implement the referrerPolicy property for Image in RNW Fabric when only source.uri is passed and not src/ srcSet.
For reference, check the public API documentation: https://reactnative.dev/docs/image#referrerpolicy
Also refer docs for source, src, srcSet
https://reactnative.dev/docs/image#sourcehttps://reactnative.dev/docs/image#srchttps://reactnative.dev/docs/image#srcset
It's not mentioned in the doc that when src / srcSet is missing then crossOrigin / referralPolicy would be ignored when source uri is a remote URL that is passed.
Currently these were ignored if src / srcSet was not passed and not added to sources headers.
This change adds headers support even without passing src / srcSet and only sources uri that consists of remote URL.
crossOrigin and referrerPolicy are passed as source.headers here:

### Steps to reproduce
```
<Image
defaultSource={{uri: this.state.defaultImageUri}}
source={{uri: this.state.imageUri}}
crossOrigin="use-credentials"
referrerPolicy="no-referrer"
/>
```
Pass this in React Native and check source headers
## Changelog:
[GENERAL] [ADDED] - Support headers [crossOrigin and referralPolicy] in Image without src and srcSet and only remote source.uri
Pull Request resolved: https://github.com/facebook/react-native/pull/50799
Test Plan:
Refer this PR for testing; https://github.com/microsoft/react-native-windows/pull/14521
## Screenshots
_Add any relevant screen captures here from before or after your changes._
Before

After
<img width="790" alt="image" src="https://github.com/user-attachments/assets/8e0a2522-7009-430d-b848-da80896670f4" />
## Testing
_If you added tests that prove your changes are effective or that your feature works, add a few sentences here detailing the added test scenarios._
Tested in playground and RNW Tester and Visual Studio Debugger
_Optional_: Describe the tests that you ran locally to verify your changes.
1. Tested with only source remote uri passed
2. Tested with both source, src
3. Tested with source, src, srcSet
Reviewed By: javache
Differential Revision: D73427747
Pulled By: cipolleschi
fbshipit-source-id: f09174d1e4eaa2173b27970a6079eeb8ba6f3069
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50900
This bumps the minor of Android Gradle Plugin ahead of the branch cut for 0.80
Changelog:
[Android] [Changed] - AGP to 8.9.2
Reviewed By: rshest
Differential Revision: D73579447
fbshipit-source-id: f0d40ba3d160e332ee9ab2853a949ed6ec51a3fc
Summary:
Right now having a javascript error like an invalid import statement during first bundle load results in a disappearing redbox screen.
https://github.com/user-attachments/assets/ab9c64f5-6e32-481c-a58f-6d37bb920acb
The `invalidate` call removed in this PR cleans up all turbomodules, including the RedBox module, which in turns calls `dismiss` in `RCTRedBox`.
After removing this line the result is as following:
https://github.com/user-attachments/assets/6eeb4d43-f883-440f-ade3-5628f85f833a
I made sure that the `invalidate` function is still called when executing only two possible ways to reload the bundle:
- the Reload button
- Cmd+R
The HMR/hot reload is not connected if the bundle has an error on initial load, so we don't need to worry about it.
Longer term, it would be better to establish HMR and use a different redbox in this case:

Doing this requires larger changes to the bundle loading flow – happy to to try and land that change if there's any guidance you could give.
## 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
-->
[IOS][FIXED] – Fix disappearing redbox on initial load of an invalid bundle.
Pull Request resolved: https://github.com/facebook/react-native/pull/50867
Test Plan: I have tested this change using RN from main and RNTester app (see videos).
Reviewed By: cortinico
Differential Revision: D73511154
Pulled By: cipolleschi
fbshipit-source-id: dfe149ebc15d845f07fd3926db2e063b468870af
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50802
The plugin analyses the source of all `import`, `require`, and `export` statements and injects the `console.warn` statement for each path targeting deep react-native source code. It runs only on a dev mode so there is no need to keep that in the `if (__DEV__) ` block. It is possible to disable this plugin by setting `disableDeepImportWarnings: true` and **resetting** the Metro cache:
```js
module.exports = {
presets: [['module:react-native/babel-preset', {
"disableDeepImportWarnings": true
}]],
};
```
Changelog:
[General][Internal] - Added plugin to react-native/babel-preset injecting `console.warn` for each react native deep import in dev mode.
For a given code:
```js
import { Image } from 'react-native';
import View from 'react-native/Libraries/Components/View/View';
const Text = require('react-native/Libraries/Text/Text');
export { PressabilityDebugView } from 'react-native/Libraries/Pressability/PressabilityDebug';
```
The transformed output should look like:
```js
import { Image } from 'react-native';
import View from 'react-native/Libraries/Components/View/View';
const Text = require('react-native/Libraries/Text/Text');
export { PressabilityDebugView } from 'react-native/Libraries/Pressability/PressabilityDebug';
console.warn("Deep imports from the 'react-native' package are deprecated ('react-native/Libraries/Components/View/View').");
console.warn("Deep imports from the 'react-native' package are deprecated ('react-native/Libraries/Text/Text').");
console.warn("Deep imports from the 'react-native' package are deprecated ('react-native/Libraries/Pressability/PressabilityDebug').");
```
For more information about why this plugin was needed, please check [RFC](https://github.com/react-native-community/discussions-and-proposals/pull/894).
Reviewed By: huntie
Differential Revision: D70783145
fbshipit-source-id: ae145db6471d861099566a8faf2fbd93bd136450
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50894
changelog: [internal]
adding more tests to cover all branches of `calculateShadowViewMutationsFlattener`.
calculateShadowViewMutationsFlattener is over 400 lines of code and covers quite a few edge cases. I plan to cover every branch with a test to make it easier to refactor Differentiator in the future.
Reviewed By: rubennorte
Differential Revision: D73543444
fbshipit-source-id: b0b22aba4b9cc4718edd2a6c4535993be437ed9f
Summary:
As the repository is moving towards Kotlin and the tests have also been moving towards mockito-kotlin, I'm doing another round here.
## Changelog:
[INTERNAL] - Flip mockito usages to mockito-kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50878
Test Plan:
```sh
yarn test-android
```
Reviewed By: javache
Differential Revision: D73569293
Pulled By: rshest
fbshipit-source-id: 9bfe7d3f69480367384eafdde429db15eb81d11c
Summary:
Rewrite of JavaModuleWrapper from Java to Kotlin in scope of https://github.com/facebook/react-native/issues/50513
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[ANDROID] [CHANGED] - Migrated JavaModuleWrapper to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50882
Test Plan:
Test RNTester using old arch. SampleLegacyModule is the one I've used, it needs to be enabled for old arch though (RNTesterApplication.kt -> getPackages & getReactModuleInfoProvider).
I may enable SampleLegacyModule for old arch to make testing easier. mateoguzmana
It breaks on `getDynamic` on old arch, but I could filter these from examples or add some fallback in SampleLegacyModule.kt for old arch.
Reviewed By: cortinico
Differential Revision: D73576099
Pulled By: javache
fbshipit-source-id: c940be27133258fa589571a600435fa478e6b51e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50863
No need for `shouldReturnInteropModule` if we can just use the nullability of what's returned by `getInteropModule` instead.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D73501845
fbshipit-source-id: 9b7628707edc3eb288733baffaca59a9d3c40b40
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50870
As explained in the doc block, now that ReactInstance is in Kotlin we can move this logic to StackTraceHelper and migrate it to Kotlin
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D73503879
fbshipit-source-id: 38a9ff346e00d68bbc3c383834e2a1763dbba9b8
Summary:
While upgrading a project to React 19, I noticed React.ElementRef is deprecated (see [types/react/index.d.ts#L199](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts#L199)). I think we can replace it for the RN types as well.
Not sure if this is considered as a breaking change.
## Changelog:
[GENERAL] [CHANGED] - TypeScript: Replace deprecated React.ElementRef usages to React.ComponentRef
Pull Request resolved: https://github.com/facebook/react-native/pull/50883
Test Plan:
Create a RNTesterPlayground.tsx next to the normal .js just to validate the type checking is not throwing an unexpected error.
<details>
<summary>Code snippet:</summary>
```tsx
import React, { useRef, useEffect } from 'react';
import { FlatList, Text, View } from 'react-native';
type Item = { id: string; title: string };
const data: Item[] = Array.from({ length: 10 }, (_, i) => ({
id: i.toString(),
title: `Item ${i + 1}`,
}));
const FlatListScrollRefExample: React.FC = () => {
const flatListRef = useRef<FlatList<Item>>(null);
useEffect(() => {
if (flatListRef.current) {
const nativeRef = flatListRef.current.getNativeScrollRef();
console.log('nativeRef', nativeRef?.componentWillUnmount);
}
}, []);
return (
<FlatList
ref={flatListRef}
data={data}
keyExtractor={(item) => item.id}
renderItem={({ item }) => (
<View style={{ padding: 16 }}>
<Text>{item.title}</Text>
</View>
)}
/>
);
};
export default FlatListScrollRefExample;
```
</details>
Reviewed By: cipolleschi
Differential Revision: D73569274
Pulled By: rshest
fbshipit-source-id: f72477b9b3c0eda1007187c7dac3da0433410e86
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50886
changelog: [internal]
Group tests related to reparenting in "describe" block. Differentiator is two algorithms hidden behind a single interface: regular and reparenting. The tests are structured this way as well where regular tests focus on common scenarios and reparenting section focuses on reparenting and special cases around that. The reparenting implementation is considerably more complex as it handles edge cases that don't happen often.
Reviewed By: mdvacca
Differential Revision: D73541053
fbshipit-source-id: c3905a0f0117cb1aa6c468e24e6bb982de48545d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50885
changelog: [internal]
a special case inside of Differentiator handling parent-child switching from unflattened-flattened to flattened-unflattened. If a child has view that is culled, this needs to be handled.
This diff also simplifies the implementation inside of calculateShadowViewMutationsFlattener by passing only one cullingContext.
Reviewed By: mdvacca
Differential Revision: D73523523
fbshipit-source-id: d6f314da6b9ff40bcf3362243b03de1b39e7aabb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50881
Rename Codegen Component Descriptors Entrypoint for FAC and hook it up in DefaultComponentsRegistry
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D73535745
fbshipit-source-id: dad68e7e6c8d7ba2ed86bbd1c06131101e00689e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50851
## Changelog:
[General] [Added] - Add pan gesture animation example to rntester
Including examples of
* using native driven Animated.event + touch event (which will not be interrupted by busy js thread, and is potentially a boost to performance) - the code requires some hacks but it's doable
* using js PanResponder to drive pan gesture animation
Reviewed By: sammy-SC
Differential Revision: D68909931
fbshipit-source-id: 484ecb0646fb249b31362013725219a1c1ec6181
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50879
The view for a view manager should not be nullable. Let's fix that.
These are also all bound specifically to `ReactTextView` instead of the generic constraint, so I just changed the constraint. Really this should just be totally merged with `ReactTextViewManager`.
Changelog: [Internal]
Reviewed By: cortinico, rshest
Differential Revision: D73453631
fbshipit-source-id: 74bcadeef0e83a719dfe2b989784501575b58168
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50753
Runtime Shadow Node Reference Updates (RSNRU) is currently implemented through the clone method which on each internal clone updates the runtime reference to point to the new clone. This guarantees that the runtime reference always points at the latest revision of the shadow node.
This came with the constraint that RSNRU could only run from one thread at all times, otherwise the React renderer state (current fiber tree) would end up being corrupted by receiving reference updates from multiple threads cloning shadow nodes.
This change moves the reference update step to the locked scope of the commit phase. Since the runtime is blocking on the commit and the scope is locked, it is safe and correct to update the runtime references with the latest revision of the shadow node after running state progression and layout.
By moving the reference update to the commit, we can support shadow node syncing from any thread since the actual runtime references are now executing at a safe time and the renderer state will stay valid at all times.
This change is gated behind the `updateRuntimeShadowNodeReferencesOnCommit` feature flag, which enabled shadow node syncing from any thread and reference updates only during the commit.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D73038439
fbshipit-source-id: d90308498f3c0625dc87158f15311d1088aad8b0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50752
Storing the runtime reference for a shadow node and updating the runtime reference to point at a specific shadow node should be separated so that these actions can be done at different moments in time.
We want to keep a reference to the runtime reference of a shadow node for all revisions cloned internally (not triggered by the React renderer, e.g. on layout or shadow node state updates).
We also want to support updating that runtime reference to point at a specific shadow node revision, ideally the one that will end up being used to mount the host component.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D73038438
fbshipit-source-id: 68c3912cbb077d790dd8d2abe8291548b12c8231
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50877
At some point I made some changes to how alpha works on BackgroundDrawable. This inadvertently broke BackgroundImage because we need a non transparent color to apply shaders.
Setting the alpha to 255 temporarily when drawing background-image layers fixes it
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D73520952
fbshipit-source-id: b8017bb06adc0d3d328d9831fbc4c74f2ec0b783
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50876
This diff is temporarily reverting the code shipped in D72671083 to wait for more data before fully release this change
changelog: [internal] internal
Reviewed By: rshest, arushikesarwani94
Differential Revision: D73515903
fbshipit-source-id: 6566e9533ebffc93348e24eb6c0512020b220eae
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50533
Builds upon https://github.com/facebook/react-native/pull/49446
On iOS, by default, every EditText accepts DragEvent and will automatically focus themselves to accept these data. In some rare cases, it might not be desirable to allow data from arbitrary drag and drop events to be pasted into a text input.
This change adds a new prop `acceptDragAndDropTypes` to do exactly that: reject drag and drop events by telling the system to ignore certain types of drag data and, by proxy, disabling behavior that automatically focuses the text input.
The prop accepts a list of [Uniform Type Identifiers](https://developer.apple.com/documentation/uniformtypeidentifiers) that iOS supports. It's important to note that these are *not* MIME types. A MIME type would be something like `text/plain` but the equivalent for iOS is `public.plain-text`.
It's important to note that this is an experimental prop, as is evident by the `experimental_` prefix on the JS side. Its signature could change before the prop has fully matured, use at your own risk
Changelog: [iOS][Added] - Add new prop for filtering drag and drop targeting to text inputs
Reviewed By: javache
Differential Revision: D70992749
fbshipit-source-id: 22b5aa1b4ced14147bf16a844361acf6f99c5a40
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49446
On Android, by default, every EditText accepts `DragEvent` and will automatically focus themselves to accept these data. In some rare cases, it might not be desirable to allow data from arbitrary drag and drop events to be pasted into a text input.
This change adds a new prop `acceptDragAndDropTypes` to do exactly that: reject drag and drop events by telling the system to ignore certain types of drag data and, by proxy, disabling behavior that automatically focuses the text input.
The prop accepts a subset of MIME types supported by Android as documented [here](https://developer.android.com/reference/android/content/ClipDescription#MIMETYPE_TEXT_HTML).
It's important to note that this is an experimental prop, as is evident by the `experimental_` prefix on the JS side. Its signature could change before the prop has fully matured, use at your own risk
Changelog: [Android][Added] - Add new prop for filtering drag and drop targeting to text inputs
Reviewed By: javache
Differential Revision: D69674225
fbshipit-source-id: 4dbbdd81bb0f394b6206da5a377c75ea71671626
Summary:
Some libraries still use the `folly_flags` method provided by our infra. When updating how folly should be installed in an app, we removed that function.
We are putting it back as deprecated, to avoid unnecessary breaking changes in libraries
## Changelog:
[iOS][Fixed] - Put back the `folly_compiler_flag` function to make libraries install pods
Pull Request resolved: https://github.com/facebook/react-native/pull/50875
Test Plan: Tested locally in a nightly app, using the react-native-exit-app library which still uses these flags
Reviewed By: cortinico
Differential Revision: D73512830
Pulled By: cipolleschi
fbshipit-source-id: 28f099064e93ecd5a5a6a7b82e3f7e9db4d35cb9
Summary:
`SocketRocket` and `fmt` are part of React Native dependencies.
If a library is written in swift and depends on them, it will fail to install the pods because these pods are not compatible with Swift.
This change makes sure that the pods are installed in a way that is swift compatible.
## Changelog:
[iOS][Fixed] - Make fmt and SocketRocket Swift friendly
Pull Request resolved: https://github.com/facebook/react-native/pull/50874
Test Plan:
Tested locally in a nightly app.
### Before the change:
```
yarn add react-native-video
cd ios
bundle exec pod install
```
This script resulted in this error:
```
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `react-native-video` depends upon `fmt` and `SocketRocket`, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
```
### After the change
```
yarn add react-native-video
cd ios
bundle exec pod install
```
This script installed pods successfully.
Reviewed By: cortinico
Differential Revision: D73512109
Pulled By: cipolleschi
fbshipit-source-id: 222d85dba1cbdf4044e3c8459008a4083a720016
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50846
## Motivation
After a more rigorous search through GitHub uses of the restricted APIs, and consultation with framework authors, it became apparent that this restriction should be lifted.
Changelog: [Internal]
Reviewed By: zeyap
Differential Revision: D73267844
fbshipit-source-id: e6c0c146690c07debf74c51f82171a9239be5c15
Summary:
the `react-native-maps` library has a complex setup for iOS. It doesn't work with autolinking, therefore we need to disable the test with the nightlies
## Changelog:
[Internal] - Disable nitghtly test for react-native-maps
Pull Request resolved: https://github.com/facebook/react-native/pull/50873
Test Plan: GHA
Reviewed By: cortinico
Differential Revision: D73510995
Pulled By: cipolleschi
fbshipit-source-id: a8abadfc8f0656de1288aa28e65abeab07bb9074
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50852
changelog: [internal]
Adding a test to verify view culling in scenario where a subtree is revealed and part of it is culled.
Reviewed By: lenaic
Differential Revision: D73454202
fbshipit-source-id: 6c4fb2ec4757b9ed1460bec8d3f02a661470266f
Summary:
Fixes https://github.com/facebook/react-native/issues/50010
On the initial render of a Text with the `selectable` prop set as `true`, the Text view is not making itself selectable. I debugged this quite a lot, and by changing the state from false to true using `setState` on the JS side, I made it work.
It turns out that we are setting this property in `onAttachedToWindow`, but somehow if `super.setTextIsSelectable` was already set as `true`, it won't re-apply it and we have to reset it to false before setting it again to true. This PR adds this reset.
I couldn't understand yet why this is not breaking in Fabric.
## Changelog:
[ANDROID] [FIXED] - Fix `selectable` prop not working correctly on initial render (old-arch)
Pull Request resolved: https://github.com/facebook/react-native/pull/50822
Test Plan:
- Test in both Fabric and Paper architectures to ensure there won't be a regression with this change in Fabric, as the issue occurs only in Paper.
- To test this, I created a small example in the RN-Tester playground to toggle the selectable property on/off. Notice in the first video that initially the prop is set as true, but it won't allow selecting. If you toggle to false and then back to true again, it works. With the provider fix it should also allow selecting the text on initial render.
Use this code snippet:
```tsx
function Playground() {
const [selectable, setSelectable] = React.useState(true);
return (
<View style={styles.container}>
<Text selectable={selectable} selectionColor="blue">
TESTING: is selectable? {selectable ? 'true' : 'false'}
</Text>
<Button title="Press me" onPress={() => setSelectable(!selectable)} />
</View>
);
}
```
Videos:
<details>
<summary>Before</summary>
https://github.com/user-attachments/assets/6a24dd0d-7f45-4a38-b18d-5142801ea1c3
</details>
<details>
<summary>After</summary>
https://github.com/user-attachments/assets/ce5f9e6e-9a4c-44d7-9d97-f607f2fdc1b4
</details>
Reviewed By: cortinico
Differential Revision: D73421487
Pulled By: rshest
fbshipit-source-id: c0b9d76076ef2e05930996953015fb58ad2a3d5f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50858
changelog: [internal]
This test verifies that React commits can override values previously set by `setNativeProps`. The test demonstrates the proper reconciliation behaviour between imperative updates via `setNativeProps` and declarative updates via React renders.
Reviewed By: lenaic
Differential Revision: D73463364
fbshipit-source-id: 3504d9a23bfc36a46fdfc4e9bf585f64088ab518
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50849
changelog: [internal]
Previously we didn't have a way to properly test bug reported in https://github.com/facebook/react-native/issues/47476. But with Fantom we do! Let's write a test for it to make sure this is not broken in the future.
Reviewed By: rubennorte
Differential Revision: D73432279
fbshipit-source-id: dbc1ce9d7b34bbe4275f6b8b1ce3a1c48bca3504
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50854
changelog: [internal]
In D73437449 I accidentally introduced a deadlock for single threaded testing environments. Here, I resolve the flakiness and the deadlock.
Reviewed By: mdvacca
Differential Revision: D73457182
fbshipit-source-id: 242edd4443b354cda4b082c2d45d8df04033cfd0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50827
This diff addresses a crash caused by view duplication in React Native Android. The issue occurred when a view was not already clipped and was laid out again, resulting in duplicated views.
This problem was particularly noticeable when using nested FlatLists, which triggered a custom focus search with an incomplete and buggy duplicated FlatList container view.
The fix involves preventing the duplication of views by checking if a view is clipped already before laying it out again. Additionally, this diff includes two other improvements:
- Preventing clipping issues: When a view is nested within a non-ReactClippingViewGroup ancestor, focus searching would fail due to the needUpdateClippingRecursive logic only running on instances of ReactClippingViewGroup. By excluding these ancestors, we ensure that the next focusable view can be properly excluded from being clipped.
- Minor fix: A minor fix was made to prevent potential issues in deeply nested cases.
- Add a Kill switch with a feature flag and mobile config combo. For Facebook we can kill through MC and for all other apps we can kill with the feature flag default value
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D73213775
fbshipit-source-id: 51a667a0c22eb35f0ec46ac4cbe430e2e62b407b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50826
Pull Request resolved: https://github.com/facebook/react-native/pull/50105
Pull Request resolved: https://github.com/facebook/react-native/pull/49543
When using `ReactScrollView` or `ReactHorizontalScrollView` Views with `removeClippedSubviews` keyboard navigation didn't work.
This is because keyboard navigation relies on Android's View hierarchy to find the next focusable element. With `removeClippedSubviews` the next View might've been removed from the hierarchy.
With this change we delegate the job of figuring out the next focusable element to the Shadow Tree, which will always contain layout information of the next element of the ScrollView.
We then prevent the clipping of the topmost parent of the next focusable view to lay out the entire containing element in case we have some necessary context in the parent
Changelog: [Android][Fixed] - Fix keyboard navigation on lists with `removeClippedSubviews` enabled
Reviewed By: NickGerleman
Differential Revision: D73114782
fbshipit-source-id: 081a2216037e033a4638151e5226f430ac093ea5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50825
Pull Request resolved: https://github.com/facebook/react-native/pull/50404
Add another function to fabric to get the topmost stacking context parent given a root and a child.
This is to be used on focus searching algorithm in the case where the next focusable child is deeper in the hierarchy meaning we need to find the top most parent in the Android hierarchy and lay that out as well before transferring focus.
If we don't lay out the parent as well as the next focusable view:
- The next focusable view might lack context given by the parent
- If the parent is a scrollview and has removeClippedSubviews enabled then laying out the next focusable view will not work
- If the view is deeper in the android hierarchy in some cases it won't be layed out unless the parent is
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73114933
fbshipit-source-id: 081720199943eff78966982a5fd1c921d4e105fd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50824
Pull Request resolved: https://github.com/facebook/react-native/pull/50196
Currently when `removeClippedSubviews` is enabled on Android keyboard navigation breaks and we can never focus the elements that are clipped. iOS has a similar issue but not as drastic, it only happens when elements on the FlatList have a lot of margin between them.
This algorithm aims to find the next focusable view and return it to native so that we can prevent the clipping of the view on the view clipping algorithm and hence fix keyboard navigation. For more information see D71324219
Fabric algorithm to find the next focusable view given:
`parentTag`: Top most relevant parent of the focused view
`focusedTag`: Tag of the currently focused view
`direction`: Direction in which focus is moving
EDIT AFTER AMA SEV 3 S510469:
This whole algorithm was based on the idea of fixing focusing within a ScrollView. What we didn't consider is that focus search could be triggered when focusing a pop-up view. This includes transfering focus to an element on a new page or a modal which means that in some cases the parent view could be removed from the hierarchy.
Just add null checks to the parent node and the currently focused node to prevent unexpected crashes.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73115104
fbshipit-source-id: b9c9314fbd4b97da23c0b941d34f4dc2a1a3b883
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50823
Introduce a trait to be able to tell if a ShadowNode is focusable by keyboard. This will be used for focus ordering that delegates the work to the shadow tree when Native platforms don't have enough information to define the next focusable node
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73114986
fbshipit-source-id: eed8642db0c65b6f54808d681640bb605cb6e0aa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50845
changelog: [internal]
`signalTaskToSync` should be released after `executeNowOnTheSameThread` is called to prevent race condition between `executeNowOnTheSameThread` and reading stubQueue's size on line 723.
Reviewed By: rubennorte, rshest
Differential Revision: D73437449
fbshipit-source-id: 3b2af3ddee5a422f7f846cc34ebbb7695463c267
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50840
Cleanup of index.js API removal warnings. This should motivate more urgency on the remaining members.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D73429537
fbshipit-source-id: 03faabdf30c2836dd5c61b4a2ce8d2355ad8e1e9
Summary:
Fixes https://github.com/facebook/react-native/issues/50817
Using a fragment is very common when rendering elements. We are cloning and adding `onLayout` always to the ListEmptyComponent element, but this would seem to work only when `View` is used for this as a wrapper in this prop. To prevent this unnecessary warning, I think we can easily check whether it is a fragment or not before cloning and adding the extra props – this adds backwards compatibility for those that don't need to use `onLayout`.
## Changelog:
[GENERAL] [FIXED] - Skip cloning Fragments in ListEmptyComponent to avoid onLayout warning
Pull Request resolved: https://github.com/facebook/react-native/pull/50833
Test Plan: Use the code snippet from the linked issue to verify that the warning is not thrown anymore when using a Fragment.
Reviewed By: javache
Differential Revision: D73421503
Pulled By: rshest
fbshipit-source-id: 0da4a38130601943e4704589ac275eba39767191
Summary:
This PR aims to migrate BlobProvider from Java to kotlin as part of [50513](https://github.com/facebook/react-native/issues/50513)
## Changelog:
[ANDROID][CHANGED] – Migrate BlobProvider to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50756
Test Plan: Tested on RN tester with both new and old arch
Reviewed By: rshest
Differential Revision: D73420896
Pulled By: cortinico
fbshipit-source-id: 4c9a26452a7e45a78c9698f699822b4ac855628c
Summary:
instead of explictly specifying fully qualified Java boxed types, use proper Kotlin syntax to refer to it.
---
👉 Notes on Java <> Kotlin type mapping !!!
See: Kotlin's Mapped Types; https://kotlinlang.org/docs/java-interop.html#mapped-types
- kotlin `Boolean` maps to Java's primitive type `boolean` and not boxed Type `Boolean`
- Java boxed type `Boolean` maps to `Boolean?` in Kotlin
So in Kotlin,
- `Boolean::class.java` refers to Java primitive type `Class<boolean>` which is equivalent to `Boolean::class.javaPrimitiveType`
- For boxed type use `Boolean::class.javaObjectType` == `Class<Boolean>`
**TIP:** When dealing with Java primitive types using reflection, use `::class.javaPrimtiveType` or `::class.javaObjectType` to avoid the confusion with using plain `::class.java`.
Changelog:
[Internal]
Reviewed By: cortinico
Differential Revision: D73224138
fbshipit-source-id: 858093a22b38bfdad40b170d0cf80a440e503829
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50812
tsia, adding some accessibility examples that we have refined so far this half.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73283176
fbshipit-source-id: 5bb451c1e79cd8bc92f333ef2fce82669ad0e971
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50811
tsia, adding some accessibility examples that we have refined so far this half.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73281713
fbshipit-source-id: 42db49feba5c232e699afe01916425ddf11f4aea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50810
tsia, adding some accessibility examples that we have refined so far this half.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73280582
fbshipit-source-id: a1cc572522729d06b9a0227f0e5731e698f86cc3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50838
This diff removes the usages of ShadowNodes in the new architecture by fully releasing disableShadowNodeOnNewArchitectureAndroid() feature flag.
changelog: [internal] internal
Reviewed By: alanleedev
Differential Revision: D72671083
fbshipit-source-id: a1505d02fd6bf7e87c7234581a26ef13768796a0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50829
It is not appropriate to go through the fast path for border drawing when we have translucent border colors since it will cause overlapping borders to look weird.
Adding an if statement to prevent fastpath when the alpha value of any border is less than 255 (opaque)
Changelog: [Android][Fixed] - Fix translucent borders on Android overlapping bug
Reviewed By: NickGerleman
Differential Revision: D73145119
fbshipit-source-id: f22d0d55adca571d6b75725f6bc4753f98698763
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50828
The new Background and Border drawables come with some correctness improvements and potential small perf gains on edge cases. We are now switching to using them by default.
Changelog: [Android][Changed] - Change to use new Background and new Border drawables by default
Reviewed By: NickGerleman
Differential Revision: D72082947
fbshipit-source-id: 7caeb279110b520bea760a4621184dc0de05cf78
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50807
This structure is unsafe:
```
// In each native module:
+load
dispatch_once
NSBundle mainBundle
```
NSBundle mainBundle itself uses dispatch_once during initialization. If that initialization triggers a native module class load, we could end up with a circular dependency chain. This could deadlock the application.
## Changes
Just remove the dispatch_once. Getting the NSBundle mainBundle is very efficient after the first access. And NSBundle objectForInfoDictionaryKey is also very efficient.
Created from CodeHub with https://fburl.com/edit-in-codehub
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73265906
fbshipit-source-id: f718e5bba7e95517613204b1f95e1b637e6c2366
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50832
Changelog: [iOS][Breaking]
these experiences did not end up shipping, so cleaning them up.
Reviewed By: fkgozali
Differential Revision: D73343958
fbshipit-source-id: ff0dc1394748c897aed9c66513b250dfc2192e0d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50818
Logging LegacyArchitectureLogger asserts only in Debug mode as that will give us enough information about wrong usages of Legacy Architecture at this point
changelog: [internal] internal
Reviewed By: fkgozali
Differential Revision: D73322301
fbshipit-source-id: 981a26b1bd7c89080f35ef0ab27677b0a38f2665
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50813
This is already in the same package, which makes Gradle build unhappy. Then, this wasn't invoked at all by a Buck build, because we have target per folder. Let's fix those.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D73286269
fbshipit-source-id: 6100c83e6607705160e4602e8637e3b1ebe8f28b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50809
Configures `react-native/metro-babel-transformer` (used by `react-native/babel-preset`) to parse source using `hermes-parser` to target React 19. This changes components written with Component Syntax to stop generating `forwardRef` calls (because `ref` is now a prop).
Most of this was already accomplished in https://github.com/facebook/react-native/pull/50377 ({D72070021}), but this call site was missed.
Changelog:
[General][Changed] - Configured Hermes Parser to target React 19, resulting in Component Syntax no longer producing `forwardRef` calls.
Reviewed By: elicwhite
Differential Revision: D73279825
fbshipit-source-id: c0d64cb8c0adb22b78c5fbed1b2c386c8b3f3ede
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50796
When we render a `Switch` today we are never actually focusing on the native `UISwitch` that gets rendered. We instead focus on the parent `RCTViewComponentView` which houses the `UISwitch` as a `contentView`. That is because of [this logic](https://www.internalfb.com/code/fbsource/[b7e1547dab5a]/xplat/js/react-native-github/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm?lines=1211-1213). This blocks the accessibility of any descendants, including the `contentView`.
What we lose here is the announcement of "on" and "off" based on the toggle state that comes built into `UISwitch`. To do this today you need to add `accessibilityState={{checked: ...}}` which is very unintuitive. Android DOES announce "on" and "off".
We can fix this with an override on the switch class.
Changelog: [iOS][Fixed] - Fix "on" and "off" announcements on `Switch`
Reviewed By: realsoelynn
Differential Revision: D73226500
fbshipit-source-id: ff4eed0b0b4b978e4b59c5e4b37d880373f6506c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50806
1. `useWindowDimensions` is already returning in DIPs, my math was just wrong before
2. Playground is marking itself as a deeplink when it shouldn't be
Changelog: [internal]
Reviewed By: cortinico, joevilches
Differential Revision: D73221335
fbshipit-source-id: 32dfa9d60609faccef8e264aa46d64b79250b64d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50782
Changelog: [IOS][FIXED] Fix TextInput `onContentSizeChange` event being dispatched only once on iOS on the new architecture
Currently, the comparison to decide whether to send event happens between the content size before and after layout metrics update. Those values turn out to be the same in all but the first call.
This updates the logic to use the previously send values in the comparison.
Reviewed By: huntie
Differential Revision: D73182563
fbshipit-source-id: 3b764a89c1844e203001d75022a3295a3fd747f2
Summary:
PR migrates DynamicFromObject class to Kotlin as part of https://github.com/facebook/react-native/issues/50513 work.
## Changelog:
[ANDROID] [CHANGED] - Migrated DynamicFromObject to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50754
Test Plan: Run RN-Tester application and played around with it a bit.
Reviewed By: mlord93
Differential Revision: D73118014
Pulled By: alanleedev
fbshipit-source-id: 84958ff07ccafea9ec3dbdf06467c638eb92d49d
Summary:
unstable_hasComponent(component) first registers the component with react native, if possible. Then, it returns you whether registration succeeded.
## Problem
For unregistered components, the initial call returns false. But, all subsequent calls return true.
The reason why: After the initial call fails, react native registers unimplemented view under that component name. So, all subsequent calls return true.
## Solution
Just record the initial loopup result. And always return that initial lookup result from this method.
Changelog: [iOS][Fixed] Fix bug: unstable_hasComponent(*) = true for unregistered components for n > 1th call.
Reviewed By: yungsters
Differential Revision: D73127468
fbshipit-source-id: ee30bde486a6bb970f40f654c65a8946452f49b3
Summary:
These internals have leaked pretty far. As we are adding support for JNI reference state wrappers, lets hide this, and make functions for getting MapBuffer work automatically if state data exposes the requisite functions, instead of external users needing to worry about multiple possible `ConcreteState` types for a given state data type.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D73158627
fbshipit-source-id: e3ac2a045368d46fab72e2017fc28d680db6a7c0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50784
Migrates us from several `.npmignore` files to `package.json#files`, for the main `react-native` package.
This reduces the size of our npm package by 38 files — in particular, catching previously missed `__tests__` and `__docs__` directories.
```diff
- npm notice package size: 4.4 MB
- npm notice unpacked size: 23.7 MB
- npm notice total files: 4533
+ npm notice package size: 4.4 MB
+ npm notice unpacked size: 23.7 MB
+ npm notice total files: 4533
```
NOTE: `"files"` or `.npmignore` — one or the other!
- Having `.npmignore` at the package root does not behave(!). Having `"files"` as one source of truth is better and safer. See https://github.com/npm/cli/issues/6221.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D73185321
fbshipit-source-id: 429c9fec4f447d63440a38bb8e3f3ce3bd155414
Summary:
parse-git-config is a transitive dep for Danger that hasn't been updated in years and has an unresolved CVE (CVE-2025-25975)
Danger has moved away from this dependency yesterday and cut a new version, so we can update to resolve
Changelog: [General][Fixed] Update Danger to 13.0.4
Reviewed By: cortinico
Differential Revision: D73181590
fbshipit-source-id: e5c512e6f381725eea71d64555018327144e23be
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50730
This is a consolidation of our "dev support" features in the `src/private/` dir.
New grouping:
- `src/private/devsupport/`
- `devmenu/` — The Dev Menu and in-app inspection features (in-app UI)
- `elementinspector/` — The Element Inspector overlay (panel with sub-features), accessed from Dev Menu → Toggle Element Inspector
- `perfmonitor/` — The Perf Monitor overlay, accessed from Dev Menu → Show Perf Monitor
- `rndevtools/` — Modules supporting React Native DevTools (external UI)
`NativeReactDevToolsRuntimeSettingsModule.js` and `NativeReactDevToolsSettingsManager.js` are also moved out of `specs_DEPRECATED/`.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D73031559
fbshipit-source-id: 952a469f31f4cd05aeed27dc7023552e723ca078
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50780
This bumps Kotlin to the latest stable: 2.1.20.
I've also fixed several warnings emitted by the new compiler.
Changelog:
[Android] [Changed] - Kotlin to 2.1.20
Reviewed By: rshest
Differential Revision: D73122000
fbshipit-source-id: 019a01d085b2c115a3efcf567056e9990a1ff0ce
Summary:
PR migrates DynamicFromArray class to Kotlin as part of https://github.com/facebook/react-native/issues/50513 work.
## Changelog:
[ANDROID] [CHANGED] - Migrated DynamicFromArray to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50602
Test Plan: Run RN-Tester application and played around with it a bit.
Reviewed By: rshest
Differential Revision: D73179609
Pulled By: cortinico
fbshipit-source-id: e304884fea9f57e152bca4926677d7338dc2403a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50774
Adding a Fantom test for the `useShadowNodeStateOnClone` feature flag, showing that the shadow node state is maintained after commit hook processing only when the feature flag is enabled.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D73121159
fbshipit-source-id: bbd7f46fbf49394ca5015e825a59d2fb1b519ee5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50776
Changelog: [Internal]
Adds a lint rule that prevents the use of named imports when importing types from React. `flow-api-translator` relies on the `React` namespace being used when generating TypeScript definitions based on Flow.
Reviewed By: huntie
Differential Revision: D73170799
fbshipit-source-id: 96d014b016c7cec8d3b266447dc7a185d2b1da26
Summary:
I've migrated `FrescoBasedTextInlineImageSpan.java` to kotlin. Reference https://github.com/facebook/react-native/issues/50513.
## Changelog:
[ANDROID] [CHANGED] - Refactor class `FrescoBasedTextInlineImageSpan` from Java to Kotlin.
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/50532
Test Plan: Tested the RN tester app with `yarn android` on both new and old architecture.
Reviewed By: rshest
Differential Revision: D73031024
Pulled By: cortinico
fbshipit-source-id: e7208bf1103849f38c3dc26d73b31315b2326275
Summary:
I forgot to add toString and protocol in test cases last time when we merged this https://github.com/facebook/react-native/pull/50043
## 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][ADDED] More Test cases
Pull Request resolved: https://github.com/facebook/react-native/pull/50768
Test Plan: Tested with yarn jest
Reviewed By: rshest, cipolleschi
Differential Revision: D73169665
Pulled By: cortinico
fbshipit-source-id: 1115c0ccce52a67663fcd60ef376ce7bde502d1f
Summary:
This unblocks the `binary-compatibility-validator` for Kotlin 2.1.0
I've bump the tool to the latest version + re-aligned all the dependencies to the one used by the tool as well
(diff utils, asm, kotlinx-metadata-jvm).
Reviewed By: mdvacca
Differential Revision: D73057557
fbshipit-source-id: 020babea3a4032a8f9919ce7f456c3d4fb9a8e0c
Summary:
Nothing big, fixed typos in CHANGELOG
## Changelog:
[INTERNAL] - Fix Changelog message
<!-- 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/50772
Reviewed By: cortinico
Differential Revision: D73155730
Pulled By: arushikesarwani94
fbshipit-source-id: 0f169b455af5d657f3fa09a99562eb376c955389
Summary:
Since I enabled INTERPROCEDURAL_OPTIMIZATION last week, we're having a warning for gtest that
they're not setting this CMake policy: CMP0069
https://cmake.org/cmake/help/latest/policy/CMP0069.html
As Gtest is not a production dependency, we can safely ignore this warning. So I'm enabling the policy for all the targets.
Changelog:
[Internal] [Changed] -
Reviewed By: alanleedev
Differential Revision: D73122573
fbshipit-source-id: 319a889024f080752f0c9287d011209459dcb013
Summary:
Afacit from searching both fbsource and GitHub, this should be totally dead.
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D73154613
fbshipit-source-id: 1ed993ae53e7bc97232a8200b5fb4e01f0db7bb4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50773
With shadow node syncing enabled by default, whenever a shadow node has to be cloned, we can be guaranteed that the state on the shadow node will be the most recent state in most cases.
This change fixes state updates being ignored when cloning YogaLayoutableShadowNodes from a commit hook. Since the most recent state gets updated post commit, any clone reading the most recent state might miss state changes done within the commit.
Changelog: [Internal]
Reviewed By: rshest, cipolleschi
Differential Revision: D72315898
fbshipit-source-id: 5e14d03681dd1cc5686a649caa2e8c3685042cfa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50770
OSS CI is failing because the we forgot a deprecation message in ReactScrollViewManager.
## Changelog:
[Internal] - Add deprecation annotation to fix ci build
Reviewed By: sbuggay
Differential Revision: D73136939
fbshipit-source-id: 4f39d7c7ae60aaca1011b70135d9535b16ed58e0
Summary:
This structure is unsafe:
```
// In each native module:
+load
dispatch_once
NSBundle mainBundle
```
NSBundle mainBundle itself uses dispatch_once during initialization. If that initialization triggers a native module class load, we could end up with a circular dependency chain. This could deadlock the application.
## Changes
Just remove the dispatch_once. Getting the NSBundle mainBundle is very efficient after the first access. And NSBundle objectForInfoDictionaryKey is also very efficient.
Created from CodeHub with https://fburl.com/edit-in-codehub
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D73058551
fbshipit-source-id: 9d14b5556748288227cfb93940f79d44997d7b47
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50735
This change adds a warning in JS that is printed when the app is running using the old architecture.
The assumption is that, if it is running with Fabric, it is running with the new architecture. So running without Fabric implies old architecture.
## Changelog:
[General][Added] - Add warning when the app runs with the legacy architecture
Reviewed By: cortinico, rubennorte
Differential Revision: D73041156
fbshipit-source-id: 89a14f6370ae54b9d115e0ef672f29084d009a8e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50757
We received [this issue](https://github.com/facebook/react-native/issues/50747) in OSS where the URL parsing logic does not respect node/chromium specs.
This can cause issue in usercode. This change fixes it
## Changelog:
[General][Fixed] - make sure that URLs are parsed following the node specs
Reviewed By: huntie
Differential Revision: D73101813
fbshipit-source-id: 36f1d23b3ad7882c16524843621d9ebbcc09b95d
Summary:
This diff converts the last java file inside `com.facebook.react.views.textinput` to Kotlin.
As `ReactEditText` is quite involved, reviewing this one is going to be quite critical.
I'm marking this as breaking as a number of nullability types has changed for OSS users.
Changelog:
[Android] [Breaking] - com.facebook.react.views.textinput.ReactEditText is now in Kotlin. If you're subclassing this type you'll need to adjust your signatures.
Reviewed By: rshest
Differential Revision: D72972921
fbshipit-source-id: 92ed112444cbc20daed5466ad20f651479bfac6f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50738
The implementation of this in Hermes depends on a deprecated CMake
feature. Since it just needs to run a command to generate the dSYM, it
seems simpler to eliminate the flag and move the work into the RN build
script.
## Changelog:
[Internal] - move dsym generation logic from Hermes to RN
Reviewed By: cortinico, cipolleschi
Differential Revision: D73054511
fbshipit-source-id: 4b8f9d97ef3386154bfe4030e0061f9c0791d7ea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50760
Changelog: [internal]
This updates all Excalidraw SVG diagrams in the repository to use the latest format exported by Excalidraw after the fix in https://github.com/excalidraw/excalidraw/pull/9386.
I basically opened every image in Excalidraw and re-exported it.
Reviewed By: lenaic
Differential Revision: D73107703
fbshipit-source-id: 4432e952f9e6ee29f59ef8a9ff05479552744a31
Summary:
## Changelog:
[Android] [Internal] - As in the title
Reviewed By: cortinico
Differential Revision: D72971263
fbshipit-source-id: 8bd0c4e29e48f7e3d47a97f1a4e988e7b0282646
Summary:
We have a different version of OkHttp internally and in OSS so we need to suppress these for now.
Only Error was supressed in previous diff, also suppress warning.
Changelog: [Internal]
Reviewed By: fkgozali
Differential Revision: D73085528
fbshipit-source-id: a38a6e15e8ca33d4e93678c54d337ad9e86c2bbe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50748
We have a different version of OkHttp internally and in OSS so we need to suppress these for now.
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D73079163
fbshipit-source-id: 1928b00acbba5bc6577a248bc46a091d5b970f10
Summary:
const val NAME had quotes around it breaking native module loading from CoreReactPackage
This error was uncaught in previous diff.
Changelog:
[Internal]
Reviewed By: makovkastar
Differential Revision: D73070533
fbshipit-source-id: a7f14f4b4bd25003529c625d9182554dd2c2ee3e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50744
Crash was discovered after converting source code from Java to Kotlin.
This was due to type checking against Kotlin types instead of Java types.
Also added minor refactoring of code
Changelog:
[Internal]
Reviewed By: Abbondanzo
Differential Revision: D73064216
fbshipit-source-id: 3429f0627740438be3bbc345c9e7b2c4a535da7e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50586
# Changelog: [Internal]
We are going to record microtasks phase of the Event Loop.
RAII reporter that was added in D69399955 will be updated to support phase as a parameter.
There is one downside of the current implementation. Every Event Loop task will have a corresponding "Run Microtasks" block displayed, even if the microtasks queue was empty. There is no API in `jsi` that would allow us to get the size of the queue. If we had that, we could emit this event only when there is something in a microtasks queue.
The good this is that these frames usually have duration of 1-2 microseconds, so they are not visible, until user fully zooms in.
Reviewed By: rubennorte
Differential Revision: D72649816
fbshipit-source-id: d597f5b75aaf0975b14f61d2aa28b9c8bc34f4d5
Summary:
The check nightlies job is failing on some libraries because the library key contains `/` and ` ` characters that fails to be used properly when they are part of a path.
With this change, we are replacing those characters with `_` so this is a valid path were CI can save the outcome that needs to be collected later.
## Changelog:
[Internal] - Fix folder path
Pull Request resolved: https://github.com/facebook/react-native/pull/50726
Test Plan: Running in GHA
Reviewed By: cortinico
Differential Revision: D73036049
Pulled By: cipolleschi
fbshipit-source-id: 147b9fa15b4dfa08e94f01715e5a175479230d80
Summary:
*Hi,*
I made a small update to the dependency array in `useLayoutEffect`, changing it from `[native]` to `[native.value]` for better precision. Since JavaScript compares objects by reference, this change can lead to a minor performance improvement. Additionally, as `useLayoutEffect` is render-blocking, I wanted to ensure we optimize its usage as much as possible.
As a micro-optimization and in line with good coding practices, I also changed a `let + if` variable to `const`. While the performance gain is minimal, it contributes to cleaner and more consistent code.
Please feel free to review, and I sincerely apologize if I made any mistakes in the process.
## 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
-->
*[General] [Changed]* – Refined `useLayoutEffect` dependency array from `[native]` to `[native.value]` for improved precision and efficiency in re-renders.
*[General] [Changed]* – Replaced `let` with `const` where applicable for better code standards and micro-optimization.
Pull Request resolved: https://github.com/facebook/react-native/pull/50682
Reviewed By: huntie
Differential Revision: D72979663
Pulled By: yungsters
fbshipit-source-id: 64ac09811b78ca67be903d8cd91da8cd6f0a45fa
Summary:
Implemented ReactLifecycleStateManager.java in Kotlin as part of Kotlin-ifying RN Round 3
## Changelog:
[ANDROID] [CHANGED] - Migrate ReactLifecycleStateManager to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50685
Test Plan: Run RN-Tester and interacted with Mulitple components(Image, Flatlist, Input ) with both new architecture enabled and disabled
Reviewed By: rshest
Differential Revision: D73003097
Pulled By: cortinico
fbshipit-source-id: 27b90a0b94c17aa42cbb1665ca6fcf06db7cbf96
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50396
Integrates the `yarn build-types` script into our CI workflows.
**Notes**
- Will validate type generation in future PRs as part of the `test-all` workflow (this has been stable (i.e. successfully runs for our codebase) for the last 3 weeks).
- This is not load bearing in production code until D71969602.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71975705
fbshipit-source-id: a234a05008b5e75976bbd5258948c37fcc1eeb76
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50718
On Windows `path.join` returns path with separators unsupported by resolution mechanism. This change enforces the use of `/` separators in `no-deep-imports` rule tests.
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D73021185
fbshipit-source-id: d4799c01a5aef5b27fad961d774b58627115d213
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50714
This diff changes the category used by LegacyArchitectureLogger soft errors to be SOFT_ASSERTIONS
changelog: [internal] internal
Reviewed By: makovkastar
Differential Revision: D72999455
fbshipit-source-id: b5378fb92b22a3d06dda550192c7eba0db97ddcb
Summary:
Migrated ReactClippingViewGroupHelper.java to Kotlin as part of the React Native Kotlin migration initiative.
This change helps modernize the React Native Android codebase and improve maintainability.
No functional changes were introduced—only a language conversion while preserving the original logic and behavior.
## Changelog:
[ANDROID] [CHANGED] - Migrated ReactClippingViewGroupHelper.java to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50679
Test Plan:
✅ Ran yarn && yarn android in the root directory and verified RNTester builds successfully.
✅ Opened RNTester on an Android emulator/device and navigated through various screens to ensure the app works as expected.
✅ Specifically tested views with removeClippedSubviews enabled to confirm runtime behavior remains unchanged.
✅ Used [KtFmt](https://github.com/facebook/ktfmt) to format the Kotlin file properly.
Reviewed By: arushikesarwani94
Differential Revision: D72973621
Pulled By: cortinico
fbshipit-source-id: e6f426a0cb7eb583935a560660900b29786df4c3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50105
Pull Request resolved: https://github.com/facebook/react-native/pull/49543
When using `ReactScrollView` or `ReactHorizontalScrollView` Views with `removeClippedSubviews` keyboard navigation didn't work.
This is because keyboard navigation relies on Android's View hierarchy to find the next focusable element. With `removeClippedSubviews` the next View might've been removed from the hierarchy.
With this change we delegate the job of figuring out the next focusable element to the Shadow Tree, which will always contain layout information of the next element of the ScrollView.
We then prevent the clipping of the topmost parent of the next focusable view to lay out the entire containing element in case we have some necessary context in the parent
Changelog: [Android][Fixed] - Fix keyboard navigation on lists with `removeClippedSubviews` enabled
Reviewed By: joevilches
Differential Revision: D71324219
fbshipit-source-id: b55b7735a30714b2a5e1c9e0ed4ae84ab43f6694
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50404
Add another function to fabric to get the topmost stacking context parent given a root and a child.
This is to be used on focus searching algorithm in the case where the next focusable child is deeper in the hierarchy meaning we need to find the top most parent in the Android hierarchy and lay that out as well before transferring focus.
If we don't lay out the parent as well as the next focusable view:
- The next focusable view might lack context given by the parent
- If the parent is a scrollview and has removeClippedSubviews enabled then laying out the next focusable view will not work
- If the view is deeper in the android hierarchy in some cases it won't be layed out unless the parent is
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D72178408
fbshipit-source-id: 7b91ea695e236f3a92f9703bcc9ca943bf0dec24
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50196
Currently when `removeClippedSubviews` is enabled on Android keyboard navigation breaks and we can never focus the elements that are clipped. iOS has a similar issue but not as drastic, it only happens when elements on the FlatList have a lot of margin between them.
This algorithm aims to find the next focusable view and return it to native so that we can prevent the clipping of the view on the view clipping algorithm and hence fix keyboard navigation. For more information see D71324219
Fabric algorithm to find the next focusable view given:
`parentTag`: Top most relevant parent of the focused view
`focusedTag`: Tag of the currently focused view
`direction`: Direction in which focus is moving
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D71558965
fbshipit-source-id: 1a13c82d067834337e7f7936860780f467c9a15d
Summary:
Introduce a trait to be able to tell if a ShadowNode is focusable by keyboard. This will be used for focus ordering that delegates the work to the shadow tree when Native platforms don't have enough information to define the next focusable node
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D72258544
fbshipit-source-id: dcc2410b408eab5dbefc4512e0680cbe7f18c811
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50638
There were two issues with inset shadows here that I fixed
* If spread was big enough it would "invert" the clear region. [RectF's inset](https://developer.android.com/reference/android/graphics/RectF#inset(float,%20float)) method does not bound to a 0x0 rect, it will instead start making the rect bigger if the inset value is large enough.
* If the clear region was outside the rect the shadow disappeared. This is because [Canvas's drawDoubleRoundRect](https://developer.android.com/reference/android/graphics/Canvas#drawDoubleRoundRect(android.graphics.RectF,%20float[],%20android.graphics.RectF,%20float[],%20android.graphics.Paint)) will fail to draw if the inner rect is not completely inside of the outer.
Changelog: [Android][Fixed] - Fix inset shadow edge cases
Reviewed By: GijsWeterings
Differential Revision: D72833275
fbshipit-source-id: 3f42fb767630319c51a380f8ea28d682df9771a6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50666
This diff updates the assert message in ReactNativeNewArchitectureFeatureFlags to reflect the behavior required by the assert
changelog: [internal] internal
Reviewed By: mlord93
Differential Revision: D72868428
fbshipit-source-id: 7a43aa9d3b3a2ee60e88cf77d117d97edc955af3
Summary:
Fixes https://github.com/facebook/react-native/issues/45857
The general idea behind this PR is the same for both platforms: dirty all nodes with `MeasurableYogaNode` trait when the layout is constrained with a new `fontSizeMultiplier`. There were a few caveats:
- `ParagraphShadowNode` marks its layout as clean in the constructor in most cases. To prevent that from using a stale measurement I'm using the font scale multiplier stored in `content_` property of the node. That value is then compared with the scale used to create the attributed string kept in the node's state. If those differ, the layout is not cleared.
- On Android, font scale wasn't passed down to the `SurfaceHandler`
- On Android, text measurement relies on cached `DisplayMetrics` which were not updated when the system font scale changed.
- `AndroidTextInputShadowNode` wasn't using `fontSizeMultiplier` at all. I needed to add it in all places where an `AttributedString` is constructed.
## Changelog:
[GENERAL] [FIXED] - Fixed text not updating correctly after changing font scale in settings
Pull Request resolved: https://github.com/facebook/react-native/pull/45978
Test Plan:
So far tested on the following code:
```jsx
function App() {
const [counter,setCounter] = useState(0);
const [text,setText] = useState('TextInput');
const [flag,setFlag] = useState(true);
return (
<SafeAreaView
style={{
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
}}
>
<Text style={{fontSize: 24}}>RN 24 Label Testing {flag ? 'A' : 'B'}</Text>
<TextInput value={text} onChangeText={setText} style={{fontSize: 24, borderWidth: 1}} placeholder="Placeholder" />
<Pressable onPress={() => setCounter(prevState => prevState + 1)} style={{backgroundColor: counter % 2 === 0 ? 'red' : 'blue', width: 200, height: 50}} />
<Pressable onPress={() => setFlag(!flag)} style={{backgroundColor: 'green', width: 200, height: 50}} />
</SafeAreaView>
);
}
```
Reviewed By: NickGerleman
Differential Revision: D71727907
Pulled By: j-piasecki
fbshipit-source-id: 240fb5fa4967a9182bce7e885798b233d1e25aea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50377
Configures the Hermes Parser to target React 19, which changes components written with Component Syntax to stop generating `forwardRef` calls (because `ref` is now a prop).
Changelog:
[General][Changed] - Configured Hermes Parser to target React 19, resulting in Component Syntax no longer producing `forwardRef` calls.
Reviewed By: javache, SamChou19815
Differential Revision: D72070021
fbshipit-source-id: b891789d4ff1cbcb8eebea3525361ab14e628b51
Summary:
Migrated FrescoBasedReactTextInlineImageShadowNode.java to Kotlin as part of the React Native Kotlin migration initiative.
This change helps modernize the React Native Android codebase and improve maintainability.
No functional changes were introduced—only a language conversion while preserving the original logic and behavior.
## Changelog:
[ANDROID] [CHANGED] - Migrated FrescoBasedReactTextInlineImageShadowNode.java to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50693
Test Plan:
✅ Ran yarn && yarn android in the root directory and verified RNTester builds successfully.
✅ Opened RNTester on an Android emulator/device and navigated through various screens to ensure the app works as expected.
✅ Specifically tested views with FrescoBasedReactTextInlineImageShadowNode enabled to confirm runtime behavior remains unchanged.
✅ Used [KtFmt](https://github.com/facebook/ktfmt) to format the Kotlin file properly.
Reviewed By: cortinico
Differential Revision: D72948067
Pulled By: rshest
fbshipit-source-id: ed56e6b328804d7b70271b669d101f70d6190d7f
Summary:
On Android, when resource shrinking is enabled, all resources added by Metro may be removed as react-native is accessing resources based on strings rather than references, so AGP can't see its usage.
Example output of `android/app/build/outputs/mapping/release/resources.txt `when `shrinkResources` is enabled.
```
raw/__node_modules_expo_vectoricons_build_vendor_reactnativevectoricons_fonts_materialcommunityicons : reachable=false
drawable/__common_assets_haptics_icon : reachable=false
```
It’s a coincidence that most of the resources are currently working, as many file names begin with strings that already exist in the String Pool. For example, `node_modules...` is flagged as used because 'node' is present in the String Pool, causing it to be whitelisted. However, this does not guarantee that the same will apply to all files - especially in a monorepo setup, where paths are significantly different. For example
* `__node_modules_expo_vectoricons_build_vendor_reactnativevectoricons_fonts_materialcommunityicons`
* `__common_assets_haptics_icon`
To prevent that behavior, metro during assets export should create `keep.xml` listing all resources generated by metro.
https://developer.android.com/build/shrink-code#keep-resources
We have already made a similar change in expo cli: https://github.com/expo/expo/pull/35465
## Changelog:
[ANDROID][ADDED] - Generate keep.xml to prevent resource shrinking
Pull Request resolved: https://github.com/facebook/react-native/pull/50620
Test Plan:
1. Enable resource shrinking in RNTester by adding this to `android.buildTypes.release` to `packages/rn-tester/android/app/build.gradle.kts`
```gradle
isMinifyEnabled = true
isShrinkResources = true
```
2. Use some resources in playground, for example:
```diff
diff --git a/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js b/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js
index 9dbacb99701..9ac9c231f3f 100644
--- a/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js
+++ b/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js
@@ -11,16 +11,14 @@
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
-import RNTesterText from '../../components/RNTesterText';
import * as React from 'react';
import {StyleSheet, View} from 'react-native';
+import {Header} from "react-native/Libraries/NewAppScreen";
function Playground() {
return (
<View style={styles.container}>
- <RNTesterText>
- Edit "RNTesterPlayground.js" to change this file
- </RNTesterText>
+ <Header />
</View>
);
}
```
3. Build app using `hermesRelease` variant
4. See Playground screen
| Before | After |
|---|---|
| <img width="488" alt="Zrzut ekranu 2025-04-10 o 12 17 53" src="https://github.com/user-attachments/assets/24fcaa7b-6ddb-4ba6-9fe5-65c27bcbc931" /> | <img width="488" alt="Zrzut ekranu 2025-04-10 o 12 15 58" src="https://github.com/user-attachments/assets/09a1ce77-be26-4571-a4b8-c466bf19e026" /> |
5. Inspect `packages/rn-tester/android/app/build/outputs/mapping/hermesRelease/resources.txt`
| Before | After |
|---|---|
| `drawable/_reactnative_libraries_newappscreen_components_logo : reachable=false` | `drawable/_reactnative_libraries_newappscreen_components_logo : reachable=true` |
Reviewed By: cortinico
Differential Revision: D72960028
Pulled By: huntie
fbshipit-source-id: df725fa2ea50150cd67687a97986976ffbbb5b40
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50698
Changelog: [internal]
This cleans up the flag to enable paint time reporting for Event Timing API entries, as this reporting fixes a bug and we've verified is stable/performant enough.
Reviewed By: rshest
Differential Revision: D72960337
fbshipit-source-id: 976810382208b9403c01c80324b540570bbc0e42
Summary:
Avoid incorrectly updating caret position
Pull Request resolved: https://github.com/facebook/react-native/issues/50641
The caret position is updated incorrectly when a user is first typing if an zero-length selection is set.
## Changelog:
[IOS] [CHANGED] - Typing into TextInput now will not cause the caret position to update to the beginning when a zero-length selection is set.
Pull Request resolved: https://github.com/facebook/react-native/pull/50680
Test Plan:
Tested with the following code(a simplified version from the code in https://github.com/facebook/react-native/issues/50641)
```js
const [selection, setSelection] = useState({start: -1, end: -1});
const onSelectionChange = (
evt: NativeSyntheticEvent<TextInputSelectionChangeEventData>,
) => {
const {selection} = evt.nativeEvent;
const {start, end} = selection;
console.log('selection change: ', start, end);
setSelection(selection);
};
return (
<View style={{ position: 'absolute', top: 50, left: 30 }}>
<TextInput
placeholder="test"
selection={selection}
onSelectionChange={onSelectionChange}
/>
</View>
);
```
When using the main branch, the caret position will jump back to the beginning after the first typing.
It works fine after applying this commit.
Reviewed By: fabriziocucci
Differential Revision: D72957245
Pulled By: cipolleschi
fbshipit-source-id: 3586797332b35e86b17f386a35e7d192ff758f7e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50699
Changelog: [internal]
Just changing the template to include emojis in the top level titles to make it easier to scan the doc
Reviewed By: lenaic
Differential Revision: D72961870
fbshipit-source-id: 64c45e7ac769c38af06ea318cdb581a04e230f90
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50656
This is going to convert to Kotlin one of the biggest class we have: ReactTextInputManager
As this class is quite big, I suspect there will be breakages.
https://github.com/search?type=code&q=%22%3A+ReactTextInputManager%22
I will investigate further and adjust the class as necessary.
Changelog:
[Android] [Breaking] - ReactTextInputManager is now in Kotlin
Reviewed By: rshest
Differential Revision: D72859925
fbshipit-source-id: 140d1a48ef891f1e6a401e3be59a11d3f9e24078
Summary:
Static code analysis detected obsolete SDK version checks.
Since [the minimum supported SDK version is API 24](https://github.com/react-native-community/discussions-and-proposals/discussions/802), these checks for API 21 are no longer necessary and can be safely removed.
## Changelog:
[INTERNAL] - Remove obsolete TargetApi annotations for LOLLIPOP (API 21)
Pull Request resolved: https://github.com/facebook/react-native/pull/50686
Test Plan:
```sh
yarn test-android
yarn android
```
CI should be green.
Reviewed By: cortinico
Differential Revision: D72948073
Pulled By: rshest
fbshipit-source-id: 1dd1415364d19f115771de3643cdc023a247d851
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50645
While we were refactoring the generation of the podspec, we made a mistake and we started generating the ReactCodegen.podspec for both libraries and apps.
This must be generated only for apps.
## Changelog:
[iOS][Fixed] - Generate `ReactCodegen.podspec` only for apps.
Reviewed By: fabriziocucci
Differential Revision: D72854074
fbshipit-source-id: 5a1d1120e576d4fe4cf8f733793f5a2619278c2b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50542
After TS types generation is completed, react native deep imports will be deprecated. This rule produces warnings to let users know to use root imports instead. For more information about why this rule was added, please check [RFC](https://github.com/react-native-community/discussions-and-proposals/pull/894).
Changelog:
[General][Added] - Added no-deep-imports rule to eslint-plugin-react-native.
Reviewed By: robhogan
Differential Revision: D71398004
fbshipit-source-id: 69104f69b1b1c59b5b0f115dcdd708a46d8d614d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50657
The ReactTextInputManager file is huge and really hard to migrate to Kotlin.
Here I'm extracting 4 private inner classes to separate files and converting them to Kotlin.
This will make reviewing the Kotlin migration of ReactTextInputManager a bit easier.
Changelog:
[Internal] [Changed] -
Reviewed By: rshest
Differential Revision: D72858396
fbshipit-source-id: 1fcca1b8421c810aa4bf9fdca7656f4e805565d8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50647
This diff makes the following file internal - ReactTextInputShadowNode
as part of our ongoing effort of reducing the API surface.
There is only one usage in OSS: `react-native-aztec`. The library is abandoned
with little weekly download so we should be good marking this as internal.
Changelog:
[Internal] [Changed] - ReactTextInputShadowNode is now internal.
Reviewed By: javache
Differential Revision: D72854896
fbshipit-source-id: 27512704ed84e893ae72d26469527276133a6295
Summary:
We fixed the previous layout issue when it wasn't in a ScrollView (I think text caching problem?) Let's enable for more than just Catalyst, and re-enable this test for iOS!
Changelog: [Internal]
Reviewed By: GijsWeterings
Differential Revision: D72683455
fbshipit-source-id: 538f8e23226c07510d382e45eb29f1710822849e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50673
Because, this is less a pain then trying to shrink every example to fit in to the tiny window given to us by Jest E2E.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D72683487
fbshipit-source-id: 5c08bd04445fc573086bc780194c893d0cb6ea19
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50672
We have precious little screen real estate, esp in E2E tests where we get 320x192 dips. Let's clean this up.
Changelog: [Internal]
Reviewed By: cortinico, GijsWeterings
Differential Revision: D72683491
fbshipit-source-id: 222a77f937dfb9dcceb627d8f084c58df7c07b56
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50669
Fixes a bug that was introduced while migrating from Java to Kotlin.
Changelog:
[Android][Changed] - Fixed a bug with synchronously fetching resources from Metro.
Reviewed By: cortinico, mdvacca
Differential Revision: D72878362
fbshipit-source-id: feb881fa51f6eaa2cb5c7ba87ac93b7fdc29dc2c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50636
A while ago someone on GitHub reported that box shadow on iOS was causing frame drops when animating a large, pretty blurry shadow: https://github.com/facebook/react-native/issues/49128. This week I finally got around to fixing this!
The slowness was happening since we were using CG to draw this shadow, which is very CPU intensive and, to my knowledge, does not take advantage of GPUs to do anything. Couple that with an animating, large, blurry shadow and we have frame issues. These shadows were taking very long to draw, to get the image of the shadow (which then needs to be copied into some texture 3 times as big, composited, put on the screen etc) took 12-14ms :o, thats very slow.
To fix this I figured out how to get CA's shadow APIs working, which take advantage of the GPU. The enable inset shadows and spread you have to get creative with a mix of `shadowPath` and `mask` with a `CAShapeLayer`, but we got it done! Things are much faster, I am not sure how to time this but using a real device shows no frame drops :D
Changelog: [iOS][Fixed] - Box shadows on iOS are faster
Reviewed By: lenaic
Differential Revision: D72823334
fbshipit-source-id: 460339c9d77e7423ce59a1a9178b6b3ad527e4b0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50665
Changelog: [internal]
Just a stylistic change of the link back to the documentation home.
It also changes the link in the template to make sure it's incorrect so people are forced to edit it when creating new docs.
Reviewed By: lenaic
Differential Revision: D72866823
fbshipit-source-id: fa7be286f996049b3f06e2defa5a8c486d63091b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50663
Changelog: [internal]
Adds additional documentation about pragmas and feature flags for Fantom.
Changes the diagram to mention that feature flags are passed to the Fantom CLI.
Reviewed By: andrewdacenko
Differential Revision: D72865960
fbshipit-source-id: abfd167279195495064f3c4dbdcaff92dd865bcf
Summary:
This PR introduces a rewrite of `DynamicFromMap.java` to Kotlin as requested in https://github.com/facebook/react-native/issues/50513.
## Changelog:
[ANDROID] [CHANGED] - Migrated `DynamicFromMap.java` to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50597
Test Plan:
1. Implement unit tests for `DynamicFromMap.kt` - `DynamicFromMapTests.kt`
2. Ensure the tests pass: `./gradlew test`
3. Run the RN tester app on new & on old architectures
Reviewed By: javache, rshest
Differential Revision: D72853616
Pulled By: cortinico
fbshipit-source-id: 855acdc7fa7810ab9f223b0be7778c028a646de5
Summary:
Backing out https://github.com/facebook/react-native/pull/50244 as it is causing unexpected issues internally.
## Changelog:
[iOS][Changed] - Revert "Add warning when a component is loaded with the interop layer"
Reviewed By: cortinico
Differential Revision: D72857290
fbshipit-source-id: cfae6ccf85a472ae03983349fc7a2620e157865d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50658
The root cause of this is D67857739, confirmed via bisect.
The ReactInstanceIntegrationTest.cpp tests caused some sort of state poisoning. Because of that all tests in the same buck module that ran after, failed. These cpp tests have a retry mechanism where failing tests are retried, and because in that situation the integration tests didn't run, they passed there.
This turned into a total of 24 tests being 50% flaky, as every first attempt failed but every second attempt (in isolation) succeeded.
I did a bit of trial and error with resetting InspectorFlags and ReactNativeFeatureFlags (the latter was already being done before D67857739), and added an extra assertion to the tests to make sure that after that, `dangerouslyDisableFuseboxForTest` still worked in the right (but only the right) contexts.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D72860850
fbshipit-source-id: 959e67ff7a43ccc3c35db108bdb1138d8c27d328
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50660
Changelog: [internal]
This is just a simpler way to test for changes in scroll position.
Reviewed By: andrewdacenko
Differential Revision: D72860138
fbshipit-source-id: a92d430399255a278f5c3c72005a5288d28310ab
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50644
Changelog: [internal]
This improves the documentation for the feature flag system by extending information about 2 areas:
- Codegen
- `print` command in CLI
Reviewed By: lenaic
Differential Revision: D72852768
fbshipit-source-id: 97932ea078595ef54cd437a433072f83bbdff609
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50654
We realized that when calling
```
npx react-native-community/cli codegen --path . --platform all --outputPath /tmp/codegen
```
We were generating in the android folder some files that are Apple-specific.
With this change, we should stop generating the Apple specific files in Android.
## Changelog
[General][Fixed] - Do not generate Apple specific files for Android
Reviewed By: cortinico
Differential Revision: D72859336
fbshipit-source-id: 443c4dca032e8e68c1da9d829d361d5e0ed007a0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49887
## Changelog:
[Internal] -
As in the title.
This was the last Java file in the `events-common` module, so now it can be a pure Kotlin one.
NOTE: I opted to make the base method `Event.getEventData` public (instead of previously protected), as based on the usage patterns by the users this seems to make the most sense in this context.
Reviewed By: cortinico
Differential Revision: D70777597
fbshipit-source-id: fdaa52e4400ad8e86a8711daf359eb5a10974d05
Summary:
Static code analysis shows that there are a lot of unresolved KDoc references. This is just another round addressing several of them.
## Changelog:
[INTERNAL] - Fix unresolved KDoc references
Pull Request resolved: https://github.com/facebook/react-native/pull/50640
Test Plan: Verify that the comments link the classes correctly using Android Studio
Reviewed By: cortinico
Differential Revision: D72848152
Pulled By: javache
fbshipit-source-id: e09b1ddad494885ef3090d7f0f62a782eed922c1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50632
Changelog: [internal]
This cleans up the `fixMountingCoordinatorReportedPendingTransactionsOnAndroid` feature flag that is no longer necessary.
Reviewed By: javache
Differential Revision: D72561255
fbshipit-source-id: 0942122832ce40cacc273265e4c95b5fe251dbe6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50643
Changelog: [internal]
Just realized this was missing from the message.
Reviewed By: lenaic
Differential Revision: D72852138
fbshipit-source-id: 27ed4b6e6d8b370cfa34a9878ca9bb0815cb75eb
Summary:
This code is not referenced internally or externally and was part of the DevSplitBundleLoader which was removed in D43597007.
Changelog: [Android][Breaking][Removed] Removed loadSplitBundleFromServer from DevSupportManager interface
Reviewed By: cortinico
Differential Revision: D72790533
fbshipit-source-id: 9e0960af4c528d9019943c89466ab442f34619e1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50545
All usages of Task.call involve a Runnable which returns another Task, which we then extract using `.continueWithTask(Task::getResult)`. Instead inline this behaviour inside `Task.call` to avoid allocation of unnecessary intermediate objects.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D72600051
fbshipit-source-id: 7e7c0c8e1de24b1aeff7addab2eb10272bc73ddb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50546
We do not use this mechanism for exception handing with Tasks, so remove it.
Changelog: [Internal]
Reviewed By: cortinico, fabriziocucci
Differential Revision: D72600053
fbshipit-source-id: f9ae877b05ece66682cb6c291b05257953f5aebb
Summary:
PR is here https://github.com/facebook/react-native/pull/50581
This enables INTERPROCEDURAL_OPTIMIZATION for Hermes in OSS, similar to how we did for libreactnative.so
I also had to bump CMake to 3.30.x to unblock the build failure with `-fuse-ld=gold`
Changelog:
[Internal] [Changed] -
Reviewed By: alanleedev
Differential Revision: D72696879
fbshipit-source-id: e842f6cdf41f6936ef4baeb70e4833a1a0c2d19b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50635
Ships the feature flag introduced by https://github.com/facebook/react-native/pull/50002.
Changelog:
[General][Changed] - Animated components' `ref` will now only reattach when receiving new props if the new props contain different `AnimatedValue` or `AnimatedEvent` instances. (Previously, Animated components' `ref` would always reattach when receiving new props.)
Differential Revision: D72802613
fbshipit-source-id: 4495eb778e3bb9473172c393bd984d93c4ba5f00
Summary:
Deleting ChoreographerCompat as its only method is deprecated and it's unused.
Use Choreographer.FrameCallback instead
changelog: [Android][Breaking] Deleting ChoreographerCompat, Use Choreographer.FrameCallback instead
Reviewed By: alanleedev
Differential Revision: D72817152
fbshipit-source-id: 08624dd07e916116381293cde57a0fdf5452a670
Summary:
ReactModuleWithSpec is deprecated and unused, it was replaced by TurboModule interface.
In this diff I'm removing DoNotStripAny annotation from ReactModuleWithSpec to make sure proguard doesn't retain any reference to it
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D72090838
fbshipit-source-id: 44aa0d6d4b2b592b5b8fea1b9e4578e2df3a9a8e
Summary:
InvalidIteratorException is not used in java, kotlin nor C++. This diff just removes this class
This is not a breaking change due to the lack of usages
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D72090837
fbshipit-source-id: 75aa4a8d2c1abbeb32bd38e5e60cbf7f04be823e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50605
In order to help Proguard to stripping-out bytecode, we need a way to statically enable all Feature Flags used by the New Architecture at build time (e.g. enableBridgelessArchitecture, useTurboModule, etc). The React Native Feature Flag system is mostly implemented in C++ and unfortunately Proguard can’t follow C++ code to understand what feature flags are enabled or disabled at build time.
After analyzing several proposals, we decided to introduce a new internal API called ReactNativeNewArchitectureFeatureFlags, this API will help us detect if an app is using the new architecture at build time.
In order to make this API to work I’ve migrated all usages of new architecture feature flags from ReactNativeFeatureFlags -> ReactNativeNewArchitectureFeatureFlags
changelog: [internal] internal
Reviewed By: mlord93
Differential Revision: D71988912
fbshipit-source-id: a6d58c5b1f39f85370298a347db228e933c6c743
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50604
ReactBuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE asume Fabric and TurboModule interops are disabled, in this diff I'm adding an assertion to validate this at runtime
changelog: [internal] internal
Reviewed By: mlord93
Differential Revision: D71854550
fbshipit-source-id: a4b3acfe4c3227115300b100be4d6222d5eace8e
Summary:
FrameworkAPI classes are not part of the public API, this diff will remove all FrameworkAPI classes from our public API tracking
changelog: [internal] internal
Reviewed By: alanleedev
Differential Revision: D72805466
fbshipit-source-id: b16791ab854017be681ceabd61b628d2d0ba0c5c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50627
Changelog: [internal]
This defines 2 new priorities in Fabric, matching the definitions in React:
* Continuous
* Idle
They're exposed to React via 2 new properties in `nativeFabricUIManager`: `unstable_ContinuousEventPriority` and `unstable_IdleEventPriority`.
It also adds the mapping from the raw event priorities to the Fabric event priorities.
This change doesn't have any effect at the moment. For these to come into effect, we need to:
1. Fix the mapping between Fabric priorities and React priorities in the React repository. See https://github.com/facebook/react/pull/32847
2. Enable the `fixMappingOfEventPrioritiesBetweenFabricAndReact` feature flag.
Reviewed By: javache
Differential Revision: D72791968
fbshipit-source-id: 525b6e5c99dc0ddc1e5c60fdb5b73f0555e5f0d3
Summary:
We currently have a high granularity of different React Native systrace markers. These different markers are not consistently applied and we only enable a subset of them by default in our tracing workflows. As we migrate more and more tracing to Perfetto the tags also become less relevant and will be replaced by Perfetto categories and tracks in the future.
This stack aims to simplify this setup by reducing all systrace tags to single TRACE_TAG_REACT.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D72672912
fbshipit-source-id: 1b6b14fc4ef6d6830bba41d7977f277d63ff5117
Summary:
Changelog: [internal]
(This is "internal" because the `PerformanceObserver` API isn't stable yet).
This cleans up the feature flag to enable the LongTasks API to the availability of the API itself isn't gated behind this specific one.
Reviewed By: rshest
Differential Revision: D72784109
fbshipit-source-id: 8ca45d66cebbd80729829c928bebb13f4a38b7ab
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReactHostImpl.java nullsafe
Reviewed By: cortinico
Differential Revision: D72384082
fbshipit-source-id: 999903b1bf98ea61d2431ace5ca6584535ca4857
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D72384065
fbshipit-source-id: 0f1df2a870d1975b0c522a2e6a17e8959aab6c7c
Summary:
This diff converts to Kotlin the following file: BridgelessAtomicRef.java
as part of our ongoing effort of migrating the codebase to Kotlin.
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D72777272
fbshipit-source-id: b6e10ce32b701614cb323adde7d3df2aa2a8f293
Summary:
This PR aims to migrate FileReaderModule from Java to kotlin as part of https://github.com/facebook/react-native/issues/50513
## 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
-->
[ANDROID][CHANGED]Migrate FileReaderModule to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50562
Test Plan: Tested on RN tester with both new and old arch
Reviewed By: arushikesarwani94
Differential Revision: D72726333
Pulled By: cortinico
fbshipit-source-id: 130393373a258f18f8baaa96745da8fdebd62436
Summary:
This is not mentioned on the spec https://drafts.csswg.org/css-ui/#outline-offset but web adds the outline-offset to the border-radius of the outline. With this change now we render outline in this case like web
Related issue: https://github.com/facebook/react-native/issues/50582
Changelog: [General][Fixed] - Outline now takes into account outline-offset to calculate its border-radius, same as web.
Reviewed By: joevilches
Differential Revision: D72749009
fbshipit-source-id: b3cd39e09e7856b6ccd45aab541cd51f05559832
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark ReactApplicationContext.java as nullsafe
Reviewed By: javache
Differential Revision: D72704847
fbshipit-source-id: cd6907630839a8be2a6fb1d0a673357aef1395fc
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark Inspector.java as nullsafe
Reviewed By: javache
Differential Revision: D72704854
fbshipit-source-id: fcd15a3cc2e9ea1ed90ecca13c068188b859afac
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark JavaScriptModuleRegistry.java as nullsafe
Reviewed By: javache
Differential Revision: D72704846
fbshipit-source-id: d1bca84cd2f4543e154ab8e7948821b176088d64
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark JSBundleLoader.java as nullsafe
Reviewed By: javache
Differential Revision: D72704848
fbshipit-source-id: 7995bda8200fff96ff66e54eb503fee53f8a19dd
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark JSONArguments.java as nullsafe
Reviewed By: javache
Differential Revision: D72704849
fbshipit-source-id: a545bca24d4d95930f0e334c5295584e3c03c10c
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark ModuleSpec.java as nullsafe
Reviewed By: javache
Differential Revision: D72704851
fbshipit-source-id: 4cccc70ac846f1aa90831557841d2e621847bfc4
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark ReactContextBaseJavaModule.java as nullsafe
Reviewed By: javache
Differential Revision: D72704852
fbshipit-source-id: 65abc94d59aefc64ff214bd70ead16d9011dec20
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark ReactMarker.java as nullsafe
Reviewed By: javache
Differential Revision: D72704853
fbshipit-source-id: 2d022f407070ab473a43281fab6f28c53fa09f21
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark NativeModule.java as nullsafe
Reviewed By: javache
Differential Revision: D72704850
fbshipit-source-id: a71f3acddb0382410739b9632fba509fffcfebfd
Summary:
This is not a TextInput and is totally unused (whoops).
Changelog: [Internal]
Reviewed By: cortinico, Abbondanzo
Differential Revision: D72683433
fbshipit-source-id: 1218701fdc473117774a9bdb6f94b6a4508599a4
Summary:
I've implemented a feature that automatically bundles the Metro Bundler's IP address into Android builds. This change aligns the Android development experience with iOS, allowing the app to maintain a connection to the Metro Bundler even when disconnected from USB.
Currently, in iOS builds, the IP address of the computer running the Metro Bundler is automatically bundled into the app, ensuring seamless connectivity even when the device is disconnected from USB. In contrast, Android developers must manually input the IP address if the USB connection is lost, which can be tedious and error-prone.
More info in discussion thread: https://github.com/react-native-community/discussions-and-proposals/issues/870
I anticipate that a change where making IP the default method of connection will result in a lot of people running into issues where they can't connect to Metro server (for example, if they're on a different network, or they disable wifi). So I also changed the default error message you get in case the app can't connect to the bundler and updated the "Change Bundle Location" dev menu.
The previous error message
```
Unable to load script. Make sure you're either
running Metro (run 'npx react-native start') or
that your bundle 'RNTesterApp.android.bundle' is
packaged correctly for release.
```
was changed to:
```
Unable to load script.
Make sure you're running Metro (npx react-native start)
or that your bundle 'RNTesterApp.android.bundle' is
packaged correctly for release.
The device must be on the same WiFi as your laptop to
connect to Metro.
To use USB instead, shake the device to open the dev
menu and set the bundler location to 'localhost: 8081'
and run:
adb reverse tcp:8081 tcp:8081
```

And the new dev menu UI looks like this:

The two buttons with "10.0.2.2:8081" and "localhost:8081" are suggestions which when tapped fill the input with the text from the button. The first button suggests the IP of the development machine, and the second one is hardcoded to localhost:8081.
## Changelog:
[ANDROID] [CHANGED] - Automatically use Metro bundler IP address when installing apps on Android
Pull Request resolved: https://github.com/facebook/react-native/pull/49166
Test Plan:
I've tested the implementation on a physical device and on emulator and it's working solid. However, I would invite further testing in order to catch possible edge cases.
I've recorded common scenarios
Scenario 1:
Device doesn't have the app installed.
We connect the device via USB, install the app and open it.
Device is on the same network as the dev machine.
Bundler location is by default set to the IP of the dev machine.
When starting app, the app is able to connect to the dev machine and download the bundle.
Scenario 2:
Device doesn't have the app installed.
Wi-Fi is turned off on the device but device is connected via USB
We install the app and open it.
Bundler location is by default set to the IP of the dev machine.
When starting app, the app is not able to connect to the dev machine and shows the error message.
After opening the dev menu we see that the IP is set to the IP of the dev machine.
We click the "localhost" option in the dev menu and click apply
After that the app is able to connect to the dev machine and download the bundle (via USB) since the traffic is forwarded using adb reverse.
Notes:
When we set an IP in the dev menu, the app will persist it.
If we connect the device via USB and reinstall the app the persisted data stays the same, so the previously set IP will be used.
However, the IP of the dev machine will be displayed as an option in the dev menu.
https://github.com/user-attachments/assets/cc2da5d4-de07-4980-a61c-68ca53db74c7https://github.com/user-attachments/assets/407b8871-8b83-4a6b-a833-f87ddc0afc82
Reviewed By: huntie
Differential Revision: D69664231
Pulled By: cortinico
fbshipit-source-id: 5a339be50a17a59202416b99e72f4397d8ff4805
Summary:
We only use fbsystrace API's directly from cxxreact and reactperferflogger targets, so export the dependency and the preprocessor flag there so we do not have to duplicate (and potentially forget to do this) from all other targets in react-native.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D72704827
fbshipit-source-id: 845c174b4f9ce0a67dd80be3f6274234328bbdb9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50592
For unclear reasons this is crashing on some devices when dereferencing the module ref. Instead we can just access the existing global_ref to the module instance and avoid any deallocation timing issues.
Also added some additional safeguards and validation against incorrect JNI invocations.
Changelog: [Android][Fixed] Fix crash when TurboModule event emitters are used on arm32
Reviewed By: cortinico
Differential Revision: D72716972
fbshipit-source-id: 3803329048d8388b3d30c9cb55a857e399569eea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50594
Some tests are failing due to unsatisfied error when looking for C++ classes of feature flags, we fix this by calling ReactNativeFeatureFlagsForTests.setup()
changelog: [internal] internal
Reviewed By: yungsters, sbuggay
Differential Revision: D72721786
fbshipit-source-id: c41c05428b1f99db9b03bb67cd9ddc47ebec84b5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50591
Changelog: [internal]
This implements linting for Markdown files in React Native via `markdownlint`. We already have Prettier support for Markdown, but this adds some missing functionality, especially validation of local links.
Reviewed By: cortinico
Differential Revision: D72649666
fbshipit-source-id: 5e2c369332b270850d6d04d8960e6ce717f5ba7a
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made FabricUIManager.java nullsafe
Reviewed By: cortinico
Differential Revision: D72705994
fbshipit-source-id: 56786a5df78322e833401c94dafae4e9335feefe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made TextAttributeProps.java nullsafe
Reviewed By: rshest
Differential Revision: D72460127
fbshipit-source-id: b5b098d8763ed45579c50068033374dfc88afa86
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D72460132
fbshipit-source-id: 4ff177555f4d035be82ec6a134227f9ed2076fb9
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReactTextViewManager.java nullsafe
Reviewed By: javache
Differential Revision: D72460124
fbshipit-source-id: a75705ac4ab486ccaa9162dee5bfd8cae77967c7
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: arushikesarwani94
Differential Revision: D72460133
fbshipit-source-id: 7673e962e50946b504e3bd9446b3aef962271241
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D72460130
fbshipit-source-id: fbc073e7b644326e85a05227c1e2e72e3dd5b870
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D72460128
fbshipit-source-id: 5165055b1023a9eab86b97ef6cdfa9553c063ec0
Summary:
https://developer.android.com/reference/android/widget/TextView#setEllipsize(android.text.TextUtils.TruncateAt) explicitly allows setting setEllipsize's argument in TextView to null to turn off ellipsizing, which is what we want for `clip`
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReactTextAnchorViewManager.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72460123
fbshipit-source-id: 26d91d273ead5906060772f65a32fbf4389d0db3
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72460131
fbshipit-source-id: d2b82fe1abcfd828490820f31862339bce9785b6
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReactBAseTeextShadowNode.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72460122
fbshipit-source-id: 772b19016fa1558b549d73ad2b23f891ce2f57f6
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72460134
fbshipit-source-id: b5e8864ddd7454ef23c5632dc2c8e502050dfe2b
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ViewManagerRegistry.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384049
fbshipit-source-id: dbca38ee6379e2e64b37c1d265c001585344661d
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384050
fbshipit-source-id: ac88074a45752a5512daa09fce8c385b256b3d41
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made TouchTargetHelper.java nullsafe
Reviewed By: rshest
Differential Revision: D72384076
fbshipit-source-id: 344d93484cb465f4841256d302a6d9eec1467643
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D72384058
fbshipit-source-id: 543da56ed4410625f17d143b127aa5cc882e0327
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ThemedReactContext.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384053
fbshipit-source-id: 39ce998cfce1de358f13b4f068f180dfd1d88378
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384062
fbshipit-source-id: 70b7b4490e002016a83746336b9bb397e917a858
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made JSPointerDispatcher.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384071
fbshipit-source-id: 474671024632f7cdce7547855d0631c6a7005e8b
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D72384057
fbshipit-source-id: fd10242d14dd3e9cc2f6cd72dcac693b0f52c818
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made PromiseImpl.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384070
fbshipit-source-id: 142a0e001af42ebb8cc1c8301b3ec7f586191d92
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384080
fbshipit-source-id: f859a21826bd1dd9d6fa0da82df5a4f0e9e79264
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made NativeModuleRegistry.java nullsafe
Reviewed By: javache
Differential Revision: D72384075
fbshipit-source-id: bebc637a757c9f86d6260f9076010de9d7c80d4a
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384051
fbshipit-source-id: 6cc3ab112a676fe6dfcfa1a4aa74e0dcd0e53e4a
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ModuleHolder.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384056
fbshipit-source-id: 42bfdd9b73bdb599ab67b6fe8759c80665156d22
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384081
fbshipit-source-id: a45f551089f9484d11d0701c98a06467da667b36
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made JsonWriterHelper.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384060
fbshipit-source-id: ce41674cc5dbadcd70029396607ac046100e2be7
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384061
fbshipit-source-id: 7a238fae907398ad785b169db7232068eef5617b
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DynamicFromObject.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384066
fbshipit-source-id: 6f187f8a87a2c5d239c671880404eb81f0e22d3e
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384067
fbshipit-source-id: b9cc92e41f29cd5af4d277ee8ec0cb3c432bdeec
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DynamicFromMap.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384077
fbshipit-source-id: 70fb921fed06e9f89eb69c558692d1d7705fe2e5
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384073
fbshipit-source-id: fb9cc4d6da6ee78785e70c8b298434f61c60c1dd
Summary:
D65596278 marked the non-primitive return types from ReadableArray as optional, so we have to follow suit
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DynamicFromArray.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384069
fbshipit-source-id: c67dc5bfb540af9190f740d565e5bda63d1caaa8
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384068
fbshipit-source-id: 83f4b75b19dcccf752e53fd301ccda7b42a5c611
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made BaseJavaModule.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384078
fbshipit-source-id: aba0f261f3b3e77133ff2a148bf4903c73c54691
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384074
fbshipit-source-id: de616024dcca4c2d14b329aa020267c8a3d0ee56
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made Arguments.java nullsafe
Reviewed By: cortinico
Differential Revision: D72384054
fbshipit-source-id: 87ad373d8663d8342d2ec8b757cec2a756210f45
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D72384064
fbshipit-source-id: 12272e3b1b0a7900515071cee9d95469e4d95d6c
Summary:
Implemented ReactEditTextInputConnectionWrapper in Kotlin as part of Kotlin-ifying RN
## Changelog:
- Removed ReactEditTextInputConnectionWrapper.java
- Added ReactEditTextInputConnectionWrapper.kt
Pick one each for the category and type tags:
[ANDROID] [CHANGED] - Kotlinify ReactEditTextInputConnectionWrapper
Pull Request resolved: https://github.com/facebook/react-native/pull/50573
Test Plan: Run RN-Tester and interacted with TextInputs with both new architecture enabled and disabled
Reviewed By: rshest
Differential Revision: D72704246
Pulled By: cortinico
fbshipit-source-id: fec358d157c6ba09fecfa98bf431b18eee7824b0
Summary:
Some minor fixes in the RNTester that were bugging me a bit:
- Playground tab icon is not displaying the correct icon when the tab is active.
- The RNTTestDetails button is being displayed when there is nothing to display.
- Export the data for the Playground tab correctly to display the description.
## Changelog:
[INTERNAL] - RNTester: Fix playground icon & test details button
Pull Request resolved: https://github.com/facebook/react-native/pull/50530
Test Plan:
<details>
<summary>Screenshots</summary>
| Before | After |
|------------------------------------|------------------------------------|
|  |  |
</details>
Reviewed By: NickGerleman
Differential Revision: D72576804
Pulled By: cortinico
fbshipit-source-id: 8555677a5121fe908c18d349e80ce8097d144fe5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50588
Changelog: [internal]
This configures Prettier to format all markdown files in `__docs__`.
Reviewed By: lenaic
Differential Revision: D72706239
fbshipit-source-id: 67b4c82528c89e497c0ff1aacbc30d76f4d29a3e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50587
Changelog: [internal]
This does an initial formatting of all Markdown files that are going to be formatted by prettier from now on.
Reviewed By: lenaic
Differential Revision: D72706240
fbshipit-source-id: b365a94e5d74945a121966fddcb43776ebc534e0
Summary:
* EventBeatManager's deprecated constructor is removed
* No need to keep a ref to jhybridobject_ (it's invalid to keep an alias_ref like this anyway)
* Use HybridClassBase to reduce the number of objects
Changelog: [Android][Removed] Removed deprecated EventBeatManager(ReactApplicationContext) constructor
Reviewed By: mdvacca
Differential Revision: D71984490
fbshipit-source-id: 01482ddd3128ef5f495682e75897e2a6549274a5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50553
Adding nanosecond resolution for macOS to the NativeCPUTime native module. This allows for running Fantom benchmarks on macOS with high resolution CPUTime counters.
This change adds the internal `getCPUTimeConversionFactor` function which is needed to convert the output from `mach_absolute_time` to a double representing time in nanoseconds. The native module calls `getCPUTTimeConversionFactor` once in the constructor and stores the result for future calls. The conversion factor defaults to 1.0 for all other platforms.
Changelog: [internal]
Reviewed By: rubennorte
Differential Revision: D72631963
fbshipit-source-id: 33fa1bfc576e634187091bfa668106e31cc62214
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50559
This diff migrates the following file to Kotlin - DevSupportManagerBase.kt
as part of our ongoing effort of migrating the codebase to Kotlin
This file was 1000LOC+ so its migration is quite involved.
I had to look into nullability of various parameters. Most notably the `Array<StackFrame?>` -> `Array<StackFrame>`.
This also is the last file left in the devsupport package that needs to be migrated to Kotlin.
Changelog:
[Android] [Breaking] - DevSupportManagerBase is now converted to Kotlin. If you're subclassing this class, you will have to adjust some of the parameters as types have changed during the migration.
Reviewed By: javache, mdvacca
Differential Revision: D72637098
fbshipit-source-id: b87d5f17e30d69fe9c09ec9b49f96818df34ea3b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50558
This diff migrates the following file to Kotlin - DevServerHelper
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - DevServerHelper to Kotlin.
Reviewed By: javache
Differential Revision: D72632266
fbshipit-source-id: 5dab7206dcf11de042d9e274e33a38a4491f1d17
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50580
This follow ups to us enabling INTERPROCEDURAL_OPTIMIZATION to libreactnative.so and enables
INTERPROCEDURAL_OPTIMIZATION for the app module as well.
Changelog:
[Android] [Changed] - Enable INTERPROCEDURAL_OPTIMIZATION for libappmodules.so in OSS
Reviewed By: rshest
Differential Revision: D72696658
fbshipit-source-id: ec07c7df9a639b5c3df8923ec384db90a78463e9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50569
This diff makes all the *Systrace files internal.
as part of our ongoing effort of reducing the API surface.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D72646992
fbshipit-source-id: d085da9cf841fc2e8a026b8d09d8a17550505c7a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50563
This diff makes all the classes inside `com.facebook.react.views.text.internal.span` internal.
Those classes are already inside an `.internal` package. By making them `internal` with the Kotlin keyword
we're making harder for them to be accidentally referenced outside React Native.
as part of our ongoing effort of reducing the API surface.
Changelog:
[Internal] [Changed] - com.facebook.react.views.text.internal.span is now internal
Reviewed By: mdvacca
Differential Revision: D72644962
fbshipit-source-id: dbb5a45e6121cb49509469d1d40c3b278cc62368
Summary:
Users should not be using `getCurrentActivity()` method on `ReactContextBaseJavaModule`.
Instead they should use `getReactApplicationContext.getCurrentActivity()`
This correctly deprecates this method for 0.80.x
Changelog:
[Android] [Deprecated] - Correctly deprecate ReactContextBaseJavaModule.getCurrentActivity() method
Reviewed By: mdvacca
Differential Revision: D72449062
fbshipit-source-id: f74bf94980447497e7e9049ede2b44c1d1f0d48b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50557
This diff migrates the following file to Kotlin - BundleDownloader
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - BundleDownloader to Kotlin
Reviewed By: javache
Differential Revision: D72627995
fbshipit-source-id: 9d65473c4d4a0962f78b0f71fc24530415a0e908
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50560
This diff migrates the following file to Kotlin - StackTraceHelper
as part of our ongoing effort of migrating the codebase to Kotlin
I've moved the method `convertProcessedError` to `internal` because it was already using a parameter of type `ProcessedError` which is itself internal.
Changelog:
[Internal] [Changed] - StackTraceHelper to Kotlin
Reviewed By: rshest
Differential Revision: D72569103
fbshipit-source-id: 8c544b83deda82c7a3d1a04d8cd0c9e12c9b6d46
Summary:
This diff removes the usage of getShadowNodeClass() on apps that are purely running on the new architecture.
The implications of this change are:
- all shadow node classes will be stripped-out by proguard
- props exposed in shadow Nodes won't be included in the native view configs, this is fine becuase all core components are already using static view configs, props included in LayoutShadow node are covered by: BaseViewConfig.android.js
changelog: [internal] internal
Reviewed By: javache, cortinico, rshest
Differential Revision: D72602551
fbshipit-source-id: caada701f80253830df0085fdbbac47a2aa6d71b
Summary:
In this diff I'm introducing the ReactNativeFeatureFlags.disableShadowNodeOnNewArchitectureAndroid() feature flag, this will be used to control the usage of shadow nodes in apps that are purely running on the new architecture.
The default value for this feature flag is true because we are assuming this is the right value long term (this is just a toggle)
changelog: [internal] internal
Reviewed By: alanleedev
Differential Revision: D72602553
fbshipit-source-id: 3eb1a151e74c1728374a1d37b4151a0928801de5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50566
This diff makes the following file internal - package com.facebook.react.internal
as part of our ongoing effort of reducing the API surface.
Changelog:
[Internal] [Changed] - com.facebook.react.internal pakcage is now internal
Reviewed By: mdvacca
Differential Revision: D72645991
fbshipit-source-id: 406c922b06ad883e00c63116e8efccd29e088ced
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50570
This diff makes the following file internal - ReactRawTextShadowNode and ReactRawTextManager
as part of our ongoing effort of reducing the API surface.
The only meaningful user of this API is this library:
https://github.com/iyegoroff/react-native-text-gradient
Which is umaintained (last supported version is RN 0.59) so I'm not considering this breaking.
Changelog:
[Android] [Changed] - Make ReactRawTextManager internal. We verified no popular libraries are impacted by this change
Reviewed By: mdvacca
Differential Revision: D72647702
fbshipit-source-id: 59a3646fdbc8f11907b4cf5056ff88c6dcec1cf8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50365
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made FabricUIManager.java nullsafe
Reviewed By: GijsWeterings
Differential Revision: D71979601
fbshipit-source-id: 599d87f0783a566c837aa70975a62f5f908a2294
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50371
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979591
fbshipit-source-id: 77369affbe4fd7411f149a4a2de869b48a1faa1a
Summary:
This PR aims to migrate UiThreadUtil from Java to kotlin as part of https://github.com/facebook/react-native/issues/50513
## 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
-->
[ANDROID][CHANGED]Migrate UiThreadUtil to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50536
Test Plan: Tested on RN tester with both new and old arch
Reviewed By: cortinico
Differential Revision: D72602041
Pulled By: arushikesarwani94
fbshipit-source-id: 9f45a139805819a21039eb640a0bd1583a3acde9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50565
This annotation is unused. It was referenced in the past with Buck1 OSS but now we can safely remove it.
Changelog:
[Internal] [Changed] -
Reviewed By: fabriziocucci
Differential Revision: D72645219
fbshipit-source-id: 0327fa562276193ad9f48dc81ea7a9fa0da19eee
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50374
This diff breaks down ScrollView props into ScrollViewBaseProps to generate more readable TS types, re-exports AnimatedComponent and sets the default SectionList Item type to `any`.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D72061941
fbshipit-source-id: 439fcdb1540288d6e610cd535b1fed82243c3b7c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50531
# Changelog: [Internal]
This should not have any functional changes, mostly refactoring the previous code, splitting it into smaller methods, better documentation and added tests.
Main changes are:
1. We are going to use smart pointers for `ProfileTreeNode`
2. Split single static method into multiple smaller methods of one class, less cognitive load and smaller context window
Reviewed By: robhogan
Differential Revision: D72401690
fbshipit-source-id: a1eed5501349dcd811661d91f3bf126a0daaacf2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50538
Promises created from `Linking.sendIntent` calls never resolve, leaving them dangling. This change fixes the issue in two spots:
1. By calling promise.resolve directly after the startActivity call
1. By wrapping startActivity in a try/catch so any exceptions thrown are forwarded to the promise as a rejection
Changelog: [Android][Fixed] - Ensure Linking.sendIntent promises resolve or reject
Reviewed By: NickGerleman
Differential Revision: D72606918
fbshipit-source-id: cd437bf65bb631bc04f99b4d2e3d637f7e98b25e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50556
This class is effectively unused, I'm removing it.
It was package private also so no one in OSS could easily use it.
Changelog:
[Internal] [Changed] - Remove unused JSDebuggerWebSocketClient
Reviewed By: GijsWeterings
Differential Revision: D72567055
fbshipit-source-id: aa2fa62c05488d1560c0acfa0b21e2d934c34be2
Summary:
Looks like Jest E2E had significant issues with this test on both android and ios RNTester. I think it's because the view with the testID did not have any contents, which means the accessibility tools have trouble getting the proper context from it. By changing it to a nested view (with some padding to better inspect the borders, since that's what's important in this test) I think we have a better, more stable test case this way
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D72571911
fbshipit-source-id: a85266cf4a1696fdaedcc97ed2a7a05f086d35bd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50549
As part of D72558674, I made SurfaceHandlerBinding.setProps nullable, to align with D71979601 - but I didn't realize this wasn't properly handled on the JNI side.
Changelog: [Android][FIxed] Fix crash when passing null initialProps
Reviewed By: lenaic
Differential Revision: D72632625
fbshipit-source-id: 82db1791ceb7c96248b6eea2eb1e6395edc308a0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50528
Changelog: [internal]
This adds basic documentation for the IntersectionObserver Web API implementation in React Native.
Reviewed By: lenaic
Differential Revision: D72573107
fbshipit-source-id: 14ed318ae3691550bbe14a6da1184013ce0c60a9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50527
Changelog: [internal]
This just defines an outline for the expected docs to be added to RN.
Reviewed By: GijsWeterings
Differential Revision: D72573497
fbshipit-source-id: a8e1c2cc0c6b966656d1089cd33b547174ace873
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50525
Changelog: [internal]
Just a rename of the file and moving relevant documentation to the README.
Reviewed By: GijsWeterings
Differential Revision: D72562795
fbshipit-source-id: d675037376a0345dd7d178cf5863f4093eb74542
Summary:
This diff migrates the following file to Kotlin - CxxInspectorPackagerConnection
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - CxxInspectorPackagerConnection to Kotlin
Reviewed By: rshest
Differential Revision: D72566596
fbshipit-source-id: 046e7549841f64d73fed56d8bc8d70f2d3ea63e8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50519
This diff migrates the following file to Kotlin - MultipartStreamReader
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - MultipartStreamReader to Kotlin
Reviewed By: rshest
Differential Revision: D72561124
fbshipit-source-id: d616bfc547ea6a773ebc1c45f97111ae7c7ec85a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50526
This change wants to automate the rotation of the issue triaging squad on Discord.
This is taking us a few minutes every week to rotate the oncall.
This change can save us some time.
The configuration file format is supposed to be like this:
```
{
"userMap": {
"discord-username1": "discord-id1",
"discord-username2": "discord-id2",
"discord-username3": "discord-id3",
"discord-username4": "discord-id4"
},
"schedule": {
"date1": ["discord-username1", "discord-username2"],
"date2": ["discord-username3", "discord-username4"],
}
}
```
## Changelog
[Internal] - Automate the issue triage oncall rotation
Reviewed By: cortinico
Differential Revision: D72569435
fbshipit-source-id: 435c13350cf503e99302775674e78a20e328e68d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50518
This diff migrates the following file to Kotlin - BridgeDevSupportManager
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - BridgeDevSupportManager to Kotlin
Reviewed By: arushikesarwani94
Differential Revision: D72558373
fbshipit-source-id: 07a16dc479e967677b1aab8a6d4a4366994fd490
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50522
This diff migrates the following file to Kotlin - BridgelessDevSupportManager
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - BridgelessDevSupportManager to Kotlin
Reviewed By: arushikesarwani94
Differential Revision: D72558016
fbshipit-source-id: 9c84f89dfca03991b1feb6f8c9ffe846350aafed
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50520
This diff migrates the following file to Kotlin - DebugOverlayController
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - DebugOverlayController.java to Kotlin
Reviewed By: arushikesarwani94
Differential Revision: D72557349
fbshipit-source-id: dd4a1c7204206189c176b36f81c6d54f5f780b10
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50521
This diff migrates the following file to Kotlin - DebugCorePackage
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - Migrate to Kotlin - DebugCorePackage
Reviewed By: javache
Differential Revision: D72556867
fbshipit-source-id: dc37538da7089f532dc3a617a8e7dbccc6e187e3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50402
While investigating pointer events, I noticed that all Android views fire `onPointerLeave`/`onPointerEnter` in rapid succession on every button press. This is because Android fires `ACTION_HOVER_EXIT` on every frame before firing `ACTION_DOWN` (in the same frame). The logic in JSPointerDispatcher needed to be updated to account for this.
Unfortunately, `ACTION_HOVER_EXIT` events have no means of distinguishing between whether they were driven by the mouse actually leaving the view's bounds or by a button press. Some OS implementations fire this event on the frame just before leaving the view's boundaries while others fire after, so pure X/Y position isn't helpful enough. The button state property on `ACTION_HOVER_EXIT` also never gets set in some OS.
To work around this issue, this change posts a callback to the very next frame after receiving `ACTION_HOVER_EXIT`. If no `ACTION_DOWN` event was received in the same frame, it calls all the way through the existing logic. But, if an `ACTION_DOWN` event *is* received, we compare the event timestamps and if they match we don't post `onPointerLeave`.
Changelog: [Android][Fixed] - Prevent onPointerLeave from dispatching during button presses
Reviewed By: vincentriemer
Differential Revision: D72078450
fbshipit-source-id: dcc7cfa4086963ed8599147d60d8406c54cd5d69
Summary:
Since we've made SurfaceHandler internal, there's no need to maintain a separate interface between it and the actual Binding implementation class.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D72558674
fbshipit-source-id: d7ac15b0e608c3aa7d05e46f1078cef1e154f846
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50481
It's here! kinda...this only works internally right now, so no OSS usage which is explicitly gated to be off. We can't really avoid exposing the types so here we are.
Changelog: [Internal]
Reviewed By: jorge-cab
Differential Revision: D72428425
fbshipit-source-id: 9642e5db46f9bd34ff505b0e37987da52857b6e9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50303
This feature is being tested internally right now. We cannot really avoid exposing the type but we are going to make this no-op for now in OSS until we are confident we can roll it out fully
Changelog: [Internal]
Reviewed By: philIip
Differential Revision: D71919847
fbshipit-source-id: b1730b8af5180c4513ce1f0d58b3a6526fffed84
Summary:
I was helping a team with some keyboard link accessibility and they had this strange bug where a link was not keyboard accessible despite having `accessible={true}`. Something that fixed it for them was adding an `accessibilityLabel`, which makes no sense.
Turns out there is a bug when the link encompasses the entirety of the `Text` component. We have a special case for handling links of this manner, and right now we are not setting the `frame` property which is responsible for outlining the element when it takes focus.
This property is not one defined by UIKit, rather it is defined in RCTAccessibilityElement. We use it to derive the accessibilityFrame which has to be in screen coordinates. If you do not set the frame property then it is supposed to use the bounds of the container. This does not work properly, seemingly bc the name "frame" gets mangled internally in UIKit leading to UB. I changed the name the "something" and it works.
To remedy this lets just change the name
Changelog: [iOS] [Fixed]
Reviewed By: javache
Differential Revision: D72338838
fbshipit-source-id: da91d0c28baeb6765d4d604f3e47c91952167f9d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50516
This diff migrates the following file to Kotlin - DevSupportManagerFactory
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Android] [Changed] - Migrate to Kotlin - DevSupportManagerFactory - We couldn't find any implementation of this class in OSS. Some Kotlin implementers might have to change the method signatures. However this interface is not supposed to be extended in OSS.
Reviewed By: javache
Differential Revision: D72556310
fbshipit-source-id: 35d1ed3c332296d3be5244fdab92a890d7ea3c40
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50517
This diff migrates the following file to Kotlin - ReactInstanceDevHelper
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Android] [Changed] - Migrate to Kotlin - ReactInstanceDevHelper. Some users implementing this class in Kotlin could have breakages. As this is a devtools/frameworks API we're not marking this as breaking.
Reviewed By: javache
Differential Revision: D72555226
fbshipit-source-id: e7e5523c56de8697def0a509c03e9fe89c6d5839
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50514
When building React Native for mac catalyst on intel architecture, we are observing a build failure in RCTInstance.
See issue: https://github.com/facebook/react-native/issues/50388
Apparently, the compiler don't understand that `errorData[@"isFatal"]` is a BOOL, so we are helping it by extracting the `boolValue`.
## Changelog:
[iOS][Fixed] - Avoid build failure on Catalyst (x86_64)
Reviewed By: cortinico
Differential Revision: D72558024
fbshipit-source-id: 152d89b02ae250a8ae54fe2df658c018d5f63f45
Summary:
Changelog: [internal]
This is stable after the last couple of fixes, so we can enable it by default. Enabling this just improves the accuracy of `IntersectionObserver` and the Event Timing API, and we still haven't shipped those to stable.
Reviewed By: GijsWeterings
Differential Revision: D72561256
fbshipit-source-id: 4b505f1df9c7c495d316e6fbf1498af94aaca959
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made NetworkingModule.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979590
fbshipit-source-id: 0ddf764f4707d2ee76ab99bc1a09a4e2a7e6b794
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50347
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979581
fbshipit-source-id: 4ed264ff43794b6aafc2a0ee419a660a6b5b0440
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50366
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made BlobModule.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979598
fbshipit-source-id: bbef5548d05e0b77ea03cf72f41a384fe7294d59
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50364
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979588
fbshipit-source-id: f5ec8bced87ea0c6c1c193be51ebc78396388d0e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50370
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made TurboModuleManager.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979605
fbshipit-source-id: b8da8f1ad12f5f6d63e7bd876d7c4912d69a4c4d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50358
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979595
fbshipit-source-id: 19bfcea537b7b62536eafa8e1d0b3f8b50666e22
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50357
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made TurboModuleInteropUtils.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979599
fbshipit-source-id: ffd7006f28db4daf8cd47ce1cd8ff6e3192c0ad1
Summary:
Per discussion in D71979599
Changelog: [General][Fixed] Throw ParsingException when ReactModule doesn't conform to TurboModule invariants
Reviewed By: cortinico
Differential Revision: D72383857
fbshipit-source-id: 2d0282b136312d414234246584d2ae60858955b6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50367
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979600
fbshipit-source-id: be36f4c409a0423b3d3ccdf2c28d96c7a3f50201
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50512
Reland of D72389708
This renames the method to be more aligned to the fact that we're using this entrypoint both for internal
and for OSS users.
I've also added a `assertLegacyArchitectureOnlyWhenMinifyEnabled` that will run only for internal builds.
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D72552028
fbshipit-source-id: 2594df9ef8056f9931960117770c4b7cddd4e922
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50511
Reland of D72384347
ReactMarker is currently loading the whole `reactnativejni` which we should not be loading in NewArch.
This is resulting in a warning fired for all the NewArch users with `legacyWarningsEnabled`.
I'm cleaning this up by moving it inside `reactnativejni_common`.
Changelog:
[Internal] [Changed] - Move ReactMarker to `reactnativejni_common` as it's used in NewArch also
Reviewed By: javache
Differential Revision: D72552075
fbshipit-source-id: bbc75aada1564f6f54ea70a8dd4f5145d4a3ffaa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50495
Changelog: [internal]
This migrates the last remaining usages of these polyfills to the built-in classes.
Reviewed By: yungsters
Differential Revision: D67828652
fbshipit-source-id: 5ff039d7413aed49d882ff03e722531cdd195488
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50494
Changelog: [internal]
Removes the dependency on the `event-target-shim` npm package now that we're using a custom implementation within `react-native`.
Reviewed By: yungsters
Differential Revision: D67828636
fbshipit-source-id: 8727f8caa2bd4badd7162eb7b993dcc768e74b85
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50485
Changelog: [internal]
This cleans up the experiment to test the new implementations of `XMLHttpRequest`, `FileReader` and `WebSocket` using the built-in `EventTarget` definition.
This effectively replaces the legacy implementations with the ones using the built-in `EventTarget` class in stable.
Reviewed By: yungsters
Differential Revision: D68625225
fbshipit-source-id: 7ccefe5d8612baca283146cdbca7f7f1d51b4ffa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50499
We enocuntered an issue internally where the `RCTInstance` was ready before the modules were done registering statically.
When this happens, it can occur that we iterate over an array that is going to be modified.
With this change, we are introducing several changes:
- By default the logs are not outputted, so the array is not going to be populated
- we are making a copy of the array before we start iterating, so even if the original reference is updated, the iteration is safe
- we are not emitting logs if in release mode. This will protect production from this issue. Also, these warns are not going to be useful in production anyway.
## Changelog:
[Internal] - fix crash when RCTInstance is ready while modules are initialized
## Facebook:
This fixes T220205371
Reviewed By: Abbondanzo
Differential Revision: D72512518
fbshipit-source-id: 32e561111d034455a6a778d05af4a96602b74bfb
Summary:
ReactMethod will remain to be supported in the New Architecture, we are unmarking it
changelog: [internal] internal
Reviewed By: shwanton
Differential Revision: D72491698
fbshipit-source-id: 656b36711dcdfc0a776ac05b1f7f431d6416f9dd
Summary:
Changing these object arguments to `$ReadOnly` permits passing in values that are `$ReadOnly` (e.g. `payload` argument to `enqueueNativeEvent`).
Changelog:
[Internal]
Reviewed By: lyahdav
Differential Revision: D72474879
fbshipit-source-id: 27341131724f4f572b78563975774a5b20dee8f8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50489
ParagraphState is shared between ParagraphTextView and ParagraphComponentView, but we only need one copy. We were forgetting to clear this on ParagraphTextView when recyling.
Changelog: [iOS][Fixed] ParagraphState is correctly deallocated when recycling Text
Reviewed By: cipolleschi
Differential Revision: D72454038
fbshipit-source-id: 43afa4eaea183cc66b64d16870c1403debff985a
Summary:
# Changelog: [Internal]
We should avoid allocating multiple of these, since they can get really big.
`RuntimeSamplingProfile` may contain up to 10k of `Sample` for every second of sampling. Every `Sample` may contain up to 500 of call frames, each of which may have a copy of strings like `functionName` and `url`.
> NOTE: The actual logic for deduplicating strings and not allocating too many of them is not part of this diff and will be published separately. Even with deduplication, there is a reason to avoid copying the profile.
Reviewed By: javache
Differential Revision: D72254364
fbshipit-source-id: fa7907fb5cabbd2ac99d3e4e05a93bcb07f7f7c7
Summary:
# Changelog: [Internal]
This was changed in D70402439.
Since these hexadecimal numbers are serialized as strings, we don't need to includes empty bits, this could save us few kilobytes of the trace in json format.
Also, this is the default for Chromium, so we shouldn't probably diverge.
`0x00000001` -> `0x1`
Reviewed By: robhogan
Differential Revision: D72459307
fbshipit-source-id: 5cc4ccbe25cdc16946e745184ad17dfcd51c6449
Summary:
# Changelog: [Internal]
`"ProfileChunk"` trace events can actually be big, depending on the number of the unique nodes reported in a single chunk.
We should avoid copying it for memory and performance reasons.
Reviewed By: robhogan
Differential Revision: D72459306
fbshipit-source-id: db3583c6c6397bb6ee8a0eb33a06a48bc10e82b8
Summary:
This renames the method to be more aligned to the fact that we're using this entrypoint both for internal
and for OSS users.
I've also added a `assertLegacyArchitectureOnlyWhenMinifyEnabled` that will run only for internal builds.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D72389708
fbshipit-source-id: 23830df2f71cc816c7ca178b735a930e794efe47
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50471
ReactMarker is currently loading the whole `reactnativejni` which we should not be loading in NewArch.
This is resulting in a warning fired for all the NewArch users with `legacyWarningsEnabled`.
I'm cleaning this up by moving it inside `reactnativejni_common`.
Changelog:
[Internal] [Changed] - Move ReactMarker to `reactnativejni_common` as it's used in NewArch also
Reviewed By: javache
Differential Revision: D72384347
fbshipit-source-id: 83965c3e4eb7847184856485d1cc1c478b2888d5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50479
In D72273163 the only reference to RN feature flag `throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS` was removed, so this diff removes the feature flag. Also it removes remnants of D69922771 which are no longer needed.
Changelog: [Internal]
Reviewed By: shwanton
Differential Revision: D72427164
fbshipit-source-id: 398583ac14910a396839140c06011efa084fe04d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50470
This diff introduces a new property called `legacyWarningsEnabled` for `gradle.properties` that
toggles the Legacy Arch warnings for users.
I've also introduced a new `ReactNativeApplicationEntryPoint` that is generated by RNGP. This class
effectively wrap `DefaultNewArchitectureEntryPoint` by setting warnings and also invoking SoLoader.
It will reduce the errors in the user space.
As of now warnigns appear in Logcat, but I'm looking into adding some UI in a subsequent diff.
Changelog:
[Android] [Added] - Add a `legacyWarningsEnabled` property to enable Legacy Warnings on NewArch
Reviewed By: mdvacca
Differential Revision: D72383907
fbshipit-source-id: bcd659a23ec5b468958124f0f6650ff72d01ce81
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50490
Changelog: [internal]
This follows the good practice in Fantom tests.
Reviewed By: javache
Differential Revision: D72454795
fbshipit-source-id: 412ee53f61073c63295a23fd7decd6f19a72bf99
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50484
Changelog: [internal]
This cleans up the `enableUIConsistency` feature flag (shipping the feature) after we verified it was stable and performance in production.
Reviewed By: yungsters
Differential Revision: D72387602
fbshipit-source-id: 11d225d962f7e3a47e858d039b7fd5c70a6cadfd
Summary:
Found this unused class with static code analysis. It is internal and has no OSS usages, so it seems like it can be safely deleted.
## Changelog:
[INTERNAL] - Remove unused com.facebook.react.fabric.mounting.mountitems.SendAccessibilityEvent class
Pull Request resolved: https://github.com/facebook/react-native/pull/50478
Test Plan:
```sh
yarn test-android
yarn android
```
Reviewed By: fabriziocucci
Differential Revision: D72445544
Pulled By: javache
fbshipit-source-id: ebbb035da22111e41b04131596d3ec61d4e1423c
Summary:
This PR adds a bunch of OSS libraries to the testing matrix.
We use these OSS libraries internally in our Meta application, so we want to make sure that our changes don't break them.
## Changelog:
[Internal] - Add OSS libraries used internally to the testing matrix
Pull Request resolved: https://github.com/facebook/react-native/pull/50477
Test Plan: GHA - Tested in a sample job firts:
Reviewed By: cortinico
Differential Revision: D72401647
Pulled By: cipolleschi
fbshipit-source-id: c0c2f4b2525b58822c2cc6225fe64210a9513275
Summary:
Use nightlies to test reanimated with RN nightlies
## Changelog:
[Internal] - use reanimated nightlies together with react native nightlies to spot breaking changes
Pull Request resolved: https://github.com/facebook/react-native/pull/50428
Test Plan: GHA - Tested triggering it from a PR in this job: https://github.com/facebook/react-native/actions/runs/14197051228?pr=50428
Reviewed By: cortinico
Differential Revision: D72243345
Pulled By: cipolleschi
fbshipit-source-id: 297ec0073dfc32ec5a5e90630b93867fac0b564f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50480
The map in the script has an if in it checking for proper release channel. For feature flags that do not pass this if, they do not have an alternative return, so `map` just maps this to `undefined`. That means there is still an element in this array which gets joined by 2 new lines. As a result every new feature flag will add 2 new lines of white space making these files look rather silly.
Fix is to filter undefined out.
Changelog: [Internal]
Reviewed By: shwanton
Differential Revision: D72427349
fbshipit-source-id: 87e1d63c8854652296ce9160ab7171a948983d54
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50467
Changelog: [Internal]
Adds a transform that is able to divide properies of interaces, types and classes into sections:
- properties
- properties typed as functions
- methods
ands sorts them alphabetically within the groups.
Reviewed By: huntie
Differential Revision: D72381050
fbshipit-source-id: 20781dc44e19e63cbb5706a02e513fc0e9bb2412
Summary:
The original diff caused some breakages.
Changelog: Backout [Android][Fixed] Made Task.java nullsafe
Differential Revision: D72433889
fbshipit-source-id: 53f7e730455ccaadde197a0f400fc6e834c1ffdd
Summary:
Image component was missing an override which enables setting accessibility values and properties.
The main issue is the lack of this prevented Image component from being accessed by VoiceOver.
Changelog: [iOS][Fixed] - Fixed accessible prop no-opts on Image components
Reviewed By: joevilches
Differential Revision: D72410952
fbshipit-source-id: 5612205aca1710fe4bfed6132efeb59065ebf0b3
Summary:
Mark concrete classes of shadow node as LegacyArchitecture
These classes won't be included in legacy architecture apks
changelog: [internal] internal
Reviewed By: joevilches, mlord93, Abbondanzo
Differential Revision: D72351188
fbshipit-source-id: 4727cdd1486b2fafb87fe3b512440af3264ad189
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50249
This change introduces a flag to turn off the legacy architecture warning if they become too annoying.
The flag can be set in the Info.plist of the React Native architecture and it is controlled by the key: `RCTLegacyWarningsEnabled`.
* If the key is missing or with a value of `YES`, logs are enabled
* If the key has a value of `NO`, react native will not output any log.
We decided to use the Info.plist file to configure the logs because in that way it will work also with React Native prebuilds.
## Changelog:
[iOS][Added] - Add flag to enable or disable legacy warning.
Reviewed By: cortinico
Differential Revision: D71814001
fbshipit-source-id: b6ae6b032ff7add6bae3d73dba490adeaceffa1f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50244
This change adds warning to React Native whenever a component is loaded using the interop layer.
The warning is emitted only once per component.
## Changelog:
[iOS][Added] - Add warnings when components are loaded using the interop layer.
Reviewed By: cortinico
Differential Revision: D71808323
fbshipit-source-id: ce864f73c7789512d4e5e67368b5aa67f94e0570
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50441
When useFabricInterop is disabled, deleting component descriptors in Component Registry is failing since https://github.com/facebook/react-native/pull/47321 removed the Fabric Interop check from the ComponentDescriptorRegistry.cpp which was added earlier in https://github.com/facebook/react-native/pull/42294
Adding back the logic of Fallback component descriptor and error for the same.
Changelog:
[General][Fixed] Fixing Fabric Interop layer bug defaulting to UnstableLegacyViewManagerAutomaticComponentDescriptor irrespective of feature flags.
Reviewed By: javache
Differential Revision: D72266017
fbshipit-source-id: 1f3093d37dbe2b96ca26aa80c0a59d5c3026e9cf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50440
Making the following changes to definition of `useFabricInterop` feature flag:
1. Changing default value to True for both internal and OSS.
2. Changing expected Release Value to false since aiming at disabling interop finally with new architecture strict mode.
3. Hence changed the `ossReleaseStage` from `canary` to `none`
4. Removing all existing over-rides of `useFabricInterop` to True now that the default is True itself.
5. Adding the over-ride to false for Facebook since that doesn't need the interop as is already in new architecture without interop mode.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D72266336
fbshipit-source-id: ff16c5b9d0f39837706a86bd0d178a66a8f2e920
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50448
In preparation for API snapshot generation and README documentation, move into dedicated dir.
Changelog: [Internal]
Reviewed By: iwoplaza
Differential Revision: D72306094
fbshipit-source-id: 3663f9ba9987a59918bae54cfc5a27555b90a9f9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50355
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made Task.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979582
fbshipit-source-id: f4104e5deb1d0538fe8b4968dc1411036a3e9634
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50361
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979592
fbshipit-source-id: 07f3b74362b85803eec90c0c974a88d061d8e816
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50354
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReconnectingWebSocket.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979606
fbshipit-source-id: d71e26fe37bdf5abbe7b933d0fee25e05d0da87d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50368
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979580
fbshipit-source-id: 0eaeaf327421db47a8499a9b6154fa6d5ab8a4fd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50353
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DialogModule.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979604
fbshipit-source-id: 556b2b10ef0879bf7cd4eac6eaf3c9c3cc1c5413
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50351
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979584
fbshipit-source-id: 52e29ac578edcbcd9bd14de4d327564d54f421cf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50352
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made FileReaderModule.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979585
fbshipit-source-id: 3bef5ff48d1d27838d2668367785a85b2b863f05
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50360
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979587
fbshipit-source-id: 50c248def66360f2a063d9eb213cfae5d6787943
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50363
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made BlobProvider.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979597
fbshipit-source-id: a6fba0d83f3558b3bed21de484b59ee6b17bb643
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50350
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979586
fbshipit-source-id: 155fc505d131acc1fa3444692928448b8567cbd5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50362
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made MountingManager.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979607
fbshipit-source-id: 0a41e3a6405500c29ec4710ea3ed57e6705f1b4a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50356
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979593
fbshipit-source-id: 4dbe6ae7f44694b77ebf64170cb71393b532b981
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50348
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made MountItemDispatcher.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979589
fbshipit-source-id: 0133fa6bd56d5595e8397029517b43d0a95b260b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50349
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979596
fbshipit-source-id: a463b916328d4aecb6b8d91c37be170a8f6fb355
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50437
Currently we do have `NativeArray`, `NativeMap` being tightly coupled with the old arch (i.e. everything inside `libreactnativejni.so`).
Those classes however are primitives used also by the New Arch and they should be accessible even without the bridge infra.
I've noticed this dependency while working on the Legacy Arch warnings.
Here I'm refactoring those primitives to live in a separate `libreactnativejni_common` module that can be loaded indipendently.
Changelog:
[Internal] [Changed] - Decouple NativeMap and NativeArray from `reactnativejni`
Reviewed By: javache, mdvacca
Differential Revision: D71635967
fbshipit-source-id: 64b0fc26491977a0e6c5be4688ff91969c81d680
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50436
Changelog: [Internal]
`is_idle` was a confusing concept that I didn't find useful when researching why disconnections happen. Instead, I'd like to know when the last communication with inspector proxy took place.
Reviewed By: hoxyq
Differential Revision: D72251072
fbshipit-source-id: 10f83bde6c8f3ed4b661bcfbef57f86f34039e5d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50435
Changelog: [Internal] when reporting how many cdp messages passed inspector proxy, also report their total size
Reviewed By: hoxyq
Differential Revision: D72245498
fbshipit-source-id: 777274527b7e180c984b11414bec54d0e6f9d27b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50464
Runners in GHA has been updated by github and they now ship with CMake 4.0. (actions/runner-images#11926)
This version is not compatible with React Native, so we are pinning cmake to 3.36.1
## Changelog:
[Internal] - Pin cmake to 3.36.1
Reviewed By: cortinico
Differential Revision: D72379834
fbshipit-source-id: ab09009102118e6590f02cf57fa6f9149482f62b
Summary:
We should not be adding files inside Jest's __mocks__ folder inside the generated podspec.
This takes care of it.
Context: https://github.com/reactwg/react-native-new-architecture/discussions/282
Changelog:
[Internal] [Changed] - Exclude __mocks__ folder from codegen podspec generation
Reviewed By: fabriziocucci
Differential Revision: D72318736
fbshipit-source-id: 73a8c3f3cd84794ead9e7ce622f7ac4299d943f1
Summary:
Currently markers are ignored in RN apps. Utilizing newly added instant track event type for sytrace so the markers are displayed nicely on the timeline. The time delta decoding will be addressed separately for proper timestamp assignment during backend processing.
## Changelog:
[Internal] [Added] - Support for logging mark events with fbsystrace
Reviewed By: javache
Differential Revision: D72094455
fbshipit-source-id: 4cd8f53ddd0b40dfded8d6d8df367698515588c7
Summary:
Make RCTScreenSize and RCTScreenScale initialize during React Native init.
After this diff, there shouldn't be any sync dispatches to the main queue. So, we can just introduce an error into RCTUnsafeExecuteOnMainQueueSync.
## Note
If people manually dispatch to the main queue like so, react native can still deadlock:
```
dispatch_sync(dispatch_get_main_queue(), ^{});
```
Changelog: [Internal]
Reviewed By: lyahdav
Differential Revision: D72273163
fbshipit-source-id: 6211851b380b4f5cd556f48f4d717a6f53d65d32
Summary:
I'll need to use feature flags in this file. And those are only accessible from c++.
Changelog: [Internal]
Reviewed By: lyahdav
Differential Revision: D72326982
fbshipit-source-id: 4c9dfd0e5baa69d979b12914f289d58be6e123a8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50432
This diff adds lint rule to keep React imports consistent across the react native repo. There is a fix suggestion in case if only React is imported.
Changelog:
[internal]
Reviewed By: NickGerleman
Differential Revision: D72244838
fbshipit-source-id: b783d6320520d76c2e5d5ce5c5b7c2a4548d50fe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50433
Make React imports consistent across react-native source code to also align with Flow tooling.
flow-api-translator adds `import * as React from 'react';` if there is no React import and React namespace has to be used after translation.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D72238732
fbshipit-source-id: 5f8cfeab26f397684b1d802731729be7071b5da7
Summary:
This method is redundant. You could just call RCTScreenScale()
Changelog: [iOS][Removed] Delete RCTComputeScreenScale
Reviewed By: philIip
Differential Revision: D72258778
fbshipit-source-id: 0b469169efc4f2def85b2e6b736f3c4570e6b428
Summary:
This is dead code. Let's remove this for now.
This api is unsafe: if it's called from a non-ui thread, it may dispatch to the ui thread synchronously.
Changelog: [iOS][Removed] - Remove RCTFloorPixelValue
Reviewed By: NickGerleman
Differential Revision: D72260694
fbshipit-source-id: d032917643c957a395ee380ef925a047abd5dace
Summary:
## Problem
If RCTScreenScale() is called from a non-ui thread, it will synchronously dispatch to the ui thread.
If the calling thread is the javascript thread, this could deadlock React Native.
## Changes
Move the method calls to the ui thread.
In the future, once all call-sites are migrated to the ui thread, we will just make these methods assert that they're being called from the ui thread.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D72177192
fbshipit-source-id: daadf713f059d33e8fff4559b4184f9d4b6b420d
Summary:
In expo-updates, we would like to handle exceptions on app launch. We used to do this by reassigning our own `DefaultJSExceptionHandler` to the property on the `ReleaseDevSupportManager `. This class has been migrated to kotlin and is now final so we can no longer do this. Instead of having the `defaultJSExceptionHandler` typed as `DefaultJSExceptionHandler` we'd like to change it to the interface, `JSExceptionHandler` so we can do this https://github.com/expo/expo/blob/93b7e9b1724a7be11b9d79c0313a2e5a2fd5e5bf/packages/expo-updates/android/src/main/java/expo/modules/updates/errorrecovery/ErrorRecovery.kt#L118C82-L118C97
## Changelog:
[ANDROID] [CHANGED] Change `defaultJSExceptionHandler`'s type to `JSExceptionHandler` on the `ReleaseDevSupportManager`
Pull Request resolved: https://github.com/facebook/react-native/pull/50400
Test Plan: RNTester runs without issue in a release build.
Reviewed By: huntie
Differential Revision: D72173667
Pulled By: cortinico
fbshipit-source-id: 978fd696322432e638a90014ff3c8c2b09fae761
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50392
## This diff
Defines an exports field for the "react-native/virtualized-lists" package. Limits internal use of subpath
imports to virtualized-lists package, and exports all currently used APIs one the root level.
Changelog:
[General][Breaking] - Subpath imports to the internal react-native/virtualized-lists package are not allowed.
Reviewed By: huntie
Differential Revision: D72162344
fbshipit-source-id: 828dab8e569f019fc48084af475e152b898f5bb5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50391
No need for the indirection here of a heap allocated pointer.
Since we have the RootComponentDescriptor we generally don't need it in any other component registry.
Changelog: [Internal]
Reviewed By: philIip
Differential Revision: D72058916
fbshipit-source-id: 0c29f26f4c56c4353eda251fe06a475e3b6085da
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50379
## Changelog:
[Android] [Added] - Allow invoking `synchronouslyUpdateViewOnUIThread` from c++ via `UIManager`
implementation is provided by SchedulerDelegate on the platform
Reviewed By: javache
Differential Revision: D71648772
fbshipit-source-id: bba0f7e9e2deafd074d28ff5cece6b7738c4d123
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50320
Define `"exports"` field on the main `react-native` package.
**Notes**
Module resolution should be equivalent to the previous implicit `"main"` field (backwards compatible).
- Exports all module subpaths to JavaScript (Flow) source files, with and without `.js` suffix (unchanged ✅)
- These are restricted to the `flow/` and `Libraries/` subdirectories (ℹ️ this should be unchanged, matching any JS imports apps may have today)
- Still includes 3P integration scripts such as `./jest-preset.js` and `./rn-get-polyfills.js` (unchanged ✅)
- Exports `./package.json` (unchanged ✅)
- TypeScript should:
- fall back to the `"types"` field (unchanged ✅)
- OR to `"."`,`"./*"` when Package Exports support is enabled via `compilerOptions`, and use the *adjacent `.d.ts` file* (unchanged ✅)
Changelog:
[General][Breaking] - The `react-native` package now defines package.json `"exports"`.
- While these expose existing JavaScript and TypeScript modules, this change may affect deep imports of non-JS files via Node in third party tools.
- Imports from `src/` and `src/private/` directories are disallowed.
Reviewed By: robhogan
Differential Revision: D71968187
fbshipit-source-id: 28ff941692d1822a916457c4fb891e200e3bca61
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50308
CxxCallbackImpl is used in new architecture, in this diff i'm removing LegacyArchitecture annotation from CxxCallbackImpl class
changelog: [internal] internal
Reviewed By: alanleedev
Differential Revision: D71820292
fbshipit-source-id: 54748cc23aa7091841a025e41ad43dcaa60923cd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50376
This makes a couple of tweaks to `SafeReleaseJniRef` to let it be used in more places:
1. Add a default ctor for null state
2. Bridge `get()` to return raw JNI ref, for use when calling Java functions directly (compared to current use case of hybrid objects)
3. Keep JNI environment attached to thread longer term, instead of repeated attach/detach, to allow use for higher frequency objects.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D71933838
fbshipit-source-id: 622cc70d2d7483475406314abcbcf92d3d2ff227
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50330
Changelog: [Internal]
Make the error reported when a debugger is created for a device that does not exist generic, and not including any specific details to make them easier to aggregate
Reviewed By: hoxyq
Differential Revision: D71979796
fbshipit-source-id: 88badc51043e35ff91d7db81c5966ed5ffce9109
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50341
Ships tge `scheduleAnimatedCleanupInMicrotask` feature flag, which changes the cleanup of `AnimatedProps` to occur in a microtask instead of synchronously during effect cleanup (for unmount) or subsequent mounts (for updates).
Changelog:
[General][Changed] - When an `Animated` component is unmounted, any completion callbacks will now be called in a microtask instead of during the commit phase.
Reviewed By: javache
Differential Revision: D71942778
fbshipit-source-id: cbe636d5cff84dfeca2f21ead374609c536e91ad
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50339
Explicitly sets the default `reactRuntimeTarget` when invoking `require('hermes-parser').parse` so that it'll be easier to find these configurations when upgrading to `'19'`.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D72006705
fbshipit-source-id: 4994917152a2a4a767b871d4a36092c0c5391324
Summary:
This workflow bumps the Podfile.lock automatically when a new release happens.
I decided not to use a js script in this case because all the commands are bash commands for git or cocoapods, therefore wrapping them all in a JS file would have added little to no benefit and only overheads.
## Changelog:
[Internal] - Bumps podfile.lock automatically
Pull Request resolved: https://github.com/facebook/react-native/pull/50345
Test Plan:
GHA - tested as a separate workflow first, hardcoding the latest RC
https://github.com/facebook/react-native/actions/runs/14127895380/job/39581024861?pr=50345
The flow correctly fails as the Podfile.lock has already been bumped in the release branch.
Reviewed By: fabriziocucci
Differential Revision: D72050261
Pulled By: cipolleschi
fbshipit-source-id: 5c0666e80b037319c365fcf4d52e8e367c3445ea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50337
# Changelog: [Internal]
This should not have any functional changes, it only prevents the WebSocket from being killed on Android, when we are sending Profile-related Trace Events.
For large traces, a single message could be more than 16MB, because we send a unique string url for every call frame.
Reviewed By: huntie
Differential Revision: D71993748
fbshipit-source-id: f0bfddfb0bb87631e72b573142abdf0d7d87ba48
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50335
Changelog: [internal]
This defines the internal technical documentation for the MutationObserver API, as an example of how to define docs using the new strategy and structure.
Reviewed By: javache
Differential Revision: D71890748
fbshipit-source-id: 3ef19c784dff7aea7a2e2d08302640d5eefacc30
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50334
Changelog: [internal]
This updates the documentation for the feature flag system to adhere to the new documentation strategy and structure.
Reviewed By: javache, rshest
Differential Revision: D71889753
fbshipit-source-id: 7ff47cf613ac01012e7329485d2b97e997a97c07
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50333
Changelog: [internal]
This defines a placeholder for the main entrypoint for the React Native internal technical documentation.
Reviewed By: javache, mdvacca, rshest
Differential Revision: D71889755
fbshipit-source-id: 453518a0b7ec2cf433884a87446a7a622418d0b2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50332
Changelog: [internal]
This defines a detailed strategy on how to approach internal technical documentation in React Native, including defining a template for subsystem documentation.
Reviewed By: javache, rshest
Differential Revision: D71889754
fbshipit-source-id: 5ce630b2e71f8c7b6aaf027a5833bcbdf0dfa5de
Summary:
Regression introduced in D71735505 where I tried to ensure fabricEventEmitter was always non-null. Instead log a soft error when this happens, so we don't drop the event silently.
Changelog: [Android][Fixed] Fixed crash when event is emitted after instance is shutdown
Reviewed By: mdvacca
Differential Revision: D71967092
fbshipit-source-id: 990b6414b41a2709d70a6deae38f5aa043203a20
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50325
axOrderViews is an optimization I came up with so that we could find and queue all the views on a single tree traversal. It initializes the array with the size of the accessibilityOrder array and places each view where its nativeID is. If there is no view corresponding to the nativeID then that axOrderViews element will be null. So to fully ignore nativeIDs that don't correspond to any View we can just filter the nulls
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D71977739
fbshipit-source-id: a3f2138eebe06808ce413355df5d9beb2f4ff388
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50230
Currently, `AnimatedProps` invokes `findNodeHandle` to both connect and disconnect the native `AnimatedNode` instances to corresponding `viewTag`s.
Not only is this slow and wasteful (because `findNodeHandle` requires traversing the fiber tree), but it prevents deferring disconnection to after the fiber tree has been unmounted.
Disconnecting after unmount is necessary when the `scheduleAnimatedCleanupInMicrotask` feature flag is enabled, which is necessary to avoid invoking animation completion callbacks in the commit phase that unmounts animated views.
I have verified that `disconnectAnimatedNodeFromView` is needed and handles being called after fibers are unmounted.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D71745805
fbshipit-source-id: ce8c2c95d38c4d5adbb79bac3c07b0872211cf51
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50311
We are going to initially expose this with the `experimental_` prefix to indicate that it has not been battle tested yet.
Changelog: [Internal]
Reviewed By: jorge-cab
Differential Revision: D71939365
fbshipit-source-id: e9481b6bd4f253fb97c11fc9d7bf3708ffe79635
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50316
This should only be used internally
Changelog: [Android][Removed] Remove FabricSoLoader from public API
Reviewed By: Abbondanzo
Differential Revision: D71965740
fbshipit-source-id: 41c2377a9efcaa21378b2ac49af0c1a544589371
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50315
Make it clearer that the only purpose of this class is to manage the soloading of the core bridge so file.
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D71965759
fbshipit-source-id: d333f3e768a2359b082d4df279548cbd4b58ec76
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50319
Originally removed in 0.71, leaving a README file as an FYI, which is now removed.
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D71968498
fbshipit-source-id: 81d380570df346f709a35727090c8e3b8b043183
Summary:
to resolve use_frameworks build error. this is an edge case happening only when there's objective-c files import to `React_RCTAppDelegate`. Xcode will have `include of non-modular header inside framework module` error originally. this is the generated umbrella header for jsitooling is incorrect. even the header path are correct, they are not modular headers.
~this pr adds a workaround to import header from outside the module.~ updates: this pr uses a forward declaration to prevent exposing the dependency in umbrella header.
## Changelog:
[IOS] [FIXED] - `JSRuntimeFactoryCAPI.h` build error for `use_frameworks` build
Pull Request resolved: https://github.com/facebook/react-native/pull/50252
Test Plan:
to reproduce the build error, we can build `USE_FRAMEWORKS=static bundle exec pod install` from rn-tester. we also need to import `React_RCTAppDelegate` from objective-c files. in this case, we can add `import React_RCTAppDelegate;` in rn-tester's main.m
```diff
--- a/packages/rn-tester/RNTester/main.m
+++ b/packages/rn-tester/RNTester/main.m
@@ -8,6 +8,9 @@
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
+@import React_RCTAppDelegate;
+// This also triggers the error
+//#import <React_RCTAppDelegate/React-RCTAppDelegate-umbrella.h>
int main(int argc, char *argv[])
{
```
Reviewed By: fabriziocucci
Differential Revision: D71963188
Pulled By: cipolleschi
fbshipit-source-id: 5d566ae5aadb9efc032aacfe32862ea289134f87
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50288
Add hints about why devices running in the background might not report debuggable pages:
- Taking them from background might be enough
- Force killing them to restart them properly might be needed on Android.
Changelog:
[General][Internal]
Reviewed By: huntie
Differential Revision: D71888615
fbshipit-source-id: dda54b15daa7eebd1bc28a4d327a9b3d006397a4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50287
Using keys intersection to iterate over Props and PassThroughProps is not legal in TS. The issue can be mitigated by using intersection of AnimatedProps and PassThroughProps.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D71898246
fbshipit-source-id: 8505989f60622654034e5a775b884945dd9388ca
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50295
Enabling `useFabricInterop` by default for internal apps since before D71582553 iOS wasn't using useFabricInterop in it's codebase and old architecture with Interop enabled is harmless.
This is to keep the current behaviour consistent.
Changelog: [Internal]
Reviewed By: philIip
Differential Revision: D71908601
fbshipit-source-id: 825338db486d8f64c44c2d4c28394d8b789c4195
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50299
## Changelog
[General] [Fixed] – Add explicit `folly/dynamic.h` include where it is actually used
## Internal
This symbol is used in the file, so ensure we actually declare it. That way we do not need to depend on some other header to provide the symbol
Reviewed By: NickGerleman
Differential Revision: D71910330
fbshipit-source-id: 4fbb584cafc688bd58f6863370efc1ede3a4c5f1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50225
Updates `index.js.flow` to export (what should be) all public types for `react-native`, closely matching the resolved exported types of `types/index.d.ts` (current manual TS defs).
- Note that this first pass doesn't have to be exhaustive (not yet load bearing) — however, I've done a best-effort scan, which passes our current `__typetests__` fixtures.
**Approach: Explicit type imports in `index.js.flow`**
We have a number of options for how we organise and re-export values and types from the new index file — for now, we're opting for explicitly exporting each symbol here.
- While this clutters the index file somewhat, it also provides a single scannable source of truth — without introducing / altering each contributing module's type exports (we might want to do this eventually, but we're far from having strong organisation denoting the public API boundary). It's self-documenting that the index file contains all root exports by name.
- At the same time, we currently have some exceptions that use `export [type] *` to line up with TypeScript `namespace`s. We aim to review and update these within this release cycle, to enforce the above system.
Changelog: [Internal] - The `react-native` package now exports all public types in Flow (fbsource)
Reviewed By: rubennorte
Differential Revision: D71741575
fbshipit-source-id: 770e2b490e494ee195f4240358fec39f69145a94
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50298
Given EventDispatcher already synchronously calls EventListener, this convenience method for listening to events directly from EventEmitter was short-sighted. We will revisit how to handle JS vs. UI dispatched events for NativeAnimated purposes in future diffs. For now, this reverts https://github.com/facebook/react-native/pull/49998
This change is not being marked as breaking since the change that added this API has not yet been shipped to stable.
## Changelog
[General][Removed] - EventEmitter addListener and removeListener APIs
Reviewed By: zeyap
Differential Revision: D71909828
fbshipit-source-id: 9246de5c7a33368d182369a2d6eb57aa960b415b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50229
Makes a few internal improvements to `AnimatedProps`:
- Change `__connectAnimatedView` and `__disconnectAnimatedView` to be private methods, so that we can confidently change their type signatures.
- Pass `#targetInstance` into those methods, so that the responsibility of verifying `#targetInstance`'s non-nullability is hoisted to the call sites.
There should be no observable runtime behavior change.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D71740601
fbshipit-source-id: 6abc6faf63f3c3274fd2d92baf0958d2471d4a63
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50228
Properly annotate the type of `#animatedView` in `AnimatedProps` and rename it to `#targetInstance`.
Otherwise, no runtime behavior change.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D71739606
fbshipit-source-id: c97e4bd323ad9b1c08fd4976f13b6b20e8fe4793
Summary:
JsErrorHandler throwing again masks what the real problem is.
Changelog: [Internal]
Reviewed By: tmikov
Differential Revision: D71920942
fbshipit-source-id: 1697f6f4c779d5c896df1be8e696a185f1c2c828
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50306
`LengthPercentage` is a class representing a length, or a percentage of a reference length.
Having a function on it, specific to resolving asymetrical corner radius is the wrong organization. Let's move it to where it belongs.
Very technically breaking, but I would be shocked if anyone is using this API.
Changelog: [Internal]
Reviewed By: jorge-cab
Differential Revision: D71922893
fbshipit-source-id: 4660c861e21c1dffae15d3f463c135a494124e2a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50233
Ships the `disableInteractionManager` feature flag, which disables `InteractionManager` and replaces its scheduler with `setImmediate`.
Changelog:
[General][Changed] - InteractionManager is deprecated and will be removed in a future release. Its behavior has been changed to be the same as `setImmediate`, and callers should migrate away from it.
Reviewed By: javache
Differential Revision: D71766877
fbshipit-source-id: 36710fdf17c92f8cdee141e43a3c4d0bd9ef0e81
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50174
Add `httpReasonPhrase` util and use to populate CDP `Response.statusText` value.
AFAIK, neither platform, and none of our dependencies, reliably provide this mapping — so this is implemented directly.
Changelog: [Internal]
Reviewed By: vzaidman
Differential Revision: D71470037
fbshipit-source-id: f3f6437d0fb3227858b5910a71170e3a634aa962
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50286
Configures a thinner version of `NetworkReporter.cpp` (the entry point to `jsinspector_network`) in production builds (i.e. dev or profiling build, as gated by `REACT_NATIVE_DEBUGGER_ENABLED`).
Even though enabling the CDP Network domain isn't reachable in prod, this will reduce the compiled code footprint of `jsinspector_network`.
We also don't need `glog` here any more — remove dep.
**Implementation notes**
The reason to gate the logic within each method, with inline `#ifdefs`, rather than swapping between complete implementation files, is because each `report*` function will also have load-bearing logic (for the Performance API) in all prod builds. Therefore, this will reduce duplication (and file switching) down the line — and can be understood at a glance with this pattern.
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D71636694
fbshipit-source-id: 50e7c008bb6fd128fe1248d767832b36ccb0219b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50173
Refactors the internals of `NetworkReporter` (and the `jsinspector_network` library) to better organise concepts before we scale to more Network CDP events.
- Introduces `cdp::network` structs modelling CDP `Network` domain events and data types.
- Moves implementation details in converting input data objects to CDP types into `CdpNetwork.cpp` and `HttpUtils.cpp`.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D71470039
fbshipit-source-id: 0c04ffb40efbbb6d6d9782959f5adb33c9097ccb
Summary:
These modules don't actually use ui things in their setup. So, they don't need to be set up on the main queue.
Changelog: [Internal]
Reviewed By: lyahdav
Differential Revision: D71849447
fbshipit-source-id: d9d6ee043cac112731c27ff920e857fccdd54bc0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50110
## Rationale
Rendering can now include main -> js sync calls.
If we allow js -> main sync calls during rendering, react native can deadlock.
So, this diff moves the js -> main sync calls to "main queue module setup", which occurs before rendering.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D71347452
fbshipit-source-id: 894f21c703981c633fc0966e1edd647251d0fe2c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50302
Changes `eslint-config-react-native` to stop overriding rules that are disabled by `eslint-config-prettier`, which disables rules that conflict with Prettier formatting.
This also adds a Jest unit test to enforce that this invariant even as the configs change.
Changelog:
[General][Changed] - `eslint-config-react-native` now respects rules disabled by `eslint-config-prettier`.
Reviewed By: kassens
Differential Revision: D71922014
fbshipit-source-id: 55ba46e880d6129a417e864ab2fbb5704c57997b
Summary:
I made a mistake before, it seems we should use std::size_t to prevent bits truncation.
## Changelog:
[IOS] [FIXED] - Fabric: Fixes color hash type to prevent bits truncation
Pull Request resolved: https://github.com/facebook/react-native/pull/50285
Test Plan: N/A
Reviewed By: javache
Differential Revision: D71895413
Pulled By: cipolleschi
fbshipit-source-id: 26cc036bee851902e11abfa8ed5c5c8222421b09
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50242
Similar to D71636694, adds conditional compile to `RCTInspectorNetworkReporter.mm` to minimize code size and operations performed in production builds.
Specifically:
- Expensive copy of `httpBody` is eliminated.
- Other optional fields that are only mapped when CDP support is enabled are also omitted.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D71637716
fbshipit-source-id: 6c7688b1ac82d2b1047b42a812834a7dfb37cd0f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50142
This is a first pass at integrating `NetworkReporter` in our networking stack on iOS (`RCTNetworking.mm`).
**Implemented events**
Wires up minimal events sufficient to populate the Chrome DevTools Network panel:
- `Network.requestWillBeSent`
- `Network.responseReceived`
- `Network.loadingFinished`
**Other notes**
`RCTNetworking` is used (tentatively) as the integration point since it:
- Is the default implementation for the network stack on iOS.
- Should allow us to pair with originating JS call site down the line.
- Intercepts Blob requests (at least `RCTImageLoader`).
- Sits outside the user-configurable `RCTNetworkingResponseHandler` and `RCTNetworkingRequestHandler` concepts.
- Is where network events are currently sent to JavaScript (`sendEventWithName`).
NOTE: Reminder: `NetworkReporter` is currently a no-op without the `fuseboxNetworkInspectionEnabled` experiment set.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D71470038
fbshipit-source-id: 069d77473c333a98f796b3dffa670a39b3016b2b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50290
Changelog: [internal]
Small rename as the official name of the API is LongTasks.
Reviewed By: yungsters
Differential Revision: D71734777
fbshipit-source-id: fac085e3b0d304f7d05087143c15d32cf2b0971b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50265
This is a fun one!
"Improvements" consist of
* Performance is better now. Previously we did a tree walk for each ID in the array, now its just one :)
* Properly handles coopting (more on that below)
**Performance**
The previous implementation naively walked the tree until it found the right nativeId for each nativeId in the prop. This new algo just does a single tree walk and collects the views that have the right nativeIds as we are doing that walk.
**Coopting**
Our iOS code implements a form of accessibility coopting, where an element can "speak for" a descendant. This happens when some parent element does not have an accessibility label but a descendant does. We look at the subtree and grab every node that has a label and lift it up to the aforementioned element without a label. This enables some nice a11y features like wrapping `Text` in a `View` and letting the `View` just read all the `Text` inside (imagine a button with a label, you would only want to focus the button and just read the text instead of the text itself).
This feature is nice but it becomes buggy when we introduce `accessibilityOrder`. Previously, there was no way to access nested elements on iOS, the platform prohibits this. However, you can get around this by using `accessibilityElements`, which our `accessibilityOrder` prop maps to. So you could define the order as `['parent', 'child']` and access both elements just fine. However, if that `parent` is a `View` that coopts `Text`, we have some issues. The `View` will read the `Text` but then when the user swipes we focus the `Text` and read it again!
To get around this we check up the superview chain in RCTParagraphViewComponentView looking for Views that might coopt us and a cooresponding accessibilityElements with said candidates. If there is such a View we do not announce ourselves. Performance is iffy here, we need to iterate up to root for all text focusing, but this should be fairly fast for all intents and purposes and I have not noticed any lag when changing focus ordering.
Changelog: [Internal]
Reviewed By: jorge-cab
Differential Revision: D71562476
fbshipit-source-id: 31fd935df0764459403464bd645aae2e664c69cb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50215
Backwards compatible updates to `CoreEventTypes`, `Image`, `Switch`, `TextInput` to align types and reduce root exports.
The effects of this change can be seen in `packages/react-native/types/__typetests__/index.tsx` (smoke test file against current manual TypeScript definitions).
Under Flow, exports on each `*EventData` type are directly removed (unreferenced).
Changelog:
[General][Deprecated] - Deprecate `*EventData` types on `Image`, `Switch`, `TextInput` components. These can be substituted for `*Event`, e.g. `NativeSyntheticEvent<ImageLoadEventData>` becomes `ImageLoadEvent`.
Reviewed By: NickGerleman
Differential Revision: D71734361
fbshipit-source-id: 287c775e840319242984d248169c267abf8f032b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50275
This change adds a check to automate a step in the release process: https://github.com/reactwg/react-native-releases/blob/main/docs/guide-release-process.md#verify-assets-have-been-uploaded-to-maven
The script will poll maven for 90 minutes and return when the artifacts are available. If, after 90 minutes, artifacts are not available, it exits with code 1 that should fail the Release workflow. The Release Crew should have a look at what's happened.
## Changelog:
[Internal] - Automate the check for artifacts being on Maven
Reviewed By: fabriziocucci
Differential Revision: D71825014
fbshipit-source-id: 8879bf9c8fc4519e86b55ad8f9bd3ecf3f8ecfb7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50283
In OSS we have some libraries written in Swift, like Flashlist, that depends on these pods.
However, if a pod is not configured to define modules, those pods cannot be imported by Swift. Therefore, the libraries above will failed to be installed in a project.
This change adds the defines_modules directive to those pods and make the library work again.
This fixes https://github.com/facebook/react-native/issues/50246
## Changelog
[Internal] - Make React-hermes and React-renderercss defines modules
Reviewed By: fabriziocucci
Differential Revision: D71892679
fbshipit-source-id: b03b65986fbdbe781b616f31dfb6bceb38b8b3b7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50232
While reviewing the `avoidStateUpdateInAnimatedPropsMemo` experiment, I noticed that the control and test groups were invoking `areCompositeKeysEqual` differently:
- Test group was passing in `allowlist`.
- Control group was not passing in `allowlist`.
Passing it in is technically more correct, but let's restore the control group behavior for now to isolate the tested changes.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D71746745
fbshipit-source-id: aa34db0532ef53ead08bbd632aab0994b31b9340
Summary:
The React Native monorepo depends on `jest-config` in `jest.config.js` but does not specify it as a dependency. This means we got it as a phantom / transitive dependency. In React Native macOS, I am testing using Yarn 4 with pnpm layout to protect against such dependencies (See https://github.com/microsoft/react-native-macos/pull/2366). The simplest way to fix this is to just declare it as a dependency.
## Changelog:
[INTERNAL] [FIXED] - Add jest-config as a dependency
Pull Request resolved: https://github.com/facebook/react-native/pull/50280
Test Plan: This change should be a no-op in React Native, we already had the package in our lock.
Reviewed By: yungsters, huntie
Differential Revision: D71891841
Pulled By: robhogan
fbshipit-source-id: 5b4720e9e09e25b2f1eebb80675bfe4f3a48e2dc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50261
Since now we have the optimization of only running the custom accessibility order when we define the tree as dirty we need to add a hierarchy change listener on all ViewGroups within the parent to notify accessibility services of potential changes in hierarchy and so mark the subtree as dirty.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D71821636
fbshipit-source-id: 25649efa1679024a205e94c340511dc58783d575
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50240
StrictAnimatedComponentType was introduced to incrementally adopt sctricter animated types at the time. After aligning AnimatedProps it is no longer necessary and can be swapped with AnimatedProps.
Changelog:
[Internal] - Removed StrictAnimatedComponentType from createAnimatedComponent.
Reviewed By: huntie
Differential Revision: D71804845
fbshipit-source-id: e8adbfde1a48fd3f4fc94f4cc0938bd64384c418
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50038
Changelog: [Internal]
Creating a new feature flag to gate change for integrating c++ native animated
Reviewed By: rozele
Differential Revision: D71216797
fbshipit-source-id: 9669628a0789701ab6d447a8561027f3a335ef4f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50271
In the next version of Flow, support for `$PropertyType` will be removed in favor of indexed access types. The final 2 usages in react-native is in `ReactNativeTypes`, which is synced from upstream react. Sync of https://github.com/facebook/react/pull/32733 is currently blocked by test failures, so I will add the temporary shim to unblock releases.
Changelog: [Internal]
Reviewed By: panagosg7
Differential Revision: D71849353
fbshipit-source-id: d4787fe17ae52aa50d54f9fb7fb8b14c149aa1e6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50260
Changelog: [internal]
Created new directory `react-native/src/private/__tests__/utilities` and moved `ensureInstance` and `isUnreachable` to it.
Reviewed By: yungsters
Differential Revision: D71826787
fbshipit-source-id: 50a50a54ab928c9060282a9f2256ad97dd856ba4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50258
Changelog: [internal]
Minor reordering of tests in `Fantom-itest`, fix of describe block for `enqueueScrollEvent` and fix incorrect usage of `enqueueScrollEvent` instead of `scrollTo` in `scrollTo` tests.
Reviewed By: yungsters
Differential Revision: D71820977
fbshipit-source-id: 07637e2d18cde96c78c83285ba28201260e42f3c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50257
Changelog: [internal]
## Context
We have some tests that make sure certain objects are deallocated/released at the right times, but those are generally hard to get right. The main reason is that WeakRefs semantics are tied to the tasks and microtasks in JS, but we handle them both inside and outside the Event Loop in Fantom tests.
This leads to some surprising behavior where things we expect to have been deallocated weren't because of some innocent looking code.
## Changes
This introduces a safety mechanism in Fantom to enforce that WeakRefs are always dereferenced inside the Event Loop, by patching the method in `WeakRef` and checking if we're in the Event Loop using Fantom APIs.
It also updates the existing test using WeakRefs to fix the new errors thrown by this patch, and to serve as a "good example" on how to use WeakRefs to do memory testing.
Reviewed By: yungsters
Differential Revision: D71815397
fbshipit-source-id: 8faab1898d9112ec365b41867179abb8b251e337
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50219
* Make FabricEventDispatcher private, we already have a public EventDispatcher interface
* Rename ReactEventEmitter to EventEmitterImpl, to make it clearer it aligned with EventDispatcherImpl
* Update docs to make it clearer what's part of the old architecture
Changelog:
[Android][Removed] Removed FabricEventDispatcher from public Android API
[Android][Removed] Removed (un)registerEventEmitter from EventDispatcher interface
Reviewed By: lenaic
Differential Revision: D71735505
fbshipit-source-id: f0b56298cc38d08101ccdcdf0bda5487204e7bdc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50247
Rather than nooping the RCTSurfacePresenterObserver in RCTNativeAnimatedTurboModule, we should just not register the observer when using ReactNativeFeatureFlags::animatedShouldSignalBatch.
## Changelog
[Internal]
Reviewed By: shwanton
Differential Revision: D71735004
fbshipit-source-id: 5176497197314a9b07fc9bd77828f7a2af2650ea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50236
If you do something like
```
<Text>
<Text accessibilityRole="link">
I am a link!
</Text>
</Text>
```
we do not announce "link".
We skip any sort of spans on the entire text on iOS, which I feel like is not ideal. This case would be common enough, and users may not have access to the top level text component.
Note Android correctly handles this already.
Changelog: [iOS] [Fixed] - Correctly announce "link" on nested text if its the entire text element
Reviewed By: javache
Differential Revision: D71770798
fbshipit-source-id: 4a0781a95cb27cf244d6d2b1d1df8a0451964301
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50245
Follows D69867335, but uses the system `[[UIDevice currentDevice] systemName]` API to get the case sensitive OS name (as opposed to the `RCTPlatformName` concept, which is lowercase "ios").
Ultimately, this value is displayed as a user facing label in the debugger.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D71809427
fbshipit-source-id: 3f62bba94df16329c934a7671bcaa489c6797cb6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50214
This diff is a second step toward the TS AnimatedProps alignment. In this change the rest of the extended types and recursions in `WithAnimatedValue` are applied.
Changelog:
[Internal] - Aligned AnimateProps to match TS types.
Reviewed By: huntie
Differential Revision: D71623036
fbshipit-source-id: d4777e25c3bf3119608938ee4cd246cdc4c4f7ee
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50195
In Flow, all AnimatedProps properties are set to `any` and misaligned with Typescript definitions. This diff is a first step toward the TS AnimatedProps. The problem can be broken down into a few parts, at each point more types will be extended in WithAnimatedValue and the rest will be set to `any`. This approach enables smoother migration and validation.
Changelog:
[Internal] - Check for Builtin and Nullable types in WithAnimatedValue to align closer to TS types.
Reviewed By: huntie
Differential Revision: D71551006
fbshipit-source-id: 9316227f4ba32bdaa5be8097483a03ae19bf516f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50221
This was already rolled out by default previously, but we wanted to complete further testing internally before cleaning up the flag.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D71735311
fbshipit-source-id: b9d32787081fbe3d7fb740067d3709624028fa23
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50223
This is an implementation detail of React and better not make it leak everywhere. It's not used quite often even in react-native codebase, so it's better to just suppress the error on each call site. Currently it's typed as any, so there is not much type safety lost anyways.
Changelog: [Internal]
Reviewed By: alexmckenley
Differential Revision: D71687426
fbshipit-source-id: 7373bcd9bedcfcb95a10fa02e6a04399ccab91f0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50216
Call TouchesHelper directly from TouchEvent and remove the need for `RCTModernEventEmitter.receiveTouches`. This enables `Animated.Event` to process these events too, since they are now being delivered just like any other event.
Changelog:
[Android][Fixed] Enables Animated.Event to be used with onTouchMove in the new architecture.
[Android][Removed] Removed deprecated EventDispatcher#receiveTouches
Reviewed By: Abbondanzo
Differential Revision: D71114177
fbshipit-source-id: 61ca43ef5334b5514c4980a05b61b674d9a52c5b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50231
Changelog: [Internal]
RCTDeviceInfo uses KVO to listen to frame changes in the application's keyWindow. On initialization, it reads the global keyWindow and adds itself as a listener. When RCTDeviceInfo is cleaned up, it reads the global keyWindow again, and removes itself as an observer.
However, this makes an assumption that the keyWindow is always the same. This is not always true - for example, when a UIAlert is presented, the OS creates a new temporary keyWindow to host the alert in order to make sure it is the first responder. If the cleanup is called then, the app will crash because there is no RCTDeviceInfo observing it. Another example is the LogBox, which also temporarily creates a new keyWindow.
The fix is simple, we can capture a reference to the application's keyWindow on initialization, but make sure it is weakly held as the keyWindow is usually managed by iOS. Then, when we remove the listener, it is always guaranteed it is the window that we are observing.
Reviewed By: javache, cipolleschi, realsoelynn
Differential Revision: D71667722
fbshipit-source-id: 103baf980b79b413fb29e6c3deff81dae33671c0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50218
These were added in D70129295 to BaseViewManager but did not exist in the JS interface.
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D71737288
fbshipit-source-id: 751d26fb9116daf45d09f3853fe37cad29a8903a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49982
In D68708899, we removed dataURI inlining of sources and source maps into `Debugger.scriptParsed` CDP notifications.
After that, all message handling for which we need to preserve order is implemented completely synchronously, so there's no need for a promise queue to preserve order.
This removes the redundant queue.
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D71036230
fbshipit-source-id: d17fb7d06a038b379fe45b4e1c742dbf8ff12f78
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50036
This is my friday round of fixing some warnings in our codebase.
Those are all minor bits that should be fixed.
Changelog:
[Internal] [Changed] -
Reviewed By: huntie
Differential Revision: D71209124
fbshipit-source-id: 40aa231e049025bbff9dff8a572784bb1a9f324b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50187
D70668516 broke some SSTs, where asset that previously was black, showed up as clear.
I was assuming that was because we fixed a separate bug where assets could erroneously show as black layer, but these tests were actually just using a black asset.
Real bug here, is that the change led to only setting image when we have a displayLink, ie showing on screen, where before, we set image (implicitly at first frame) as layer content.
This change fixes that behavior, so first frame is rendered as part of off-screen view rendering, for images considered animatable.
Changelog:
[iOS][Fixed] - Fix animated images missing from offscreen render
Reviewed By: cipolleschi
Differential Revision: D71590856
fbshipit-source-id: f5da690b27f2da0f6979f25ece031ff0d418cca6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50193
This fix makes sure that we convert to JSException only NSException thrwn by sync methods.
Currently, nothing in the stack will be capable of understanding that js error if it is triggered by an exception raised by an asyc method.
See https://github.com/reactwg/react-native-new-architecture/discussions/276 for further details
We need to cherry pick this in 0.78 and 0.79
## Changelog:
[iOS][Fixed] - Make sure the TM infra does not crash on NSException when triggered by async method
Reviewed By: fabriziocucci
Differential Revision: D71619229
fbshipit-source-id: b87aef5dd2720a2641c8da0904da651866370dc6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50175
This change logs warning in the RN Dev Tools and in the Xcode console when a legacy module is used through the interop layer.
The `moduleName.methodName` warning is logged only once per usage not to flood the users with Warnings.
## Changelog:
[iOS][Added] - Add warnings when a legacy module is used in the Interop Layer.
Reviewed By: cortinico
Differential Revision: D71561348
fbshipit-source-id: f3ec830ddb07c4d0ab34534ad2baf95e75b1a3b3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49897
This change introduces the first warning for the New Architecture warning.
When modules are registered through the RCT_EXPORT_MODULE (or its variants) a warning is emitted.
Note: currently it is only emitted on the Xcode console.
I'm looking into ways to emit it also in the RN DevTools console.
## Changelog:
[iOS][Added] - Show warnings in the New Architecture when modules are loaded using RCT_EXPORT_MODULE
Reviewed By: cortinico
Differential Revision: D70789672
fbshipit-source-id: 06cb6cafbe7f65142a92d2e1ab9bc4ff59d0312a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50194
Changelog: [internal]
Just a small improvement of the diagram to make it more symmetrical and expand on what parts of the system are used within the rest of the RN repo.
Reviewed By: javache
Differential Revision: D71620577
fbshipit-source-id: 6b9398f416fd529eea192e82cad844212278492c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50192
Third party libraries depend transitively agains the React-renderercss modules because it is imported by Fabric.
Without this change, the use_frameworks on iOS does not works when a 3P library is imported.
This changes fix the behavior and we need to cherry pick them in 0.79.
## Changelog:
[iOS][Fixed] - Make sure 3p libraries depends on React-renderercss to work with use_frameworks
Reviewed By: fabriziocucci
Differential Revision: D71618395
fbshipit-source-id: 70c12dcbeb2dfa5fd7513c27d5c069a1f3c95966
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50170
This is needed in D71470038 and later, where submodules of `jsinspector-modern` need to operate with CDP message payloads. We functionally split out these files as a library to avaoid a dependency cycle.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D71551561
fbshipit-source-id: 527479399d7563883c1b6599f884b7857e79bd77
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49824
The way this works is each element on the list of `accessibilityElements` says that each element should go before the next element in its list. For example:
Imagine the default focus order:
```
[A, B, C, D, E]
```
If I set `accessibilityElements` to be:
```
[E, D, C, B, A]
```
That's just re ordering the focus order to be reversed, but what happens if I miss elements?
If I set `accessibilityElements` to be:
```
[D, B]
- D should go before B
```
Then my resulting order will be:
```
[A, D, B, C, E]
```
Because we follow the default order, then we find `B` but `D` should go before `B` so we first go to `D` and then finally go back to `B` and then continue our default order
This algorithm works with nested elements and it doesn't need to be exhaustive
We are also borrowing the concepts of Containers and elements from iOS.
We will disable views according to iOS logic to facilitate code shareability
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D70129295
fbshipit-source-id: 5ada03c7e5eb71a7b0a9d205296c2fa4366a3643
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50080
I'm renaming ReactNativeFeatureFlagsProviderHolder -> ReactNativeFeatureFlagsJavaProvider to make naming consistent with documentation and remove the concept of "Holder" which is not part of the original design
changelog: [internal] internal
Reviewed By: rubennorte
Differential Revision: D71333170
fbshipit-source-id: be89c3aafe5d9b1c9699aff224c7c8511bdf9327
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50180
Prepare for the change that makes `React.ComponentType` an alias of `component(...Props)`, which comes with stricter checking and making the props automatically readonly.
Changelog: [Internal]
Reviewed By: gkz
Differential Revision: D71566900
fbshipit-source-id: cefcc10fda9a9777532f25b325412b0d50ebb9b8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50106
## Changelog:
[General] [Added] - Create TurboModuleWithJSIBindings interface
So c++ TurboModules can initialize some private members with reference to `jsi::Runtime`
Reviewed By: lenaic
Differential Revision: D71396842
fbshipit-source-id: 59d32e4cbf2c5081912a4c828acc66ceb8702855
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50158
Compile-out UIManagerModule from FpsDebugFrameCallback
The setViewHierarchyUpdateDebugListener does not exists on Bridgeless and NotThreadSafeViewHierarchyUpdateDebugListener is deprecated and marked for deletion on the new architecture.
The new architecture exposes a different API called ItemDispatchListener that's a sort of replacement for NotThreadSafeViewHierarchyUpdateDebugListener. Although it's not the same.
FpsView is broken in old/new arch and needs to be rebuild, I believe this behavior needs to be rethinked in the future. For now I'm excluding usages of NotThreadSafeViewHierarchyUpdateDebugListener and setViewHierarchyUpdateDebugListener for apps running on the new arch enabled by default.
changelog: [internal] internal
Reviewed By: rshest
Differential Revision: D71050642
fbshipit-source-id: 662deb064ffc2322b560618fac3203ab4e86c277
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50164
Based on analysis this method is only used by legacy architecture, this diff adds an assert if NativeModuleRegistry.onBatchComplete() is used in new architecture
changelog: [internal] internal
Reviewed By: cortinico
Differential Revision: D71050638
fbshipit-source-id: 7a9791230880d2431e6b136735653a8ab4c34d7d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50160
In this diff we are removing UIManagerModule from NativeAnimatedModule
This code wasn't executing when fabric is enabled, with this change the code that references UIManagerModule will be stripped out
changelog: [internal] internal
Reviewed By: cortinico
Differential Revision: D71050641
fbshipit-source-id: fbedd5b9e1a9efb45c2fb7558d97fc639897c28c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50157
UIManagerType.DEFAULT is becoming confusings As we are expanding the usage of the New architecture everywhere.
That's why I'm depreacting this constant and introducing UIManagerType.LEGACY.
changelog: [Android][Deprecated] Deprecate UIManagerType.DEFAULT, replaced by UIManagerType.LEGACY
Reviewed By: alanleedev
Differential Revision: D70738948
fbshipit-source-id: 9793a6cce3b931f9c0de4e0c2026852119f392b2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50172
This specific warning is only for React Native users.
We don't need this warning on console for RNtester so I'm excluding react-native-github
project from the list of project where this warning gets fired.
Changelog:
[Internal] [Changed] - Do not warn for JSC deprecation on react-native-github
Reviewed By: mdvacca
Differential Revision: D71556035
fbshipit-source-id: 8ab625eb2c090416119903dbc9c29afac51c91bd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50104
Changelog:
[General][Internal] raises an event report when an attempt to open the debugger for not supported apps is made
Reviewed By: robhogan
Differential Revision: D71398802
fbshipit-source-id: 66b90a0286ee0844ced4319381e3a0581ce540b5
Summary:
fix: https://github.com/facebook/react-native/issues/50132
The goal of this PR is to ensure selected TextInput scrolls to the selected range when text or selection change.
The background of this feature check is to implement a rich text editor.
## Changelog:
[IOS][FIXED] - Selection range not respected when changing text or selection when selection is forced
Pull Request resolved: https://github.com/facebook/react-native/pull/50166
Test Plan:
Tested with the sample linked to this pull request.
As TextInput is a controlled component
Here is a video of the sample with the patch: https://drive.google.com/file/d/1lS9_70quNqND_E8MjLFcRG6HoHcDkfmv/view?usp=drive_link
First TextInput shows the initial issue reported in the ticket.
Second TextInput shows the global behavior of the controlled component, the 2 buttons allows to force focus and the force text values
I have also backport this part on 0.77.1 and test it in my app, it works fine for me (let's see if I have QA feedback)
Reviewed By: javache
Differential Revision: D71544064
Pulled By: cipolleschi
fbshipit-source-id: ca49a3a2ca0f5f87307054efda31b0c779c31496
Summary:
Expose eager initialization method on `RCTRootViewFactory` (iOS) so that application can prepare `ReactHost`/Bridge before actually creating a root view. Then creating a root view is significantly faster.
## Changelog:
[IOS] [ADDED] - allow eager initialization of `RCTRootViewFactory`
<!-- 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/49986
Test Plan:
Invoke `initializeReactHostWithLaunchOptions:` before calling `viewWithModuleName:` and measure the time difference vs not using eager initilization:
Before
- calling `viewWithModuleName:`: 63.39ms, 47.91 ms, 60.18ms
After:
- calling `initializeReactHostWithLaunchOptions`: 52.41 ms, 81.03 ms, 60.52 ms
- calling `viewWithModuleName`: 0.49 ms, 0.63 ms, 0.47 ms
Test run 3 times on iPhone simulator on M1 mac.
Reviewed By: javache
Differential Revision: D71548601
Pulled By: cipolleschi
fbshipit-source-id: 86ecfb8bec4c2657537caf32af49545b21d3656b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50131
Outlines and stubs methods on the `NetworkReporter` class, and the `Network.getResponseBody` CDP request on `NetworkIOAgent`. Together, these form the APIs to implement for CDP network debugging.
Also updates internal mutex use to `std::atomic<bool>`.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D70708526
fbshipit-source-id: f44bd0d246a38883dd591752fb2d3ed4567de4a0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50115
## Rationale
Rendering can now include main -> js sync calls.
If we allow js -> main sync calls during rendering, react native can deadlock.
So, this diff moves the js -> main sync calls to "main queue module setup", which occurs before rendering.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71348561
fbshipit-source-id: 1c57ba1d40b062712fd53b9dac0bc8ecd60b425d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50113
## Rationale
Rendering can now include main -> js sync calls.
If we allow js -> main sync calls during rendering, react native can deadlock.
So, this diff moves the js -> main sync calls to "main queue module setup", which occurs before rendering.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71348559
fbshipit-source-id: 918f145d817866a5d08087c1a4a0e151f783109e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50112
## Rationale
Rendering can now include main -> js sync calls.
If we allow js -> main sync calls during rendering, react native can deadlock.
So, this diff moves the js -> main sync calls to "main queue module setup", which occurs before rendering.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71347448
fbshipit-source-id: f62a92a35011a7c8de0a7ee35047cc94f23106d1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50109
## Rationale
Rendering can now include main -> js sync calls.
If we allow js -> main sync calls during rendering, react native can deadlock.
So, this diff moves the js -> main sync calls to "main queue module setup", which occurs before rendering.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71347449
fbshipit-source-id: 1fa010fd08a2d0b809f36a4c8df973b86e4610f9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50111
## Rationale
Rendering can now include main -> js sync calls.
If we allow js -> main sync calls during rendering, react native can deadlock.
So, this diff moves the js -> main sync calls to "main queue module setup", which occurs before rendering.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71480047
fbshipit-source-id: e36a4dd317bbbf46a6766f01fbf4d69a83a45c17
Summary:
We will use main queue setup of native modules to solve this problem instead.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71341038
fbshipit-source-id: 77e2064c732a5572d063a240f769fa7a79530f1b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50040
This diff implements main queue module setup.
Sometimes, people need to capture uikit things, and use them from javascript. In those cases, people can write main queue modules. These modules will be eagerly initialized on the main queue, during react native init.
## On Necessity
**Sync** dispatches to the main thread from the js thread can deadlock react native. And **async** dispatches to the main thread from the js thread sometimes might not be enough: it could lead to flickery rendering. So, we need to allow people to capture ui thread things, before any js executes.
## Caveat
This api is dangerous and discouraged. All react native surfaces will pay the cost of one surface introducing a main queue module. It could also slow down common/critical interactions in your app, if you're not careful.
We will introduce performance logging for this infrastructure. So that we can monitor and file tasks, when main queue module init starts taking "too long."
Changelog: [General][Breaking]: Introduce beforeload callback arg into ReactInstance::loadScript
Reviewed By: mdvacca
Differential Revision: D71084243
fbshipit-source-id: 8fdb84761ac69468afc428f4f79eff6322449e3c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49957
## Changes
This diff introduces the api for "main queue modules" into turbo modules.
This will occur occurs before any rendering.
## Rationale
Rendering can now include main -> js sync calls. If we allow js -> main sync calls during rendering, react native can deadlock.
With this diff, we can move the js -> main sync calls to before any rendering happens.
## APIs
**Buck API:**
Plugin:
```
react_module_plugin_providers(
name = "AccessibilityManager",
native_class_func = "RCTAccessibilityManagerCls",
unstable_requires_main_queue_setup = True,
)
```
**OSS API:**
[codegenConfig](https://reactnative.dev/docs/the-new-architecture/using-codegen) in package.json:
```
"codegenConfig": {
"name": "<SpecName>",
"type": "<types>",
"jsSrcsDir": "<source_dir>",
"android": {
"javaPackageName": "<java.package.name>"
},
"ios": {
"modules": {
"AccessibilityManager": {
"className": "RCTAccessibilityManager",
"unstableRequiresMainQueueSetup": true
}
}
}
},
```
Changelog: [iOS][Added] Introduce unstableRequiresMainQueueSetup api to modules
Reviewed By: cipolleschi
Differential Revision: D70413478
fbshipit-source-id: 78d89437c2869a979ae5c94f08b01087686dfae7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50140
Extends `react-native-codegen` to support the `.fb` filename suffix used to gate source code that is only relevant for Meta internal use cases.
Changelog:
[Internal]
Reviewed By: cipolleschi
Differential Revision: D70808462
fbshipit-source-id: a6772d6504f76724b8474df6799bc69a76a2f81b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50147
Noticed a couple bugs here, around a crash from assertion internal to the caching map which hashes on the AttributedString, that may or may not be related.
1. We are missing `baseTextAttributes` for both hashing and equality (which is mostly innocuous, but still wrong)
2. We were not hashing or comparing `textAlignVertical`
3. For equality, we were comparing parent shadow view tag and metrics, but for hashing, we were hashing the whole ShadowView.
I think #3 could cause issues, since we could see different hash despite equality, which could break invariants.
Changelog: [Internal]
Reviewed By: lunaleaps
Differential Revision: D71500246
fbshipit-source-id: 462749d5ca10d10bf0dab88089253a2bb8e603fb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50139
adding this event to Pressable because it is going to be consumed after to track if pressable location is moved
Changelog:
[General] [Added] - Expose `onPressMove` as base prop for `Pressable`
Reviewed By: thurn
Differential Revision: D71429258
fbshipit-source-id: 79acaa735764a47a21d89042d3e4b9c114c72950
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50117
D70870978 failed the compat check because it modified a union by removing an element in the middle:
```
'global' | 'self'
```
from
```
'global' | 'application' | 'self'
```
This caused the compat check to complain that index 1 in both unions: `self` didn't match `application` and thus it was a type incompatibility.
We should have been comparing these as an unsorted array of options, which first sorts, then treats differences as added/removed elements instead of incompatbile elements.
If in the example above the removed element was the last one from the union, it would have been fine.
Once these are classified as added/removed, the VersionDiffer is able to check whether that change is allowed in fromNative or toNative.
Changelog: [General][Fixed] Compatibility Check: Allow union changes when the new element is in the middle of the union
Reviewed By: makovkastar
Differential Revision: D71433054
fbshipit-source-id: 20a73f0ba0576daf30cec97bae969b31baf7f468
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50135
We settled on a different name here so gotta change some code with the old name. This is not exposed yet so this change is chill
Changelog: [Internal]
Reviewed By: jorge-cab
Differential Revision: D71471884
fbshipit-source-id: c30384802ef51e5aae830b27299859db05f2520b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50075
This is an exploratory change to see how it will look like to build core from SPM.
In this change we are building three pieces of React native (using the Podspec names for simplicity):
- React-jsi
- React-debug
- React-logger
- React-MapBuffer
They depends on a local ReactNativeDependency.xcframework we can build using the prebuild-io script.
## CHANGELOG:
[INTERNAL] - set up initial Swift PM configuration
Reviewed By: cortinico
Differential Revision: D70567840
fbshipit-source-id: 3f65a3e7c3dd39f71f6d4c04726712a5968e0a97
Summary:
This PR fixes https://github.com/facebook/react-native/issues/48657
- Memory usage for creating a blob lowered from _( nearest 2^N greater than the file size)+1KB_ previously To _(file size)+1KB_. This is achieved by avoiding internal calls to java.io.ByteArrayOutputStream.ensureCapacity by creating a buffer based on file size.
- Increases the max file size a Blob can be created from before hitting a OutOfMemoryException.
- Major performance increase by avoiding buffer copying
## Changelog:
[ANDROID] [CHANGED] - Speed and Memory usage improvements to Android Blob support
[ANDROID] [FIXED] - Creating of Blobs from large files now works. File size can now be upto available (free) heap size.
Pull Request resolved: https://github.com/facebook/react-native/pull/50121
Test Plan: Used the App here to test Android Blob creation. https://github.com/giantslogik/blob-large-file-fetch.
Reviewed By: cortinico
Differential Revision: D71464835
Pulled By: javache
fbshipit-source-id: 38de7d83bcaee265fc6e7183f6b1160027cd4cb2
Summary:
In the final XCFramework we no longer need to place resource bundles in a subfolder called Resources - they should be located directly in the framework folder.
This commit fixes this by removing copying to the Resources folder. I also removed a few unneeded tests since we know that we are in a valid folder at this point.
bypass-github-export-checks
## Changelog:
[INTERNAL] - Moved resource bundles up one level
Pull Request resolved: https://github.com/facebook/react-native/pull/50101
Test Plan: Run RNTester with RCT_USE_RN_DEP=1 and verify that it launches
Reviewed By: cortinico
Differential Revision: D71464608
Pulled By: cipolleschi
fbshipit-source-id: 6cfdda0c6785ffeb13c170f9fd2dd9f5b889d490
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49998
We have listeners for EventDispatcher, but we don't have any listener capabilities for synchronous hooks from events on the UI thread.
This proposal adds an affordance for generic event listeners that can be attached by the host platform mounting manager, e.g., to wire events to NativeAnimated event drivers.
## Changelog
[General][Added] - EventEmitter `addListener` and `removeListener` APIs
Reviewed By: javache
Differential Revision: D71050838
fbshipit-source-id: a7f298c71bd882a573781c2fe1fb5a1ae79f301c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50032
In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.
Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.
When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.
## Changelog
[Internal]
Reviewed By: javache
Differential Revision: D71198197
fbshipit-source-id: 5e49e3b0fb01079870fbc7fc7e74ca0db354cda5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49988
NativeAnimated currently depends on folly::dynamic event payloads for event-driven animations. While some events (e.g., ScrollEvent.h) have an `asDynamic` implementation, not all events do. In practice, NativeAnimated just needs to be able to extract an numeric value from a path to drive an animation.
Rather than converting events to dynamic, or otherwise special casing event handling, this change allows arbitrary payloads to implement `EventPayload::extractValue` to retrieve JS property path values directly from events, without intermediate conversions to dynamic.
## Changelog
[Internal]
Reviewed By: javache
Differential Revision: D71046682
fbshipit-source-id: 3544335ff9d50da87ced015de587b97204173b57
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49848
Adds a new method to reset the server host in PackageConnectionSettings to its default state rather than relying on providing a blank string
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D70584220
fbshipit-source-id: 2862eee5f71bfe318da7199f2288367433d6f887
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50100
While moving the generation of `ReactCodegen.podspec` from Cocoapods to Codegen, we wrongly copied some parts of the script and now it is generating folders with a `,` as a suffix.
This change fixes the problem and prevent the generation of such folders.
## Changelog:
[Internal] - Avoid generating `ios,` folders
Reviewed By: fabriziocucci
Differential Revision: D71395049
fbshipit-source-id: 1e6024af6e24834a682865792e64d056fb94e027
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50068
Note: this involved tightening up some signatures in Kotlin files
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DevSupportManagerBase.java nullsafe
Reviewed By: mdvacca
Differential Revision: D71126381
fbshipit-source-id: 01c08e2fc61eff885911fa9c295d504fa7ea334c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50067
Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71126382
fbshipit-source-id: d90966e62372395e864425c82321dc1fc04c1413
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50066
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made BundleDownloader.java nullsafe
Reviewed By: alanleedev
Differential Revision: D71126383
fbshipit-source-id: 94e9e9dfc1db83d32046e370c895fa889dabf116
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50065
Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71126388
fbshipit-source-id: a9f08b4ce101202cebe13107cc9c6a660deaf58f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50064
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DebugOverlayController.java nullsafe
Reviewed By: mdvacca
Differential Revision: D71126394
fbshipit-source-id: 77bba33f4f14566e133fa9e9649631bcffa3f0c9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50063
Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71126397
fbshipit-source-id: b1cdea896d6cd9d25f9075e0bf35b9e16bf6ef65
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50062
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made CxxInspectorPackagerConnection.java nullsafe
Reviewed By: mdvacca
Differential Revision: D71126386
fbshipit-source-id: 94b6fca6972e5f08c22df7bebe6f853b5ceb20a7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50061
Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71126390
fbshipit-source-id: 8ab63944b0e6ce3c78b14414e8a992c1321114f1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50060
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DevServerHelper.java nullsafe
Reviewed By: rshest
Differential Revision: D71126391
fbshipit-source-id: 0d39b23d0d96f32f25ac1003d849428000777852
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50059
Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71126395
fbshipit-source-id: fb42b12dae542bde6e0e9e58baeaab054ed8c49e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50058
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made JSDebuggerWebsocketClient.java nullsafe
Reviewed By: mdvacca
Differential Revision: D71126385
fbshipit-source-id: 8707e8c6b8092c0c301dc81a363758b60f38086a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50057
Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71126392
fbshipit-source-id: 96464734a2edc7ec242cd3f3646222587d89eb2c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50056
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made MultipartStreamReader.java nullsafe
Reviewed By: mdvacca
Differential Revision: D71126393
fbshipit-source-id: 3b621be82cd874c608cb610ba35dff0be7cbd195
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50055
Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71126389
fbshipit-source-id: f41d3fbdfdfcde28a8bfc1d52efaca6a8b0fcb1a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50054
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made StackTraceHelper.java nullsafe
Reviewed By: javache
Differential Revision: D71126387
fbshipit-source-id: 3456dde049b50e48ad703fe8312cf57b8d849515
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50053
Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71126384
fbshipit-source-id: 6a2e348f75b0b589de080bf060c4669db82a69c6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50091
Changelog: [internal]
If a library uses mount hooks to perform mount operations, it's possible to get concurrent modifications of the list of pending surface IDs to report.
This fixes that potential error by making a copy of the list before dispatching the mount notifications.
Fixes https://github.com/facebook/react-native/issues/49783.
Reviewed By: javache
Differential Revision: D71387739
fbshipit-source-id: 96c723ef2d6bcc659c4452434b7a4d5af26117ef
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50090
Changelog: [internal]
I refactored `FabricUIManager` in D54547194 / https://github.com/facebook/react-native/pull/43337 and accidentally removed setting this flag to avoid scheduling redundant tasks in the UI thread to report mount. This fixes it.
Reviewed By: javache
Differential Revision: D71387374
fbshipit-source-id: cad8a3ead2434738325560902cbab817e5d5dde7
Summary:
Headers are currently copied into each arch in the final xcframework. This is not necessary and will cause a lot of duplication since these files are the same for all archs.
This commit fixes this by only copying headers when we build the final XCFramework:
- ReactNativeDependencies.podspec: Changed the prepare script to be more resilient to different header structs, since we have multiple ways of packaging our tarballs locally and on the servers
- build.js: Removed copying headers when building frameworks
- compose-framework.js: Added copying headers once to the root of the XCFramework.
- rndependencies.rb: updated docs with correct ENV vars
bypass-github-export-checks
## Changelog:
[INTERNAL] - Changes the header structure in our XCFramework to avoid duplication
Pull Request resolved: https://github.com/facebook/react-native/pull/50085
Test Plan: Run RNTester with RCT_USE_RN_DEPS=1 to use prebuilt RN Deps.
Reviewed By: javache
Differential Revision: D71385183
Pulled By: cipolleschi
fbshipit-source-id: 160d56dea7f61d1b8d0a45b80f6c0789647358e6
Summary:
We had some issues with the Swift package build step where we saw an error message when we included resources and couldn't find out why this was happening.
After systematically going through the generated swift package file and looking for a reason I found a mistake.
When we generate the Package.swift file we pass all compilerFlags from the configuration of the target to both cpp/c flags - which in the case of the folly target ends up being passed to the dependency scanner which isn't too happy about this c++ flag.
The solution was to split `compilerFlags` into `cCompilerFlags` and `cxxCompilerFlags`.
This commit fixes this by:
- split `compilerFlags` into `cCompilerFlags` and `cxxCompilerFlags`.
- Updated configuration with correct settings
- Updated Package.swift generation to use these new flags
- Fixed issue with the copy bundles step that didn't copy the directory in some cases.
## Changelog:
[INTERNAL] - Fixed processing resources in the generated swift package for the RN Dependencies/prebuild
## Test-plan
Test by prebuilding RNDependencies, include the XCFramework in a new app and try to load resource bundles:
```obj-c
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
std::string input = "3.1416 xyz ";
double_conversion::DoubleToStringConverter::EcmaScriptConverter();
LOG(INFO) << "Hello from GLOG";
fmt::print("Hello, world from FMT!\n");
BOOST_ASSERT(100 == 100);
double result;
fast_float::from_chars(input.data(), input.data() + input.size(), result);
LOG(INFO) << "Answer :" << result;
NSArray *frameworks = [NSBundle allFrameworks];
for (NSBundle *framework in frameworks) {
NSString *frameworkName = framework.bundleURL.lastPathComponent;
if ([frameworkName isEqualToString: @"ReactNativeDependencies.framework"]) {
[self loadBundle:framework bundleName:@"ReactNativeDependencies_glog"];
[self loadBundle:framework bundleName:@"ReactNativeDependencies_boost"];
[self loadBundle:framework bundleName:@"ReactNativeDependencies_folly"];
break;
}
}
return YES;
}
- (void) loadBundle:(NSBundle*)framework bundleName: (NSString*)bundleName {
NSBundle *bundle = [NSBundle bundleWithURL:[framework bundleURL]];
NSURL *bundleURL = [bundle URLForResource:bundleName withExtension:@"bundle"];
NSBundle *resourceBundle = [NSBundle bundleWithURL:bundleURL];
NSURL* url = [resourceBundle URLForResource:@"PrivacyInfo" withExtension:@"xcprivacy"];
if (url == nil) {
LOG(ERROR) << "Could not find PrivacyInfo.xcprivacy in the " << [bundleName UTF8String] << " bundle";
} else {
LOG(INFO) << "Found PrivacyInfo.xcprivacy in " << [bundleName UTF8String] << ".";
}
}
```
Pull Request resolved: https://github.com/facebook/react-native/pull/50050
Reviewed By: javache
Differential Revision: D71316215
Pulled By: cipolleschi
fbshipit-source-id: 53093f962874101f5618997fdac3dd4550768da5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50092
`oldProps` can be null, so this is an unsafe dereference. We also typically compare with `_props`, which represents the previous state of the component.
Changelog: [General][Fixed] Fixed crash in RCTPullToRefreshViewComponentView#updateProps
Reviewed By: cipolleschi
Differential Revision: D71388015
fbshipit-source-id: deff9c581ee207c4481056a720c10dfd661f088d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50088
Changelog: [internal]
This fixes a crash when using the `fixMountingCoordinatorReportedPendingTransactionsOnAndroid` feature flag. The problem was that we were accessing the surface handler registry safely, but there were cases where invalid surface handler references were being kept in the registry.
Reviewed By: javache
Differential Revision: D71387111
fbshipit-source-id: 643fcdf10c4c5751d77e276efb37795b7af726bb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50077
Currently, `DevServerHelper` will fetch malformed URLs if the supplied `resourcePath` has a leading slash.
This diff adds a warning and automatically trims the leading slash when this happens.
Changelog:
[Android][Changed] - Leading slash supplied to `DevServerHelper.downloadBundleResourceFromUrlSync` will now be trimmed and emit a warning.
Reviewed By: robhogan
Differential Revision: D71333088
fbshipit-source-id: 636c9c6c6919d1e9d4a829ed5ae7253f829e549c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50071
Pull Request resolved: https://github.com/facebook/react-native/pull/50070
Changelog:
[General][Internal] Send code and close reasons when we close the connection to any websockets from the dev middleware
This should improve the debuggability of our code.
Reviewed By: robhogan
Differential Revision: D71314509
fbshipit-source-id: 1d6fc57a8601bcea78e95a87d423c7c46c51e799
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49950
Changelog: [GENERAL][CHANGED] - Changed `react-native-codegen` to support types under `CodegenTypes` namespace
## Summary
Currently, codegen relies on deep importing types under `react-native/Libraries/Types/CodegenTypes` to be properly type-checked. Updating codegen to support types under a single namespace will enable us to provide a single import from the package with access to all relevant types.
Reviewed By: huntie
Differential Revision: D70967809
fbshipit-source-id: 41241dcc51965f4243acd34e8b63475cb56ca67a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50030
In Flow importing Node from react is equivalent importing ReactNode in Typescript. During translation Node is not translated to ReactNode but React.Node is translated to React.ReactNode. The easiest solution is to migrate all "Node" types to "React.Node" so that the translation is correct. To make sure that everyone follow the lint rule is added that checks for Node imports from react.
Changelog:
[Internal] - Added lint rule preventing "Node" imports from react and migrated "Node" types to use React namespace in react-native
Reviewed By: javache, huntie
Differential Revision: D71189533
fbshipit-source-id: baea8feb46be3dc30b6e58bcefe140655ec0530a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50027
Changelog: [IOS][CHANGED] - Overwrite betterHitTest in RCTScrollViewComponentView instead of changing layout metrics of the container view
## Summary:
In https://github.com/facebook/react-native/pull/49855 I changed the container view of `RCTScrollViewComponentView` to be `RCTViewComponentView` instead of `UIView` so the touches would bass through its `betterHitTest` implementation (along with udating its layout metrics so the right path in the function is chosen). This resulted in some issues and the alternative approach of customizing the hit testing of the ScrollView itself might be a better approach.
This PR changes overwrites the `betterHitTest` method in a way that the `containerView` is entirely skipped during hit testing, instead forwarding the call to its children. This way, it won't prevent touches outside its frame from being delivered to children that extend out of the frame.
Reviewed By: cipolleschi
Differential Revision: D71187882
fbshipit-source-id: 9d0c79048f389b9bee37dea1e59226b54ddbe6f2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50028
Changelog: [IOS][CHANGED] - Replace a workaround for measuring multiline text with `maximumNumberOfLines` on iOS with a proper solution
## Summary:
In https://github.com/facebook/react-native/pull/49549 support for `numberOfLines` was added to iOS `TextInput`. Along that, a workaround for measuring multiline text with limited number of lines was added to avoid an edge case coming from `NSTextContainer` measuring empty lines even if they are over the line limit.
This PR handles that case properly by counting and measuring individual lines to properly handle the offending edge case.
Reviewed By: NickGerleman
Differential Revision: D71111841
fbshipit-source-id: 6adb4450a13fcc845604622ea76576658a7537aa
Summary:
As discussed with huntie, this is not a breaking change.
Changelog:
[Internal] [Changed] -
bypass-github-export-checks
Reviewed By: huntie
Differential Revision: D71201094
fbshipit-source-id: 3a27e621ac7718e4574c7981e5d64802e36e74cd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50035
changelog: [internal]
to make it easier to write JSDocs, let's export functions directly from index.js instead of using proxy object.
Reviewed By: rubennorte
Differential Revision: D71200977
fbshipit-source-id: 0b53c0d3f73577c19253537b9e884459a4920643
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50022
RCTHostTests.mm calls `makeHermesRuntime`, which is from `hermes.h`. Explicitly include the header so that RCTHostTests isn't getting it indirectly.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D71146426
fbshipit-source-id: 5a5f5a466e1920797c4531773ca23f53eb1203b7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50033
changelog: [internal]
All public APIs should be covered with tests, this diff adds tests for Fantom.scheduleTask.
Reviewed By: rubennorte
Differential Revision: D71195921
fbshipit-source-id: dc7f0f889b9633b1e641dc8887fd506bc4753fe5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50013
The diff incorporates event-target-shim types that will be referenced by generated TS types to make sure that the public API does not change unexpectedly. The generated tsconfig contains path property which tells Typescript to use copied types instead of the downloaded event-target-shims types.
Changelog:
[internal] - Moved event-target-shim types to react-native package.
Reviewed By: huntie
Differential Revision: D71044389
fbshipit-source-id: b2837cc880a2161f7ff716470fd6eb4644d514e2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50019
Changelog: [internal]
This adds some basic tests for the API to show that it's working correctly.
This was in response to https://github.com/facebook/react-native/issues/49684. If there are use cases that we think are incorrectly handled, we should add them to this test.
Reviewed By: cortinico
Differential Revision: D71128943
fbshipit-source-id: 73876ba514c23ec8f829723500fa408512b90222
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49942
iOS flushes NativeAnimated operations to the UI thread in one of two ways:
1. Some operations flush immediately when the operation is queued, namely startAnimation, stopAnimation, and setValue.
2. Other operations rely on flushing from one of the previous operation types, or a UIManager mount callback.
This behavior leads to non-determinism in flushing of some operations like `setOffset` or `startListeningToAnimatedNodeValue`, where if these operations are created, out-of-band from "flushed" operations, they will not take affect until the next React commit.
This change wires up the `animatedShouldSignalBatch` feature flag to queue operations on the JS thread, and flush them after `NativeAnimated.finishOperationBatch` is called.
## Changelog
[Internal]
Reviewed By: javache
Differential Revision: D70904592
fbshipit-source-id: 6bc7a8614cbe5e275d4d7bf5310da9f0090c0e10
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49989
Changelog: [internal]
This experiment didn't yield any significant wins and there are some failing e2e tests which seem suspicious, so better be safe and keep the current version.
Reviewed By: javache
Differential Revision: D71050517
fbshipit-source-id: da14fdd49e8d39cdcdc1dd579a50af3bf894d08a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50014
This was unintentionally made public during the Kotlin migration (D67791375), revert back to internal visibility, and update some of the deprecation comments.
Changelog: [Android][Removed] TouchesHelper is no longer part of the public API
Reviewed By: Abbondanzo
Differential Revision: D71114176
fbshipit-source-id: 2bd8882039fb972e1c2632a503292080c56a2f22
Summary:
If you use this preset to create library code, it is often helpful to be able to still read the transpiled code, even when sourcemaps are available.
This change adds a compact option which allows for disabling the default behavior that removes whitespace from the transpiled files.
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[GENERAL] [ADDED] - Add `compact` option to `react-native/babel-preset` to allow disabling whitespace removal
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/49979
Reviewed By: rshest
Differential Revision: D71109024
Pulled By: robhogan
fbshipit-source-id: ab205cca2a82b56955d1e1c55e288dcbe7754f8f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50002
Creates a new feature flag, `avoidAnimatedRefInvalidation`, to experiment with changing `useAnimatedProps`, so that the returned ref callback is no longer invalidated when `props` changes.
When we introduced `useAnimatedPropsMemo` and stabilized `AnimatedProps` (which is only invalidated when `AnimatedValue` and shallow `AnimatedEvent` instances are changed in an update), we should have also made this change. It was an oversight that we did not do this.
Avoiding unnecessary invalidation of the ref callback is important to reduce extra work and unpredictable semantics associated with unnecessary detaching and re-attaching of refs.
Changelog:
[Internal]
Reviewed By: lunaleaps, jbrown215
Differential Revision: D71074781
fbshipit-source-id: 82386a79b8e9bed0b74d9b85978af66f453a7ad0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49991
This change adds nightly support for prebuilds.
t works the same way hermes works: if the react native version contains nightly, we try to use that version to download the right tarball.
To work, it needs to use the `RCT_USE_RN_DEP` env variable.
## Changelog
[Internal] - Add Nightly support to consume ReactNativeDependencies
Reviewed By: cortinico
Differential Revision: D71050926
fbshipit-source-id: 9f461b5f17fde960d92b4082bc60f76959e82cdf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49978
This change connects the RNDependencies we prebuild in CI with the other iOS jobs we have.
By doing so, we aim to speed up the build time in CI, saving time and money.
## Changelog:
[Internal] - Connect the ReactNativeDependencies in CI
Reviewed By: cortinico
Differential Revision: D71034587
fbshipit-source-id: 14f1237f4fb57ee103a80be1718042d66ff7b0d7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49970
This change add supports to pass a tarball from a local file to the ReactNativeDependencies podspec, so that we can build React Native using a local copy or the RNDependencies and we can use it also in CI.
## Changelog:
[INTERNAL] - Add support for local tarballs
Reviewed By: cortinico
Differential Revision: D71032641
fbshipit-source-id: d83c96c8c12f3add45f8f5ea15fa0eac06d0bedf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49968
Updates all the core podspec to use the new `ReactNativeDependencies` podspec
## Changelog:
[INTERNAL] - Updates Modules in core to use the new dependencies.
Test Plan:
✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs
✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities
Reviewed By: cortinico
Differential Revision: D71032639
Pulled By: cipolleschi
fbshipit-source-id: e53179a8c1b47ee2b945f5cb5dfaf3f6f2755af2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49971
Updated the Cocoapods infrastructure to use the new the `ReactNativeDependencies.podspec`
## Changelog:
[INTERNAL] - Configured the Cocoapods infra to use the new `ReactNativeDependencies.podspec`
Test Plan:
✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs
✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities
Reviewed By: javache, cortinico
Differential Revision: D71032638
Pulled By: cipolleschi
fbshipit-source-id: 154c8891d5b8b4b84952274c169479122a4800b1
Summary:
There are two environment variables that is related to ReactNativeDependencies:
- `RCT_USE_DEP_PREBUILD `: If set to 1, ReactNativeDependencies will be built from source.
- `RCT_DEPS_VERSION`: If set to 1, it will override the version of ReactNativeDependencies to be used.
bypass-github-export-checks
## Changelog:
[INTERNAL] - Introduced functions to configure ReactNativeDependencies in Cocoapods
Pull Request resolved: https://github.com/facebook/react-native/pull/49812
Test Plan:
✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs
✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities
Reviewed By: javache
Differential Revision: D70968672
Pulled By: cipolleschi
fbshipit-source-id: bb93e763bd71cec7314565b5a751b226735b404e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49969
Improved RCT-Folly podspec by configuring it as a prepare step, so that we don't need to forward the folly flags to all the others pods and to 3rd party dependencies.
## Changelog:
[INTERNAL] - Configure folly in a prepare step
Test Plan:
✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs
✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities
Reviewed By: javache
Differential Revision: D71032640
Pulled By: cipolleschi
fbshipit-source-id: a34a9b38fa5d5b37a0a193a73659f0d45dd3d660
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50008
The diff adds extraction of triple-slash directives using regex to match and retrieve following reference.
Changelog:
[internal] - Added support for triple-slash directives in generated .d.ts files
Reviewed By: huntie
Differential Revision: D71113674
fbshipit-source-id: 2207d5b455515c44ba585ffecc063914e0818e58
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50011
changelog: [internal]
Majority of time, you want to simply scroll. This diff introduces a convenience method Fantom.scrollTo.
Previously, you would have to write:
```
Fantom.runOnUIThread(() => {
Fantom.enqueueScrollEvent(element, {
x: 0,
y: 60,
});
});
Fantom.runWorkLoop();
```
Now, you can just do:
```
Fantom.scrollTo(element, {
x: 0,
y: 60,
});
```
Reviewed By: rubennorte
Differential Revision: D71113680
fbshipit-source-id: aed49a2f12be8ab30be549235cc7a2b3e35faadb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50009
changelog: [internal]
rename method `scrollTo` to `enqueueOnScrollEvent` to make it obvious that event is only enqueued and not executed.
Reviewed By: rubennorte
Differential Revision: D71027761
fbshipit-source-id: 8a22babc2f5e86196c0b0af75ab65d539048dc72
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49975
Removes the "Plugins" category from the non-structural grouping of exports in `index.js`, `index.js.flow`, aligning these with the "APIs" and "Components" categories in our docs.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D71033295
fbshipit-source-id: bd39bb6ff5e30c1ed0a8d56d1ed61d52120fb776
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49990
Changelog: [internal]
This cleans up the flag and makes the Document API essentially part of the DOM APIs flag, after we've verified this is stable in a production experiment.
Reviewed By: sammy-SC
Differential Revision: D68772174
fbshipit-source-id: 3b3d0c4369a648faab3dc7caed8eec2c95fa05b3
Summary:
Android's onAnimationEnd callback is lossy and ocasionally just does not fire. However the LayoutAnimationController maintains a sparse array of animations (with Strong View refs) that is only cleaned when the onAnimationEnd callback is invoked. This results in a leak of Android View objects over time.
To avoid this, the Strong View refs are migrated to WeakReference's and the associated sparse array is cleaned of any invalid layout animations in response to the reset() call.
This closes two leaks:
1. Unbound growth in LayoutAnimationController::mLayoutHandlers
2. Pinning View objects into memory as the sole remaining GC root
## Changelog:
1. Made OpacityAnimation and PositionAndSizeAnimation classes hold weak refs to views only
2. Added a method to LayoutHandlingAnimation to surface if their view ref is gone
3. Added cleanup for Animation with bad view refs
Pick one each for the category and type tags:
[ANDROID] [Fixed]- Fixes memory leak
Pull Request resolved: https://github.com/facebook/react-native/pull/49959
Test Plan: * Primarily code inspection and regression given the intermittent nature of Android's failure to execute the callback.
Reviewed By: alanleedev
Differential Revision: D71037262
Pulled By: javache
fbshipit-source-id: 1fa4eaa2ca839f347a55cb37e2648db972748586
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50001
Updates `react-native/.flowconfig` with the following option:
```
react.runtime=automatic
```
This adjusts Flow to model the current behavior of React and JSX, relaxing the requirement that JSX elements have `React` within scope.
Changelog:
[General][Changed] - Changed Flow for the React Native monorepo, so that `React` no longer has to be in scope when using JSX.
Reviewed By: javache
Differential Revision: D71096283
fbshipit-source-id: 65762ac39206c682b7be5d3f512b2b83f7eb1b49
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50000
This adds some tests that verify that controlled textinput, via text prop, or children creating attributedstring, does not jumble text, so long as JS side does not mutate underlying text content.
The rewriting/max length example does still run into problems here.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D71076703
fbshipit-source-id: 85995e8cc087533b1115f158ba5dad67ed008289
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49999
Changelog: [Internal]
Early initialize call to RCTScreenSize which is used by Modal and will read screen size off the UI Thread to avoid main thread deadlocks
Reviewed By: sammy-SC
Differential Revision: D70999156
fbshipit-source-id: 47fb8666c3330ee67cbcb430060f0cec37ec3c7c
Summary:
We were missing some null checks that could cause a crash.
There seems to be some cases where either the parent or the currently focused View are present on Android's hierarchy but not present on the Shadow Tree, in this cases we can just return a nullptr to fall back to default focusing behavior on Android.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D71050870
fbshipit-source-id: a4b4e533c4e9a59c53190feb4b23db4b436b8ae9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49987
I went through the whole changelog for 0.79 and applied categories to all the entries + did some significant cleanup (remove some entries that were actually internals, grouped and sorted various items)..
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D71003373
fbshipit-source-id: 5a95e619f1cf2ffc84263b92104efee16fd74e53
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49941
This diff introduces annotations into the ios codegen config!
## Before
In the new architecture, people can declare module/component codegen config in [package.json](https://reactnative.dev/docs/the-new-architecture/using-codegen#configuring-codegen)
This config contains the following maps:
- modulesConformingToProtocol
- modulesProvider
- componentProvider
```
"codegenConfig": {
"name": "HelloWorldSampleModule",
"type": "all",
"jsSrcsDir": "specs",
"android": {
"javaPackageName": "com.helloworld"
},
"ios": {
"modulesConformingToProtocol": {
"RCTImageURLLoader": [
"RCTHelloWorldImageURLLoader"
],
"RCTURLRequestHandler": [
"RCTHelloWorldURLRequestHandler"
],
"RCTImageDataDecoder": [
"RCTHelloWorldImageDataDecoder"
]
},
"modulesProvider": {
"HelloWorldImageURLLoader": "RCTHelloWorldImageURLLoader",
"HelloWorldURLRequestHandler": "RCTHelloWorldURLRequestHandler",
"HelloWorldImageDataDecoder": "RCTHelloWorldImageDataDecoder"
},
"componentProvider": {
"FooComponent": "RCTFooComponentClass"
}
}
```
## After
This information is a little bit easier to understand if we group it by module/component (into **annotations**):
(that's what this diff does!)
```
"codegenConfig": {
"name": "HelloWorldSampleModule",
"type": "all",
"jsSrcsDir": "specs",
"android": {
"javaPackageName": "com.helloworld"
},
"ios": {
"modules": {
"HelloWorldImageURLLoader": {
"conformsToProtocols": ["RCTImageURLLoader"],
"className": "RCTHelloWorldImageURLLoader"
},
"HelloWorldURLRequestHandler": {
"conformsToProtocols": ["RCTURLRequestHandler"],
"className": "RCTHelloWorldURLRequestHandler"
},
"HelloWorldImageDataDecoder": {
"conformsToProtocols": ["RCTImageDataDecoder"],
"className": "RCTHelloWorldImageDataDecoder"
}
},
"components": {
"FooComponent": {
"className": "RCTFooComponent"
}
},
}
```
## Migration
The old way is still supported (for now). We will deprecate it soon, and eventually remove it from react native!
Changelog: [iOS][Added] - Codegen: Introduce module/component annotations inside package.json
Reviewed By: mdvacca
Differential Revision: D70822061
fbshipit-source-id: 87ec5664a551c54b9300ba92987f237a601ccfbf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49940
This will just make sure that we don't unintentionally break this script.
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D70919549
fbshipit-source-id: 6d9f2acca46486f1c920afed69609c70f53e6b18
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49992
changelog: [internal]
View culling does not play along with view flattening/unflattening. This diff adds a test case for it + fix. Previously, view culling would crash.
There are still untested branches of view flattening/unflattening where I am trying to come up with test cases.
Reviewed By: rubennorte
Differential Revision: D71047032
fbshipit-source-id: 9f52473743755e49e4bfda0783803cb79591ca27
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49908
There are various batching mechanisms across react-native platforms. The NativeAnimated startOperationBatch and finishOperationBatch methods are a useful way to signal that complete animation graphs are established for atomic flushes to the UI thread.
Setting up this feature flag for use across non-Android React Native platforms.
## Changelog
[Internal]
Reviewed By: javache
Differential Revision: D70827938
fbshipit-source-id: 4c4a74e9a11f75090152637d6195092f5af866a0
Summary:
This PR (https://github.com/facebook/react-native/pull/48182) introduced skipping hidden folders during Codegen generation.
However, when using pnpm, all files are stored in the `.pnpm` folder (see explanation here: https://pnpm.io/symlinked-node-modules-structure).
As a result, some libraries that support the new architecture but lack the `ios.codegenConfig.componentProvider` field - like [FlashList](https://github.com/Shopify/flash-list/blob/main/package.json) - will be skipped during Codegen generation.
This PR explicitly includes `.pnpm` to prevent this issue.
## Changelog:
[iOS][Fixed] - Check .pnpm folder when looking for third-party components.
Pull Request resolved: https://github.com/facebook/react-native/pull/49983
Test Plan:
Tested on:
RN 0.78.0
PNPM: 10
Flashlist: 1.7.3
Reviewed By: cipolleschi
Differential Revision: D71047936
Pulled By: cortinico
fbshipit-source-id: fa9caab23dea8c92ef5f23c997812d348eb19e08
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49981
Changelog: [internal]
(because MutationObserver isn't a public API yet)
## Context
`MutationObserver` is a [JavaScript API](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) used to report mutations in the DOM tree. The mutations available on Web are: changing children, changing attributes and changing text. In React Native, only changing children is supported.
Mutation detection needs to happen synchronously when mutations happen (in ShadowTree commits) and the notification is dispatched as a microtask in JS, which means we can only report mutations happening in JavaScript.
There's an assumption that only React (in JS) can change the structure of the tree in Fabric, so we implemented `MutationObserver` considering this assummption.
Unfortunately, while the assumption is correct (we can only mutate children from React) the implementation didn't take into account that commit hooks were triggered from multiple threads, even if the structure doesn't change (e.g.: with Fabric state updates). In this case, we do the checks but we never dispatch the notifications. This can cause crashes (see T217617393) if we try to check for mutations from the main thread while we add new observers in the JS thread (because that logic wasn't thread safe).
This fixes that crash by, in MutationObserver, not only preventing notifications from commits not coming from React, but also preventing the determination altogether.
In order to do this, this modifies the signature of the commit hooks to also pass the commit options, and adds a new field in the commit options with the source of the commit (for now, just "React" or "Unknown").
In `MutationObserver`, before accessing the data structures of the observer, we check if the commit is coming from React, and return early otherwise.
Reviewed By: javache
Differential Revision: D71036705
fbshipit-source-id: 985c8f903375cbf876dce5174e04563f74d7621a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49973
We still depend on the Community CLI directly, supporting local development in `packages/rn-tester`. Bump to latest — contains a number of build improvements, and will align us closer to prod/next.
Changelog: [Internal]
Reviewed By: cortinico, cipolleschi
Differential Revision: D71033085
fbshipit-source-id: ddbf7df5a35951b77c36d111cfd12ad64c3b73f7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49956
This is no longer being used internally so I think we can just remove this for less complexity
Changelog: [Internal]
Reviewed By: philIip
Differential Revision: D70983663
fbshipit-source-id: 61ca5212cb45dd1c8b96aee62964ad62b410d6f1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49854
Changelog: [GENERAL][ADDED] - Codegen utility functions and types are now exported from the root package
Up to this point, third-party libraries needed to use deep imports to access codegen utilities and types This diff exports them from the main entry point, as we want to move away from supporting deep imports in OSS as a part of JS Stable API project.
Reviewed By: huntie
Differential Revision: D70628408
fbshipit-source-id: 5a6e1cb870465ede0fbc9eb8912d255aa90aa2a8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49974
Changelog: [internal]
The feature flag system currently logs an error when trying to access common feature flags (flags accessible from everywhere but defined in native) from JS if the native module isn't available.
This forces a pattern in code to check if the module is available before accessing certain feature flags, to avoid showing that error to users in the legacy architecture.
This removes the need for that pattern by adding the check in the feature flag infra itself. If TM infra isn't available, we return default values and don't log the error.
Reviewed By: rozele
Differential Revision: D70975412
fbshipit-source-id: 5544bd96aaaf046ef90ca69bc549bef4e54eb98b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49855
Changelog: [IOS][FIXED] - Fixed touch events not being dispatched to ScrollView's children when they overflow the content container
Closes https://github.com/facebook/react-native/issues/47740.
Changes the ScrollView's container view to be `RCTViewComponentView` instead of `UIView` and sets custom layout metrics to it in a way that it will propagate touch events to all children, even if they overflow its bounds.
Reviewed By: sammy-SC
Differential Revision: D70619894
fbshipit-source-id: 348a1a369489d5208d6037c8d76b223c4ab2d5f7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49582
TSIA, this is a fairly straightforward implementation since iOS likes the shape the data is already in. Note I form a stacking context since I need the native view that has `accessibilityElements` to actually be an ancestor of everything under it
Note I am not exposing anything yet on the JS side, since we need to do Android also
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D69625269
fbshipit-source-id: 836f1bb631646408a5726f126be61c0ff6afe1d0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49960
Fixes https://github.com/facebook/react-native/issues/49106
RN legacy arch, and web, will clip inline content which appears after elipsized text. This is the correct behavior, compared to new arch, which will put it in a random place depending on the platform.
`line-clamp`: https://jsfiddle.net/7xgdke1b/
`text-overflow`: https://jsfiddle.net/7xgdke1b/2/
Fabric renderer does not, funnily enough, having an `isClipped` field on `TextMeasurement::Attachment` that is never used.
This change propagates state for whether an attachment is beyond elipsized area to this measurement, then when we see it, we set empty layout results with `DisplayType::None` so that we don't create native views. We don't layout child views either, but this seems to work out okay, even when removing and re-adding `numberOfLines`.
Changelog:
[General][Fixed] - Fix New Arch handling of inline views when text truncated
Reviewed By: mdvacca
Differential Revision: D70922174
fbshipit-source-id: 8c1f4aadbf53ff64ce55b44d6c7953d9b2e40bc5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49543
When using `ReactScrollView` or `ReactHorizontalScrollView` Views with `removeClippedSubviews` keyboard navigation didn't work.
This is because keyboard navigation relies on Android's View hierarchy to find the next focusable element. With `removeClippedSubviews` the next View might've been removed from the hierarchy.
With this change we delegate the job of figuring out the next focusable element to the Shadow Tree, which will always contain layout information of the next element of the ScrollView.
Changelog: [Android][Fixed] - Fix keyboard navigation on lists with `removeClippedSubviews` enabled
Reviewed By: joevilches
Differential Revision: D69618406
fbshipit-source-id: 1df7f90066dfc685e74a89b29222937777714b87
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49961
As preparation for fixing focus on FlatList we need to prevent the currently focused view from getting clipped. This is because in Android, if the currently focused view gets clipped before transferring focus we crash.
Changelog: [Android][Changed] - Prevent currently focused child from getting clipped when `removeClippedSubviews` is enabled
Reviewed By: NickGerleman
Differential Revision: D70994348
fbshipit-source-id: 8c68eeebd7df8e7d8f788e50a3bbe46b0335ace3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49951
We previously fixed Differentiator generating an incorrect parentTag (https://github.com/facebook/react-native/pull/48055), but this can lead to crashes in Android UI due to reordering that happens in the Android mounting layer. While we have an experiment to disable this reordering (https://github.com/facebook/react-native/pull/46702) this currently has a negative performance impact which needs to be addressed.
As a mitigation, we can make the lookup of parentTag's ViewManager state nullable. We only require this to support `needsCustomLayoutForChildren`, which is not commonly used, and seems acceptable to drop in this scenario.
Changelog: [Android][Changed] Do not crash when parent view state can't be found
Reviewed By: NickGerleman
Differential Revision: D70966621
fbshipit-source-id: 33d0b6a90860788a4c9a8c6cea36c2c72c1392e1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49937
Adding an assert for recycled views still attached to their parent, which would lead to an exception when the view would be added to a new parent.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D70922503
fbshipit-source-id: 7d4daf427306203d603c31999ab138b3aee08e83
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49954
We have a different version of OkHttp internally and in OSS so we need to suppress these for now.
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D70975145
fbshipit-source-id: cd2a3ab5cdc52f25c78cb608e917fa3ca378e4f1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49817
changelog: [internal]
Remove feature flag excludeYogaFromRawProps. It did not yield any performance wins and the code to support the feature is spread across multiple classes. Removal simplifies complexity.
Reviewed By: javache
Differential Revision: D70389071
fbshipit-source-id: 21751f56aec8de501ff1e1efafda035069d8ef48
Summary:
Migrate com.facebook.react.uimanager.layoutanimation.OpacityAnimation to Kotlin.
I moved out `OpacityAnimationListener` as well in this PR to separate concerns and align more with the codebase.
## Changelog:
[INTERNAL] - Migrate com.facebook.react.uimanager.layoutanimation.OpacityAnimation to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/49822
Test Plan:
```bash
yarn test-android
yarn android
```
Reviewed By: javache
Differential Revision: D70588884
Pulled By: alanleedev
fbshipit-source-id: 1b70f5e5facd5f47b828090e7c63a218229000cb
Summary:
When using the `login-password` prompt type, there is a TypeScript type mismatch issue. The `callbackOrButtons` parameter returns an object with `{login: string, password: string}` structure, but this type variation is not properly included in the **AlertType** type definition. This causes TypeScript to show type errors when using callback functions that expect credentials in the format `(credentials: {login: string, password: string}) => void`.
## Changelog:
- [General] [Fixed] Add missing type variation `{login: string, password: string}` to **AlertType** type definition to properly support `login-password` prompt callbacks
Pull Request resolved: https://github.com/facebook/react-native/pull/49757
Test Plan: This change is purely type-related and doesn't affect runtime behavior.
Reviewed By: NickGerleman
Differential Revision: D70797036
Pulled By: alanleedev
fbshipit-source-id: 8e27a39f0c8f49083730c683b41b69173715bd68
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49927
This change automates updating App's Info.plist with the new `RCTNewArchEnabled` boolean entry. The value depends on how the pod install is set up. In this way, we maintain the previous UX to enable/disable the New Arch.
## Context
The RCT_NEW_ARCH_ENABLE flag is a compile time flag we used for almost two years to configure the iOS apps and to determine whether the app should build with the New Arch or not.
However, given that we are looking into prebuilding React Native, we have to get rid of all the compilation flags, because they would require us to prebuild a combinatorial number of artifacts for react native. For example:
- New Arch / Hermes
- Old Arch / Hermes
- New Arch / JSC
- Old Arch / JSC
- ...
## Backward compatibility
We are going to keep adding the RCT_NEW_ARCH_ENABLED flag in all the dependencies, through the cocoapods inrastructure, so libraries, which are not prebuilt, will be build for the right architecture by the app itself.
## Changelog:
[iOS][Added] -
Reviewed By: cortinico
Differential Revision: D70888212
fbshipit-source-id: 541a818e02ccb96c822de29b0714646d1e69a5a9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49924
This change deprecates the RCT_NEW_ARCH_ENABLEd flag to toggle the New Architecture.
The new approach bring iOS closer to Android: to diasable the New Architecture, user needs to modify the App's Info.plist and add a `RCTNewArchEnabled` boolean entry and set it to `NO`.
The absence of the entry implies that the New Arch is enabled. (Defaults to enabled)
This also deprecates the `RCTSetNewArchEnabled` function because it makes no sense now
## Context
The RCT_NEW_ARCH_ENABLE flag is a compile time flag we used for almost two years to configure the iOS apps and to determine whether the app should build with the New Arch or not.
However, given that we are looking into prebuilding React Native, we have to get rid of all the compilation flags, because they would require us to prebuild a combinatorial number of artifacts for react native. For example:
- New Arch / Hermes
- Old Arch / Hermes
- New Arch / JSC
- Old Arch / JSC
- ...
## Backward compatibility
We are going to keep adding the RCT_NEW_ARCH_ENABLED flag in all the dependencies, through the cocoapods inrastructure, so libraries, which are not prebuilt, will be build for the right architecture by the app itself.
## Changelog:
[iOS][Deprecated] - deprecate the `RCT_NEW_ARCH_ENABLED` and the `RCTSetNewArchEnabled`
Reviewed By: cortinico
Differential Revision: D70885454
fbshipit-source-id: 4b8404ead4900d9787049ebd0b8b3c29b272f913
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49929
X-link: https://github.com/facebook/metro/pull/1459
In the next version of Flow, we will stop bundling many of the builtin libdefs, and they have been moved to flow-typed. This diff checks in them to prepare for the deployment of the next version of Flow.
Changelog: [Internal]
Reviewed By: SamChou19815
Differential Revision: D70896122
fbshipit-source-id: aa6bd0b1e653b983a345b0e202c8dad5058a0001
Summary:
GHA passes the version to the script with a `v` prefix. However, when we receive the version from NPM, the `v` prefix is not here.
We can fix the script by dropping the `v` when it is passed to the function.
bypass-github-export-checks
## Changelog:
[Internal] - Fix verifyPackageOnNPM
Pull Request resolved: https://github.com/facebook/react-native/pull/49944
Test Plan: GHA
Reviewed By: cortinico, fabriziocucci
Differential Revision: D70960414
Pulled By: cipolleschi
fbshipit-source-id: 4234103ebe49cf715aea4a1473a8a60978f07a9f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49936
Ensure LegacyArchitectureLogger.assertWhenLegacyArchitectureMinifyingEnabled is called only once per class loading in kotlin
changelog: [internal] internal
Reviewed By: alanleedev
Differential Revision: D70922132
fbshipit-source-id: ce4d68dc2ab0f61266e4bb5cddfc175c364f568a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49938
Recycling a `ReactViewGroup` will lead to all child views being removed from the view. To avoid having view recycling corrupt the clipping state set for the child views, ahead of base view recycling preparation this diff disables `removeClippedSubviews` so that layout changes don't run over all child views that will end up being removed anyway.
The bug reported earlier should already have been resolved by D70672120 since the view recycling of a child view would remove the view from the parent. Meaning the ReactViewGroup can only have subviews that are not prepared for recycling, any recycled view would have been removed from their parent (the ReactViewGroup)
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D70921641
fbshipit-source-id: a8b311169b268c09400d2b62008184e379f6fe79
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49934
The typing of internal version of jest and the libdef in react-native has diverged a bit. This diff aligns the typing for `describe`
Changelog: [Internal]
Reviewed By: gkz
Differential Revision: D70917375
fbshipit-source-id: 9c2ab98a08394aa187712f4966748a8a60e202b1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49900
This appears to fix an issue where removing a sibling with zIndex breaks drawing of the next sibling. The theory is that eager return in `onViewRemoved` prevents the view from reverting into a state where it no longer uses custom draw order. However, tracing back history, this eager return was [added](https://github.com/facebook/react-native/pull/43389) to fix a bug in Reanimated. cc bartlomiejbloniarz to confirm if [this Reanimated issue](https://github.com/software-mansion/react-native-reanimated/issues/5715) resurfaces from this change.
Fixes#49838
## Changelog
[Android][Fixed] Fixes issue with z-indexed sibling removal
Reviewed By: NickGerleman, cipolleschi
Differential Revision: D70795631
fbshipit-source-id: 500af92226be29af73f36f911ffff27a0c083ae9
Summary:
Currently, when integrating into a native app using ReactNativeFactory, when we forget to set `dependencyProvider` we get a random crash exception instructing us (depending on native modules in our app) about an unrecognized selector:

After this change we get a proper error informing us that we for got to set dependencyProvider:

## Changelog:
[IOS] [ADDED] - Useful error message about setting dependency provider
Pull Request resolved: https://github.com/facebook/react-native/pull/49843
Test Plan: CI Green
Reviewed By: cortinico
Differential Revision: D70631515
Pulled By: cipolleschi
fbshipit-source-id: d99c8fa12fdb0624a01fe16c50fe0f2d10554f94
Summary:
Migrate com.facebook.react.bridge JavaScriptContextHolder & JavaScriptExecutor to Kotlin.
In this PR I also marked the return of HermesExecutor.initHybridDefaultConfig as non-nullable to keep the conversion without logic changes. I checked that this was changed unintentionally to nullable in 12e321daf0 but I think it was not supposed to be.
## Changelog:
[INTERNAL] - Migrate com.facebook.react.bridge JavaScriptContextHolder & JavaScriptExecutor to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/49909
Test Plan:
```bash
yarn test-android
yarn android
```
Reviewed By: javache
Differential Revision: D70871012
Pulled By: Abbondanzo
fbshipit-source-id: 1c15927056baf166e520e896e92bebf664fa0229
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49931
This change fixes the app startup in the Old Architecture by implementing the loadSourceForBridge:onProgress:onComplete method in the RCTDefaultReactNativeFactoryDelegate object.
The method was missing here, so the Bridge was never trying to load the JS bundle from Metro, resulting in an empty app.
## Changelog:
[iOS][Fixed] - Implement the loadSourceForBridge:onProgress:onComplete in the RCTDefaultReactNativeFactoryDelegate.
Reviewed By: cortinico
Differential Revision: D70898811
fbshipit-source-id: 3e5d519a1965e92ace91ca6d5b316a9069279448
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49906
Task.call is equivalent to a try-catch and wrapping the result in a Task. Inlining this is cheaper than creating a TaskCompletionSource and a Runnable.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D70803554
fbshipit-source-id: 0886176be974eff67c983ce1475ad685a8021b14
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49926
Those files can be fully removed as it's not referenced at all in OSS/Internal
Changelog:
[Internal] [Changed] -
Reviewed By: fabriziocucci
Differential Revision: D70888664
fbshipit-source-id: 4cacc449aa141e0465f771bf8c52d573d4227ef5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49922
Spamming the DB with "heartbeat" events with close to 0 ping didn't give us any useful information. Instead, report high ping situations.
Changelog:
[General][Internal] Remove reporting all device and debugger heartbeat events, only report heartbeats with high round trip latency
Reviewed By: GijsWeterings
Differential Revision: D70707457
fbshipit-source-id: 6bc8a55fd32dfa60fb4f7764ac00a6218417dcb5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49907
These tests have been disabled for a while due to feature flags being introduced, fusebox flags with native dependencies, and the removal of Powermock.
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D70803553
fbshipit-source-id: d1ae6e4ca6c0d22e6a8c89bf01b28333929fa8a6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49912
Changelog: [internal]
This migrates all Fantom tests to use package-relative imports from `react-native` instead of relative paths.
Note that a lot of the current deep imports (e.g.: `import ReactNativeElement from 'react-native/src/private/webapis/dom/nodes/ReactNativeElement'`) will not be necessary when we release those APIs as public.
Reviewed By: sammy-SC
Differential Revision: D70779722
fbshipit-source-id: f0d28e00ca9881dc2a3cd151b75327b26711277e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49911
Changelog: [internal]
The approach in Fantom tests is to use the public API as much as we can, but forcing us to use relative imports in tests makes it harder to see what's the public API and what's not. This disables the lint rule so we can use package imports in Fantom tests without warnings/errors.
Reviewed By: sammy-SC
Differential Revision: D70779721
fbshipit-source-id: b244e6a36060e6bc60318fe285ffcf3a81a78acd
Summary:
- Update ignore micromatch pattern to filter out `__test_fixtures__` from build output
- Remove `babel/plugin-transform-object-rest-spread`
- Remove `babel/plugin-transform-async-to-generator`
- Remove `babel/plugin-transform-destructuring`
The `package.json:engines:node` field is already set to `>=18` which makes the three Babel transforms that were removed redundant.
## Changelog:
[INTERNAL] [CHANGED] - Remove fixtures files and outdated Babel transforms from `react-native/codegen` build output
Pull Request resolved: https://github.com/facebook/react-native/pull/49916
Test Plan: - Ran against Node 18
Reviewed By: robhogan
Differential Revision: D70885090
Pulled By: cortinico
fbshipit-source-id: 328b75a6031a7ca6a9b3ed170061ffb0a47d6d93
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49898
Changelog: [internal]
In the method to access the native node reference from elements, we weren't considering the case where the element is the `documentElement`, which is a special case we were handling correctly in the case of native node references from nodes (where we also handle it possibly being a document node).
Because of this, methods in `Element` and `ReactNativeElement` weren't working correctly on the `documentElement`. We didn't catch this initially because we only tested the traversal methods defined in node in the test for `ReactNativeDocument`.
This fixes the issue.
Reviewed By: javache
Differential Revision: D70792748
fbshipit-source-id: c42d05a066efaffccade94e9d3835fb7172e2335
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49896
This change makes possible to opt-out from the New Architecture.
Env variables are always `string`s in ruby and the check was always failing because it was comparing it with a number (always false)
## Changelog:
[iOS][Fixed] - enable back the opt-out from the New Architecture
Reviewed By: cortinico
Differential Revision: D70789827
fbshipit-source-id: 7d3f96c3db22f2715dec2b649534b20e3273ea3e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49860
changelog: [internal]
now that Fantom supports tests with <Modal />, add a test to cover scenario where <ScrollView /> is inside of <Modal />.
Reviewed By: rubennorte, rshest
Differential Revision: D70696834
fbshipit-source-id: 5f51917ac5c6a2cf451906e302ee2b62c15449ea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49859
changelog: [internal]
this will be used for testing purposes in Fantom.
This diff also cleans up `ModalInjection.js` which is unused.
Reviewed By: rubennorte
Differential Revision: D69883384
fbshipit-source-id: 4ff278ef174c95fd5a93f70519f14c5190a5ada5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49894
Update `babel` entries in `yarn.lock` and run:
`yarn update-babel-flow-lib-defs`
...from Metro, to regenerate our Flow definitions from Babel source, then sync to RN.
Changelog: [Internal]
Facebook
D70778791 updated some `xplat/js/yarn.lock` Babel entries, which caused `xplat/js/tools/metro/scripts/__tests__/babel-lib-defs-test.js` to start failing only when Yarn had *not* been run in `xplat/js/tools/metro`, because the hoisted `xplat/js` Babel deps were a greater version than the locked `xplat/js/tools/metro` Babel deps.
This realigns them and updates the types to unbreak the test both internally an in OSS.
Reviewed By: vzaidman
Differential Revision: D70785807
fbshipit-source-id: 59ee8adc296f9ca155dde04c1429273656a26244
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49895
Minor thing, but the fact that these fixture `package.json`s for testing a release script reference real Metro packages and versions always trips me up when I'm updating Metro (grepping, etc).
There's no need for them to mention Metro - any non-RN package is sufficient to test that the script preserves other dependencies. This swaps them for dummy packages.
Changelog: [Internal]
Reviewed By: vzaidman
Differential Revision: D70789598
fbshipit-source-id: 32f394bf1f783534b76d260908538d7b5716ef1f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49885
Updates all `metro*` dependencies to the latest `^0.82.0`.
The breaking changes in this release apply only to frameworks and integrators.
This update brings `package.json#exports` resolution enabled by default, and lazy hashing for much faster Metro startup.
Release notes:
https://github.com/facebook/metro/releases/tag/v0.82.0
Changelog:
[General][Changed] Update Metro to ^0.82.0
Reviewed By: vzaidman
Differential Revision: D70778791
fbshipit-source-id: ffb55ed384d721205aa4d7f528c63c0b0a38abc5
Summary:
acquireWakeLockNow was static before but wasn't marked as static in https://github.com/facebook/react-native/commit/9afad527b831ec0c5d50e88daacbaacbc476d478 when changing code to Kotlin.
This breaks react-native-firebase but I've submitted the bug report there as I guess it might be fixed there too.
## Changelog:
[ANDROID] [FIXED] - Marked acquireWakeLockNow as static
Pull Request resolved: https://github.com/facebook/react-native/pull/49875
Test Plan: No tests as it reverts the broken change
Reviewed By: rshest
Differential Revision: D70773675
Pulled By: javache
fbshipit-source-id: d7363702dfec078b7e6d2693d05b8ab87e818522
Summary:
This PR adds a step in CI to sign the xcframework if we have a certificate available
bypass-github-export-checks
## Changelog:
[Internal] - Sign XCFrameworks in CI
Pull Request resolved: https://github.com/facebook/react-native/pull/49871
Test Plan: GHA
Reviewed By: cortinico
Differential Revision: D70734340
Pulled By: cipolleschi
fbshipit-source-id: 244422bdf9a8e0a2075a727a91805f762d4f95c9
Summary:
This pull request includes a minor change to the `React-cxxreact.podspec` file in the `ReactCommon/cxxreact` package. The change corrects a typo in the `HEADER_SEARCH_PATHS` configuration.
## Changelog:
[IOS] [FIXED] - Corrected the path from `"$(PODS_ROOT)/fas_float/include"` to `"$(PODS_ROOT)/fast_float/include"` in the `HEADER_SEARCH_PATHS` configuration.
Pull Request resolved: https://github.com/facebook/react-native/pull/49879
Reviewed By: rshest
Differential Revision: D70773742
Pulled By: javache
fbshipit-source-id: 0823732bf45c8c17ee7d4c0c3542be5c286445ba
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49873
In the old architecture, when we were passing a `null` value as a parameter in a function that accepted nullable parameter, the null value was mapped to `nil` on iOS.
After my changes in [d4236791e2](https://github.com/facebook/react-native/commit/d4236791e238a614d2fadf5c5659874d983ab029), in the New Architecture, through the interop layer, legacy modules were receiving an `NSNull` object instead of nil.
This was breaking those modules which started crashing or observing undesired behavior.
This change fixes the issue by making sure that, in those cases, a `nil` value is passed.
Note that nested objects in the old architecture were correctly receiving NSNull, so nested objects were behaving correctly already.
## Changelog:
[iOS][Fixed] - Properly pass `nil` for nullable parameters instead of `NSNull` for legacy modules
Reviewed By: javache
Differential Revision: D70723460
fbshipit-source-id: 384f48b6dbb3f54c369b31b6d2ee06069fa3591c
Summary:
Fixes https://github.com/facebook/react-native/issues/49819 . Details about how the issue was introduced in the issue description.
bypass-github-export-checks
## Changelog:
[IOS] [FIXED] - Fixed: extraModulesForBridge callback not called when New Architecture enabled
<!-- 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/49849
Test Plan:
Without the change:
1. Open `packages/rn-tester` project
2. In `AppDelegate.mm`, implement `extraModulesForBridge` and add a breakpoint / output something
3. Run the app in iOS <-- Verify that the method is not executed
With the change:
1-3. Same as above <-- verify that the method is called correctly
> [!NOTE]
> As far as I could tell, there is no test suite for this specific codepath, so I didn't write a test for this change. Happy to write one if someone can guide me a little bit.
Reviewed By: rshest
Differential Revision: D70724196
Pulled By: cipolleschi
fbshipit-source-id: cc08798d08cdbd6883347810c7d2697c358770fb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49850
`RCTUIImageViewAnimated` has some bugs around reuse.
1. Recycling will set `image` to null, which will no-op on comparison to `self.image`, but `self.image` is always null when the image is animated, because `RCTUIImageViewAnimated` handles rendering the frames itself. This means we don't properly do things like invalidating the DisplayLink when the image is first recycled.
2. If we ever set superclass image to nil, we make some change to the underlying CALayer, which causes the content to remain black, even though we customize our own `displayLayer`. Diffing layer descriptions, we seem to afterward have a `contentsMultiplyColor` and `contentsSwizzle` on the layer that aren't public.
The solution I have in this diff is to, instead of drawing layers ourselves, update backing UIImage image to the frame. I think this would fix some other bugs as well, like tintColor not applying to animated images. My guess is that this shouldn't add too much extra work, since `UIImageView` should just be propagating the `UIImage` to the layer in a same way that we were before. This same bug may have also been possible before when switching between animated and non-animated image sources I think.
Changelog:
[iOS][Fixed] - Fix Recycling of Animated Images
Reviewed By: cipolleschi, joevilches
Differential Revision: D70668516
fbshipit-source-id: f1127da3e03ebab2b6f7584ba492b3e13448c13b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49863
After the creation of the XCFramework, that needs to be signed. After the XCFramework is signed, no further modification can happen or they would break the signature.
## Changelog:
[Internal] - Add function to sign the XCFramework
Reviewed By: cortinico
Differential Revision: D70697279
fbshipit-source-id: c2411ca7d12d4679ba55f124cbb445367b15945a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49858
`prepareToRecycleView` returns nullable, since we may decide a view is not recyclable. We should respect that and return the view returned by super.
Changelog: [Internal]
bypass-github-export-checks
Reviewed By: fabriziocucci
Differential Revision: D70696246
fbshipit-source-id: a8e12320611a3b6a3d05353e4b7556c4da416aea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49851
Android doesn't allow to mount a view that already has a parent. View recycling removes all children from a view. But if some views don't support recycling, they'll keep a reference to their children. Children being recycled will cause an exception when being mounted.
This diff removes the view from its parent when it is being recycled. This guarantees that whatever the parent, the view can be mounted after being recycled.
bypass-github-export-checks
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D70672120
fbshipit-source-id: 023d8fb48982d6d9ae7f9c537f7f2bb21cf15066
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49837
Bootstraps the `NetworkReporter` API and `jsinspector_network` library. This will form the common C++ logic for Network Inspection in React Native DevTools.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D70554862
fbshipit-source-id: 862e255f61e21871c35b1a848caec3f34e843823
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49816
Previously, we had different versions of "debug" installed in different packages, mostly because of messed up `yarn.lock` entries.
Also, updated the package, receiving some performance improvements (no relevant breaking changes).
Changelog:
[General][Internal] update and dedupe the npm package "debug"
Reviewed By: huntie
Differential Revision: D70402368
fbshipit-source-id: 5e21bc6d92e0cb45ac1d862f100ef6dc0f21dbc1
Summary:
`jscodeshift` is only used in one module (`src/generators/components/GenerateViewConfigJs.js`, but depends on a rather complex dependency chain and has a rather large maintenance burden relative to what it's used for and the value it adds in the codebase.
Since the `GenerateViewConfigJs` module creates simple templates, using `babel/core` (and implicitly `babel/template` and `babel/types`) is a lot simpler and changes little code. The only change this introduces to the output are formatting changes (`singleQuote` and `trailingCommas` options are discarded). The code is otherwise functionally identical.
## Changelog:
[INTERNAL] [CHANGED] - Drop jscodeshift dependency from react-native/codegen
Pull Request resolved: https://github.com/facebook/react-native/pull/49641
Test Plan:
This was tested against a React Native build with the `react-native/babel-plugin-codegen` plugina active and using the snapshots in the repo itself. While the snapshots have changed in formatting, none of the outputs change the code's AST.
<details>
<summary>
Example output from <code>react-native/babel-plugin-codegen</code> to supplement the snapshot tests
</summary>
This is the example bundling output of `AndroidSwipeRefreshLayout`. This demonstrates that both the view config output and the `Commands` export continue to be generated correctly.
```js
var _interopRequireDefault = require(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.__INTERNAL_VIEW_CONFIG = exports.Commands = undefined;
var _codegenNativeCommands = _interopRequireDefault(require(_dependencyMap[1]));
var _codegenNativeComponent = _interopRequireDefault(require(_dependencyMap[2]));
var React = _interopRequireWildcard(require(_dependencyMap[3]));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
var NativeComponentRegistry = require(_dependencyMap[4]);
var _require = require(_dependencyMap[5]),
ConditionallyIgnoredEventHandlers = _require.ConditionallyIgnoredEventHandlers;
var _require2 = require(_dependencyMap[6]),
dispatchCommand = _require2.dispatchCommand;
var nativeComponentName = 'AndroidSwipeRefreshLayout';
var __INTERNAL_VIEW_CONFIG = exports.__INTERNAL_VIEW_CONFIG = {
uiViewClassName: "AndroidSwipeRefreshLayout",
directEventTypes: {
topRefresh: {
registrationName: "onRefresh"
}
},
validAttributes: {
enabled: true,
colors: {
process: (req => 'default' in req ? req.default : req)(require(_dependencyMap[7]))
},
progressBackgroundColor: {
process: require(_dependencyMap[8]).default
},
size: true,
progressViewOffset: true,
refreshing: true,
...ConditionallyIgnoredEventHandlers({
onRefresh: true
})
}
};
var _default = exports.default = NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
var Commands = exports.Commands = {
setNativeRefreshing(ref, value) {
dispatchCommand(ref, "setNativeRefreshing", [value]);
}
};
```
</details>
Reviewed By: yungsters
Differential Revision: D70580474
Pulled By: elicwhite
fbshipit-source-id: 85bc6578b685f19a1565ded8d7e56dc2a1ff1999
Summary:
It seems that if we update the scroll state when the state wrapper is null we can get into an out of sync state.
I've replicated the issue in HelpCenter and confirmed with a video this seems to be the case (i.e. when gazing on some cards, their corresponding frame is incorrect)
https://www.internalfb.com/intern/px/p/6xWgl
NOTE: I have accidentally stumbled upon this fix but I could really use a review from someone who has more context around the `ReactScrollViewHelper` because this change might have bigger implications I'm not aware of!
Changelog:
[Android][Fixed] - Fix occasional syncronization issue in ScrollView when rendering dynamic content with content offset
Commits affecting the React Native open source repository must have a changelog
entry in the commit summary. Every React Native release has almost 1000 commits,
and manually categorizing these commits is very time consuming.
In your diff summary, please add a `Changelog:` entry using the format:
The "Category" field may be one of:
- **Android**, for changes that affect Android.
- **iOS**, for changes that affect iOS.
- **General**, for changes that do not fit any of the other categories.
- **Internal**, for changes that would not be relevant to developers consuming
the release notes.
The "Type" field may be one of:
- **Breaking**, for breaking changes.
- **Added**, for new features.
- **Changed**, for changes in existing functionality.
- **Deprecated**, for soon-to-be removed features.
- **Removed**, for now removed features.
- **Fixed**, for any bug fixes.
- **Security**, in case of vulnerabilities.
If your change does not modify React Native's public interface, you can use:
Changelog: [Internal]
For more details, please read the wiki: https://fburl.com/react-native/changelog
Reviewed By: javache
Differential Revision: D70484547
fbshipit-source-id: c314b958eeed4dd96755539f5bbfb8f03e17a525
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49841
Changelog: [internal]
This effectively reverts D62962341 / https://github.com/facebook/react-native/pull/46563 as the experiments didn't provide the expected wins and we don't have bandwidth to iterate on this.
Reviewed By: rshest
Differential Revision: D70622429
fbshipit-source-id: c53c9437448c0a7be8f5b4f04d6369efbd99105a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49810
Changelog:
[Internal]
Migrated StyleSheet namespace content to StyleSheetExport.js to recreate it by importing * as StyleSheet, which aligns with TS namespace definition. Added .flow files that specify base type declarations and will be digested by the flow tooling.
Reviewed By: huntie
Differential Revision: D70391322
fbshipit-source-id: dd974ef282cb984a1e57d5732e3b5bdab6db4564
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49836
We were passing the path to the `RegularFile` instead of the `PublishingArtifacts` to the gradle script.
cortinico why this is not checked at build time? This should be a typing issue that should be caught at build time, also during the test-all jobs, not just when the nightly run...
## Changelog:
[Internal]
Reviewed By: cortinico
Differential Revision: D70617638
fbshipit-source-id: 67ff1aea2bd827fb110db7a0d2f3651b88a1e8cc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49835
The implementation of moduleProviderForName is slightly off.
This method was supposed to replace the previous ternary expression and to enhance with the module provider call.
The ternary expression used to be
```
!RCTTurboModuleInteropEnabled() || [self _isTurboModule:moduleName] ? [self _provideObjCModule:moduleName] : nil
```
However, as you can see from the current implementation, instead of calling `RCTTurboModuleInteropEnabled()` we are calling `RCTTurboModuleEnabled()` which is clearly a mistake.
On top of that, I'm also updating the guard around the `getModuleProvider` selector as it was bypassing the other checks, and that's wrong.
## Changelog:
[Internal] - Fix moduleProviderForName method
Reviewed By: RSNara
Differential Revision: D70569552
fbshipit-source-id: ed4055da9ea385ed10323ed8d7a8772010b3a105
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49823
Introduce LegacyArchitectureLogger class, which provides logging functionality to help track and debug usage of legacy architecture components when an app is running on the new architecture. The data provided by this class will help identify classes and methods that are still being used in the new architecture when they shouldn't.
changelog: [Internal] Internal
Reviewed By: rshest
Differential Revision: D70543605
fbshipit-source-id: 56262170c03bb0fd375b8dc3cb34a7c15a69a810
Summary:
Benchmark to test changes from https://github.com/facebook/react-native/issues/49449
Might be nice to have some version of this in the repo.
## Changelog:
[INTERNAL] [ADDED] - Setup a Macrobenchmark for RNTester
Pull Request resolved: https://github.com/facebook/react-native/pull/49486
Test Plan:
### Methodology
Picked various JS file from websites (facebook, instagram) to artificially grow RN tester bundle somewhat realistically. The files are required lazily from a button press callback to simulate the code being included, but not executed, as it would be in a large app that uses lazy requires for the different screens.
I've also made the RN tester screens lazy so all their code is not loaded initially. This is more representative of real apps. Note this is implemented in a hacky way just for the purpose of this test. It would actually be nice to implement this properly.
The tests were made using low end device Samsung Galaxy A03s.
### Compression ON with 10.5 mb bundle
#### Peak allocated memory
60.9 mb
#### ReactInstance.loadJSBundler
148.64 ms
#### Benchmark
timeToFullDisplayMs min 1,825.0, median 1,911.1, max 1,994.8
timeToInitialDisplayMs min 834.9, median 860.9, max 903.9
#### APK
Size: 22.9 mb
Download size: 14.5 mb
### Compression OFF with 10.5 mb bundle
#### Peak allocated memory
51.5 mb
#### ReactInstance.loadJSBundler
946 us
#### Benchmark
timeToFullDisplayMs min 1,752.8, median 1,827.2, max 1,977.5
timeToInitialDisplayMs min 837.7, median 881.3, max 937.2
#### APK
Size: 28 mb
Download size: 14.5 mb
Reviewed By: rshest
Differential Revision: D70002286
Pulled By: cortinico
fbshipit-source-id: 436597f439ba244649373870c1facefdb12297d9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49813
Making use of the recently standardised `REACT_NATIVE_DEBUGGER_ENABLED` preprocessor flag, conditionally swap out `HostAgent` for a stub in production (non dev, non profiling) builds. This uses the same private implementation idiom as `HermesRuntimeTargetDelegate`.
This results in a **42.2kiB** size reduction (uncompressed) in production builds, due to excluding the CDP agent components of `jsinspector-modern`.
- Intentionally, we're gating just this logic, rather than several outer integration points/native bindings for `jsinspector-modern`. This is for predictability and maintenance — the Fusebox subsystem is always loaded/bound, but can fork to an empty implementation.
{F1975625351}
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D70495853
fbshipit-source-id: 00253ac71444819a917a3781efe38365acb91e85
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49786
Most of these call-sites are only used for exceptional scenarios, so we can just rely on std::to_string and do string concatenation. For a few others that may be more perf-sensitive, I switched over to `snprintf`.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D70402439
fbshipit-source-id: 3b90ebb13a7bf1c6cf30722ef636e5e8498a5b26
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49814
`bgWhiteBrigh + t = bgWhiteBright`
seems like no one was using `chalk.bgWhiteBright` before me :)
Changelog:
[General][Internal] fix type on the flow types for "chalk"
Reviewed By: huntie, hoxyq
Differential Revision: D70403987
fbshipit-source-id: 34f65e57fbb2eeadd6030557e0499db0b2603b38
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49815
The pull to refresh component props's casting is imprecise.
This change uses the more precise type for the props.
## Changelog:
[Internal] - cast props to `PullToRefreshViewProps`
Reviewed By: sammy-SC
Differential Revision: D70559080
fbshipit-source-id: c42d3d41a22683a3392813c2af25828781a68401
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49795
# Changelog: [Internal]
I've been able to reliably and consistently record samples with an interval between 2 consecutive ones to be ~0.1-0.2ms, lets bump the sampling frequency to have more frames.
On Windows, Hermes Sampler peaks at ~500Hz, so this won't have much effect.
Reviewed By: huntie
Differential Revision: D70395983
fbshipit-source-id: 9a9e619d75096a3ee75e0e1a2f8b8fff33130268
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49794
# Changelog: [Internal]
Before, we would store all User Timings and Timeline Events in the PerformanceTracer's buffer, and then add Profile event to it as well.
On larger apps, the amount of events buffered could reach ~100k, which inevitably would cause OOM.
With this approach, we will flush out buffered events from PerformanceTracer first, then do JavaScript Profile serialization, then send it over CDP straight away.
Reviewed By: huntie
Differential Revision: D70395982
fbshipit-source-id: 2c17abba421fa9c4afc4d4ca36afd98b1db50905
Summary:
Added a new template `ReactNativeVersion.kt-template.js` to be used to generate the Kotlin template for Android. Updating also the set-rn-artifacts-version script to use this template instead of the Java one.
## Changelog:
[INTERNAL] - Migrate ReactNativeVersion Android template to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/49758
Test Plan:
```bash
yarn test-android
yarn android
node ./scripts/releases/set-version.js 1000.0.0
```
Reviewed By: huntie, rshest
Differential Revision: D70486775
Pulled By: cortinico
fbshipit-source-id: 5dd1e0e2ecf4d848dc24e6c47df243a1259ab559
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49751
fast_float promises significant improvements in float parsing performance and is already what's being used in folly internally. Unifying all percentage parsing on the new css parser logic, which can use fast_float internally.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D70392268
fbshipit-source-id: 56147e5478d008bc2c34579df035ec7acf8744bb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49775
Upgrading this dependency to match folly and to enable using this for number parsing across Fabric.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D70482373
fbshipit-source-id: 64429595c1126e6a06436701a7562bdf6dd962d5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49807
This change fixes a copy-and-paste mistake in passing the right parameter for publishing the ReactNativeDependencies dSYMs.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D70552858
fbshipit-source-id: fc103814420d94180d26c89ba9b405693864a64b
Summary:
X-link: https://github.com/facebook/yoga/pull/1791
Disabling RTTI for Yoga is causing std::exception to don't work properly in OSS.
Fixes: https://github.com/facebook/react-native/issues/48027
Not sure why we originally disabled RTTI for Yoga, but we have it enable for the whole
React Native build so it probably makes sense to have it enabled for Yoga as well.
Changelog:
[Internal] [Changed] - Enable RTTI to fix exception pointer issue on React Native
bypass-github-export-checks
Reviewed By: javache, NickGerleman
Differential Revision: D70386744
fbshipit-source-id: 36e3a1ddb38346d31979d5c1b77d6e9796d6a855
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49803
This refactors the whole ReactCommon to use the `target_compile_reactnative_options` macro we just introduced.
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D70386740
fbshipit-source-id: 1f15ea7e182d79bbb0bedce653284808e3309e4f
Summary:
Found this issue while releasing 0.79.0-rc.0 (see [job](https://github.com/facebook/react-native/actions/runs/13649159968/job/38156418752)).
bypass-github-export-checks
```
SyntaxError: Invalid destructuring assignment target
at new AsyncFunction (<anonymous>)
at callAsyncFunction (/__w/_actions/actions/github-script/v6/dist/index.js:15143:16)
at main (/__w/_actions/actions/github-script/v6/dist/index.js:15236:26)
at /__w/_actions/actions/github-script/v6/dist/index.js:15217:1
at /__w/_actions/actions/github-script/v6/dist/index.js:15268:3
at Object.<anonymous> (/__w/_actions/actions/github-script/v6/dist/index.js:15271:12)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
```
## Changelog:
[Internal] -
Reviewed By: cipolleschi
Differential Revision: D70552301
fbshipit-source-id: b50e3d76c7497cc218e379400d5870531669abe1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49761
LayoutAnination classes are not used on the new architecture, this diff marks the as LegacyArchitecture to drive its removal
Changelog: [Internal] internal
Reviewed By: rshest
Differential Revision: D70410096
fbshipit-source-id: cda84958985c4133c926455a5c9611773a0d32ec
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49792
This removes the `$` from the `event` and `payload` identifier inside codegen.
This is causing the `-Wdollar-in-identifier-extension` warning to fire.
As I'm looking into enabling `-Wall -Werror` for React Common, this should be addressed as well.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D70500543
fbshipit-source-id: c593680961b1b98561c3985f92ade5d6ba448ac9
Summary:
This is causing the `-Wno-nullability-extension` warning to fire.
As I'm looking into enabling `Wall Werror` for ReactCommon, this should be fixed as it's causing the build to fail.
We don't use nullability extensions at all in the other JNI_OnLoad files, so it's fine (and probably better) we
replace them with a function that also doens't specify a Nullability annotation.
This is impacting only the OSS So Merging toolchain.
Changelog:
[Internal] [Changed] -
bypass-github-export-checks
Reviewed By: cipolleschi
Differential Revision: D70500544
fbshipit-source-id: 2d5b52d8f34ec026a25e8625bd0c6a1812221dea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49797
Backing D70314889 as it was breaking some internal tests.
I verified that before the backout the tests were failing and after the backout they were not.
## Changelog:
[iOS][Changed] - Reverted fix: avoid race condition crash in [RCTDataRequestHandler invalidate].
Reviewed By: Abbondanzo
Differential Revision: D70511155
fbshipit-source-id: 276f6947aa6bb648c9c9eeb5c342f336acc8a26f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49650
- Added a new template to React Native's Feature Flag's script for Canary and Experimental prerelease stages iOS
- Overload initWithDelegate to add optional releaseLevel parameter
- Add Obj-C enum for Release Level
- Use static variables to keep the context on whether a ReactNative Factory has been created and with which flags it has been created.
- Crash in case we try to create multiple factories with different feature flags.
- Creating multiple factories with the same feature flags is allowed
Changelog: [iOS] [Added] - On `RCTReactNativeFactory` add `initWithDelegate` overload with argument to specify release level for an application
Reviewed By: cipolleschi
Differential Revision: D70106210
fbshipit-source-id: 14fe4c8571621a75a7064f1ffd02a07270cea43a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49745
It turns out we want those flags to be available also inside ReactCommon so I'm moving it there.
This will allow us to reference them also inside ReactCommon and will make sure Common does not depend on Android
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D70386742
fbshipit-source-id: 3675c01f5e3f6515af6423d75e3fe145ba3d8936
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49743
Those 3rd party CMake libraries were not using our compiler flags correctly.
This fixes it.
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D70386743
fbshipit-source-id: e35688f7eb3fa9bcdda1180023006d267782ceaf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49791
The cache for RNTester is broken because the matrix parameters used to test RNTester are not part of the job_id that is used to create the cache keys to restore the Podfile.lock.
This means that we have a race condition on which job of the matrix manages to save the cache. However, those caches are not always valid for the other jobs that presents different matrix parameters.
This change should fix the issue.
## Changelog:
[Internal] - Fix test-rn-tester cache Cache
Reviewed By: cortinico
Differential Revision: D70493507
fbshipit-source-id: 1db6e00507b3e9abe4400831ee1b048c620b9102
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49780
Now that we're using a minimum Metro version of 0.81.3, Metro will dynamically assert `import` or `require` based on the style of the import at source.
Asserting both is likely to cause issues with `babel/runtime` and potentially other packages - see https://github.com/facebook/metro/pull/1447.
Changelog:
[Internal] metro-config: Assert import/require dynamically when using `unstable_enablePackageExports` with Metro.
Reviewed By: hoxyq
Differential Revision: D70473577
fbshipit-source-id: b3e6fbd78e2b6fc0f9a16ec3db2c19698848e6d1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49788
Release of 0.78 was successful but it failed to verify the package of NPM because of some error in the JS files.
Preparing for 0.79, I discovered some other issues in the NPM checking scripts.
This change should fix them.
## Changelog:
[Internal] - Fix publishing scripts
Reviewed By: fabriziocucci
Differential Revision: D70489717
fbshipit-source-id: 02a37d9a86fe108c7f7d2d634b8c0727dabb153d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49746
This flag is no longer necessary since RN 0.73 so I'm cleaning it up.
Changelog:
[Internal] [Changed] -
Reviewed By: rshest
Differential Revision: D70386741
fbshipit-source-id: c2c8f998fa7b97985396b26345cfcf3474effc7b
2025-03-03 06:52:22 -08:00
4239 changed files with 208085 additions and 103495 deletions
* Please [search for similar issues](https://github.com/facebook/react-native/issues) in our issue tracker.
Make sure that your issue:
* Have a **valid reproducer** (either a [Expo Snack](https://snack.expo.dev/) or a [empty project from template](https://github.com/react-native-community/reproducer-react-native).
* Have a **valid reproducer** (See [How to report a bug](https://reactnative.dev/contributing/how-to-report-a-bug)).
* Is tested against the [**latest stable**](https://github.com/facebook/react-native/releases/) of React Native.
Due to the extreme number of bugs we receive, we will be looking **ONLY** into issues with a reproducer, and on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native.
🚨 IMPORTANT: Due to the extreme number of bugs we receive, issues **without a reproducer** or for an [**unsupported versions**](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native **will be closed**.
- type:textarea
id:description
attributes:
@@ -83,7 +83,7 @@ body:
path: /bin/zsh
Binaries:
Node: ...
version: 18.14.0
version: 22.14.0
...
render:text
validations:
@@ -109,8 +109,8 @@ body:
- type:input
id:reproducer
attributes:
label:Reproducer
description:A link to a Expo Snack or a public repository that reproduces this bug, using [this template](https://github.com/react-native-community/reproducer-react-native). Reproducers are **mandatory**.
label:MANDATORY Reproducer
description:A link to either a failing RNTesterPlayground.js file, an Expo Snack or a public repository from [this template](https://github.com/react-native-community/reproducer-react-native) that reproduces this bug. Reproducers are **mandatory**, issues without a reproducer will be closed.
Do not attempt to open a bug in this category if you're not using the New Architecture as your bug will be closed.
Make sure that your issue:
* Have a **valid reproducer** (either a [Expo Snack](https://snack.expo.dev/) or a [empty project from template](https://github.com/react-native-community/reproducer-react-native).
* Have a **valid reproducer** (See [How to report a bug](https://reactnative.dev/contributing/how-to-report-a-bug)).
* Is tested against the [**latest stable**](https://github.com/facebook/react-native/releases/) of React Native.
Due to the extreme number of bugs we receive, we will be looking **ONLY** into issues with a reproducer, and on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native.
🚨 IMPORTANT: Due to the extreme number of bugs we receive, issues **without a reproducer** or for an [**unsupported versions**](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native **will be closed**.
- type:textarea
id:description
attributes:
@@ -95,7 +95,7 @@ body:
path: /bin/zsh
Binaries:
Node: ...
version: 18.14.0
version: 22.14.0
...
render:text
validations:
@@ -121,8 +121,8 @@ body:
- type:input
id:reproducer
attributes:
label:Reproducer
description:A link to a Expo Snack or a public repository that reproduces this bug, using [this template](https://github.com/react-native-community/reproducer-react-native). Reproducers are **mandatory**.
label:MANDATORY Reproducer
description:A link to either a failing RNTesterPlayground.js file, an Expo Snack or a public repository from [this template](https://github.com/react-native-community/reproducer-react-native) that reproduces this bug. Reproducers are **mandatory**, issues without a reproducer will be closed.
description:Which JavaScript engine to use. Must be one of "Hermes", "JSC".
default:Hermes
use-frameworks:
description:The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
default:StaticLibraries
architecture:
description:The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup. Must be one of "OldArch" or "NewArch"
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
'use strict';
const{
prepareFailurePayload,
sendMessageToDiscord,
}=require('../notifyDiscord');
describe('prepareFailurePayload',()=>{
it('should handle undefined failures',()=>{
constmessage=prepareFailurePayload(undefined);
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nNo failures to report.',
});
});
it('should handle empty failures array',()=>{
constmessage=prepareFailurePayload([]);
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nNo failures to report.',
});
});
it('should format a single failure correctly',()=>{
constfailures=[
{
library:'react-native-reanimated',
platform:'iOS',
},
];
constmessage=prepareFailurePayload(failures);
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nThe integration of libraries with React Native nightly failed for the following libraries:\n\n❌ [iOS] react-native-reanimated',
});
});
it('should sort multiple failures by platform and library name',()=>{
constfailures=[
{
library:'react-native-reanimated',
platform:'iOS',
},
{
library:'react-native-gesture-handler',
platform:'Android',
},
{
library:'react-native-screens',
platform:'iOS',
},
{
library:'react-native-svg',
platform:'Android',
},
];
constmessage=prepareFailurePayload(failures);
// The failures should be sorted: first Android (alphabetically), then iOS
// Within each platform, libraries should be sorted alphabetically
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nThe integration of libraries with React Native nightly failed for the following libraries:\n\n❌ [Android] react-native-gesture-handler\n❌ [Android] react-native-svg\n❌ [iOS] react-native-reanimated\n❌ [iOS] react-native-screens',
});
});
it('should handle failures with missing properties',()=>{
constfailures=[
{
// Missing library
platform:'iOS',
},
{
library:'react-native-gesture-handler',
// Missing platform
},
{
// Both missing
},
];
constmessage=prepareFailurePayload(failures);
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nThe integration of libraries with React Native nightly failed for the following libraries:\n\n❌ [iOS] Unknown\n❌ [Unknown] react-native-gesture-handler\n❌ [Unknown] Unknown',
`> **Newer version available**: You are on a supported minor version, but it looks like there's a newer patch available - ${labelWithContext.newestPatch}. Please [upgrade](https://reactnative.dev/docs/upgrading) to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.`,
`> **Missing reproducer**: We could not detect a reproducible example in your issue report. Please provide either: <br/><ul><li>If your bug is UI related: a [Snack](https://snack.expo.dev)</li><li> If your bug is build/upgrade related: a project using our [Reproducer Template](https://github.com/react-native-community/reproducer-react-native/generate)</li><li>Otherwise send us a Pull Request with the [RNTesterPlayground.js](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js) edited toreproduce your bug.</li></ul>`,
`> **Missing reproducer**: We could not detect a reproducible example in your issue report. Reproducers are **mandatory** and we can accept only one of those as a valid reproducer: <br/><ul><li>For majority of bugs: send us a Pull Request with the [RNTesterPlayground.js](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js) edited to reproduce your bug.</li><li>If your bug is UI related: a [Snack](https://snack.expo.dev)</li><li> If your bug is build/upgrade related: a project using our [Reproducer Template](https://github.com/react-native-community/reproducer-react-native/generate)</li></ul><br/>You can read more about about it on our website: [How to report a bug](https://reactnative.dev/contributing/how-to-report-a-bug).`,
console.log('Successfully sent message to Discord');
return;
}else{
consterrorText=awaitresponse.text();
console.error(
`Failed to send message to Discord: ${response.status}${errorText}`,
);
thrownewError(`HTTP status code: ${response.status}`);
}
}
/**
* Prepares a formatted Discord message payload from a list of failures.
* @param {Array<Object>} failures - List of failures to format
* @returns {Object} - The formatted Discord message payload
*/
functionprepareFailurePayload(failures){
if(!failures||failures.length===0){
return{
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nNo failures to report.',
};
}
// Sort failures by platform and then by library name
constsortedFailures=[...failures].sort((a,b)=>{
// First sort by platform
constplatformA=a.platform||'Unknown';
constplatformB=b.platform||'Unknown';
if(platformA!==platformB){
returnplatformA.localeCompare(platformB);
}
// Then sort by library name
constlibraryA=a.library||'Unknown';
constlibraryB=b.library||'Unknown';
returnlibraryA.localeCompare(libraryB);
});
// Format the failures into a message
constformattedFailures=sortedFailures
.map(failure=>{
constlibrary=failure.library||'Unknown';
constplatform=failure.platform||'Unknown';
return`❌ [${platform}] ${library}`;
})
.join('\n');
return{
content:`⚠️ **React Native Nightly Integration Failures** ⚠️\n\nThe integration of libraries with React Native nightly failed for the following libraries:\n\n${formattedFailures}`,
- name:Build the Helloworld application for ${{ matrix.flavor }} with Architecture set to ${{ matrix.architecture }}, and using the ${{ matrix.jsengine }} JS engine.
- name:Build the Helloworld application for ${{ matrix.flavor }} with Architecture set to New Architecture.
shell:bash
run:|
cd packages/helloworld/android
cd private/helloworld/android
args=()
if [[ ${{ matrix.architecture }} == "OldArch" ]]; then
needs:[prepare_hermes_workspace, build_hermes_macos]# prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
runs-on:macos-14
needs:[prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies]# prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
needs:[prepare_hermes_workspace, build_hermes_macos]# prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
runs-on:macos-14
needs:[prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies]# prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
@@ -1174,7 +1174,7 @@ Heads-up: the Facebook internal team is [currently working on a rewrite of some
- Restrict `WebView` to only http(s) URLs: ([634e7e11e3](https://github.com/facebook/react-native/commit/634e7e11e3ad39e0b13bf20cc7722c0cfd3c3e28), [23f8f7aecb](https://github.com/facebook/react-native/commit/23f8f7aecb1f21f4f5e44fb9e4a7456ea97935c9))
- Node 8 is now the minimum required version ([c1e6f27823](https://github.com/facebook/react-native/commit/c1e6f278237e84c8ed26d3d2eb45035f250e2d40))
- Upgrade React to v16.4.1, sync React Renderer to revision ae14317 ([c749d951ad](https://github.com/facebook/react-native/commit/c749d951ada829c6f6fb76f35e68142e61054433))
- Update new project template's Flow config to fix `Cannot resolve module X` isse due to removal of `@providesModule` ([843a433e87](https://github.com/facebook/react-native/commit/843a433e87b0ccaa64ab70d07e22bffbabad8045))
- Update new project template's Flow config to fix `Cannot resolve module X` issue due to removal of `@providesModule` ([843a433e87](https://github.com/facebook/react-native/commit/843a433e87b0ccaa64ab70d07e22bffbabad8045))
- Upgrade Flow to v0.75 ([3bed272a62](https://github.com/facebook/react-native/commit/3bed272a620ac806a6142327013265ea8138641a), [bc2f12c68c](https://github.com/facebook/react-native/commit/bc2f12c68cf8cfdf8c060354e84392fd9a3645d8), [6264b6932a](https://github.com/facebook/react-native/commit/6264b6932a08e1cefd83c4536ff7839d91938730))
- Upgrade Prettier to v1.13.6 ([29fb2a8e90](https://github.com/facebook/react-native/commit/29fb2a8e90fa3811f9485d4b89d9dbcfffea93a6), [bc2f12c68c](https://github.com/facebook/react-native/commit/bc2f12c68cf8cfdf8c060354e84392fd9a3645d8))
@@ -1745,7 +1745,7 @@ Below is a list of the remaining, low-level changes that made it into this relea
- Changes to RCTShadowView to increase RCTSurface performance ([f96f9c5fd6](https://github.com/facebook/react-native/commit/f96f9c5fd692000f561e87cba68642ef7daf43e7) by [@shergin](https://github.com/shergin))
- Designated methods to control dirty propagation ([af226ef949](https://github.com/facebook/react-native/commit/af226ef949f3a21ef68a6e6b9fbd4cc06fa05152) by [@shergin](https://github.com/shergin))
- Add missing tvOS header ([49cbca7464](https://github.com/facebook/react-native/commit/49cbca7464e27c34105122459ae29cc3b1247513) by [@grabbou](https://github.com/grabbou))
- On Android, seperate logic to initialize JS from starting the app ([4996b9aeb4](https://github.com/facebook/react-native/commit/4996b9aeb4127892b7579b45927dec14833b8b4d) by [@axe-fb](https://github.com/axe-fb))
- On Android, separate logic to initialize JS from starting the app ([4996b9aeb4](https://github.com/facebook/react-native/commit/4996b9aeb4127892b7579b45927dec14833b8b4d) by [@axe-fb](https://github.com/axe-fb))
- ♻️ JS linting was cleaned up: removed unused libs, strengthened the rules, removed unneeded rules, prevent disabled tests, and more ([2815ada238](https://github.com/facebook/react-native/commit/2815ada23872fc28dc8dd5a9833962cb73f452eb), [183c316f4c](https://github.com/facebook/react-native/commit/183c316f4c869804b88cffe40614c84ac0a472d0), [9c67e749d8](https://github.com/facebook/react-native/commit/9c67e749d8f63cf14ece201ec19eee4676f96a85), [79902f99b8](https://github.com/facebook/react-native/commit/79902f99b81f538042b38a857182c2e5adbfd006), [9a36872f0c](https://github.com/facebook/react-native/commit/9a36872f0c7ba03a92fabf65e4d659d6861ea786), [67a3c42d1a](https://github.com/facebook/react-native/commit/67a3c42d1a29b6fa1375f7445d1c9b4429939bae), [b826596700](https://github.com/facebook/react-native/commit/b82659670041d0e472f68c0a14b3ef5b962db09b), [a1a0a69546](https://github.com/facebook/react-native/commit/a1a0a6954635141ce6c167816b67674aa5c31062), and [11a495cb32](https://github.com/facebook/react-native/commit/11a495cb3235ebbc2ad890e92ec612fd5316bffb) by [@TheSavior](https://github.com/TheSavior))
- 👷 Separate JS lint and flow checks from tests ([5ea5683d01](https://github.com/facebook/react-native/commit/5ea5683d01487b49c814fca6e11a818b9a777239) by [@hramos](https://github.com/hramos))
- 👷 Fix Buck in build config to enable CI ([796122d8f3](https://github.com/facebook/react-native/commit/796122d8f3b825c0bf0c138c662f3477f8bab123), [7c3a61f3b6](https://github.com/facebook/react-native/commit/7c3a61f3b610e219fd798eccd330deb9a2471253), [82b123e744](https://github.com/facebook/react-native/commit/82b123e744b87cc59c96b4e82af9ed03981b4f42) by [@grabbou](https://github.com/grabbou))
- The `NewAppScreen` component is redesigned and moved to the `react-native/new-app-screen` package ([3cf0102007](https://github.com/facebook/react-native/commit/3cf01020071c76f40499878674cc7aaf5dbe168a) by [@huntie](https://github.com/huntie))
- The `react-native` package now defines package.json `"exports"`. ([319ba0afd2](https://github.com/facebook/react-native/commit/319ba0afd2f694bc70a20250f0b8c79a06a36dc6) by [@huntie](https://github.com/huntie))
- Subpath imports to the internal react-native/virtualized-lists package are not allowed. ([be8393c41b](https://github.com/facebook/react-native/commit/be8393c41b3d613385a2ee4632438030e80d6b2d) by [@iwoplaza](https://github.com/iwoplaza))
- Dispatch `folly::dynamic` events with r-value instead of l-value ([12e5df844b](https://github.com/facebook/react-native/commit/12e5df844bf60c19a825e5c5738d765a8562945c) by [@rozele](https://github.com/rozele))
- Introduce beforeload callback arg into `ReactInstance::loadScript` ([061174c150](https://github.com/facebook/react-native/commit/061174c150ad05e0ea3fad3cdddb44df9710c337) by [@RSNara](https://github.com/RSNara))
- Updated `eslint-config-react-native` to depend on `eslint-plugin-react-hooks` v5.2.0 from v4.6.0. This includes a breaking change in which ESLint will no longer recognize component names that start with 1 or more underscores followed by a capital letter. (https://github.com/facebook/react/pull/25162) ([4de592756b](https://github.com/facebook/react-native/commit/4de592756bb39d4fc99698c96d2f69dea46d82e1) by [@yungsters](https://github.com/yungsters))
#### Android specific
- Convert `ReactEditText` to Kotlin. If you're subclassing this type you'll need to adjust your signatures. ([cac27d15be](https://github.com/facebook/react-native/commit/cac27d15bef39e1a4bf7e3279e85a7bae4ee3a9c) by [@cortinico](https://github.com/cortinico))
- Convert `NetworkModule` to Kotlin, mark methods as final ([8726e26348](https://github.com/facebook/react-native/commit/8726e263486d07d71e0cd80eba5a4c52705fdb14) by [@Abbondanzo](https://github.com/Abbondanzo))
- Convert `ReactTextInputManager` to Kotlin ([ab47834eb1](https://github.com/facebook/react-native/commit/ab47834eb1910b4da1c594843cf1ab5dc02d23c1) by [@cortinico](https://github.com/cortinico))
- Convert `ColorPropConverter` ([57768bfbcd](https://github.com/facebook/react-native/commit/57768bfbcd84100e244bff4910d46643559c015d) by [@fabriziocucci](https://github.com/fabriziocucci))
- Convert `DevSupportManagerBase` to Kotlin. If you're subclassing this class, you will have to adjust some of the parameters as types have changed during the migration. ([9da485b54c](https://github.com/facebook/react-native/commit/9da485b54c2deec324775f59cb36080baee9d4c9) by [@cortinico](https://github.com/cortinico))
- Convert `ReactInstanceDevHelper` to Kotlin. Some users implementing this class in Kotlin could have breakages. As this is a devtools/frameworks API we're not marking this as breaking. ([09492075e8](https://github.com/facebook/react-native/commit/09492075e827f96d9ce9a5d689ac7d0a44380a33) by [@cortinico](https://github.com/cortinico))
- Make `ModuleDataCleaner` internal ([6fa1864d52](https://github.com/facebook/react-native/commit/6fa1864d52fc47c37aeb5e0f99d972dee92f6ede) by [@mateoguzmana](https://github.com/mateoguzmana))
- Make `DeviceInfoModule` internal ([f02607badb](https://github.com/facebook/react-native/commit/f02607badb5641ab235f41be8005ce62d2bd63d4) by [@mateoguzmana](https://github.com/mateoguzmana))
- Removed `loadSplitBundleFromServer` from `DevSupportManager` interface ([86cd31eb6b](https://github.com/facebook/react-native/commit/86cd31eb6bb72de0791a62b39b64a155c791f034) by [@javache](https://github.com/javache))
- Deleting `ChoreographerCompat`, Use `Choreographer.FrameCallback` instead ([f8b2956437](https://github.com/facebook/react-native/commit/f8b2956437c23dd63463becc704b569bd8fcb19e) by [@mdvacca](https://github.com/mdvacca))
- Deleting deprecated `StandardCharsets` ([40b38d0a44](https://github.com/facebook/react-native/commit/40b38d0a44c7c83d36e34c9689ec3a2ac5d85b6b) by [@mdvacca](https://github.com/mdvacca))
#### iOS specific
- Cleanup queue configs for some native modules ([5b5cf0e199](https://github.com/facebook/react-native/commit/5b5cf0e1995b11336ed029a7afc8eba1f02ac9d1) by [@philIip](https://github.com/philIip))
- Delete `BridgeModuleBatchDidComplete` config helpers ([cbad8aafa5](https://github.com/facebook/react-native/commit/cbad8aafa541546c82e8079f6ef1a54ce8df83b3) by [@philIip](https://github.com/philIip))
### Added
- Add warning when the app runs with the legacy architecture ([706b6e878d](https://github.com/facebook/react-native/commit/706b6e878d7d503ed870d6635ae1f963a34e8ccd) by [@cipolleschi](https://github.com/cipolleschi))
- Added a custom Jest resolver to opt out from handling `"exports"` in tests ([ee9bd851ac](https://github.com/facebook/react-native/commit/ee9bd851acfc38150f434d676602865ba8cec591) by [@j-piasecki](https://github.com/j-piasecki))
- Support `minimumFontScale` in `paragraphAttributes` ([f53d066d26](https://github.com/facebook/react-native/commit/f53d066d26352e6abfdf2f727ea06425ea163039) by [@anupriya13](https://github.com/anupriya13))
- Configure the "react-native-strict-api" opt in for our next-gen TypeScript API ([6ea24f7bb9](https://github.com/facebook/react-native/commit/6ea24f7bb90829f0806210252dfce50ecee5666d) by [@huntie](https://github.com/huntie))
- Support headers [crossOrigin and referralPolicy] in Image without src and srcSet and only remote source.uri ([49ea9d80b8](https://github.com/facebook/react-native/commit/49ea9d80b883b50d242908bb47881b2680302291) by [@anupriya13](https://github.com/anupriya13))
- Add pan gesture animation example to rntester ([5ec00097b6](https://github.com/facebook/react-native/commit/5ec00097b6712897f8f456d63fc2459439e1dfd7) by [@zeyap](https://github.com/zeyap))
- Add `showsVerticalScrollIndicator` in ScrollViewProps.cpp `SetProp` ([bc90c839aa](https://github.com/facebook/react-native/commit/bc90c839aa8efb6f721a9b72a7b8248a0da3a219) by [@anupriya13](https://github.com/anupriya13))
- Adds JS changes for radial gradient ([1b45dc8033](https://github.com/facebook/react-native/commit/1b45dc8033e1064b2485c8b855a05634e2c1163f) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
- CSS Added hwb(H W B / A) notation ([692b05e77d](https://github.com/facebook/react-native/commit/692b05e77d42c9b3ef6dfcbb31f6a11ba0f1e5a3) by [@zhongwuzw](https://github.com/zhongwuzw))
- Added `no-deep-imports` rule to `eslint-plugin-react-native`. ([87809d9326](https://github.com/facebook/react-native/commit/87809d9326f7463e30bbf78edca0ef2a2fa139d9) by [@coado](https://github.com/coado))
- Allow setting `SurfaceStartedCallback` on `UIManager` ([c5e9ef53ae](https://github.com/facebook/react-native/commit/c5e9ef53ae9bfe6ea06ddee54228ada0305e4df7) by [@zeyap](https://github.com/zeyap))
- Move rncxx scheduler to oss ([744a0f8385](https://github.com/facebook/react-native/commit/744a0f8385c0dacfbd25446d08cb6e1640a5a2f9) by [@zeyap](https://github.com/zeyap))
- Add `UIManager::add/RemoveEventListener` ([b0f2083d9d](https://github.com/facebook/react-native/commit/b0f2083d9d881c8b0629fa455f6eb0c963e7e531) by [@zeyap](https://github.com/zeyap))
- Added slash of alpha support using rgb() ([7441127040](https://github.com/facebook/react-native/commit/7441127040f6da52f04b3bccc37894e51d09c6b2) by [@zhongwuzw](https://github.com/zhongwuzw))
- Implementation for `URLSearchParams` ([af1f1e4fe5](https://github.com/facebook/react-native/commit/af1f1e4fe5cb6514d2e806fe0ad5b505e86c0f4b) by Ritesh Shukla)
- Add accessibilityOrder to iOS and Android ([8cf4d5b531](https://github.com/facebook/react-native/commit/8cf4d5b531647375b202130bd2d3b8b2f6dce8e3) by [@jorge-cab](https://github.com/jorge-cab))
- Create `TurboModuleWithJSIBindings` interface ([1acd45950b](https://github.com/facebook/react-native/commit/1acd45950bb85560e2578fa6feaa9e5666c1b65e) by [@zeyap](https://github.com/zeyap))
- Expose `onPressMove` as base prop for `Pressable` ([6df938c72e](https://github.com/facebook/react-native/commit/6df938c72eb9b71ad626462127164fbb6cd4947c) by Regina Tuk)
- Added type definitions for Colors object in LaunchScreen module to enhance code readability and type safety. ([c2864c160d](https://github.com/facebook/react-native/commit/c2864c160dac3253dc20c598865884f8b4c67163) by [@qnnp-me](https://github.com/qnnp-me))
- EventEmitter `addListener` and `removeListener` APIs ([ff4537c15e](https://github.com/facebook/react-native/commit/ff4537c15ecef319ff3dfc87613e4696d280c643) by [@rozele](https://github.com/rozele))
- URL accessors for unimplemented Methods ([3dac90006f](https://github.com/facebook/react-native/commit/3dac90006fe046fd7b1fcedd93955cc88eaaed6f) by [@riteshshukla04](https://github.com/riteshshukla04))
- Add `compact` option to `react-native/babel-preset` to allow disabling whitespace removal ([86911003dc](https://github.com/facebook/react-native/commit/86911003dc396afd3e2016b7435d56c2269c33ff) by [@jnields](https://github.com/jnields))
- Codegen utility functions and types are now exported from the root package ([c7aa3f3fe7](https://github.com/facebook/react-native/commit/c7aa3f3fe722731fa7383385bce541eac860feca) by [@j-piasecki](https://github.com/j-piasecki))
#### Android specific
- Expose Android's `screenReaderFocusable` prop ([4ce093154d](https://github.com/facebook/react-native/commit/4ce093154d8fe130fca1f8da57067a666171db7f) by [@jorge-cab](https://github.com/jorge-cab))
- Warn Legacy Arch users if they use a Component with a ShadowNode with `YogaMeasureFunction.measure()` function. That Component will stop working on NewArch. ([9345c88a61](https://github.com/facebook/react-native/commit/9345c88a619f36537e25cf28b79d2c01cd40f780) by [@cortinico](https://github.com/cortinico))
- Add new prop for filtering drag and drop targeting to text inputs ([d10dd7130c](https://github.com/facebook/react-native/commit/d10dd7130ccc61c3f183f96edb8fec1279ec8a9a) by [@Abbondanzo](https://github.com/Abbondanzo))
- Adds android changes for radial gradient ([a2409941c2](https://github.com/facebook/react-native/commit/a2409941c20f63d0339e2f2b1c9a2e942d29ca2e) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
- Generate `keep.xml` to prevent resource shrinking ([864833fca9](https://github.com/facebook/react-native/commit/864833fca9334ba0b986243fce790e89ff64d932) by [@jakex7](https://github.com/jakex7))
- Create `UIManagerNativeAnimatedDelegate` to potentially drive per frame NativeAnimated update ([8d6098a645](https://github.com/facebook/react-native/commit/8d6098a645745fa964bac475ff14598d0cdfd11a) by [@zeyap](https://github.com/zeyap))
- Add a `legacyWarningsEnabled` property to enable Legacy Warnings on NewArch ([7ca2811750](https://github.com/facebook/react-native/commit/7ca28117507688864af0561a0350d46666410291) by [@cortinico](https://github.com/cortinico))
- Allow invoking `synchronouslyUpdateViewOnUIThread` from c++ via `UIManager` ([4912958812](https://github.com/facebook/react-native/commit/49129588123fe05c828fae036b9521f4ba6fe84c) by [@zeyap](https://github.com/zeyap))
- Collections DSL functions for Kotlin(`buildReadableMap`, `buildReadableArray`) ([78dbbaafdd](https://github.com/facebook/react-native/commit/78dbbaafdd4a732f6cbb1525816b38a51adcf1cf) by [@l2hyunwoo](https://github.com/l2hyunwoo))
#### iOS specific
- Expose iOS's `accessibilityRespondsToUserInteraction` as a prop ([fd8a3456ca](https://github.com/facebook/react-native/commit/fd8a3456cac72634cc149904e157e07257dbf364) by [@jorge-cab](https://github.com/jorge-cab))
- Add new prop for filtering drag and drop targeting to text inputs ([93f12eb71d](https://github.com/facebook/react-native/commit/93f12eb71d20feb0d7b96758df6c53b0277032f5) by [@Abbondanzo](https://github.com/Abbondanzo))
- Radial gradient ([d7533dce1c](https://github.com/facebook/react-native/commit/d7533dce1cdb4c0bc70deeab68f53752d13becf2) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
- Add flag to enable or disable legacy warning. ([ce7a602edf](https://github.com/facebook/react-native/commit/ce7a602edfe1e7121b4e7b05b80e338304dcf579) by [@cipolleschi](https://github.com/cipolleschi))
- Add warnings when components are loaded using the interop layer. ([8acc53da57](https://github.com/facebook/react-native/commit/8acc53da57d3295cf76ae61e183e7c42973928f4) by [@cipolleschi](https://github.com/cipolleschi))
- Enabled `useFabricInterop` by default in OSS ([21c858ce3e](https://github.com/facebook/react-native/commit/21c858ce3ef55a9812c8e53d3a1b40836564dd6c) by [@arushikesarwani94](https://github.com/arushikesarwani94))
- Add warnings when a legacy module is used in the Interop Layer. ([7b500b8522](https://github.com/facebook/react-native/commit/7b500b8522792b26b0afe8c33dedd460c6d99227) by [@cipolleschi](https://github.com/cipolleschi))
- Show warnings in the New Architecture when modules are loaded using RCT_EXPORT_MODULE ([4d40882172](https://github.com/facebook/react-native/commit/4d40882172a303cdb0f8ff96e0884749f4ebc840) by [@cipolleschi](https://github.com/cipolleschi))
- Allow eager initialization of `RCTRootViewFactory` ([ddbb5fda09](https://github.com/facebook/react-native/commit/ddbb5fda09ff3daaa69e195d2d872bc88480e707) by [@mdjastrzebski](https://github.com/mdjastrzebski))
- Introduce unstableRequiresMainQueueSetup api to modules ([636665c1c2](https://github.com/facebook/react-native/commit/636665c1c20d1ba51f16eea18664e3cd35308518) by [@RSNara](https://github.com/RSNara))
- Codegen: Introduce module/component annotations inside package.json ([76436d35c7](https://github.com/facebook/react-native/commit/76436d35c73772f161071066b98b640bf68094ea) by [@RSNara](https://github.com/RSNara))
- ([3b3d502ccf](https://github.com/facebook/react-native/commit/3b3d502ccfc163ecb8531fb465032e831980b8af) by [@cipolleschi](https://github.com/cipolleschi))
- Useful error message about setting dependency provider ([e1464c0975](https://github.com/facebook/react-native/commit/e1464c097550bb9251513ba64547f4c5afdc838d) by [@okwasniewski](https://github.com/okwasniewski))
- On `RCTReactNativeFactory` add `initWithDelegate` overload with argument to specify release level for an application ([df282a0538](https://github.com/facebook/react-native/commit/df282a0538224258a48ef77ebf9b9d2ed77ed5d5) by [@jorge-cab](https://github.com/jorge-cab))
### Changed
- Bump React to 19.1 ([0e11e6a28b](https://github.com/facebook/react-native/commit/0e11e6a28bf3a12e30b5c6a7e93f3a5653888375) by [@cipolleschi](https://github.com/cipolleschi))
- Re-expose `src/*` subpaths when not using the Strict TypeScript API ([1a46b203b8](https://github.com/facebook/react-native/commit/1a46b203b83d7cbe44185cd7e437e77b850e1af5) by [@huntie](https://github.com/huntie))
- TypeScript: Replace deprecated `React.ElementRef` usages to `React.ComponentRef` ([12147e3bee](https://github.com/facebook/react-native/commit/12147e3bee782a73c1560593912ad706d2262b0c) by [@mateoguzmana](https://github.com/mateoguzmana))
- Configured Hermes Parser for ReactNative to target React 19, resulting in Component Syntax no longer producing `forwardRef` calls. ([68cad5d2d3](https://github.com/facebook/react-native/commit/68cad5d2d3c3b364a86767b0dfe4f92086223a7c) by [@yungsters](https://github.com/yungsters))
- Configured Hermes Parser for Metro to target React 19, resulting in Component Syntax no longer producing `forwardRef` calls. ([f2518d4374](https://github.com/facebook/react-native/commit/f2518d43746fbf712b8cb0ca920f134005c1faec) by [@yungsters](https://github.com/yungsters))
- Replaced `let` with `const` where applicable for better code standards and micro-optimization. ([38fefb2771](https://github.com/facebook/react-native/commit/38fefb2771d7ff65568fa989f2ca4a5bf44e58ec) by [@sanjaiyan-dev](https://github.com/sanjaiyan-dev))
- Animated components' `ref` will now only reattach when receiving new props if the new props contain different `AnimatedValue` or `AnimatedEvent` instances. (Previously, Animated components' `ref` would always reattach when receiving new props.) ([eeab47e61a](https://github.com/facebook/react-native/commit/eeab47e61a32b5fe33352a58ad7b8ac0a652ba6b) by [@yungsters](https://github.com/yungsters))
- When an `Animated` component is unmounted, any completion callbacks will now be called in a microtask instead of during the commit phase. ([da1bf8d1d1](https://github.com/facebook/react-native/commit/da1bf8d1d1b83b8cee76e94987d94d9ffba6db51) by [@yungsters](https://github.com/yungsters))
- InteractionManager is deprecated and will be removed in a future release. Its behavior has been changed to be the same as `setImmediate`, and callers should migrate away from it. ([a8a4ab10d0](https://github.com/facebook/react-native/commit/a8a4ab10d0ee6004524f0e694e9d5a41836ad5c4) by [@yungsters](https://github.com/yungsters))
- `eslint-config-react-native` now respects rules disabled by `eslint-config-prettier`. ([6346689c3d](https://github.com/facebook/react-native/commit/6346689c3d0420c1d6b85ca8db1e4f3fa115c5e9) by [@yungsters](https://github.com/yungsters))
- Changed `react-native-codegen` to support types under `CodegenTypes` namespace ([5349b7c7b5](https://github.com/facebook/react-native/commit/5349b7c7b586a86adcfa6f123aa138efac5811ce) by [@j-piasecki](https://github.com/j-piasecki))
- Changed Flow for the React Native monorepo, so that `React` no longer has to be in scope when using JSX. ([1bb7446993](https://github.com/facebook/react-native/commit/1bb7446993e5151b92367f33f5bed3f5783f471a) by [@yungsters](https://github.com/yungsters))
- Update Metro to ^0.82.0 ([0ad192003e](https://github.com/facebook/react-native/commit/0ad192003ef786c7dd1322762690d63730f17582) by [@robhogan](https://github.com/robhogan))
- Bump minimum Metro from 0.81.0 to ^0.81.3 || ^0.82.0 ([6606a1da84](https://github.com/facebook/react-native/commit/6606a1da8434a8d59d898a56e277f4130442d2ad) by [@robhogan](https://github.com/robhogan))
- deps: Update debugger-frontend from bc635fa...343405b ([647af1c4ca](https://github.com/facebook/react-native/commit/647af1c4ca219515ab00b442370b61346ba1edb1) by [@huntie](https://github.com/huntie))
- Replace hsr_core dependency for react profiling with hz_tracing dependency ([0f55ef7754](https://github.com/facebook/react-native/commit/0f55ef7754109c68a0bd10d958d8c81ead5e42e2) by [@metaadrianstone](https://github.com/metaadrianstone))
#### Android specific
- Gradle to 8.14.1 ([827a6851d0](https://github.com/facebook/react-native/commit/827a6851d0a61c048fec7a73ca3b293ef90ad2ae) by [@cortinico](https://github.com/cortinico))
- Incorporate maxLines and ellipsization into text layout ([b1367eeb81](https://github.com/facebook/react-native/commit/b1367eeb81078605a39959c49568b00fae7ea8e1) by [@NickGerleman](https://github.com/NickGerleman))
- Make mHybridData in `CxxReactPackage` protected ([0c58ccf501](https://github.com/facebook/react-native/commit/0c58ccf501c1478242c28122bdc87bcd7389e56b) by [@zeyap](https://github.com/zeyap))
- Migrate `ViewGroupManager` to kotlin ([761b15888d](https://github.com/facebook/react-native/commit/761b15888df3b0f47b84a2e29a330165bc7a9492) by [@riteshshukla04](https://github.com/riteshshukla04))
- Migrate `Inspector` to Kotlin ([93efaeb241](https://github.com/facebook/react-native/commit/93efaeb241fcf037b22a92b127d5ffd9fe8bde0c) by [@Vin-Xi](https://github.com/Vin-Xi))
- Gradle to 8.14 ([0e963aaa54](https://github.com/facebook/react-native/commit/0e963aaa54a0324b20795069bdf112e801ca2f62) by [@cortinico](https://github.com/cortinico))
- `ReactActivity` has been migrated to Kotlin. ([403feb9bc2](https://github.com/facebook/react-native/commit/403feb9bc25226120daf1daa1ec401b263b7e833) by [@rshest](https://github.com/rshest))
- Migrate `JSBundleLoader` to Kotlin ([de165a2cfd](https://github.com/facebook/react-native/commit/de165a2cfdb9967ae99237d8c9519cc2dd232855) by [@yogeshpaliyal](https://github.com/yogeshpaliyal))
- AGP to 8.9.2 ([e4bf88a076](https://github.com/facebook/react-native/commit/e4bf88a0765c765e27236199d8138233c4590047) by [@cortinico](https://github.com/cortinico))
- Migrate `JavaModuleWrapper` to Kotlin ([79d3eea0b7](https://github.com/facebook/react-native/commit/79d3eea0b72fc50dab44135d502be2fb39128520) by drrefactor)
- Migrate `BlobProvider` to Kotlin ([5d1febf7de](https://github.com/facebook/react-native/commit/5d1febf7def124ef84e2224923d2b26fcdb81236) by [@JatinDream11](https://github.com/JatinDream11))
- Change to use new Background and new Border drawables by default ([132a871b46](https://github.com/facebook/react-native/commit/132a871b465eb6509be0e3d9ae61d032b415f535) by [@jorge-cab](https://github.com/jorge-cab))
- Migrate `DynamicFromObject` to Kotlin ([867858df65](https://github.com/facebook/react-native/commit/867858df655445efca1bbfe3ddca55a30a11c7e5) by [@yasir6jan](https://github.com/yasir6jan))
- Kotlin to 2.1.20 ([a3d38d5722](https://github.com/facebook/react-native/commit/a3d38d57223dafac0c23c044bd78af020538591c) by [@cortinico](https://github.com/cortinico))
- Migrate `DynamicFromArray` to Kotlin ([74e8c78268](https://github.com/facebook/react-native/commit/74e8c7826864c166efc735b6d419f9005452942d) by [@BogiKay](https://github.com/BogiKay))
- Refactor class `FrescoBasedTextInlineImageSpan` from Java to Kotlin. ([cb51d25ba8](https://github.com/facebook/react-native/commit/cb51d25ba8bd6c4675efd58311891a40d83b4108) by [@gouravkhunger](https://github.com/gouravkhunger))
- Migrate `ReactLifecycleStateManager` to Kotlin ([800b12406f](https://github.com/facebook/react-native/commit/800b12406f8ea777bef93e98685aacfda0560d5b) by [@rohitverma-d11](https://github.com/rohitverma-d11))
- Migrate `ReactStylesDiffMap` to Kotlin ([a0f016ecad](https://github.com/facebook/react-native/commit/a0f016ecad4d577300e95de41be4e297b9c02c4f) by [@poonamjain96](https://github.com/poonamjain96))
- Migrate `ReactClippingViewGroupHelper` to Kotlin ([2834825b8b](https://github.com/facebook/react-native/commit/2834825b8ba01119b4ae3a01ec641defaea1a1f2) by priyanka.raghuvanshi)
- Migrate `FrescoBasedReactTextInlineImageShadowNode` to Kotlin ([30030c5a76](https://github.com/facebook/react-native/commit/30030c5a763280681782e27f26df1d451ff7f93c) by [@nitinshukla413](https://github.com/nitinshukla413))
- Migrate `DynamicFromMap.java` to Kotlin ([86a7388355](https://github.com/facebook/react-native/commit/86a738835555e3377f27ddee0e0083cae8c4804f) by [@artus9033](https://github.com/artus9033))
- Migrate `NativeAnimatedNodesManager` to kotlin ([bfb274c244](https://github.com/facebook/react-native/commit/bfb274c244a9744b6f8cfc9c6b95cc7edca83ef1) by [@zeyap](https://github.com/zeyap))
- Migrate `FileReaderModule` to Kotlin ([07a1fb8e6b](https://github.com/facebook/react-native/commit/07a1fb8e6b3ef8f5ab2b53bd2c5ffff15467f7ea) by [@devanshsaini11](https://github.com/devanshsaini11))
- Automatically use Metro bundler IP address when installing apps on Android ([d816ba0a70](https://github.com/facebook/react-native/commit/d816ba0a7005f413bc45510d34223f632e752c27) by [@hrastnik](https://github.com/hrastnik))
- Migrate `ReactEditTextInputConnectionWrapper` to Kotlin ([5c9883b018](https://github.com/facebook/react-native/commit/5c9883b01865f4cb880bf525de69f4ab5aaed008) by [@Q1w1N](https://github.com/Q1w1N))
- Enable `INTERPROCEDURAL_OPTIMIZATION` for `libappmodules.so` in OSS ([2da062f9d1](https://github.com/facebook/react-native/commit/2da062f9d19196c338191cbc85c2e893a82f4107) by [@cortinico](https://github.com/cortinico))
- Migrate `NativeAnimatedModule` to kotlin ([de9b4f3642](https://github.com/facebook/react-native/commit/de9b4f36425cb4df6642e29528da33880623844b) by [@zeyap](https://github.com/zeyap))
- Enable `INTERPROCEDURAL_OPTIMIZATION` for React Native ([f107c28d2f](https://github.com/facebook/react-native/commit/f107c28d2fe03bd10eada503aecf23fa966be9c5) by [@cortinico](https://github.com/cortinico))
- Make ReactRawTextManager internal. We verified no popular libraries are impacted by this change ([788213f91a](https://github.com/facebook/react-native/commit/788213f91accd38be90b53bca218cd6cd050daeb) by [@cortinico](https://github.com/cortinico))
- Migrate `UiThreadUtil` to Kotlin ([1033584c20](https://github.com/facebook/react-native/commit/1033584c203f41821d5802f56d66cae005ea9b77) by [@riteshshukla04](https://github.com/riteshshukla04))
- Migrate `DevSupportManagerFactory` to Kotlin - We couldn't find any implementation of this class in OSS. Some Kotlin implementers might have to change the method signatures. However this interface is not supposed to be extended in OSS. ([0bd0635be6](https://github.com/facebook/react-native/commit/0bd0635be6b9102a02e62d2be430b1dba218cd36) by [@cortinico](https://github.com/cortinico))
- Creating of Blobs from large files now works. File size can now be upto available (free) heap size. ([81e47af764](https://github.com/facebook/react-native/commit/81e47af7648c489e29982221552086db4a807b8d) by [@giantslogik](https://github.com/giantslogik))
- Leading slash supplied to `DevServerHelper.downloadBundleResourceFromUrlSync` will now be trimmed and emit a warning. ([cf67427406](https://github.com/facebook/react-native/commit/cf67427406426efc9e03b279577056e8692a764b) by [@yungsters](https://github.com/yungsters))
- Prevent currently focused child from getting clipped when `removeClippedSubviews` is enabled ([81405b450c](https://github.com/facebook/react-native/commit/81405b450c77ec66687db9ab62dcba9d6b869d4a) by [@jorge-cab](https://github.com/jorge-cab))
- Do not crash when parent view state can't be found ([ade41c851b](https://github.com/facebook/react-native/commit/ade41c851b2081278d37fd74bd4b9701ccdfbf15) by [@javache](https://github.com/javache))
#### iOS specific
- Enable `DEFINES_MODULE` in `React-jsc.podspec` ([473e42bbc3](https://github.com/facebook/react-native/commit/473e42bbc383fb01981bdfc7085ab923f0c786c0) by [@krozniata](https://github.com/krozniata))
- Update `RCTImageLoader.mm` to cast `loadHandler` to `RCTImageLoaderLoggable` before calling `shouldEnablePerfLogging` ([2562440385](https://github.com/facebook/react-native/commit/2562440385a4e2747df8f3bfb734a5c86976f514) by Aaron Coplan)
- Revert "Add warning when a component is loaded with the interop layer" ([bd64ec817d](https://github.com/facebook/react-native/commit/bd64ec817d4a8be87722122622d30f72e614b87c) by [@cipolleschi](https://github.com/cipolleschi))
- Overwrite betterHitTest in `RCTScrollViewComponentView` instead of changing layout metrics of the container view ([850760ab61](https://github.com/facebook/react-native/commit/850760ab6112d1f38a5a9014282ae5186ab814d6) by [@j-piasecki](https://github.com/j-piasecki))
- Replace a workaround for measuring multiline text with `maximumNumberOfLines` on iOS with a proper solution ([77cdaa8733](https://github.com/facebook/react-native/commit/77cdaa8733db7a7de25b8b0aef87a11f91be9efd) by [@j-piasecki](https://github.com/j-piasecki))
### Deprecated
- Deprecate `*EventData` types on `Image`, `Switch`, `TextInput` components. These can be substituted for `*Event`, e.g. `NativeSyntheticEvent<ImageLoadEventData>` becomes `ImageLoadEvent`. ([701859b397](https://github.com/facebook/react-native/commit/701859b397eddc0686fcdfe43e0244888168dc12) by [@huntie](https://github.com/huntie))
#### Android specific
- Correctly deprecate `ReactContextBaseJavaModule.getCurrentActivity()` method ([1408c69fd8](https://github.com/facebook/react-native/commit/1408c69fd8c5327bd3390fce8ed41e20299a5bfa) by [@cortinico](https://github.com/cortinico))
- Deprecate `UIManagerType.DEFAULT`, replaced by `UIManagerType.LEGACY` ([a8668319ad](https://github.com/facebook/react-native/commit/a8668319ad203cb3dc78f725f5544da6048d5b4e) by [@mdvacca](https://github.com/mdvacca))
#### iOS specific
- Deprecate `loadImageForURL` in favor of new signature which uses completionHandlerWithMetadata ([43c9a609de](https://github.com/facebook/react-native/commit/43c9a609deb1b769c51751d61904a5d80f0bd05a) by Aaron Coplan)
- Deprecate the `RCT_NEW_ARCH_ENABLED` and the `RCTSetNewArchEnabled` ([6dd721b258](https://github.com/facebook/react-native/commit/6dd721b258ba775de945d9df25f8a9eca4c509b1) by [@cipolleschi](https://github.com/cipolleschi))
### Removed
#### Android specific
- Deprecated `ResourceDrawableIdHelper.instance` ([8de401c625](https://github.com/facebook/react-native/commit/8de401c62520fc0ef83e820b62e15714dc793b45) by [@javache](https://github.com/javache))
- Make `StateWrapperImpl` Internal ([9f941c50c9](https://github.com/facebook/react-native/commit/9f941c50c970e35ac6fcfa11848d1f7f5a0a9323) by [@NickGerleman](https://github.com/NickGerleman))
- Removed deprecated `EventBeatManager(ReactApplicationContext)` constructor ([c97af95a7f](https://github.com/facebook/react-native/commit/c97af95a7ffe2267f6d13f68c607fefac12d639b) by [@javache](https://github.com/javache))
- Remove `FabricSoLoader` from public API ([902f82656e](https://github.com/facebook/react-native/commit/902f82656edc6c092e074759a47dc46aad53a63e) by [@javache](https://github.com/javache))
- Removed `(un)registerEventEmitter` from `EventDispatcher` interface ([d1c0f57073](https://github.com/facebook/react-native/commit/d1c0f57073a083b787af6c78d662506c760acf4e) by [@javache](https://github.com/javache))
- `TouchesHelper` is no longer part of the public API ([2196597e2b](https://github.com/facebook/react-native/commit/2196597e2b602acdaecdfe04a6fb9046cb042f85) by [@javache](https://github.com/javache))
#### iOS specific
- Delete `RCTComputeScreenScale` ([094876367f](https://github.com/facebook/react-native/commit/094876367f2821edce16331f5a30f9edb303dbe9) by [@RSNara](https://github.com/RSNara))
- Remove `RCTFloorPixelValue` ([dc97df10a2](https://github.com/facebook/react-native/commit/dc97df10a2f243855b3c5c9135d01cbc0c543d87) by [@RSNara](https://github.com/RSNara))
### Fixed
- **NewAppScreen:** Fix Networking URL in New app screen ([89e6c72fd4](https://github.com/facebook/react-native/commit/89e6c72fd4ba6c0610e892069ee5b96092dfc192) by [@riteshshukla04](https://github.com/riteshshukla04))
- **Runtime:** Align timer IDs and timer function argument error handling with web standards. ([480a4642e5](https://github.com/facebook/react-native/commit/480a4642e5a644becf1c477d3d239f9b57efff3a) by [@kitten](https://github.com/kitten))
- **TypeScript:** Reference `global.d.ts` using `path` so they can be resolved by TSC ([6399caef63](https://github.com/facebook/react-native/commit/6399caef635b6aadc4c98ec37c9f007f81fa1f79) by [@krystofwoldrich](https://github.com/krystofwoldrich))
- **VirtualizeSectionList:** Fix VirtualizeSectionList generic arguments ([44b0f5560b](https://github.com/facebook/react-native/commit/44b0f5560b285dfd8e28e6056e9434d76734f3fd)) by [@coado](https://github.com/coado)
- Fix generated types in react-native/virtualized-lists being used without opt-in ([c9f2055097](https://github.com/facebook/react-native/commit/c9f20550972db2f94c5970948239312046a66a4e) by [@j-piasecki](https://github.com/j-piasecki))
- Made `DevServerHelper` and its method open so that they can be overridden. ([2a0c1e6a9e](https://github.com/facebook/react-native/commit/2a0c1e6a9e98c19101dc89b9adba4a990cd6902c) by [@chrfalch](https://github.com/chrfalch))
- Wrong `borderBottomEndRadius` on RTL ([68d6ada448](https://github.com/facebook/react-native/commit/68d6ada44893701b6006a6b1753131c7e880a30a) by [@riteshshukla04](https://github.com/riteshshukla04))
- Made function `removeView` open in Kotlin class ([9d11dcd3b0](https://github.com/facebook/react-native/commit/9d11dcd3b06641dc8780043067d6d4fbfcac71d1) by [@chrfalch](https://github.com/chrfalch))
- Fixed codegen breaking when a subset of `modulesConformingToProtocol` fields was specified or when the value was string ([e4ef685dd7](https://github.com/facebook/react-native/commit/e4ef685dd75f09f22b0122e83fc94bc9d2df8a97) by [@j-piasecki](https://github.com/j-piasecki))
- Fixed the generated type definitions for `Animated.FlatList` and `Animated.SectionList` to correctly infer item types. ([9be5ac1010](https://github.com/facebook/react-native/commit/9be5ac101051dd8121a48af1a29a60b7ba0b753e) by [@j-piasecki](https://github.com/j-piasecki))
- Fixed switches correctly reverting to controlled state ([aa8c072870](https://github.com/facebook/react-native/commit/aa8c072870f6f9740e567a0f455c0e500ff1400c) by [@javache](https://github.com/javache))
- Skip cloning `Fragments` in `ListEmptyComponent` to avoid onLayout warning ([2b0189b964](https://github.com/facebook/react-native/commit/2b0189b9649b58dc93ac79ad2bf709fd7bc8f117) by [@mateoguzmana](https://github.com/mateoguzmana))
- Fixed text not updating correctly after changing font scale in settings ([c008604e0a](https://github.com/facebook/react-native/commit/c008604e0a05460b440fcfaded70498594465916) by [@j-piasecki](https://github.com/j-piasecki))
- Do not generate Apple specific files for Android ([e83ece0d17](https://github.com/facebook/react-native/commit/e83ece0d17217c18a9b3dea53f261b9e0a45621a) by [@cipolleschi](https://github.com/cipolleschi))
- Outline now takes into account outline-offset to calculate its border-radius, same as web. ([b47bfcef5f](https://github.com/facebook/react-native/commit/b47bfcef5f85ed1b4d713bec9be76efd1b485d3d) by [@jorge-cab](https://github.com/jorge-cab))
- Throw ParsingException when ReactModule doesn't conform to TurboModule invariants ([c5132f485f](https://github.com/facebook/react-native/commit/c5132f485f6c5af51c6e8133eb5f029a389762dc) by [@GijsWeterings](https://github.com/GijsWeterings))
- Fix TS docs for `contentInsetAdjustmentBehavior` ([24ba7dfe6f](https://github.com/facebook/react-native/commit/24ba7dfe6feaacef76718491b8cb260d05afab9b) by [@steinalex](https://github.com/steinalex))
- Add explicit `folly/dynamic.h` include where it is actually used ([0b1d0e84ee](https://github.com/facebook/react-native/commit/0b1d0e84eed1714e4d5dbf67a01f8c25fd5445d8) by [@mzlee](https://github.com/mzlee))
- Compatibility Check: Allow union changes when the new element is in the middle of the union ([69ccbc3943](https://github.com/facebook/react-native/commit/69ccbc39438d599308b8d98c0dcf72d3bae1bf41) by [@elicwhite](https://github.com/elicwhite))
- Fixed crash in RCTPullToRefreshViewComponentView#updateProps ([fab7fa88e3](https://github.com/facebook/react-native/commit/fab7fa88e3bd3c84a0ffe0c027e14185b037120d) by [@javache](https://github.com/javache))
- Fix New Arch handling of inline views when text truncated ([99f962627f](https://github.com/facebook/react-native/commit/99f962627f1b88b8a48c2b64b1887652f784b624) by [@NickGerleman](https://github.com/NickGerleman))
- Add missing type variation `{login: string, password: string}` to **AlertType** type definition to properly support `login-password` prompt callbacks ([c6a075bcc7](https://github.com/facebook/react-native/commit/c6a075bcc72b984da787a94d30d38426a68cef80) by [@assynu](https://github.com/assynu))
#### Android specific
- **Layout:** Restored the possibility to extend `LayoutAnimationController` ([bca7c5a553](https://github.com/facebook/react-native/commit/bca7c5a55301398beaa6ca35c96ae7ad5426c297) by [@tomekzaw](https://github.com/tomekzaw))
- **TextInput:** Fix broken focus behavior for TextInput in older Android versions (< 9) ([fb62355555](https://github.com/facebook/react-native/commit/fb623555552075793086acdd1ddd0c1e3fba72c4)) by [@joevilches](https://github.com/joevilches)
- Assume full container width when ellipsizing line ([e565c662d7](https://github.com/facebook/react-native/commit/e565c662d7550b143930bf2e646a749bcaea026a) by [@NickGerleman](https://github.com/NickGerleman))
- Fix incorrect clip to padding box on new Background and Border drawables ([989b3f61a0](https://github.com/facebook/react-native/commit/989b3f61a070c68f30d36036925f54cb081da49e) by [@jorge-cab](https://github.com/jorge-cab))
- Can now focus `TextInput` with keyboard ([e00028f6bb](https://github.com/facebook/react-native/commit/e00028f6bb6c19de861f9a25f377295755f3671b) by [@joevilches](https://github.com/joevilches))
- Double selection with dataDetectorType and links ([70aced5eb1](https://github.com/facebook/react-native/commit/70aced5eb17c48e6b7201377e6068cf6558c7460) by [@joevilches](https://github.com/joevilches))
- Correctly Pass `SurfaceID` to `TextLayoutManager` ([6f0a0a5c2c](https://github.com/facebook/react-native/commit/6f0a0a5c2c7d678646be5af9a3c4ccf1ba9c9804) by [@NickGerleman](https://github.com/NickGerleman))
- Sync offset and value from native -> js in separate fields ([2efe8094c0](https://github.com/facebook/react-native/commit/2efe8094c0d4251213b5305ddaba11aaf76bfd56) by Martin Booth)
- Ensure latest offset value is synced to native ([3e3094c3dd](https://github.com/facebook/react-native/commit/3e3094c3dd57a83e167ffd163093c41f4cf6d8c5) by Martin Booth)
- Fix `BatchExecutionOpCodes.OP_CODE_SET_ANIMATED_NODE_OFFSET` mapping to call setAnimatedNodeOffset (rather than setAnimatedNodeValue) ([9efcdc091c](https://github.com/facebook/react-native/commit/9efcdc091c81c6ae6118ed78791096ca07fe0140) by Martin Booth)
- Fix fetch of content scheme uris failing on Android. ([87c54a7eba](https://github.com/facebook/react-native/commit/87c54a7ebab5530de4cec359440d2c5945244e07) by [@giantslogik](https://github.com/giantslogik))
- Fix Non-uniform border colors on TextInput ([42251ec0ed](https://github.com/facebook/react-native/commit/42251ec0eddaf42d0a89caeb75a92ef34c517a95) by [@NickGerleman](https://github.com/NickGerleman))
- `Settings.Global.TRANSITION_ANIMATION_SCALE` accepts comma as decimal separator ([8b11970adb](https://github.com/facebook/react-native/commit/8b11970adb7d09bc9a4be78cfaee04cb7e084177) by [@vzaidman](https://github.com/vzaidman))
- Fix `selectable` prop not working correctly on initial render (old-arch) ([5ed486cc8f](https://github.com/facebook/react-native/commit/5ed486cc8fb4aeef12c92a04619cc668427eee75) by [@mateoguzmana](https://github.com/mateoguzmana))
- Fix keyboard navigation on lists with `removeClippedSubviews` enabled ([bbff754db3](https://github.com/facebook/react-native/commit/bbff754db370a2d69926048e384ccaa6ff97c230) by [@jorge-cab](https://github.com/jorge-cab))
- Fix translucent borders on Android overlapping bug ([57779cebf0](https://github.com/facebook/react-native/commit/57779cebf066ee420fa861df8269e875ab1d21f4) by [@jorge-cab](https://github.com/jorge-cab))
- Fix keyboard navigation on lists with `removeClippedSubviews` enabled ([fc9f2fe0ea](https://github.com/facebook/react-native/commit/fc9f2fe0ea20d6e73be8fdf4eb47affaddea6427) by [@jorge-cab](https://github.com/jorge-cab))
- Fix inset shadow edge cases ([0929697a6d](https://github.com/facebook/react-native/commit/0929697a6df9ab5a3654c0077bb95427eae77b4c) by [@joevilches](https://github.com/joevilches))
- Fix crash when TurboModule event emitters are used on arm32 ([6e701ce080](https://github.com/facebook/react-native/commit/6e701ce080122f5b60633e3475651a0d2d9fe54a) by [@javache](https://github.com/javache))
- Ensure Linking.sendIntent promises resolve or reject ([6609ba98e5](https://github.com/facebook/react-native/commit/6609ba98e5f738cb8746c7ccfda1072cfa05f986) by [@Abbondanzo](https://github.com/Abbondanzo))
- Fix crash when passing null initialProps ([ee85957fd6](https://github.com/facebook/react-native/commit/ee85957fd68669d8887d0e03b96f91b807bc99ac) by [@javache](https://github.com/javache))
- Prevent onPointerLeave from dispatching during button presses ([833ab6fe1b](https://github.com/facebook/react-native/commit/833ab6fe1b252244bf7d8a2f158fa13470c27e76) by [@Abbondanzo](https://github.com/Abbondanzo))
- Fixed crash when event is emitted after instance is shutdown ([6dd5a838c3](https://github.com/facebook/react-native/commit/6dd5a838c340aabc1ad385ccfc5cc3b478d5fda3) by [@javache](https://github.com/javache))
- Removed deprecated EventDispatcher#receiveTouches ([7056d20984](https://github.com/facebook/react-native/commit/7056d20984dab1d0c965684acc2d7a2b13c66fac) by [@javache](https://github.com/javache))
- Fixes memory leak - Close a view leak due to lossy onAnimationEnd callback ([313d7d79d4](https://github.com/facebook/react-native/commit/313d7d79d4257efcce5f3a555e335a74ce56df53) by [@knappam](https://github.com/knappam))
- Fix `RNCodegen.js` for generating ComponentDescriptors.cpp ([d8b0e050c4](https://github.com/facebook/react-native/commit/d8b0e050c47ee7078ccc26bbabb4cf37d3ac9a37) by [@arushikesarwani94](https://github.com/arushikesarwani94))
- Fix keyboard navigation on lists with `removeClippedSubviews` enabled ([c068c599c6](https://github.com/facebook/react-native/commit/c068c599c641491e735caf79e4e60a0fb3c04f83) by [@jorge-cab](https://github.com/jorge-cab))
- Fix occasional syncronization issue in ScrollView when rendering dynamic content with content offset ([8f209acb3f](https://github.com/facebook/react-native/commit/8f209acb3f7338448b0b7a26224fc4b2cfb722db) by [@fabriziocucci](https://github.com/fabriziocucci))
- Fix crash with nested FlatLists and fix edge case with nested views ([9526406fc2](https://github.com/facebook/react-native/commit/9526406fc24ed0df10c63c54869814a26d69ece0) by [@jorge-cab](https://github.com/jorge-cab))
- Made `ReactHostImpl.java` nullsafe ([568ba647cf](https://github.com/facebook/react-native/commit/568ba647cfbeaa676a84366a981a1cad65297893) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReactApplicationContext.java` as nullsafe ([f86de9724b](https://github.com/facebook/react-native/commit/f86de9724b71b2e1fef6bd2d3447eccbbe7c1f1f) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `Inspector.java` as nullsafe ([8d72e5eeb9](https://github.com/facebook/react-native/commit/8d72e5eeb91911551b8fd7764e2b0d37d1d920aa) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `JavaScriptModuleRegistry.java` as nullsafe ([bf911e1f92](https://github.com/facebook/react-native/commit/bf911e1f92438d27e20a0fe2bb4bec1a0d3c2838) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `JSBundleLoader.java` as nullsafe ([9d21f97ebe](https://github.com/facebook/react-native/commit/9d21f97ebeabe1f89e105280cb95fd5a5c6b2a56) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `JSONArguments.java` as nullsafe ([12b22dc57c](https://github.com/facebook/react-native/commit/12b22dc57cffe4669ea04ef751704aa56fe63d36) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ModuleSpec.java` as nullsafe ([1e4d016950](https://github.com/facebook/react-native/commit/1e4d01695000fba0605c7e4be04d825a570820f3) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReactContextBaseJavaModule.java` as nullsafe ([27179a7cf2](https://github.com/facebook/react-native/commit/27179a7cf27463a87111454ba17e117f5898aae7) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReactMarker.java` as nullsafe ([911c11f129](https://github.com/facebook/react-native/commit/911c11f1298c03cecf5777b052aa0139bf66adfc) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `NativeModule.java` as nullsafe ([005c11ea0a](https://github.com/facebook/react-native/commit/005c11ea0a1fafb62c3fbdea6c84a73789ea10b6) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `FabricUIManager.java` nullsafe ([97ddd17e5e](https://github.com/facebook/react-native/commit/97ddd17e5eaf38ac4138d96520cbdeeb9da98555) by [@javache](https://github.com/javache))
- Made `TextAttributeProps.java` nullsafe ([623dcc3902](https://github.com/facebook/react-native/commit/623dcc39025bf4d3e82d590637831e380f412397) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReactTextViewManager.java` nullsafe ([1929ebd00e](https://github.com/facebook/react-native/commit/1929ebd00ee6a0429ea30c4ee940e57dd443f43b) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReactTextView.java` nullsafe ([021491bf51](https://github.com/facebook/react-native/commit/021491bf51c7cc086aa5800e5548863bb14ad723) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReactTextShadowNode.java` nullsafe ([3857aa8baf](https://github.com/facebook/react-native/commit/3857aa8bafb0e440a7a6590641b6c71284fa44d4) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReactTextAnchorViewManager.java` nullsafe ([e04b5b3ecf](https://github.com/facebook/react-native/commit/e04b5b3ecf2d692d9a0f95db298ecb2a67a61eef) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReactBAseTeextShadowNode.java` nullsafe ([dbb5a23cad](https://github.com/facebook/react-native/commit/dbb5a23cadd5cfa0c0ad4dafaa17ee4992662b05) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ViewManagerRegistry.java` nullsafe ([af516266db](https://github.com/facebook/react-native/commit/af516266dbfbf72fb9954864931951bac702f4c8) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `TouchTargetHelper.java` nullsafe ([02fc3bd58c](https://github.com/facebook/react-native/commit/02fc3bd58c3da3e09150180fd9f8b04192b45bfd) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ThemedReactContext.java` nullsafe ([552338ce9f](https://github.com/facebook/react-native/commit/552338ce9ffb32500fb30c227953d5e426fc3f7f) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `JSPointerDispatcher.java` nullsafe ([c025bf6c72](https://github.com/facebook/react-native/commit/c025bf6c72c4d17247e11acc121f04710411b303) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `PromiseImpl.java` nullsafe ([4c8ea858a5](https://github.com/facebook/react-native/commit/4c8ea858a53a68af688c5a5755f4104c674fee0e) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `NativeModuleRegistry.java` nullsafe ([8aaccef2ee](https://github.com/facebook/react-native/commit/8aaccef2ee2d67756ce54f5819f0c3d8eab1fbf6) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ModuleHolder.java` nullsafe ([d97aba5cd7](https://github.com/facebook/react-native/commit/d97aba5cd72a7b42a279a1ef4e8eb450d9f68cd5) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `JsonWriterHelper.java` nullsafe ([30da6ca84a](https://github.com/facebook/react-native/commit/30da6ca84a704d38c03a62da43597ce769a8bf3a) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `DynamicFromObject.java` nullsafe ([a0e3490ff5](https://github.com/facebook/react-native/commit/a0e3490ff5ca9f1db6fadff1e4e1bfa666fc3a50) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `DynamicFromMap.java` nullsafe ([dcb2dbb2c3](https://github.com/facebook/react-native/commit/dcb2dbb2c383c27f3e5ba83adcd40f2e77e0009c) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `DynamicFromArray.java` nullsafe ([3665046c14](https://github.com/facebook/react-native/commit/3665046c140ecebb12f4f136fe3ca5386f20bffb) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `BaseJavaModule.java` nullsafe ([77ea9fd1f8](https://github.com/facebook/react-native/commit/77ea9fd1f844f6b6fe6eba2ed1ac61dd8317b3e4) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `Arguments.java` nullsafe ([c8f01ffc3e](https://github.com/facebook/react-native/commit/c8f01ffc3ea2271e166ea6b8fecf53aa950b4c42) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `FabricUIManager.java` nullsafe ([ea2fbd453f](https://github.com/facebook/react-native/commit/ea2fbd453f319279d91f6770c14d11165223b68d) by [@javache](https://github.com/javache))
- Made `NetworkingModule.java` nullsafe ([9b30cdd008](https://github.com/facebook/react-native/commit/9b30cdd00881f52c6437d00048670041f5758b5d) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `BlobModule.java` nullsafe ([c80ac8fcf2](https://github.com/facebook/react-native/commit/c80ac8fcf224d3f815b5182d2fb7164865cd6913) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `TurboModuleManager.java` nullsafe ([419b68f38a](https://github.com/facebook/react-native/commit/419b68f38aa31d1d7d2de939a47516143adaafdf) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `TurboModuleInteropUtils.java` nullsafe ([90184d20e1](https://github.com/facebook/react-native/commit/90184d20e1e5c128c532bd4a1f15bb3074bcd83a) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `Task.java` nullsafe ([eba9ebe0a9](https://github.com/facebook/react-native/commit/eba9ebe0a9145adb718b0ef522ad490b67593bac) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReconnectingWebSocket.java` nullsafe ([ff6601bfb7](https://github.com/facebook/react-native/commit/ff6601bfb78600e3ded170d4ee214a43175d0fc5) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `DialogModule.java` nullsafe ([4e7d09ceff](https://github.com/facebook/react-native/commit/4e7d09ceff35757ffe29368701806d91c7c75fd1) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `FileReaderModule.java` nullsafe ([8f5aaf13b2](https://github.com/facebook/react-native/commit/8f5aaf13b2f67f84d8e189b175d9a830a5ab446c) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `BlobProvider.java` nullsafe ([020db409a2](https://github.com/facebook/react-native/commit/020db409a2c05a99748523db2f3df08051bcc3af) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `MountingManager.java` nullsafe ([7aaf0cb3f1](https://github.com/facebook/react-native/commit/7aaf0cb3f1428bfd78b4a399b2ef235eee40f3c0) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `MountItemDispatcher.java` nullsafe ([e957bdb8fa](https://github.com/facebook/react-native/commit/e957bdb8fa8940ab405405098df1878037dd1314) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `DevSupportManagerBase.java` nullsafe ([adbcaef1e1](https://github.com/facebook/react-native/commit/adbcaef1e1632eff29570cce878b65594096a694) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `BundleDownloader.java` nullsafe ([61d4b04159](https://github.com/facebook/react-native/commit/61d4b041593bd94a318fc71f8691711ff9d15af5) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `DebugOverlayController.java` nullsafe ([e9e4c2adaf](https://github.com/facebook/react-native/commit/e9e4c2adaf0cf9e20734bfc54685b228d45b5d66) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `CxxInspectorPackagerConnection.java` nullsafe ([fd23a08a3a](https://github.com/facebook/react-native/commit/fd23a08a3a34cbfb4ff8d7215acde323cb4c943a) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `DevServerHelper.java` nullsafe ([311cef3c0d](https://github.com/facebook/react-native/commit/311cef3c0df8f112e4bfae4663ba9dd04e465d5e) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `JSDebuggerWebsocketClient.java` nullsafe ([3289569747](https://github.com/facebook/react-native/commit/3289569747f59aa3bf997758ccd2cd4d3451c8fa) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `MultipartStreamReader.java` nullsafe ([b40b1e679e](https://github.com/facebook/react-native/commit/b40b1e679e3a2622b5aeff940106888c41ffbdd9) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `StackTraceHelper.java` nullsafe ([14de1c1cba](https://github.com/facebook/react-native/commit/14de1c1cba7f49ff66c15eb80e422cbddf2c476d) by [@GijsWeterings](https://github.com/GijsWeterings))
#### iOS specific
- Skip codegen for selectively disabled libraries in react-native.config.js ([be8595b18a](https://github.com/facebook/react-native/commit/be8595b18a46635bf679d8e7473f2960c33530fa) by [@ismarbesic](https://github.com/ismarbesic))
- Fixed adding child views to a native view using the interop layer ([d53a60dd23](https://github.com/facebook/react-native/commit/d53a60dd23c5df8afca058a867c50df8b61f62e2) by [@chrfalch](https://github.com/chrfalch))
- Fix codegen crawling all library code with `componentProvider` defined in config ([65aa819811](https://github.com/facebook/react-native/commit/65aa8198116e1d23175358f75c9b23774d3522b4) by [@kkafar](https://github.com/kkafar))
- Skip codegen for selectively disabled libraries in react-native.config.js ([7681036537](https://github.com/facebook/react-native/commit/7681036537d8759673881843a9a8f6f5a1ae93e0) by [@aattola](https://github.com/aattola))
- Fix codegen extracting `.class` from complex component classes ([f2b19608cc](https://github.com/facebook/react-native/commit/f2b19608cca36c118786b4e3d22bf2468fced86d) by [@gabrieldonadel](https://github.com/gabrieldonadel))
- Ignore `build/` and `DerivedData/` directories when reading `.plist` files. ([c783128f6e](https://github.com/facebook/react-native/commit/c783128f6e8541bb0b13c4f5c634e790ca854c23) by [@tjzel](https://github.com/tjzel))
- Remove deprecated ATOMIC_VAR_INIT macro in RCTProfile.m ([21bf7cf6cf](https://github.com/facebook/react-native/commit/21bf7cf6cf043de323c40edc001add4cd21256ce) by [@rmaz](https://github.com/rmaz))
- Fix disappearing redbox on initial load of an invalid bundle. ([4cc9db1cd5](https://github.com/facebook/react-native/commit/4cc9db1cd501b019e90bb540ce836e2a2c2bf2ff) by [@aleqsio](https://github.com/aleqsio))
- Properly check for debug schemes when building hermes from source ([bef5cc1007](https://github.com/facebook/react-native/commit/bef5cc100771c3b8bc5dffa565b7c24fef3eb34d) by [@WoLewicki](https://github.com/WoLewicki))
- Put back the `folly_compiler_flag` function to make libraries install pods ([3b17cdb643](https://github.com/facebook/react-native/commit/3b17cdb6435dcb975685672be0d29d2f73bf368f) by [@cipolleschi](https://github.com/cipolleschi))
- Make fmt and SocketRocket Swift friendly ([3f41fe2948](https://github.com/facebook/react-native/commit/3f41fe29488bbcf4fba620b18cace90de737c197) by [@cipolleschi](https://github.com/cipolleschi))
- Fix "on" and "off" announcements on `Switch` ([db6e000023](https://github.com/facebook/react-native/commit/db6e0000234530979594abf81c6bd0521b561068) by [@joevilches](https://github.com/joevilches))
- Fix TextInput `onContentSizeChange` event being dispatched only once on iOS on the new architecture ([5fd5188172](https://github.com/facebook/react-native/commit/5fd51881727b2d86f87abf04db032940ac0ec8c4) by [@j-piasecki](https://github.com/j-piasecki))
- Fix bug: unstable_hasComponent(*) = true for unregistered components for n > 1th call. ([fa9d082747](https://github.com/facebook/react-native/commit/fa9d082747cf286a112b869e763afff6df6ec9d4) by [@RSNara](https://github.com/RSNara))
- Generate `ReactCodegen.podspec` only for apps. ([18a7c8d57c](https://github.com/facebook/react-native/commit/18a7c8d57c5843267756fd9d2137964370dc5780) by [@cipolleschi](https://github.com/cipolleschi))
- Box shadows on iOS are faster ([52173ab701](https://github.com/facebook/react-native/commit/52173ab701094dcc84399cdf8a8769f5242de27d) by [@joevilches](https://github.com/joevilches))
- Allow links that encorporate entire <Text> to be keyboard accessible ([83fae860df](https://github.com/facebook/react-native/commit/83fae860df8d1ac2d89b3cddf8c595b2cc88a74f) by [@joevilches](https://github.com/joevilches))
- Avoid build failure on Catalyst (`x86_64`) ([0f534293af](https://github.com/facebook/react-native/commit/0f534293afe9981e463dae97f7ccb4c7abf0589c) by [@cipolleschi](https://github.com/cipolleschi))
- `ParagraphState` is correctly deallocated when recycling Text ([a5a71f115f](https://github.com/facebook/react-native/commit/a5a71f115ff9fb8156968451f11874a3c3096a4f) by [@javache](https://github.com/javache))
- Fixed accessible prop no-opts on Image components ([e3f7c8f456](https://github.com/facebook/react-native/commit/e3f7c8f45617d682c5934d4eeee8a7ada4689ce5) by [@jorge-cab](https://github.com/jorge-cab))
- Avoid race condition crash in `RCTDataRequestHandler` invalidate ([44810f7498](https://github.com/facebook/react-native/commit/44810f749841b8340cc06fecbf861c6390751c29) by [@zhongwuzw](https://github.com/zhongwuzw))
- Correctly announce "link" on nested text if its the entire text element ([bffb414291](https://github.com/facebook/react-native/commit/bffb414291cfbd3d6e3e51448dd68b7bddddf658) by [@joevilches](https://github.com/joevilches))
- Fix animated images missing from offscreen render ([d1a090b0af](https://github.com/facebook/react-native/commit/d1a090b0afe94ed5d5f55cf0b6f0ecc044ac332e) by [@NickGerleman](https://github.com/NickGerleman))
- Selection range not respected when changing text or selection when selection is forced ([d32ea66e6a](https://github.com/facebook/react-native/commit/d32ea66e6a945dd84092532401b265b12d482668) by Olivier Bouillet)
- Check .pnpm folder when looking for third-party components. ([91d034533e](https://github.com/facebook/react-native/commit/91d034533e9f52232b351bb88b2ae7b48704e68f) by [@kirill3333](https://github.com/kirill3333))
- Fixed touch events not being dispatched to ScrollView's children when they overflow the content container ([6ecd9a43f1](https://github.com/facebook/react-native/commit/6ecd9a43f16e76771e2f970972bcd067aa570cf7) by [@j-piasecki](https://github.com/j-piasecki))
- Corrected the path from `"$(PODS_ROOT)/fas_float/include"` to `"$(PODS_ROOT)/fast_float/include"` in the `HEADER_SEARCH_PATHS` configuration. ([01881017d3](https://github.com/facebook/react-native/commit/01881017d3d446355945779547215408309e6a36) by [@DorianMazur](https://github.com/DorianMazur))
- Fix Recycling of Animated Images ([1a9adfba16](https://github.com/facebook/react-native/commit/1a9adfba162151a3e8c2e7a5248e6b17e2eef195) by [@NickGerleman](https://github.com/NickGerleman))
- Fix bug: unstable_hasComponent(*) = true for unregistered components for n > 1th call. ([f4d99d6a23](https://github.com/facebook/react-native/commit/f4d99d6a23a08c2ef2c2fff78dc966961608683b) by [@RSNara](https://github.com/RSNara))
- RCTDeviceInfo: fix crash due to failure to get AccessibilityManager ([ac23323da1](https://github.com/facebook/react-native/commit/ac23323da1bda2ce271797aa58dd74ffb0a5992f) by Adam Ernst)
## v0.79.4
### Fixed
- **Codegen:** Backports fix: exclusion of selectively disabled libraries from codegen generation ([3acfe01382](https://github.com/facebook/react-native/commit/3acfe01382e67b16386bb04f7730abc479fec1cc) by [@cipolleschi](https://github.com/cipolleschi))
- **Flow:** Publish top-level Flow types for `react-native` ([50667eceb1](https://github.com/facebook/react-native/commit/50667eceb1be4771375d6a3cc2f4e42d4d8aad3a) by [@aswinandro](https://github.com/aswinandro))
- **Runtime:** Disabling `updateRuntimeShadowNodeReferencesOnCommit` by default. ([2cd074d77a](https://github.com/facebook/react-native/commit/2cd074d77a706f4fe4396ffdf87408f781e935a4) by [@lenaic](https://github.com/lenaic))
#### Android specific
- **TextInput:** Fix broken focus behavior for TextInput in older Android versions (< 9) ([0ebaaed281](https://github.com/facebook/react-native/commit/0ebaaed281fcfa01b20a17a461c1d0b489a7f0a2) by [@joevilches](https://github.com/joevilches))
#### iOS specific
- **Dimensions:** Fix Dimensions not changing when orientation changes ([235ac2cca0](https://github.com/facebook/react-native/commit/235ac2cca0b173934d329f3a797f136a219d315f) by [@riteshshukla04](https://github.com/riteshshukla04))
## v0.79.3
### Fixed
- **Runtime:** Align timer IDs and timer function argument error handling with web standards. ([480a4642e5](https://github.com/facebook/react-native/commit/480a4642e5a644becf1c477d3d239f9b57efff3a) by [@kitten](https://github.com/kitten))
- **Typescript:** Reference `global.d.ts` using path not types so they can be resolved by TSC ([af21f260a1](https://github.com/facebook/react-native/commit/af21f260a1cee460d11fc9c292aaa9f602cbd5a4) by [@krystofwoldrich](https://github.com/krystofwoldrich))
#### Android specific
- **Runtime:** Fixes issue with z-indexed sibling removal ([34ae9facd5](https://github.com/facebook/react-native/commit/34ae9facd52b5da28b5ced22110532bbcdad2cec) by [@rozele](https://github.com/rozele))
- **Style:** Wrong borderBottomEndRadius on RTL ([68d6ada448](https://github.com/facebook/react-native/commit/68d6ada44893701b6006a6b1753131c7e880a30a) by [@riteshshukla04](https://github.com/riteshshukla04))
#### iOS specific
- **Cocoapods:** enable DEFINES_MODULE in React-jsc ([c8fcac2765](https://github.com/facebook/react-native/commit/c8fcac2765e0f79f0e7bb3a422a65698aec62536) by [@cipolleschi](https://github.com/cipolleschi))
- **Codegen:** Allow the .pnpm folder to be discovered during code generation ([ed7b4d86ab2b77b4cba6c2105e35047ac68c93e1](https://github.com/facebook/react-native/commit/ed7b4d86ab2b77b4cba6c2105e35047ac68c93e1) by [@kirill3333](https://github.com/kirill3333))
- **Codegen:** Exclude selectively disabled libraries from codegen generation ([e5c089669a](https://github.com/facebook/react-native/commit/e5c089669a82bd2075c1657d0291aa32a6b61966) by [@cipolleschi](https://github.com/cipolleschi))
- **Interop Layer:** Fixed adding child views to a native view using the interop layer ([d53a60dd23](https://github.com/facebook/react-native/commit/d53a60dd23c5df8afca058a867c50df8b61f62e2) by [@chrfalch](https://github.com/chrfalch))
- **RedBox:** Fix disappearing redbox on initial load of an invalid bundle. ([4cc9db1cd5](https://github.com/facebook/react-native/commit/4cc9db1cd501b019e90bb540ce836e2a2c2bf2ff) by [@aleqsio](https://github.com/aleqsio))
- **Switch:** Fixes Switch component incorrectly renders as toggled on even though value prop is hardcoded to false ([8d42fc40bc](https://github.com/facebook/react-native/commit/8d42fc40bc1b31efa7913198e23f39ac46532dc7) by [@zhongwuzw](https://github.com/zhongwuzw))
## v0.79.2
### Added
- **Runtime:** Add useShadowNodeStateOnClone and updateRuntimeShadowNodeReferencesOnCommit ([22a4e060d5](https://github.com/facebook/react-native/commit/22a4e060d5cf6b31d940f39f6e4776c14192d240) by [@lenaic](https://github.com/lenaic))
### Fixed
- **Blob:** Make sure that URLs are parsed following the node specs ([6d8a02a666](https://github.com/facebook/react-native/commit/6d8a02a66606bd0a3931626aff0e76f7c3b31caa) by [@cipolleschi](https://github.com/cipolleschi))
- **Codegen:** Fix codegen ImageSource require ([4d7c4bd6e8](https://github.com/facebook/react-native/commit/4d7c4bd6e8bf79f069970ca4f54ae3f4c92b80e0) by [@jakex7](https://github.com/jakex7))
## v0.79.1
### Changed
#### Android specific
- **DevSupport:** Change `defaultJSExceptionHandler`'s type to `JSExceptionHandler` on the `ReleaseDevSupportManager` ([9eb75d4bd5](https://github.com/facebook/react-native/commit/9eb75d4bd553bdc166118110d095b98bef811d4e) by [@alanjhughes](https://github.com/alanjhughes))
#### iOS specific
- **TextInput:** Typing into TextInput now will not cause the caret position to update to the beginning when a zero-length selection is set. ([7771317e5c](https://github.com/facebook/react-native/commit/7771317e5cf49bda65275ea1149160a45c607803) by [@ouchuan](https://github.com/ouchuan))
### Fixed
#### Android specific
- **Codegen:** Do not generate Apple specific file for Android ([b2bacc4a9f](https://github.com/facebook/react-native/commit/b2bacc4a9f3b97a4f59126a229477d3c952b3f44) by [@cipolleschi](https://github.com/cipolleschi))
#### iOS specific
- **Codegen:** Do not generate ReactCodegen.podspec for libraries ([f3c280442d](https://github.com/facebook/react-native/commit/f3c280442dc49e13b24baa2348f6b8c802045178) by [@cipolleschi](https://github.com/cipolleschi))
## v0.79.0
### Added
- **Codegen:** Allow UnsafeMixed as Array value in codegen ([abd7259de4](https://github.com/facebook/react-native/commit/abd7259de4c11f2615788e8bb258b0459c57eeed) by [@javache](https://github.com/javache))
- **DevX:** Add inspector proxy events for debugger heartbeat (sampled) and abandoned connections ([84f3cf95ea](https://github.com/facebook/react-native/commit/84f3cf95ea9ad17ba5c0014ea35d0b8e98af56fe) by [@vzaidman](https://github.com/vzaidman))
- **DevX:** Add inspector proxy info logs in regards to CDP connection to device and DevTools ([29419ce8f0](https://github.com/facebook/react-native/commit/29419ce8f095e3d763adb5073140b115fecb66e2) by [@vzaidman](https://github.com/vzaidman))
- **Flow:** Added explicit type for _lastNativeRefreshing and changed React import syntax in RefreshControl ([a24f9ef825](https://github.com/facebook/react-native/commit/a24f9ef825a0291b7fec20d9ab190c67c94f3260) by [@coado](https://github.com/coado))
- **Flow:** Added explicit type for _memoizedRenderer and changed React and View import in FlatList ([b634fa1edb](https://github.com/facebook/react-native/commit/b634fa1edb56bd01724d24dee4b0243c68ddc4d2) by [@coado](https://github.com/coado))
- **Flow:** Added explicit type for argument in _captureRef in SectionList ([e31ff4212b](https://github.com/facebook/react-native/commit/e31ff4212b62e4b7dc3ed746d790645e893fbd11) by [@coado](https://github.com/coado))
- **Flow:** Added explicit type for Symbol.iterator in URLSearchParams ([89af3e804f](https://github.com/facebook/react-native/commit/89af3e804f2da3874bc1c20ff1e3ba892efe3ea3) by [@coado](https://github.com/coado))
- **Flow:** Added explicit type to supported commands in TextInputNativeCommands ([1126bbb149](https://github.com/facebook/react-native/commit/1126bbb1493dbea04addfdcc809ace01aecab604) by [@coado](https://github.com/coado))
- **Flow:** Added type for exported object in AssetRegistry ([44d84f2af6](https://github.com/facebook/react-native/commit/44d84f2af60392684d0ff4b4e65ae797fad5b456) by [@coado](https://github.com/coado))
- **Flow:** Added types in TouchHistoryMath ([b9df812b67](https://github.com/facebook/react-native/commit/b9df812b67a22d459e85511962ac507a80f67f29) by [@coado](https://github.com/coado))
- **Infra:** Open Sourcing React Native's Compatibility Check ([60e3921f9c](https://github.com/facebook/react-native/commit/60e3921f9cf0a91edd54c269f3157d81d0d4467a) by [@elicwhite](https://github.com/elicwhite))
- **Layout:** Linear gradient color transition hint syntax and `px` unit support. ([cc89ddd50b](https://github.com/facebook/react-native/commit/cc89ddd50bed869013082ad98eb0555a386cf7c9) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
- **Layout:** Support stylistic sets for fontVariant ([c09b71b990](https://github.com/facebook/react-native/commit/c09b71b99038bacfbc2a1dca521a9220afa3dcb4) by [@LeviWilliams](https://github.com/LeviWilliams))
- **LogBox:** Add full owner stack support to React Native ([967ef32154](https://github.com/facebook/react-native/commit/967ef321548321c184432221e38c2f0394d4e264) by [@rickhanlonii](https://github.com/rickhanlonii))
- **LogBox:** Add owner stack code frames to LogBox ([0affa544c3](https://github.com/facebook/react-native/commit/0affa544c334aa6804cc787324decac45ba82cce) by [@rickhanlonii](https://github.com/rickhanlonii))
- **Metro:** Add opt in for legacy Metro log streaming via `--client-logs` flag ([0d66c524cf](https://github.com/facebook/react-native/commit/0d66c524cfdf4f3abd742b3b8bc6b39f24f7c214) by [@huntie](https://github.com/huntie))
- **TextInput:** Adds the escape key to the key press event handler payload. ([e566c1ec06](https://github.com/facebook/react-native/commit/e566c1ec067188f36f36d7ffd087e7ac06c69617) by [@sbuggay](https://github.com/sbuggay))
#### Android specific
- **Docs:** Improve ToastAndroid jsdocs ([299a7a959d](https://github.com/facebook/react-native/commit/299a7a959d34cda9900acb7318aabf7262acc23e) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Gradle:** Add support for Gradle Configuration caching ([e41887e62f](https://github.com/facebook/react-native/commit/e41887e62fcaf5a8d6bfc2817f88298b49d1b7a5) by [@cortinico](https://github.com/cortinico))
- **Initialization:** On `DefaultNewArchitectureEntryPoint` class add property to specify the desired release level for an application ([19c18eb995](https://github.com/facebook/react-native/commit/19c18eb9957f711ab63a9e3a334972389162bde8) by [@jorge-cab](https://github.com/jorge-cab))
- **Initialization:** Set ReactSurface and ReactRootView to ReactDelegate when created via ReactNavigationActivityDelegate ([a302fbcaaf](https://github.com/facebook/react-native/commit/a302fbcaaf69c8f019a212f7b9b839fa1ddd6b2f) by Maddie Lord)
#### iOS specific
- **Initialization:** Encapsulate device info listeners ([7dc85d0e97](https://github.com/facebook/react-native/commit/7dc85d0e9765e7f633285843506b8832ff13db9f) by [@okwasniewski](https://github.com/okwasniewski))
- **JSC:** Inform users about JSC being moved to a different repo ([13177b3025](https://github.com/facebook/react-native/commit/13177b3025d06c93fb2634a19e0033b8ac4f67a7) by [@okwasniewski](https://github.com/okwasniewski))
- **JSC:** Js runtime C API for Swift ([a6607c07cd](https://github.com/facebook/react-native/commit/a6607c07cda6bb24c12b41761598b84ce8e028cd) by [@okwasniewski](https://github.com/okwasniewski))
- **Runtime:** Added custom load js block in bridge mode ([1e9ac296a5](https://github.com/facebook/react-native/commit/1e9ac296a59f3698ca656ef0161e93ba9dc941c8) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Runtime:** Missing nonnull annotations for RCTArchConfiguratorProtocol, RCTUIConfiguratorProtocol.h ([0141a44026](https://github.com/facebook/react-native/commit/0141a44026a62074d1288963d243a55216c2e4d7) by [@okwasniewski](https://github.com/okwasniewski))
- **TextInput:** Add support for `numberOfLines` prop on `TextInput` ([dcaa33e6d9](https://github.com/facebook/react-native/commit/dcaa33e6d9d59b7d32bbdc14a91b297b6d68cee1) by [@j-piasecki](https://github.com/j-piasecki))
### Breaking
- **APIs:** Deep imports to modules inside React Native libraries with `require` syntax will now require to append an explicit `.default`. Here the list of affected modules:
- `Libraries/Alert` and `Libraries/ActionSheetIOS` ([c89c5d7e3d](https://github.com/facebook/react-native/commit/c89c5d7e3d981e5e11ae926bdd83567cbe61201a) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/BatchedBridge` and `Libraries/AppState` ([135277ace1](https://github.com/facebook/react-native/commit/135277ace118b1fbc11e222624f871221d1a3b72) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Blob` ([9a70bc0418](https://github.com/facebook/react-native/commit/9a70bc041889d961c2c5ee3f58d6a135111bc0a4) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/BugReporting`, `Libraries/vendor`, `Libraries/Vibration` and `Libraries/YellowBox` ([09700327f7](https://github.com/facebook/react-native/commit/09700327f7294ed5242fb6af7804e124183ebc64) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Components` ([9eeef22a67](https://github.com/facebook/react-native/commit/9eeef22a67ff74ccc2d20647624bee26211a3ab5) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Components` ([aac312da8e](https://github.com/facebook/react-native/commit/aac312da8e23b865027e89a93ecb9cc89bfb9860) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Components` ([ce412746b1](https://github.com/facebook/react-native/commit/ce412746b1635dce3162eb798f59f604dd1bbb03) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Components` ([da695f3a20](https://github.com/facebook/react-native/commit/da695f3a2084f9742d2c75e1b6c5dfa0dba23580) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/DevMenu` ([ce84922236](https://github.com/facebook/react-native/commit/ce849222365a5990b0127fe62739cb2794b31568) by [@j-piasecki](https://github.com/j-piasecki))
- `Libraries/EventEmitter` and `Libraries/Image/*.js` ([8783196ee5](https://github.com/facebook/react-native/commit/8783196ee540f8f78ce60ad20800338cc7645194) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Interaction` ([bdc23fa2b4](https://github.com/facebook/react-native/commit/bdc23fa2b44401c0c6e66d8cf9a0df542ee2c871) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/LayoutAnimation` and `Libraries/Linking` ([4d6785bdb5](https://github.com/facebook/react-native/commit/4d6785bdb53a94d650364ef7b5821fab16c39ae3) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Lists` ([e767dc3458](https://github.com/facebook/react-native/commit/e767dc3458c6665e9f63cf0723f12c9beab6724a) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Modal` and `Libraries/Network` ([28945c68da](https://github.com/facebook/react-native/commit/28945c68da056ab2ac01de7e542a845b2bca6096) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/PermissionsAndroid` and `Libraries/PushNotificationIOS` ([e74246bd66](https://github.com/facebook/react-native/commit/e74246bd66fd434cefc8a5a0cc2b3ae7ea725816) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/ReactNative` ([c93bd436a5](https://github.com/facebook/react-native/commit/c93bd436a57c760461a269aced681854e5dd3f13) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/StyleSheet` ([4f20362b07](https://github.com/facebook/react-native/commit/4f20362b07c0b3daa14094a4b5d0dc41e2c956ca) by [@j-piasecki](https://github.com/j-piasecki))
- `Libraries/Text`, `Libraries/Share` and `Libraries/Settings` ([156ee5bee7](https://github.com/facebook/react-native/commit/156ee5bee7d2588399f2b8c19fa01ce40b8335d8) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Text`, `Libraries/Share` and `Libraries/Settings` ([1be7e1a95f](https://github.com/facebook/react-native/commit/1be7e1a95fed16c46767a7907ac864d5170ba540) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Utilities/BackHandler`, `Utilities/DevLoadingView.js` and `Utilities/HMRClient*.js` ([827a847791](https://github.com/facebook/react-native/commit/827a8477912f56e3d0d2b50007a4c06a6468a0bc) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Utilities/differ/...` ([2b30aa5cc8](https://github.com/facebook/react-native/commit/2b30aa5cc8fef42cf8bc110b8d48a201a3dc855a) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Utilities/Platform` ([d98116aa44](https://github.com/facebook/react-native/commit/d98116aa44e4b90ccb19fd895433918396b0b932) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Utilities` ([52ffda7e55](https://github.com/facebook/react-native/commit/52ffda7e55cf8330905d57869c0bb3b5793c0e58) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/WebSocket` ([7df73eebdc](https://github.com/facebook/react-native/commit/7df73eebdc9716819d59a27e4bc783cb853c9775) by [@iwoplaza](https://github.com/iwoplaza))
- `react-native/virtualized-lists` ([1cf4c84ba0](https://github.com/facebook/react-native/commit/1cf4c84ba0f6f630d55ba0bebde122d742c419e8) by [@j-piasecki](https://github.com/j-piasecki))
- `StyleSheet/` ([e4d969a4ab](https://github.com/facebook/react-native/commit/e4d969a4ab71693f38837271356361a3d9df8c5d) by [@iwoplaza](https://github.com/iwoplaza))
- `Utilities/binaryToBase64`, `Utilities/DevSettings`, `Utilities/PolyfillFunctions` and `Utilities/RCTLog` ([152587cda0](https://github.com/facebook/react-native/commit/152587cda06ec3bb2274ec0182114c85c41507d3) by [@iwoplaza](https://github.com/iwoplaza))
- `Utilities/deepFreezeAndThrowOnMutationInDev`, `Utilities/defineLazyObjectProperty`, `Utilities/DeviceInfo` and `Utilities/FeatureDetection` ([028c0b36f6](https://github.com/facebook/react-native/commit/028c0b36f637b31d013bab88e0c834ea8174b4e1) by [@iwoplaza](https://github.com/iwoplaza))
- `Utilities/dismissKeyboard.js`, `Utilities/GlobalPerformanceLogger.js` and `Utilities/SceneTracker.js` ([fc6ca26d3f](https://github.com/facebook/react-native/commit/fc6ca26d3f97e5a839313803635b38eb468b10b9) by [@iwoplaza](https://github.com/iwoplaza))
- `Utilities/infoLog`, `Utilities/logError`, `Utilities/mapWithSeparator` and `Utilities/warnOnce` ([7aef81b984](https://github.com/facebook/react-native/commit/7aef81b9840074e85ef3a2e81d808009868cbbbf) by [@iwoplaza](https://github.com/iwoplaza))
([48d900b703](https://github.com/facebook/react-native/commit/48d900b703aa125f2bc6e7ab5a24de45572bc66b) by [@iwoplaza](https://github.com/iwoplaza))
- **APIs:**`Libraries/Core/ExceptionsManager` now exports a default `ExceptionsManager` object, and `SyntheticError` as a secondary export. ([e5818d92a8](https://github.com/facebook/react-native/commit/e5818d92a867dbfa5f60d176b847b1f2131cb6da) by [@iwoplaza](https://github.com/iwoplaza))
- **APIs:** Move `Libraries/Inspector/` modules to `src/private/` ([0bde08fe67](https://github.com/facebook/react-native/commit/0bde08fe67c57740118b2bda49fb1f6b427a118b) by [@huntie](https://github.com/huntie))
- **APIs:** Move `XHRInterceptor` API to `src/private/` ([389779c348](https://github.com/facebook/react-native/commit/389779c3482fac98f6ab9ad50ac194cabfe38a98) by [@huntie](https://github.com/huntie))
- **APIs:** Removed `Libraries/Animated/AnimatedWeb.js` file. ([ecae8a2908](https://github.com/facebook/react-native/commit/ecae8a29089130e0d30ef91c69077a17e9d2b67d) by [@iwoplaza](https://github.com/iwoplaza))
- **DevX:** Remove deprecated `unstable_enableLogBox` function. LogBox is enabled by default. ([7368265107](https://github.com/facebook/react-native/commit/7368265107ba31fbfc35bb481ab7fb5626bfe072) by [@huntie](https://github.com/huntie))
- **DevX:** Remove deprecated `YellowBox` and `console.ignoredYellowBox` APIs. Use `LogBox`. ([45a2d9c5a8](https://github.com/facebook/react-native/commit/45a2d9c5a80f93de907a73ee2d61518c4b528d9a) by [@huntie](https://github.com/huntie))
- **DevX:** Remove legacy Libraries/JSInspector modules ([9ba4dd81db](https://github.com/facebook/react-native/commit/9ba4dd81db08c401ef04fa60800585bf39c6dab3) by [@huntie](https://github.com/huntie))
- **DevX:** Remove some web debugging remnants ([9aae84a688](https://github.com/facebook/react-native/commit/9aae84a688b5af87faf4b68676b6357de26f797f) by [@NickGerleman](https://github.com/NickGerleman))
- **Libs:** Remove incorrect hwb() syntax support from normalize-color ([676359efd9](https://github.com/facebook/react-native/commit/676359efd9e478d69ad430cff213acc87b273580) by [@NickGerleman](https://github.com/NickGerleman))
- **StyleSheet:** Disallow invalid unitless lengths in box shadows ([8e2de303e3](https://github.com/facebook/react-native/commit/8e2de303e329e29728843dce4ff81177efca0a7a) by [@NickGerleman](https://github.com/NickGerleman))
- **StyleSheet:** Disallow invalid unitless lengths in filters ([b34e63539d](https://github.com/facebook/react-native/commit/b34e63539dc49b0b6586441f4df4d7d28fd47237) by [@NickGerleman](https://github.com/NickGerleman))
#### Android specific
- **APIs:** Make `ResponseUtil` internal ([360cbf7433](https://github.com/facebook/react-native/commit/360cbf7433f885522e2393802af5caf2b96d4595) by [@mateoguzmana](https://github.com/mateoguzmana))
- **APIs:** Removed `RuntimeConfig` class for Hermes which was unused. ([08ddc11269](https://github.com/facebook/react-native/commit/08ddc11269808da0adabb4139718d73310f2f2b7) by [@cortinico](https://github.com/cortinico))
- **APIs:** Reduce visibility of `FabricUIManager.setBinding()` method, unused outside of react native ([2a9a13d567](https://github.com/facebook/react-native/commit/2a9a13d567bb63dabcd698a2ad737ef3b5513a1f) by [@mdvacca](https://github.com/mdvacca))
- **APIs:** Remove `TLSSocketFactory` class ([e065411c91](https://github.com/facebook/react-native/commit/e065411c91f2592e172b1fa5e3c1348c04d513e6) by [@mateoguzmana](https://github.com/mateoguzmana))
- **API:**`RuntimeExecutor` and `RuntimeScheduler` constructors are now private, `MapBufferSoLoader` was removed as no longer required. ([6c8ace9b05](https://github.com/facebook/react-native/commit/6c8ace9b05898fd3bfd3673af1f99680d0c1ebb1) by [@javache](https://github.com/javache))
- **API:** Remove `DevSupportManagerFactory.launchJSDevtools` API ([514ec4192f](https://github.com/facebook/react-native/commit/514ec4192fbaa6922dac20a72c8902b921c5a97e) by [@huntie](https://github.com/huntie))
- **API:** Stable API - Make `AnimatedNodeWithUpdateableConfig` internal as it was not used in OSS ([54e0b69e7e](https://github.com/facebook/react-native/commit/54e0b69e7e325b667ef4b69eab0bfa123ce8e428) by [@cortinico](https://github.com/cortinico))
### Changed
- **Animated:** Introduced a feature flag to test an optimization in `Animated` to reduce memory usage. ([fb8a6a5bb0](https://github.com/facebook/react-native/commit/fb8a6a5bb08892d9d74c607ec99f4afc9c967b04) by [@yungsters](https://github.com/yungsters))
- **Animated:** The `AnimatedNode` graph will not occur during the insertion effect phase, which means animations can now be reliably started during layout effects. ([e0c0476553](https://github.com/facebook/react-native/commit/e0c0476553912a864b1bf19a98678432afa57659) by [@yungsters](https://github.com/yungsters))
- **Animated:** When an Animated component is updated or unmounted, `AnimatedNode` instances will now detach in a microtask instead of synchronously in the commit phase of React. This will cause the completion callback of finished animations to execute after the commit phase instead of during it. ([50b75a74d1](https://github.com/facebook/react-native/commit/50b75a74d1d8f8f0237d044f6bf72d49ca9e5cf4) by [@yungsters](https://github.com/yungsters))
- **Codegen:** Replace jscodeshift with @babel/core ([8f19201](https://github.com/facebook/react-native/commit/8f19201c5edd7fd18ab1ada8d4df2a8c31be8d4d) by [@kitten](https://github.com/kitten))
- **Deps:** Bump Node 18 -> 20 to build React Native in OSS ([1fd3806ee9](https://github.com/facebook/react-native/commit/1fd3806ee9a8d463da9a2c29c6a8597da53a61e8) by [@cortinico](https://github.com/cortinico))
- **Deps:** Upgrade React DevTools to 6.1.0. ([07860545f5](https://github.com/facebook/react-native/commit/07860545f5994b1e1f395bec60012433d9abf2fe) by [@hoxyq](https://github.com/hoxyq))
- **Deps:** Upgrade React DevTools to 6.1.1. ([5c88633035](https://github.com/facebook/react-native/commit/5c886330359c04b953521a08e31eacd5aa399a9b) by [@hoxyq](https://github.com/hoxyq))
- **DevX:**`Debugger.scriptParsed` now includes the field `sourceMapURL` as a (rewritten) remote url as opposed to base64 data url ([ff2e40371e](https://github.com/facebook/react-native/commit/ff2e40371ec13d2fef54098c5391ca20292c572f) by [@vzaidman](https://github.com/vzaidman))
- **DevX:** Removed a long-running loop causing the app to lag while attempting a connection to Metro ([9b977def6c](https://github.com/facebook/react-native/commit/9b977def6c228b3fdadc870ac0c34a422933560b) by [@EdmondChuiHW](https://github.com/Edmond
ChuiHW))
- **FeatureFlags:** Re-enable `enableFixForViewCommandRace` feature flag ([ae59702f8e](https://github.com/facebook/react-native/commit/ae59702f8ee89e7bddec971e0a041744cb91e65c) by [@okwasniewski](https://github.com/okwasniewski))
- **Flow:** Improved eventInitDict type in WebSocketEvent class ([fa2fac1372](https://github.com/facebook/react-native/commit/fa2fac137287781d5b582507251af0352e654cec) by [@coado](https://github.com/coado))
- **Flow:** Improved Props type in UnimplementedView ([b200c7cb2f](https://github.com/facebook/react-native/commit/b200c7cb2f714e162cfc1d45b59fca4a9253233a) by [@coado](https://github.com/coado))
- **Flow:** Improved types for exported Types and Properties in LayoutAnimation ([3c02738ec4](https://github.com/facebook/react-native/commit/3c02738ec4c36d8414493ef8f0016a809d849d33) by [@coado](https://github.com/coado))
- **Flow:** Improved types in AnimatedWeb ([647ca90a30](https://github.com/facebook/react-native/commit/647ca90a3007f4c8d1f93ee9c262022e04e76ff8) by [@coado](https://github.com/coado))
- **Flow:** Improved types in ScrollView ([1be2ba4597](https://github.com/facebook/react-native/commit/1be2ba4597fbe835ec461caa9dd838e4186b49eb) by [@coado](https://github.com/coado))
- **Flow:** Improved types in StatusBar by adding StackProps ([48cafc0b69](https://github.com/facebook/react-native/commit/48cafc0b6971f7e1ddf3b6b37a66fdf0b3f08a88) by [@coado](https://github.com/coado))
- **Flow:** Improved types in TextAncestor ([df9d43f02b](https://github.com/facebook/react-native/commit/df9d43f02b3605e40f068bf5ba424e978af17a8f) by [@coado](https://github.com/coado))
- **Flow:** Improved types in WebSockertInterceptor callbacks ([d2adb976ab](https://github.com/facebook/react-native/commit/d2adb976abebcb0f38750903d98fbb5a3f50924b) by [@coado](https://github.com/coado))
- **Flow:** Refactored `Libraries/Components/StaticRenderer` syntax ([0e6cb590ec](https://github.com/facebook/react-native/commit/0e6cb590eca4f31c466f82c278f1f38f6273ed62) by [@coado](https://github.com/coado))
- **Flow:** Replaced $FlowFixMe in CodegenTypes with Object type ([812c3b33cd](https://github.com/facebook/react-native/commit/812c3b33cde53b47bcc43f2dd70cc780da5a4ae0) by [@coado](https://github.com/coado))
- **Flow:** Replaced $FlowFixMe in InteractionManager to Function type ([cd7a30ce48](https://github.com/facebook/react-native/commit/cd7a30ce4842ed58775512d244b6a9ed18956d4d) by [@coado](https://github.com/coado))
- **Flow:** Replaced $FlowFixMe in NativeModules with any type ([286a360d9b](https://github.com/facebook/react-native/commit/286a360d9b13d37f43fde74b66318aa73a7bc1f7) by [@coado](https://github.com/coado))
- **Flow:** Replaced $FlowFixMe in RCTDeviceEventEmitter with any ([8df6cfa56b](https://github.com/facebook/react-native/commit/8df6cfa56be1a9b38fba30cc074f8147ebc05928) by [@coado](https://github.com/coado))
- **Flow:** Replaced $FlowFixMe with PressEvent in ScrollViewNativeComponentType ([8befab1760](https://github.com/facebook/react-native/commit/8befab17604c7758358bc834beb5f9c02026e9ac) by [@coado](https://github.com/coado))
- **Metro:** Update Metro to ^0.82.0 ([8421b8a872](https://github.com/facebook/react-native/commit/8421b8a8723633da9806e2db37a43add5de8761c) by [@robhogan](https://github.com/robhogan))
- **TypeScript:** Improve TypeScript types for `global` objects ([094c5be42e](https://github.com/facebook/react-native/commit/094c5be42eace6eb83fabc1f46336745c6879401) by [@coado](https://github.com/coado))
- **TypeScript:** Increase minimum typescript version in index.d.ts ([721f85adf7](https://github.com/facebook/react-native/commit/721f85adf7336cb07dafbfd98f9612f2e2b43268) by [@coado](https://github.com/coado))
- **TypeScript:** Move view flattening props to cross platform type interface ([ecad90ad8b](https://github.com/facebook/react-native/commit/ecad90ad8b68c623d028938cf84d1dbccc45e45f) by [@okwasniewski](https://github.com/okwasniewski))
#### Android specific
- **Deps:** Bump AGP to 8.8.2 ([2062defb2d](https://github.com/facebook/react-native/commit/2062defb2d9ce218056f072fb7f1b00375336bcf) by [@cortinico](https://github.com/cortinico))
- **Deps:** Gradle to 8.13 ([b95424d159](https://github.com/facebook/react-native/commit/b95424d1596a5b562b4fc5a0da38b7d9efab2f19) by [@cortinico](https://github.com/cortinico))
- **Deps:** Update androidx app compat to 1.7.0 ([b0fd9c1556](https://github.com/facebook/react-native/commit/b0fd9c155697ebc105cee99ce79b84ca43e491a5) by [@janicduplessis](https://github.com/janicduplessis))
- **Gradle:** Better compatibility with Kotlin 2.1.x ([a0528d834c](https://github.com/facebook/react-native/commit/a0528d834c644766a78cff8b092ca1c5447e20b5) by [@cortinico](https://github.com/cortinico))
- **Gradle:** Add option to disable bundle compression to improve startup time ([778382ad3d](https://github.com/facebook/react-native/commit/778382ad3d8f5ecc4535ed44b2cd508475a97beb) by [@mrousavy](https://github.com/mrousavy))
- **Initialization:** Allow passing custom JSRuntimeFactory to DefaultReactHost ([cdc166709d](https://github.com/facebook/react-native/commit/cdc166709d247dbcff6b390d1f51840c9f330a69) by [@Kudo](https://github.com/Kudo))
- **JSC:** Add a build time JSC lean core warning ([90e27c2b4f](https://github.com/facebook/react-native/commit/90e27c2b4f6c831922e61b370342ced328cb705d) by [@Kudo](https://github.com/Kudo))
- **JSC:** Exclude `jsctooling` when `useThirdPartyJSC` gradle property is true ([66032f22b8](https://github.com/facebook/react-native/commit/66032f22b8cab9fb7ad4c26d508e2d9bba3ae308) by [@Kudo](https://github.com/Kudo))
- **Runtime:** Feature flags for recycling View, Text components separately ([ca5ce205f7](https://github.com/facebook/react-native/commit/ca5ce205f71f1af9cd42d4677c2b5a8dee684abb) by Thomas Nardone)
- **Runtime:** Introduces BuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE to determine if the new architecture is fully enabled into an Android app ([b45a3e5cd8](https://github.com/facebook/react-native/commit/b45a3e5cd81997e11b763073daf0a7f5b78188f8) by [@mdvacca](https://github.com/mdvacca))
#### iOS specific
- **CocoaPods:** Fix Gemfile versions ([2527d29a96](https://github.com/facebook/react-native/commit/2527d29a96216fbaafd4f98fd7a931b9330e0570) by [@cipolleschi](https://github.com/cipolleschi))
- **CocoaPods:** Generate the ReactCodegen.podspec as part of codegen instead of as part of pod install. ([dab9b3b440](https://github.com/facebook/react-native/commit/dab9b3b44015acd1d2e462d3d0dc2597a99b16a9) by [@cipolleschi](https://github.com/cipolleschi))
- **Cocoapods:** Ignore deprecation warning when calling pod install through core-cli-utils ([4141560afc](https://github.com/facebook/react-native/commit/4141560afc06a38bc23cdcaa6a31e6f41e6e5408) by [@cipolleschi](https://github.com/cipolleschi))
- **CocoaPods:** Invoke Codegen as part of the Core-cli-utils package ([cc1e8d1523](https://github.com/facebook/react-native/commit/cc1e8d1523bee3880f0a038c550b8e2131d5a535) by [@cipolleschi](https://github.com/cipolleschi))
- **CocoaPods:** Stop running codegen when running pod install ([f15094ef88](https://github.com/facebook/react-native/commit/f15094ef880218a0517863e6cf7d11247be66bfb) by [@cipolleschi](https://github.com/cipolleschi))
- **JSC:** Decouple JSC when `USE_THIRD_PARTY_JSC=1` ([176bed79b4](https://github.com/facebook/react-native/commit/176bed79b4c69455f16527512feb87c67e6f89de) by [@Kudo](https://github.com/Kudo))
- **NativeModules:** Properly handle `null` values coming from NativeModules. ([d4236791e2](https://github.com/facebook/react-native/commit/d4236791e238a614d2fadf5c5659874d983ab029) by [@cipolleschi](https://github.com/cipolleschi))
- **Text:** Moved workaround for multiline text measurement with `maximumNumberOfLines` earlier in the pipeline ([167a1a30da](https://github.com/facebook/react-native/commit/167a1a30daab588982638dc878b434688653df47) by [@j-piasecki](https://github.com/j-piasecki))
### Deprecated
- **DevX:** Deprecated usage of `HERMES_ENABLE_DEBUGGER` build-time flag for enabling React Native debugger in favour of `REACT_NATIVE_DEBUGGER_ENABLED` and `REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY`. ([5fcb69e8b7](https://github.com/facebook/react-native/commit/5fcb69e8b7756434ee4bcd9e3d19cc3c719920c7) by [@hoxyq](https://github.com/hoxyq))
#### iOS specific
- **CocoaPods:** Deprecate calling `pod install` directly ([e3def00d7a](https://github.com/facebook/react-native/commit/e3def00d7a9567f5879a6cd0dfed161bc1aaa176) by [@cipolleschi](https://github.com/cipolleschi))
- **Initialization:** Deprecate RCTAppDelegate ([74de9526ab](https://github.com/facebook/react-native/commit/74de9526ab6c1fb1f627f340653cb78d898ca698) by [@okwasniewski](https://github.com/okwasniewski))
#### Android specific
- **Layout:**`ViewManagerPropertyUpdater.updateProps` is deprecated, use the related ViewManager APIs instead ([a18bc58645](https://github.com/facebook/react-native/commit/a18bc5864508e9073fa3190d786a68761fb45073) by [@javache](https://github.com/javache))
- **Layout:** Deprecated ViewManagerDelegate#setProperty and ViewManagerDelegate#receiveCommand ([5a290c4cab](https://github.com/facebook/react-native/commit/5a290c4cab6f58744a9252687feefd8b6a8d3305) by [@javache](https://github.com/javache))
### Fixed
- **C++:** Add default case to `displayModeToInt()` function ([8c06f57860](https://github.com/facebook/react-native/commit/8c06f57860278cd4ff4a03bf182d22a27fcd0779) by [@Yajur-Grover](https://github.com/Yajur-Grover))
- **C++:** Add explicit casts for pointerIds for PointerEvents in NativeDOM ([94ea10c693](https://github.com/facebook/react-native/commit/94ea10c6939f915251520b49aeb131917364c078) by [@jonthysell](https://github.com/jonthysell))
- **Codegen:** Fix codegen to avoid the creation of `<appName>,` folders ([9498b71438](https://github.com/facebook/react-native/commit/9498b714381d060109fa6a9673db264bc6659f64) by [@cipolleschi](https://github.com/cipolleschi))
- **DevX:** Always patch React DevTools first so StrictMode dim chars are excluded from logs/logbox. ([e015d1b19a](https://github.com/facebook/react-native/commit/e015d1b19a2d6894badbe5525c7e53f2c2e21742) by [@rickhanlonii](https://github.com/rickhanlonii))
- **DevX:** Disconnections of DevTools when the network is under significant strain. ([b0974135bf](https://github.com/facebook/react-native/commit/b0974135bf1c0946d4a85bdc1fd423ff7dc612c5) by [@vzaidman](https://github.com/vzaidman))
- **DevX:** FindNodeAtPoint now considers overflow area of the parent node ([d8bc7c68c0](https://github.com/facebook/react-native/commit/d8bc7c68c0a6ea2dee73edc3270dbdcb3b132af9) by [@hoxyq](https://github.com/hoxyq))
- **JS:** Fix `react-native-community/cli-platform-*` packages not being found in monorepos ([7926d656b3](https://github.com/facebook/react-native/commit/7926d656b30667a026a5bc85da61696e915893bf) by [@tido64](https://github.com/tido64))
- **JS:** Fix `react-native-community/cli` not being found in pnpm setups ([a672a4d007](https://github.com/facebook/react-native/commit/a672a4d0073a282ba9de1ca24a563833530f0d60) by [@tido64](https://github.com/tido64))
- **JS:** Fix registering of `start` and `bundle` commands with community CLI and isolated node_modules. ([cdaa1aa9aa](https://github.com/facebook/react-native/commit/cdaa1aa9aa330bc6c58d902a89f515d30288698f) by [@robhogan](https://github.com/robhogan))
#### Android specific
- **Codegen:** Improve input files for codegen gradle task ([e9e0d8c2f7](https://github.com/facebook/react-native/commit/e9e0d8c2f79e4077445c28e459ba0e5981da478b) by [@janicduplessis](https://github.com/janicduplessis))
- **Image:** Fix Image defaultSource runtime error ([1c51b77868](https://github.com/facebook/react-native/commit/1c51b7786860fe364a115f7a4ed29228157f0f5c) by [@mateoguzmana](https://github.com/mateoguzmana))
- **JS:** GetAndroidResourceFolderName() should return raw folder for svg file ([3a4798cc30](https://github.com/facebook/react-native/commit/3a4798cc30a53ba5ca428845d56fbeca43ef4524) by [@sunnylqm](https://github.com/sunnylqm))
- **Layout:** Elevation prop on android has incorrect border-radius ([f7d78f81cc](https://github.com/facebook/react-native/commit/f7d78f81cc971be2dcf5476c790556df4220b2bc) by [@jorge-cab](https://github.com/jorge-cab))
- **Layout:** Fix inset boxShadow when blur < spread ([a3b29e1441](https://github.com/facebook/react-native/commit/a3b29e1441f86fab624f21d977681f39f9acf549) by [@joevilches](https://github.com/joevilches))
- **Layout:** Fix issue where boxShadow crashes with small blur radius ([103f8b3885](https://github.com/facebook/react-native/commit/103f8b38856cad04e93d5b404024c28adbf52cee) by [@joevilches](https://github.com/joevilches))
- **Layout:** Fixed anti-aliasing not showing on older Android versions ([6c6e0a9085](https://github.com/facebook/react-native/commit/6c6e0a90855ac070742ce1923204115cbf2528f8) by [@jorge-cab](https://github.com/jorge-cab))
- **Layout:** Make `setLayoutAnimationEnabledExperimental` a no-op in Bridgeless ([44da5d2ee0](https://github.com/facebook/react-native/commit/44da5d2ee07d06a0e11b626e2641e255f0ffde9f) by [@arushikesarwani94](https://github.com/arushikesarwani94))
- **Libs:** Fix react-native/popup-menu-android not building for 3rd party developers ([e96396bd18](https://github.com/facebook/react-native/commit/e96396bd184471ff8d7a69b4775d851076231b47) by [@cortinico](https://github.com/cortinico))
- **Modal:** Fixed crash with Modal when trying to call syncSystemBarsVisibility() ([141fb23bba](https://github.com/facebook/react-native/commit/141fb23bba7120e515902f7bdebd87297d7aca92) by [@alanleedev](https://github.com/alanleedev))
- **Modal:** Sync Modal system bars visibility with current activity ([7016225062](https://github.com/facebook/react-native/commit/701622506248022c3a2fcea1c0066bba6e80232a) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Runtime:** Marked acquireWakeLockNow as static ([2a58201322](https://github.com/facebook/react-native/commit/2a582013228d7b729141c781ac98034f8a70578b) by [@mstrokin](https://github.com/mstrokin))
- **Runtime:** Make DefaultReactNativeHost.clear() also invalidate DefaultReactHost ([07769d4d7e](https://github.com/facebook/react-native/commit/07769d4d7eb1d3000210c7a8dafd9a5411694444) by [@WoLewicki](https://github.com/WoLewicki))
- **Runtime:** Pass the bundle URL protocol when setting up HMR client on Android ([ba894c908a](https://github.com/facebook/react-native/commit/ba894c908a02a84596525872b6232accc1acfaea) by [@byCedric](https://github.com/byCedric))
- **ScrollView:** Scroll view throttle no longer impacts events other than `onScroll` ([bc810e5115](https://github.com/facebook/react-native/commit/bc810e5115256e4fb5330b21c3a5d9ee3dd9a00c) by [@Abbondanzo](https://github.com/Abbondanzo))
- **Text:** Allow text links to be navigable via keyboard by default ([98b0991128](https://github.com/facebook/react-native/commit/98b0991128c902bbe273f519ac79ac0676cef1c0) by [@joevilches](https://github.com/joevilches))
- **Text:** Fix text link accessibility on state update removal ([c9e6567881](https://github.com/facebook/react-native/commit/c9e6567881b2a596677b1b14d1c1d2537fec507d) by [@joevilches](https://github.com/joevilches))
- **TextInput:** Avoid `ConcurrentModificationException` when iterating over `mListeners``TextWatcher` array ([243aecc095](https://github.com/facebook/react-native/commit/243aecc095c20f8295fdefa8fc3e3ac8a7691043) by [@kirillzyusko](https://github.com/kirillzyusko))
- **TextInput:** TextInputs can now receive focus via external keyboard ([3420eb87b0](https://github.com/facebook/react-native/commit/3420eb87b01f42092c1691a1f6544f20d244cc60) by [@joevilches](https://github.com/joevilches))
#### iOS specific
- **C++:** Update deprecated enums in RCTTextPrimitivesConversions.h ([4121d24454](https://github.com/facebook/react-native/commit/4121d24454433ab007b664076ee00a951494fb4d) by [@joannaquu](https://github.com/joannaquu))
- **CocoaPods:**`JSRuntimeFactoryCAPI.h` build error for `use_frameworks` build ([7786805337](https://github.com/facebook/react-native/commit/7786805337526fa6e8ed758407b78884a37b89ef) by [@Kudo](https://github.com/Kudo))
- **CocoaPods:** Make sure 3p libraries depends on React-renderercss to work with use_frameworks ([cc12caa0a9](https://github.com/facebook/react-native/commit/cc12caa0a9dcb08d11fe18c9b34290352ca1909e) by [@cipolleschi](https://github.com/cipolleschi))
- **CocoaPods:** Compatibility with Ruby 3.4.0 ([b1735bc593](https://github.com/facebook/react-native/commit/b1735bc5936ebe352b4ab27604a3ae85980121f1) by [@okwasniewski](https://github.com/okwasniewski))
- **CocoaPods:** Fix wrong cocoapods script on new_architecture.rb ([541e655832](https://github.com/facebook/react-native/commit/541e655832acaed7836c23326cfc62fd0ba5521f) by [@CHOIMINSEOK](https://github.com/CHOIMINSEOK))
- **Codegen:** Enable use of multiple `RCTAppDependencyProvider` instances ([0cc1ac18cf](https://github.com/facebook/react-native/commit/0cc1ac18cf7f2a99500ef6f315c4dccda7736ea0) by [@vonovak](https://github.com/vonovak))
- **DeviceInfo:** Data race related to read/write of RCTDeviceInfo._invalidated. ([2a18d83521](https://github.com/facebook/react-native/commit/2a18d83521b30642a7e403fd55a5afd4ef2d8cb4) by [@hakonk](https://github.com/hakonk))
- **DevX:** Issue where performance monitor would be hidden under newly presented views. ([e7556e921c](https://github.com/facebook/react-native/commit/e7556e921c07692012a4295dd7d84fe23f5838a5) by [@chrsmys](https://github.com/chrsmys))
- **DevX:** Remove private symbols for non-simulator and non-catalyst builds. ([9350d6f2f5](https://github.com/facebook/react-native/commit/9350d6f2f5473cddc6ea4c13602c9f80c9c40916) by [@EvanBacon](https://github.com/EvanBacon))
- **Infra:** Workaround for a iOS build app running on Apple Silicon Mac(in Xcode Destination: "Mac(Designed for iPad)") TextInput crash due to serialization attempt of WeakEventEmitter ([0511e2e49a](https://github.com/facebook/react-native/commit/0511e2e49a51ab32aa6f40df7c6b3dde92b09031) by [@iwater](https://github.com/iwater))
- **Initialization** Make React Native work without AppDelegate window property ([ae7bbe06c9](https://github.com/facebook/react-native/commit/ae7bbe06c9a4e47e1aa6cfa5cca7f6aa5a8ff83b) by [@okwasniewski](https://github.com/okwasniewski))
- **JSC:** Return nullptr when USE_THIRD_PARTY_JSC is set to true ([515ff1e626](https://github.com/facebook/react-native/commit/515ff1e626110116f272428d1d182eedcff2deab) by [@okwasniewski](https://github.com/okwasniewski))
- **Layout:** Fix cases where background color, filter, and background image were sized incorrectly if there was a scaling transform ([acaf94dc21](https://github.com/facebook/react-native/commit/acaf94dc214867633a50b113d9925335a0d59099) by [@joevilches](https://github.com/joevilches))
- **Layout:** Fix cases where background color, filter, and background image were sized incorrectly if there was a scaling transform ([f835b824f4](https://github.com/facebook/react-native/commit/f835b824f43ae54ee6d4e4b72101638bbd5f365d) by [@joevilches](https://github.com/joevilches))
- **Layout:** Improve detached keyboard detection, support Stage Manager on iOS ([c499ae1192](https://github.com/facebook/react-native/commit/c499ae1192ec178e4d20f8ed4ae03ff3e077bf65) by [@mhoran](https://github.com/mhoran))
- **Layout:** Layout direction changes are now honored on bundle reload. ([36f29beac4](https://github.com/facebook/react-native/commit/36f29beac47259768612bf56e5d9acfa4b94ab1a) by [@chrsmys](https://github.com/chrsmys))
- **Layout:** Suppressed iOS 13 deprecation warnings in RCTStatusBarManager ([fffd6d75b4](https://github.com/facebook/react-native/commit/fffd6d75b48ae1f6c78dbc0f7e9b6fe509df3394) by Ingrid Wang)
- **Native Module:** Add guard for custom module provider lookup in TMManager ([d0a101fbea](https://github.com/facebook/react-native/commit/d0a101fbeaec0bdace3a680078e0acc8635b5c3e) by [@shwanton](https://github.com/shwanton))
- **PullToRefresh:** Fix new arch recycled RefreshControl was missing its title ([e3d607fc2e](https://github.com/facebook/react-native/commit/e3d607fc2ea18c7ad9474d72cf18b1328d6647f7) by [@High5Apps](https://github.com/High5Apps))
- **Runtime:** Convert to JSException only NSException from sync methods ([9805a4f](https://github.com/facebook/react-native/commit/9805a4f89a8b23b5aa7201ed1013e5da5932e084) by [@cipolleschi](https://github.com/cipolleschi))
- **Runtime:** Handle null params in the Interop TM layer ([6314925](https://github.com/facebook/react-native/commit/63149256c0e19ecbd008d1bf8f0ff1e79bb63cf2) by [@cipolleschi](https://github.com/cipolleschi))
- **Runtime:** Call RCTInitializeUIKitProxies before bridge create ([a51fa6c002](https://github.com/facebook/react-native/commit/a51fa6c0028a5bc9afb89656f1aeb41847b7fe8e) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Runtime:** Fixed: extraModulesForBridge callback not called when New Architecture enabled ([c0a5c2c3cb](https://github.com/facebook/react-native/commit/c0a5c2c3cb883dc68e98d2720b194df17d0b9ee7) by Bruno Aybar)
- **Runtime:** Enable back the opt-out from the New Architecture ([9abdd619da](https://github.com/facebook/react-native/commit/9abdd619da110dbe227c387179a449623395c7b2) by [@cipolleschi](https://github.com/cipolleschi))
- **Runtime:** Add missing loadFromSource method in the DefaultRNFactoryDelegate ([7739615e0d](https://github.com/facebook/react-native/commit/7739615e0d614a93f297b70ef0947dddf3d1ba6e) by [@cipolleschi](https://github.com/cipolleschi))
- **Runtime:** App crash caused by the `[RCTFileRequestHanlder invalidate]` method ([789ed7d5ad](https://github.com/facebook/react-native/commit/789ed7d5ad75ad4c20ecd1eb19d1fc18275fc500) by [@zhouzh1](https://github.com/zhouzh1))
- **Runtime:** Bridge: Fixes HostTarget use after free when deallocated bridge ([3e2e8ec757](https://github.com/facebook/react-native/commit/3e2e8ec7579fa72af09f016753c167952dffaf43) by [@zhongwuzw](https://github.com/zhongwuzw))
- **TextInput:** Fixes TextInput crashes when any text is entered while running as iOS app on apple silicon mac ([8d7aca30e7](https://github.com/facebook/react-native/commit/8d7aca30e7fb50c9c069931a7ed67d8d4a745a2a) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Text:** Fixed onPress for Text with nested View. ([6b2c40c64f](https://github.com/facebook/react-native/commit/6b2c40c64f8278785d7e37f908918e0344ba278f) by [@coado](https://github.com/coado))
- **TextInput:** Fix selection makes TextInput clear its content when using children ([e3b176a598](https://github.com/facebook/react-native/commit/e3b176a598bd47338b52522f05893f781e3a7744) by Olivier Bouillet)
- **TextInput:** Fixed TextInput's `onContentSizeChange` event being dispatched multiple times with the same size ([2bb65717b7](https://github.com/facebook/react-native/commit/2bb65717b7b86d19e4d35707003df7d5be31c2fb) by [@j-piasecki](https://github.com/j-piasecki))
- **TextInput:** Implement `dataDetectorTypes` in the same way as the old architecture ([2ae45ec3ce](https://github.com/facebook/react-native/commit/2ae45ec3ce50cb9d95782173f6dfca74e8110848) by [@VidocqH](https://github.com/VidocqH))
### Removed
- **C++:** Removed `RawProps::operator=` ([e4d1cf8ce9](https://github.com/facebook/react-native/commit/e4d1cf8ce994d39ed67a660888cbeef2fba83b36) by [@javache](https://github.com/javache))
- **JS**: Removed context from addEventListener arguments in Linking ([1536a7f196](https://github.com/facebook/react-native/commit/1536a7f1960f21e56d2e4730a5ca8524b49530df) by [@coado](https://github.com/coado))
#### iOS specific
- **JSC:** Clean up RCTBridgeDelegate to remove shouldBridgeUseCustomJSC method ([c8f1506f13](https://github.com/facebook/react-native/commit/c8f1506f13310ffafe370273805684e696d72d50) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Layout:** Remove no longer needed UISceneDelegate ([a033cf9d5e](https://github.com/facebook/react-native/commit/a033cf9d5e8ffbda8b6f86cf3ce152b4ccb73187) by [@okwasniewski](https://github.com/okwasniewski))
## v0.78.2
### Changed
- **Deps:** Metro minimum to 0.81.3, fix "_interopRequireDefault is not a function" ([23c9dbc563](https://github.com/facebook/react-native/commit/23c9dbc563637a6b8c22c1b9d86fa03b65bde520) by [@robhogan](https://github.com/robhogan))
### Fixed
#### Android specific
- **Runtime:** Fixes issue with z-indexed sibling removal ([34ae9facd5](https://github.com/facebook/react-native/commit/34ae9facd52b5da28b5ced22110532bbcdad2cec) by [@rozele](https://github.com/rozele))
#### iOS specific
- **RCTNetworking:** app crash caused by the `[RCTFileRequestHanlder invalidate]` method ([5861f7eea7](https://github.com/facebook/react-native/commit/5861f7eea79767f14a06719937cbdabed39be9c9) by [@zhouzh1](https://github.com/zhouzh1))
- **Runtime:** Implement the `loadSourceForBridge:onProgress:onComplete` in the `RCTDefaultReactNativeFactoryDelegate`. ([8b33668c43](https://github.com/facebook/react-native/commit/8b33668c4338d31c27e6bd90b2a0e6fc0a077588) by [@cipolleschi](https://github.com/cipolleschi))
- **Text:** Fix selection makes TextInput clear its content when using children ([301532b51fe33cd08152c7dde2b15d57105332dd](https://github.com/facebook/react-native/commit/301532b51fe33cd08152c7dde2b15d57105332dd) by [freeboub](https://github.com/freeboub))
- **TurboModules:** Make sure the TM infra does not crash on NSException when triggered by async method ([ae1841ac964](https://github.com/facebook/react-native/commit/ae1841ac9645c10d66aeef784579b94fa0169e03) by [@cipolleschi](https://github.com/cipolleschi))
## v0.78.1
### Fixed
- **Deps:** community-cli-plugin: resolve cli-server-api via peer dependency on cli ([9ffbeadf8a](https://github.com/facebook/react-native/commit/9ffbeadf8a1ecfef1c0ac08bc39157ac6e17796e) by [@robhogan](https://github.com/robhogan))
- **DevTools:** Fix disconnections of DevTools when the network is under significant strain ([9e47ed9a20](https://github.com/facebook/react-native/commit/9e47ed9a205184abf1d7eb422fb22ef27f18cae5) by [@vzaidman](https://github.com/vzaidman))
- **style:** Fix elevation with border-radius set (#48982) ([68dc582305](https://github.com/facebook/react-native/commit/68dc582305e2568245380ddca2ceaee3b5ec752f) by [@polovi](https://github.com/polovi))
#### iOS specific
- **Initialization:** Call `extraModulesForBridge` callback in the New Architecture. ([97adbd897f](https://github.com/facebook/react-native/commit/97adbd897f88d108f0be21a5895dadc74189b6fc) by [@Bruno125](https://github.com/Bruno125))
- **Initialization:** Added custom load js block in bridge mode ([bdc83cb129](https://github.com/facebook/react-native/commit/bdc83cb129757d6adc373c11535d78055727e3fa) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Interop Layer:** Properly pass `nil` for nullable parameters instead of `NSNull` for legacy modules ([619d5dfbb2](https://github.com/facebook/react-native/commit/619d5dfbb280892fcc2a9f78d630eb88fb32960f) by [@cipolleschi](https://github.com/cipolleschi))
- **TextInput:** Fixes TextInput crashes when any text is entered while running as iOS app on apple silicon mac ([282cdc9fb4](https://github.com/facebook/react-native/commit/282cdc9fb4a1ceac17b63584f9988d3192235885) by [@zhongwuzw](https://github.com/zhongwuzw))
## v0.78.0
### Breaking
@@ -141,6 +812,30 @@
- **Style:** Fixed `centerContent` losing taps and causing jitter ([fe7e97a2fd](https://github.com/facebook/react-native/commit/fe7e97a2fd272db0d9d9aa7d0561337a7c8e2c30) by [@gaearon](https://github.com/gaearon))
- **Xcode:** Properly escape paths in Xcode build script used when bundling an app. ([2fee13094b](https://github.com/facebook/react-native/commit/2fee13094b3d384c071978776fd8b7cff0b6530f) by [@kraenhansen](https://github.com/kraenhansen))
## v0.77.2
### Added
#### iOS specific
- **Codegen:** Add the `source` parameter to generate-codegen-artifacts to avoid generating files not needed by libraries. ([98b8f17811](https://github.com/facebook/react-native/commit/98b8f178110472e5fed97de80766c03b0b5e988c) by [@cipolleschi](https://github.com/cipolleschi))
### Fixed
- **DevTools:** Fix disconnections of DevTools when the network is under significant strain. ([b0974135bf](https://github.com/facebook/react-native/commit/b0974135bf1c0946d4a85bdc1fd423ff7dc612c5) by [@vzaidman](https://github.com/vzaidman))
- **CLI:** Fix registering of `start` and `bundle` commands with community CLI and isolated node_modules. ([1f002f9999](https://github.com/facebook/react-native/commit/1f002f9999fb2a225f8e2cb3844badc97313b45f) by [@robhogan](https://github.com/robhogan))
- **Metro:** Bump minimum Metro to 0.81.3, fix "_interopRequireDefault is not a function" with enablePackageExports ([b335436113](https://github.com/facebook/react-native/commit/b335436113aa11cc4f17eb696368e05708374c33) by [@robhogan](https://github.com/robhogan))
#### Android specific
- **Fabric:** Avoid NPE when touch event is triggered before SurfaceManager is initiated ([b8095f4692](https://github.com/facebook/react-native/commit/b8095f4692610c7f4631b851dc7d8dc9b149a277) by [@CHOIMINSEOK](https://github.com/CHOIMINSEOK))
- **Image:** Fix defaultSource runtime error ([1c51b77868](https://github.com/facebook/react-native/commit/1c51b7786860fe364a115f7a4ed29228157f0f5c) by [@fbp93](https://github.com/fbp93))
#### iOS specific
- **Interop Layer:** Properly pass `nil` for nullable parameters instead of `NSNull` for legacy modules ([619d5dfbb2](https://github.com/facebook/react-native/commit/619d5dfbb280892fcc2a9f78d630eb88fb32960f) by [@cipolleschi](https://github.com/cipolleschi))
- **TextInput:** Fix crashes when any text is entered while running as iOS app on apple silicon mac ([8d7aca30e7](https://github.com/facebook/react-native/commit/8d7aca30e7fb50c9c069931a7ed67d8d4a745a2a) by [@zhongwuzw](https://github.com/zhongwuzw))
## v0.77.1
### Fixed
@@ -516,6 +1211,46 @@ github.com/robhogan))
- **TextInput:** Workaround for Mac Catalyst TextInput crash due to serialization attempt of WeakEventEmitter ([e04738b7ec](https://github.com/facebook/react-native/commit/e04738b7ecec9e7da3aab49bb24a6336b9496b94) by [@rozele](https://github.com/rozele))
- **TextInput:** Fix `maxLength` not working in old arch ([4b3ef3b00c](https://github.com/facebook/react-native/commit/4b3ef3b00ce0026c0d1e1f2a5546fcec249255d8) by [@mateoguzmana](https://github.com/mateoguzmana))
## v0.76.9
### Changed
- **Deps:** Bump folly to 2024.10.18. This allow to use Xcode 16.3 with React Native ([73b41b5808](https://github.com/facebook/react-native/commit/73b41b5808e37d8d40d9c504ce5299ba2c315efd) by [@cipolleschi](https://github.com/cipolleschi))
- **Deps:** Bump fmt to 11.0.2. This allow to use Xcode 16.3 with React Native ([73b41b5808](https://github.com/facebook/react-native/commit/73b41b5808e37d8d40d9c504ce5299ba2c315efd) by [@cipolleschi](https://github.com/cipolleschi))
- **Deps:** Add dependency to fast_float v6.1.4, as it is required by folly. This allow to use Xcode 16.3 with React Native ([73b41b5808](https://github.com/facebook/react-native/commit/73b41b5808e37d8d40d9c504ce5299ba2c315efd) by [@cipolleschi](https://github.com/cipolleschi))
### Fixed
#### Android specific
- **Deps:** Move CMakeLists for fast_float to third-party folder ([71abbab169](https://github.com/facebook/react-native/commit/71abbab169960e7bd48f18ad72eafe042836ec7f) by [@cipolleschi](https://github.com/cipolleschi))
- **Deps:** Fix Folly CMakeLists ([21919be5ee](https://github.com/facebook/react-native/commit/21919be5ee646c0c6b6235298b66371d44cf153e) by [@cipolleschi](https://github.com/cipolleschi))
#### iOS specific
- **Runtime:** Fixed crash caused by the request operation canceling ([2bddb0012e](https://github.com/facebook/react-native/commit/2bddb0012e2e6b87d2c4ddb8ff788fc16f211f12) by [@zhouzh1](https://github.com/zhouzh1))
## v0.76.8
### Fixed
- **FormData:** Remove non compliant `filename*` attribute in a FormData `content-disposition` header ([9e846b4d11](https://github.com/facebook/react-native/commit/9e846b4d11a287977c05a77169d8775ab14474ca) by [@foyarash](https://github.com/foyarash))
- **DevX:** Disconnections of DevTools when the network is under significant strain. ([08c04147ba](https://github.com/facebook/react-native/commit/08c04147ba7664ad82dcb59184293bec8c0e728f) by [@vzaidman](https://github.com/vzaidman))
- **JS:** Fix `react-native-community/cli` not being found in pnpm setups ([9ba96ad79d6](https://github.com/facebook/react-native/commit/9ba96ad79d62a77dbf12b0012eaa4f61e4749ec0) by [@tido64](https://github.com/tido64))
- **JS:** Fix `react-native-community/cli-platform-*` packages not being found in monorepos ([ffe7bd1471](https://github.com/facebook/react-native/commit/ffe7bd147179d976b165f869cd8ae28d5de87286) by [@tido64](https://github.com/tido64))
#### Android specific
- **popup-menu-android:** Fix react-native/popup-menu-android not building for 3rd party developers ([ac637ff44](https://github.com/facebook/react-native/commit/ac637ff448e7d4f9bb4c16297fbd27ed94ab9803) by [@cortinico](https://github.com/cortinico))
- **DevTools:** Pass the bundle URL protocol when setting up HMR client on Android ([68055f2d8a](https://github.com/facebook/react-native/commit/68055f2d8a1f475a79651cdae81e6af1a32ddf6f) by [@byCedric](https://github.com/byCedric))
- **CLI:** Fix registering of `start` and `bundle` commands with community CLI and isolated node_modules. ([b9c4095e40](https://github.com/facebook/react-native/commit/b9c4095e40faed0f3ea06f1981b9a53c54a08291) by [@robhogan](https://github.com/robhogan))
#### iOS specific
- **layout:** Layout direction changes are now honored on bundle reload. ([23b888ff2d](https://github.com/facebook/react-native/commit/23b888ff2d5b877a88e3432e4a4af2836f0b8dca) by [@chrsmys](https://github.com/chrsmys))
- **TextInput:** Fixes TextInput crashes when any text is entered while running as iOS app on apple silicon mac ([e2b081e66f](https://github.com/facebook/react-native/commit/e2b081e66f277948fcb8bc546c8184c8eaff4d17) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Runtime:** Convert to JSException only NSException from sync methods ([8eec35f134](https://github.com/facebook/react-native/commit/8eec35f134f353e99fa27935110cd33d4bd9c213) by [@cipolleschi](https://github.com/cipolleschi))
@@ -28,7 +28,7 @@ Examples of contributing to the release include being a [community releaser](htt
### Current partners:
* **[Coinbase](https://www.coinbase.com/):** Publishes [posts](https://blog.coinbase.com/tagged/react-native) advocating React Native usage. Supports `@react-native-community/datetimepicker` and other community modules to migrate to the new architecture. Supports releases in testing and feedback.
* **[Callstack](https://callstack.com/):** Maintains the [React Native CLI](https://github.com/react-native-community/react-native-cli) and [other community libraries](https://github.com/callstack), organizes [React Native EU](https://react-native.eu/) and hosts [The React Native Show podcast](https://www.callstack.com/podcast-react-native-show)
* **[Callstack](https://callstack.com/):** Maintains [React Native Community CLI](https://github.com/react-native-community/cli), develops [RNEF](https://rnef.dev), [Re.Pack](https://re-pack.dev) and [other community libraries](https://github.com/callstack). Hosts [React Universe Conf](https://www.reactuniverseconf.com/) and [React Universe On Air](https://www.callstack.com/podcast).
* **[Expo](https://expo.dev/):** Builds [Expo Go and SDK](https://github.com/expo/expo), [Snack](https://snack.expo.dev/), and [Expo Application Services](https://expo.dev/eas). Maintains [React Native Directory](https://reactnative.directory/), stewards [React Navigation](https://reactnavigation.org/) along with other partners.
* **[Infinite Red](https://infinite.red/):** Maintains the [ignite cli/boilerplate](https://github.com/infinitered/ignite), organizes [Chain React Conf](https://cr.infinite.red/), hosts the [React Native Radio podcast](https://reactnativeradio.com), publishes the [React Native Newsletter](https://reactnativenewsletter.com)
* **[Meta](https://opensource.fb.com/):** Oversees the React Native product and maintains the [React Native core repo](https://reactnative.dev/)
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.