Commit Graph

38536 Commits

Author SHA1 Message Date
Dawid Małecki 5ba3aacaf7 Remove StrictAnimatedComponentType from createAnimatedComponent (#50240)
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
2025-03-26 01:22:32 -07:00
Vitali Zaidman 590426da14 don't strip IWebSocket or it's members in release builds
Summary:
Changelog:
[General][Internal]

Reviewed By: Abbondanzo

Differential Revision: D71815485

fbshipit-source-id: cba6d4907ccdd366b31edfb74ca1f6001f970739
2025-03-25 23:56:38 -07:00
Sam Zhou 171c6808b9 Align react-native jest definition with internal jest definition (#50272)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50272

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D71849789

fbshipit-source-id: 5b600c4371a21a28272538022234e2cc01e8d92b
2025-03-25 19:13:58 -07:00
Zeya Peng e7b3424cce Add feature flag useCxxNativeAnimated (#50038)
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
2025-03-25 18:51:52 -07:00
Sam Zhou a70fe45370 Shim $PropertyType in react-native for now (#50271)
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
2025-03-25 18:08:26 -07:00
Rubén Norte 7d8ac6639f Move ensureInstance and isUnreachable to tests utilities directory (#50260)
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
2025-03-25 17:09:18 -07:00
Rubén Norte 3331218b84 Fix several tests and grouping in Fantom-itest (#50258)
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
2025-03-25 17:09:18 -07:00
Rubén Norte b12ab7a3d4 Enforce that WeakRef.deref() is always called within the event loop (#50257)
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
2025-03-25 17:09:18 -07:00
Pieter De Baets d1c0f57073 Simplify event emitter layering (#50219)
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
2025-03-25 14:53:36 -07:00
Mateo Guzmán 175c969148 Migrate ReactRawTextShadowNode to Kotlin (#50234)
Summary:
Migrate com.facebook.react.views.text.ReactRawTextShadowNode to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.text.ReactRawTextShadowNode to Kotlin

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

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

Reviewed By: rshest

Differential Revision: D71803869

Pulled By: javache

fbshipit-source-id: dba9eea7aa8453b9372cbeb54a7f86b35fd30905
2025-03-25 14:46:06 -07:00
Sam Zhou cbd2ee55ef Eliminate $PropertyType and $ElementType in react-native (#50262)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50262

Prepare for their removal in Flow

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D71823860

fbshipit-source-id: e1e18424ae731cd323999316a7f3a5d42f4b5b91
2025-03-25 14:00:17 -07:00
Eric Rozell c920b7f54a Do not register RCTSurfacePresenterObserver for animatedShouldSignalBatch (#50247)
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
2025-03-25 13:19:36 -07:00
Joe Vilches bffb414291 Allow link role to be announced if its set on entire text in nested text (#50236)
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
2025-03-25 12:56:47 -07:00
generatedunixname89002005287564 0437c4071b Fix CQS signal. Id] 22447575 -- modernize-use-nullptr in xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/jni/react/jni (#50256)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50256

Reviewed By: dtolnay

Differential Revision: D71798310

fbshipit-source-id: 233822abac4288ab5871718671936bbbd6d571ff
2025-03-25 12:34:59 -07:00
Alex Hunt a0bc9a84d9 Use UIDevice systemName for inspector metadata (#50245)
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
2025-03-25 11:55:17 -07:00
Jakub Piasecki b2d88d33b7 Align SectionList types with OSS (#50074)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50074

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D71318882

fbshipit-source-id: ac26820bd4a9200c4156b703dce036535f677025
2025-03-25 11:03:54 -07:00
Jakub Piasecki e27c97bc56 Update StyleSheet and Platform exports (#50169)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50169

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D71548325

fbshipit-source-id: b0c6cc0dc3b15757f0630d7ef8398161a46c51a8
2025-03-25 10:28:13 -07:00
Dawid Małecki 3bb86b0ecf Change Animated re-export to generate correct namespace in TS (#50222)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50222

The flow-api-translator will generate

```ts
export * as default from './AnimatedExports';
```

in TS which preserves the namespace. Previous import, export translated to:

```ts
declare const $$EXPORT_DEFAULT_DECLARATION$$: typeof Animated;
declare type $$EXPORT_DEFAULT_DECLARATION$$ =
  typeof $$EXPORT_DEFAULT_DECLARATION$$;
export default $$EXPORT_DEFAULT_DECLARATION$$;
```

which dropped the `Animated` namespace.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D71737199

fbshipit-source-id: a46a7ddddd023fa831cd4bb50f17a0641f328066
2025-03-25 03:47:30 -07:00
Dawid Małecki 9c5cf4e9c4 Align AnimateProps to match TS types (#50214)
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
2025-03-25 03:47:30 -07:00
Dawid Małecki eb2d9c1ac0 Check for Builtin and Nullable types in WithAnimatedValue to align closer to TS types (#50195)
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
2025-03-25 03:47:30 -07:00
Pieter De Baets e104532357 Cleanup fixDifferentiatorEmittingUpdatesWithWrongParentTag (#50221)
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
2025-03-24 20:25:19 -07:00
Sam Zhou be7abbcf3f Minor fixes for jest libdef (#50235)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50235

- Remove duplicate definition for `toBeCalledWith` and `lastCalledWith`.
- Replace `typeof undefined` with `void`
- Make some Array types readonly where we can.

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D71762238

fbshipit-source-id: 5c20bd7e941a8c36084e291f23cd6caa27f07eb9
2025-03-24 15:32:25 -07:00
Sam Zhou 26ca802e84 Remove __REACT_DEVTOOLS_GLOBAL_HOOK__ from react-native libdef (#50223)
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
2025-03-24 12:31:58 -07:00
Yurii Nakonechnyi 2cb49eeaa3 LayoutData - added explicit default fields values initialization (#50227)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50227

Explicit defaults add 'strictness' and take the guesswork out of what's going on in places like this:

https://github.com/facebook/yoga/blob/6455a848a76f433bdb48b2640b7f4644774c76fd/yoga/algorithm/CalculateLayout.cpp#L2345

Changelog: [Internal]

X-link: https://github.com/facebook/yoga/pull/1802

Reviewed By: javache

Differential Revision: D71687310

Pulled By: NickGerleman

fbshipit-source-id: f11d18aa68ce7ccd17fb1d5af0e729e8c0711cf9
2025-03-24 12:23:46 -07:00
Pieter De Baets 7056d20984 Remove deprecated RCTModernEventEmitter.receiveTouches (#50216)
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
2025-03-24 11:55:13 -07:00
Phillip Pan 90fce6398f weakly hold key window for KVO frame listener (#50231)
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
2025-03-24 11:49:07 -07:00
Pieter De Baets 8f43ae9370 Add accessibilityOrder to base view config (#50218)
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
2025-03-24 11:47:34 -07:00
Mateo Guzmán 4a9e9a8e77 Migrate ReactTextInputBlurEvent to Kotlin (#50202)
Summary:
Migrate com.facebook.react.views.textinput.ReactTextInputBlurEvent to Kotlin.

## Changelog:

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

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

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

Reviewed By: javache

Differential Revision: D71681495

Pulled By: arushikesarwani94

fbshipit-source-id: 899687bd9dfcd861c49156fee82304ddc1d9ea82
2025-03-24 11:05:18 -07:00
Mateo Guzmán 7c7d64496d Migrate ReactContentSizeChangedEvent to Kotlin (#50204)
Summary:
Migrate com.facebook.react.views.textinput.ReactContentSizeChangedEvent to Kotlin.

## Changelog:

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

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

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

Reviewed By: javache

Differential Revision: D71681505

Pulled By: arushikesarwani94

fbshipit-source-id: f4d63251afc48652032e9beaf60073797f2bb246
2025-03-24 10:45:31 -07:00
Mateo Guzmán cd04aae1a3 Migrate ReactTextChangedEvent to Kotlin (#50203)
Summary:
Migrate com.facebook.react.views.textinput.ReactTextChangedEvent to Kotlin.

## Changelog:

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

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

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

Reviewed By: javache, Abbondanzo

Differential Revision: D71681502

Pulled By: arushikesarwani94

fbshipit-source-id: 9639740a41bbebf943bc716c495c3593461346a6
2025-03-24 10:37:59 -07:00
Mateo Guzmán e797b1659e Migrate ReactTextInputEndEditingEvent to Kotlin (#50201)
Summary:
Migrate com.facebook.react.views.textinput.ReactTextInputEndEditingEvent to Kotlin.

## Changelog:

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

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

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

Reviewed By: javache

Differential Revision: D71681473

Pulled By: arushikesarwani94

fbshipit-source-id: 4a1e3f3b56fa425e8e2bbcf8251eb05a572b329f
2025-03-24 10:35:21 -07:00
Fabrizio Cucci 795e573f00 Add changelog entry for v0.79.0-rc.3 (#50224)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50224

As per title.

Changelog: [Internal]

Reviewed By: cortinico, Abbondanzo

Differential Revision: D71740110

fbshipit-source-id: edf60f1413a5a33fadbb6716432126c4e905f356
2025-03-24 10:06:43 -07:00
Vitali Zaidman 71dec84d43 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

fbshipit-source-id: d17fb7d06a038b379fe45b4e1c742dbf8ff12f78
2025-03-24 08:43:50 -07:00
Jakub Piasecki 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 Corti 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 Corti 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 Piasecki 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 Gerleman 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 Cipolleschi 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 Cipolleschi 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 Cipolleschi 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án 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án 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án 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án 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 Norte 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 Cipolleschi 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 Baets 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án 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 Hunt 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