Commit Graph
35704 Commits
Author SHA1 Message Date
Vitali ZaidmanandFacebook GitHub Bot 760af1499d dev-middleware: Remove redundant async queuing (#49982)
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
2025-03-24 07:35:03 -07:00
Jakub PiaseckiandFacebook GitHub Bot a4282a7cc3 Add pre-transform that replaces nullable types with undefined for object types (#50213)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50213

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D71730936

fbshipit-source-id: c126d461fda4ab9758a41421d8300dd92a5cd9af
2025-03-24 07:21:58 -07:00
Nicola CortiandFacebook GitHub Bot f760c11f65 Doing a round of yarn lint --fix (#50036)
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
2025-03-24 06:55:03 -07:00
Nicola CortiandFacebook GitHub Bot 4435d7b8dc Delete unnecessary DevSupportSoLoader (#50198)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50198

We don't really need another wrapper around SoLoader to decide when to load a library. SoLoader already does this for us. See:
https://github.com/facebook/SoLoader/blob/62c2028a07f146bbc56c0337dacf226fcd6f95ef/java/com/facebook/soloader/SoLoader.java#L1070-L1139

I'm removing this extra unnecessary class.

Changelog:
[Internal] [Changed] - Delete unnecessary DevSupportSoLoader

Reviewed By: huntie

Differential Revision: D71636985

fbshipit-source-id: b6df35b61d4e376503c158e921ca970ad77a6deb
2025-03-24 05:06:53 -07:00
Jakub PiaseckiandFacebook GitHub Bot ca4b82a629 Rename one of GestureResponderHandlers to make them unambiguous (#50136)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50136

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D71472943

fbshipit-source-id: 53d4a17098bafbfb7ded7b6f072b63b04e488d8c
2025-03-24 04:37:14 -07:00
Nick GerlemanandFacebook GitHub Bot d1a090b0af Fix animated images missing from offscreen render (#50187)
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
2025-03-21 13:27:50 -07:00
Riccardo CipolleschiandFacebook GitHub Bot dfde51e469 Convert to JSException only NSException from sync methods (#50193)
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
2025-03-21 10:08:12 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 7b500b8522 Add warning when a module tries to invoke a method using the interop layer (#50175)
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
2025-03-21 09:55:00 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 4d40882172 Add warning when RCT_EXPORT_MODULE is used in New Arch (#49897)
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
2025-03-21 09:55:00 -07:00
Mateo GuzmánandFacebook GitHub Bot 345403f042 Migrate ReactTextInputKeyPressEvent to Kotlin (#50184)
Summary:
Migrate com.facebook.react.views.textinput.ReactTextInputKeyPressEvent to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.textinput.ReactTextInputKeyPressEvent to Kotlin

Pull Request resolved: https://github.com/facebook/react-native/pull/50184

Test Plan:
```bash
yarn test-android
yarn android
```

Reviewed By: javache

Differential Revision: D71588770

Pulled By: arushikesarwani94

fbshipit-source-id: 53354d9cd8cc24b9ec6f84de689ea4b2839e49ce
2025-03-21 09:43:49 -07:00
Mateo GuzmánandFacebook GitHub Bot d9876d8dc9 Migrate ReactTextInputFocusEvent to Kotlin (#50185)
Summary:
Migrate com.facebook.react.views.textinput.ReactTextInputFocusEvent to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.textinput.ReactTextInputFocusEvent to Kotlin

Pull Request resolved: https://github.com/facebook/react-native/pull/50185

Test Plan:
```bash
yarn test-android
yarn android
```

Reviewed By: javache

Differential Revision: D71588274

Pulled By: arushikesarwani94

fbshipit-source-id: cbdabca31c5bfc6b2b5e4b6bf40dda4c591db1f2
2025-03-21 09:43:45 -07:00
Mateo GuzmánandFacebook GitHub Bot 7358fcf10f Migrate ReactTextInputLocalData to Kotlin (#50183)
Summary:
Migrate com.facebook.react.views.textinput.ReactTextInputLocalData to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.textinput.ReactTextInputLocalData to Kotlin

Pull Request resolved: https://github.com/facebook/react-native/pull/50183

Test Plan:
```bash
yarn test-android
yarn android
```

Reviewed By: javache

Differential Revision: D71589108

Pulled By: arushikesarwani94

fbshipit-source-id: e460518ffca43346f32ea0742ef656d72f5ed2d5
2025-03-21 09:40:39 -07:00
Mateo GuzmánandFacebook GitHub Bot a670c9aeb3 Migrate ReactTextInputSelectionEvent to Kotlin (#50182)
Summary:
Migrate com.facebook.react.views.textinput.ReactTextInputSelectionEvent to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.textinput.ReactTextInputSelectionEvent to Kotlin

Pull Request resolved: https://github.com/facebook/react-native/pull/50182

Test Plan:
```bash
yarn test-android
yarn android
```

Reviewed By: javache

Differential Revision: D71589613

Pulled By: arushikesarwani94

fbshipit-source-id: 5a93834b8e450e63629f409cd7711b7b0850e288
2025-03-21 09:39:55 -07:00
Rubén NorteandFacebook GitHub Bot c72d4c5ee9 Improve architecture diagram for feature flag system (#50194)
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
2025-03-21 07:49:49 -07:00
Riccardo CipolleschiandFacebook GitHub Bot cc12caa0a9 Add React-renderercss dependency for 3p libs (#50192)
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
2025-03-21 07:09:25 -07:00
Pieter De BaetsandFacebook GitHub Bot 08aeffa929 Cleanup lazyAnimationsCallback feature flag (#50191)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50191

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D71616196

fbshipit-source-id: 9ff7169d99211a34e55ede6f22f0e4ffdda39330
2025-03-21 06:08:08 -07:00
Mateo GuzmánandFacebook GitHub Bot 424dbf66dd Migrate ReactTextInputSubmitEditingEvent to Kotlin (#50181)
Summary:
Migrate com.facebook.react.views.textinput.ReactTextInputSubmitEditingEvent to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.textinput.ReactTextInputSubmitEditingEvent to Kotlin

Pull Request resolved: https://github.com/facebook/react-native/pull/50181

Test Plan:
```bash
yarn test-android
yarn android
```

Reviewed By: Abbondanzo

Differential Revision: D71589831

Pulled By: arushikesarwani94

fbshipit-source-id: bf4bb35f3de1934195f1c5a7c9ad7b1264c15bef
2025-03-21 01:42:44 -07:00
Alex HuntandFacebook GitHub Bot 094a22fa16 Split out CdpJson into separate library (#50170)
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
2025-03-20 20:07:37 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 3a8f51e02e Implement accessibleElements Focusing Order (#49824)
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
2025-03-20 18:19:16 -07:00
Mateo GuzmánandFacebook GitHub Bot ad0205a122 Migrate AbstractLayoutAnimation to Kotlin (#50145)
Summary:
Migrate com.facebook.react.uimanager.layoutanimation.AbstractLayoutAnimation to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.layoutanimation.AbstractLayoutAnimation to Kotlin

Pull Request resolved: https://github.com/facebook/react-native/pull/50145

Test Plan:
```bash
yarn test-android
yarn android
```

Reviewed By: alanleedev

Differential Revision: D71541347

Pulled By: javache

fbshipit-source-id: 5b53f9076a732afc68911f2ace7209f0fee46292
2025-03-20 17:00:55 -07:00
Ramanpreet NaraandFacebook GitHub Bot 45fa563d3a Remove RCTUnsafeExecuteOnMainQueueSync from sample modules (#50149)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50149

Let's just remove RCTUnsafeExecuteOnMainQueueSync from the examples.

That way, people don't copy-paste it, thinking it's okay to use.

Changelog: [Internal]

Reviewed By: lyahdav

Differential Revision: D71505823

fbshipit-source-id: f8d51b1a16bfdd6abdf62a6ba09ffff49d79a3f1
2025-03-20 16:25:15 -07:00
David VaccaandFacebook GitHub Bot 81dfaad871 Annotate ReactNativeFeatureFlags.setAccessorProvider as visibileForTesting (#50107)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50107

Annotate ReactNativeFeatureFlags.setAccessorProvider as visibileForTesting

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D71353954

fbshipit-source-id: 4f3256c209087ccb46020d5762ef0da332e648dc
2025-03-20 15:17:39 -07:00
David VaccaandFacebook GitHub Bot 0cb99cf6e3 Fix typos on ReactNativeFeatureFlags definitions (#50108)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50108

Fix typos on ReactNativeFeatureFlags definitions

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D71353956

fbshipit-source-id: 697c9ae5cf11e50a6a33be239952f7ef5af6f4a6
2025-03-20 15:17:39 -07:00
David VaccaandFacebook GitHub Bot 194ae45b80 Rename ReactNativeFeatureFlagsProviderHolder -> ReactNativeFeatureFlagsJavaProvider (#50080)
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
2025-03-20 15:17:39 -07:00
David VaccaandFacebook GitHub Bot 92c6ba6ed5 Fix typos on ReactNativeFeatureFlags system (#50079)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50079

Fix typos on ReactNativeFeatureFlags system

changelog: [internal] internal

Reviewed By: shwanton, NickGerleman

Differential Revision: D71331170

fbshipit-source-id: 25ffed7cf2d003fa9071723c975e69f464d62b79
2025-03-20 15:17:39 -07:00
Sam ZhouandFacebook GitHub Bot 4f14499013 Fix issues in react-native ahead of making React.ComponentType an alias of component(...Props) (#50180)
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
2025-03-20 15:05:28 -07:00
Zeya PengandFacebook GitHub Bot 1acd45950b TurboModuleWithJSIBindings (#50106)
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
2025-03-20 14:49:29 -07:00
David VaccaandFacebook GitHub Bot ceff2e8c37 Update JavaScriptContextHolder documentation to not mention CatlaystInstance (#50163)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50163

Update JavaScriptContextHolder documentation to not mention CatlaystInstance

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D71508657

fbshipit-source-id: 379be65c8a4afdfb0ed994fd1189b1285c246eec
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 06325d5411 Compile-out methods using Context.isBridgeless() (#50176)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50176

Compile-out methods using Context.isBridgeless()

changelog: [internal] internal

Reviewed By: arushikesarwani94

Differential Revision: D71079164

fbshipit-source-id: a610e2406d92e254bb5b11d692c0a5f5a6a0e4cb
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot ce9471051c Compile-out UIManagerModule from FpsDebugFrameCallback (#50158)
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
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 8d1278eb1a Assert if NativeModuleRegistry.onBatchComplete() is used in new architecture (#50164)
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
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 7dd6e25861 Compile-out UIManagerModule from ReactSafeAreaView (#50161)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50161

Compile-out UIManagerModule from ReactSafeAreaView

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D71050640

fbshipit-source-id: e6675064a0e34bb581b495b3a6412f42372d223d
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 6f5d6a5990 Remove UIManagerModule from NativeAnimatedModule (#50160)
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
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 204ca2ec95 Rename MaintainVisibleScrollPositionHelper.getUIManagerModule() -> MaintainVisibleScrollPositionHelper.getUIManager() (#50177)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50177

This diff renames MaintainVisibleScrollPositionHelper.getUIManagerModule() -> MaintainVisibleScrollPositionHelper.getUIManager() to move away from the UIManagerModule naming

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D71050639

fbshipit-source-id: 4d9aaf66af0f2a881146a83ec170344adc1bad7b
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 5e2eedc116 Remove UIManager dependency out of ReactInstance class (#50162)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50162

In this diff I'm removing UIManager dependency out of ReactInstance class

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D71003821

fbshipit-source-id: 8ee46619f5a598a03990d0677b47e8ec60902f10
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 4f8d215d8e Ensure UIManagerHelper does not access UIManagerModule (#50159)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50159

Ensure UIManagerHelper does not access UIManagerModule

changelog: [internal] internal

Reviewed By: cortinico, alanleedev

Differential Revision: D70742205

fbshipit-source-id: f7eabfb7d28b4debc667a9b0cfd55741b373380b
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 73b220f483 Compile-out UIManagerModule from ReactModalHostView (#50155)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50155

Compile-out UIManagerModule from ReactModalHostView

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D70742206

fbshipit-source-id: f2ce2b1d039dd09d482830cdb92fd9db84c604d4
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 4ca670e5ca Compile-out UIManagerModule from ReactHostImpl (#50156)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50156

Compile-out UIManagerModule from ReactHostImpl

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D70742208

fbshipit-source-id: ae915ee41681b9e4275ecc6c7cfd475f42a03333
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot a8668319ad Deprecate UIManagerType.DEFAULT and introduce UIManagerType.LEGACY (#50157)
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
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot a8c675d460 Compile out UIManagerModule from ReactTextView (#50154)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50154

Compile out UIManagerModule from ReactTextView

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D70738949

fbshipit-source-id: 1f15d1f305bbe1e8b933558acc96a59fcfff8ced
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 89eaf661f9 Remove UIManagerModule from comments (#50153)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50153

Remove UIManagerModule from comments

changelog: [internal] internal

Reviewed By: cortinico, alanleedev

Differential Revision: D70738950

fbshipit-source-id: 13286c1c451fcf4fd4b4c7693f755c33577d12bf
2025-03-20 13:08:29 -07:00
Nicola CortiandFacebook GitHub Bot 38a7ba7c2a Do not warn for JSC deprecation on react-native-github (#50172)
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
2025-03-20 10:48:12 -07:00
Vitali ZaidmanandFacebook GitHub Bot a6e5a9fc9d raise event when trying to open the debugger on opt builds (#50104)
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
2025-03-20 10:23:07 -07:00
Olivier BouilletandFacebook GitHub Bot d32ea66e6a fix(ios): selection range not respected when changing text or selection when selection is forced (#50166)
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
2025-03-20 09:53:11 -07:00
Maciej JastrzębskiandFacebook GitHub Bot ddbb5fda09 feat(iOS): allow eager initialization of RCTRootViewFactory (#49986)
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
2025-03-20 09:52:53 -07:00
Alex HuntandFacebook GitHub Bot a8745324c6 Scaffold NetworkReporter methods (#50131)
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
2025-03-20 06:46:13 -07:00
Eric RozellandFacebook GitHub Bot 12e5df844b Convert folly::dynamic event dispatch to r-value (#50133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50133

Allow move semantics for folly::dynamic event dispatching to avoid copying the folly::dynamic when dispatched.

## Changelog

[General][Breaking] - Dispatch folly::dynamic events with r-value instead of l-value

Reviewed By: NickGerleman

Differential Revision: D71423497

fbshipit-source-id: 5435772e14b025aab97d34df9983b91fd7285fd0
2025-03-20 04:57:36 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 146d809b6b Bump cache keys for Xcode which was restoring an old Pods folder (#50134)
Summary:
Bump the xcode keys to make sure that we use the newly created artifacts

## Changelog:
[Internal] - bump keys to use the right artifacts

Pull Request resolved: https://github.com/facebook/react-native/pull/50134

Test Plan: GHA - Verified that CI passes the critical point in https://github.com/facebook/react-native/actions/runs/13948665701/job/39044363180?pr=50134

Reviewed By: NickGerleman

Differential Revision: D71473229

Pulled By: cipolleschi

fbshipit-source-id: 09b097a6b0c576705585a5584481a2abe63ab034
2025-03-20 03:25:02 -07:00
Ramanpreet NaraandFacebook GitHub Bot 886319b4bc Make AppState use main queue setup (#50115)
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
2025-03-19 21:16:05 -07:00
Ramanpreet NaraandFacebook GitHub Bot b4775ebb39 Make StatusBarManager use main queue setup (#50113)
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
2025-03-19 21:16:05 -07:00