Commit Graph

12270 Commits

Author SHA1 Message Date
Mateo Guzmán 2edb928059 Make DrawerClosedEvent internal (#50689)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+NOT+user%3Acortinico+NOT+repo%3AMaxdev18%2Fpowersync_app+NOT+repo%3Acarter-0%2Finstagram-decompiled+NOT+repo%3Am0mosenpai%2Finstadamn+NOT+repo%3AA-Star100%2FA-Star100-AUG2-2024+NOT+repo%3Alclnrd%2Fdetox-scrollview-reproductible+NOT+repo%3ADionisisChytiris%2FWorldWiseTrivia_Main+NOT+repo%3Apast3l%2Fhi2+NOT+repo%3AoneDotpy%2FCaribouQuest+NOT+repo%3Abejayoharen%2Fdailytodo+NOT+repo%3Amolangning%2Freversing-discord+NOT+repo%3AScottPrzy%2Freact-native+NOT+repo%3Agabrieldonadel%2Freact-native-visionos+NOT+repo%3AGabriel2308%2FTestes-Soft+NOT+repo%3Adawnzs03%2FflakyBuild+NOT+repo%3Acga2351%2Fcode+NOT+repo%3Astreeg%2Ftcc+NOT+repo%3Asoftware-mansion-labs%2Freact-native-swiftui+NOT+repo%3Apkcsecurity%2Fdecompiled-lightbulb+com.facebook.react.views.drawer.events.DrawerClosedEvent).

## Changelog:

[INTERNAL] - Make com.facebook.react.views.drawer.events.DrawerClosedEvent internal

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

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

Reviewed By: rshest

Differential Revision: D72959868

Pulled By: cortinico

fbshipit-source-id: 6a9c1f408b821afb753b514d5d9e7cbd2079e8ea
2025-04-14 08:28:41 -07:00
Andrew Datsenko 152fa171ee move rncxx threading (#50702)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50702

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D72865847

fbshipit-source-id: 0477670ca1f99089aece9b21feb2482b56f43936
2025-04-14 07:55:19 -07:00
Nitin Shukla 30030c5a76 Migrate FrescoBasedReactTextInlineImageShadowNode.java to Kotlin (#50693)
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
2025-04-14 07:38:45 -07:00
Jakub Grzywacz 864833fca9 Generate keep.xml to prevent resource shrinking on Android (#50620)
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
2025-04-14 07:33:27 -07:00
Rubén Norte 748183ded0 ] Clean up feature flag to enable paint time reporting in Event Timing API (#50698)
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
2025-04-14 07:12:00 -07:00
Wang Chuan 7771317e5c fix(ios): avoid incorrectly updating caret position (#50680)
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
2025-04-14 05:42:24 -07:00
Rubén Norte db4b3df910 Use emojis in technical docs titles (#50699)
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
2025-04-14 05:41:02 -07:00
Nicola Corti ab47834eb1 Convert to Kotlin - ReactTextInputManager (#50656)
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
2025-04-14 05:25:39 -07:00
Jakub Piasecki 7269a2da79 Update React types usage in ImageProps (#50541)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50541

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72624527

fbshipit-source-id: ffdce30b010e2425bc805d800f70be5eaf2b3fed
2025-04-14 05:12:31 -07:00
Mateo Guzmán 1d7fd7ebcf Make I18nManagerModule internal (#50691)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+NOT+user%3Acortinico+NOT+repo%3AMaxdev18%2Fpowersync_app+NOT+repo%3Acarter-0%2Finstagram-decompiled+NOT+repo%3Am0mosenpai%2Finstadamn+NOT+repo%3AA-Star100%2FA-Star100-AUG2-2024+NOT+repo%3Alclnrd%2Fdetox-scrollview-reproductible+NOT+repo%3ADionisisChytiris%2FWorldWiseTrivia_Main+NOT+repo%3Apast3l%2Fhi2+NOT+repo%3AoneDotpy%2FCaribouQuest+NOT+repo%3Abejayoharen%2Fdailytodo+NOT+repo%3Amolangning%2Freversing-discord+NOT+repo%3AScottPrzy%2Freact-native+NOT+repo%3Agabrieldonadel%2Freact-native-visionos+NOT+repo%3AGabriel2308%2FTestes-Soft+NOT+repo%3Adawnzs03%2FflakyBuild+NOT+repo%3Acga2351%2Fcode+NOT+repo%3Astreeg%2Ftcc+NOT+repo%3Asoftware-mansion-labs%2Freact-native-swiftui+NOT+repo%3Apkcsecurity%2Fdecompiled-lightbulb+com.facebook.react.modules.i18nmanager.I18nManagerModule).

There is only one usage in [qunarcorp/imsdk-android](https://github.com/qunarcorp/imsdk-android), but the project has not been updated for 6 years so I'm not considering it breaking.

## Changelog:

[INTERNAL] - Make com.facebook.react.modules.i18nmanager.I18nManagerModule internal

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

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

Reviewed By: cortinico

Differential Revision: D72948034

Pulled By: rshest

fbshipit-source-id: 3ca653194d73125d5718bfce74abd1fc969eb050
2025-04-14 04:54:23 -07:00
Mateo Guzmán fef7fb954c Make ImageLoaderModule internal (#50688)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+NOT+user%3Acortinico+NOT+repo%3AMaxdev18%2Fpowersync_app+NOT+repo%3Acarter-0%2Finstagram-decompiled+NOT+repo%3Am0mosenpai%2Finstadamn+NOT+repo%3AA-Star100%2FA-Star100-AUG2-2024+NOT+repo%3Alclnrd%2Fdetox-scrollview-reproductible+NOT+repo%3ADionisisChytiris%2FWorldWiseTrivia_Main+NOT+repo%3Apast3l%2Fhi2+NOT+repo%3AoneDotpy%2FCaribouQuest+NOT+repo%3Abejayoharen%2Fdailytodo+NOT+repo%3Amolangning%2Freversing-discord+NOT+repo%3AScottPrzy%2Freact-native+NOT+repo%3Agabrieldonadel%2Freact-native-visionos+NOT+repo%3AGabriel2308%2FTestes-Soft+NOT+repo%3Adawnzs03%2FflakyBuild+NOT+repo%3Acga2351%2Fcode+NOT+repo%3Astreeg%2Ftcc+NOT+repo%3Asoftware-mansion-labs%2Freact-native-swiftui+NOT+repo%3Apkcsecurity%2Fdecompiled-lightbulb+com.facebook.react.modules.image.ImageLoaderModule).

## Changelog:

[INTERNAL] - Make com.facebook.react.modules.image.ImageLoaderModule internal

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

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

Reviewed By: cortinico

Differential Revision: D72948039

Pulled By: rshest

fbshipit-source-id: d164ec1df405072731c956926ae7fb977635ad96
2025-04-14 04:45:29 -07:00
Mateo Guzmán 6f2357a050 Remove obsolete @TargetApi annotations for Lollipop (API 21) (#50686)
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
2025-04-14 04:37:59 -07:00
Riccardo Cipolleschi 18a7c8d57c Do not generate ReactCodegen.podspec for libraries (#50645)
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
2025-04-14 03:38:55 -07:00
Dawid Małecki 87809d9326 Add no-deep-imports rule to eslint-plugin-react-native (#50542)
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
2025-04-14 03:02:36 -07:00
Nicola Corti 70cdf12c4d Extract inner classes from ReactTextInputManager to separate files (#50657)
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
2025-04-12 01:49:35 -07:00
Nicola Corti 02aa7e7ce0 Make class internal - ReactTextInputShadowNode (#50647)
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
2025-04-12 01:49:35 -07:00
Nick Gerleman f9aed5a747 Enable TextInput-textStyles E2E Test against RNTester
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
2025-04-11 21:08:16 -07:00
Nick Gerleman e4ae7be1a2 Hide chrome when viewing deep links on tiny screens (#50673)
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
2025-04-11 21:08:16 -07:00
Nick Gerleman 675b51f562 Remove chonky header for single modules (#50672)
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
2025-04-11 17:13:19 -07:00
Nick Gerleman e385ff689b Use rntester-legacy URL scheme for legacy arch app (#50670)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50670

Changelog: [internal]

Reviewed By: shwanton

Differential Revision: D72840476

fbshipit-source-id: 8fca3241c54b70fc3267cfcf30211035eb595a25
2025-04-11 14:50:12 -07:00
Andrew Datsenko 047914562e move rncxx utils (#50668)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50668

Changelog: [Internal]

Reviewed By: zeyap

Differential Revision: D72800712

fbshipit-source-id: f966906d10df1fac818fc9998dbe5e0b8d67be3f
2025-04-11 14:35:03 -07:00
Omar Bafagih a92a209544 Convert ReactPropertyHolder.java to Kotlin (#50633)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50633

Changelog:
[Internal]

Converted xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/annotations/ReactPropertyHolder.java to Kotlin using Android studio kotlinator

Reviewed By: alanleedev

Differential Revision: D72800835

fbshipit-source-id: 4637a3b63f346fb72311427f27d8f711cd37996e
2025-04-11 14:05:38 -07:00
Tim Yung d0c8716bfd RN: Revert Okio.buffer(…) Change from D72632266 (#50669)
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
2025-04-11 13:32:12 -07:00
Andrew Datsenko 14fdf3257f move rncxx profiling (#50651)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50651

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D72792459

fbshipit-source-id: d010508ca6311b6981090a64e4746141eda67976
2025-04-11 12:07:12 -07:00
Joe Vilches 52173ab701 Use CA shadow apis for box shadow (#50636)
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
2025-04-11 11:55:50 -07:00
Zeya Peng c5e9ef53ae allow setting SurfaceStartedCallback on UIManager
Summary:
## Changelog:

[General] [Added] - allow setting SurfaceStartedCallback on UIManager

Reviewed By: rshest

Differential Revision: D71917124

fbshipit-source-id: b8f8eaef892518e3aaa3da82ab91b06173a644a0
2025-04-11 10:54:07 -07:00
Zeya Peng 8d6098a645 create UIManagerNativeAnimatedDelegate to drive per frame NativeAnimated update
Summary:
## Changelog:

[Android] [Added] - create UIManagerNativeAnimatedDelegate to potentially drive per frame NativeAnimated update
* I'm imitating the way LayoutAnimation kicks off (`UIManagerAnimationDelegate`); re-using `UIManager::animationTick` function to schedule per frame animation callback

Reviewed By: rshest

Differential Revision: D71419497

fbshipit-source-id: ba867e4c2ed2ad89a7c9229c1156e20aca45e0e9
2025-04-11 10:54:07 -07:00
Zeya Peng a812cac176 call TurboModuleWithJSIBindings::installJSIBindings at core TurboModuleBinding instead of on each platform (#50534)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50534

## Changelog:

[Internal] [Changed] - call `TurboModuleWithJSIBindings::installJSIBindings` at core TurboModuleBinding instead of on each platform

Reviewed By: rshest

Differential Revision: D72073835

fbshipit-source-id: 17adde1e003876d41695f4679e6fe85a82fbaff7
2025-04-11 10:54:07 -07:00
Zeya Peng 5747fc4b17 Fix license comment block in ReactCxxPlatform code
Summary:
## Changelog:

[Internal] [Changed] - Fix license comment block in ReactCxxPlatform code

Reviewed By: rshest

Differential Revision: D72802801

fbshipit-source-id: 987a532bfe10d66db0aa2dad687d064225fa609d
2025-04-11 10:44:01 -07:00
Rubén Norte 143beaaa99 Improve format of navigation to home (#50665)
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
2025-04-11 10:28:04 -07:00
Rubén Norte 9fde76a02d Improve documentation for Fantom (expanding on pragmas) (#50663)
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
2025-04-11 10:28:04 -07:00
artus9033 86a7388355 refactor: migrate DynamicFromMap to Kotlin (#50597)
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
2025-04-11 09:59:00 -07:00
Rubén Norte 39b2d664bf Fix incorrect formatting (#50662)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50662

Changelog: [internal]

Prettier accidentally removed the line break here, breaking the Github Markdown format for this.

Reviewed By: andrewdacenko

Differential Revision: D72861208

fbshipit-source-id: 565e9f146a5eed12a9bbc465bb599057a4511d21
2025-04-11 09:11:28 -07:00
Rubén Norte 6a746e8855 Move src/private/component files to specific directories (#50653)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50653

Changelog: [internal]

Just moving some private modules to scoped directories within `src/private/components`.

Reviewed By: rshest

Differential Revision: D72855151

fbshipit-source-id: ae61c9fa976fde4f5f58622525bf16eceb9de7bf
2025-04-11 08:49:03 -07:00
Riccardo Cipolleschi bd64ec817d Backout "Add warning when a component is loaded with the interop layer"
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
2025-04-11 08:16:46 -07:00
Gijs Weterings 5fd08ce3de Fix ReactInstanceIntegrationTest.cpp poisoning future tests. (#50658)
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
2025-04-11 08:15:26 -07:00
Nicola Corti 45e725b3dc Convert to Kotlin - ReactTextInputShadowNode (#50648)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50648

This diff converts another class to Kotlin - ReactTextInputShadowNode

Changelog:
[Internal] [Changed] - ReactTextInputShadowNode to Kotlin

Reviewed By: rshest

Differential Revision: D72854819

fbshipit-source-id: 94d2f4e05ecdbf0d7507e59a0e11fd02d4dbfa55
2025-04-11 08:09:24 -07:00
Andrew Datsenko 798eb0ab84 move rncxx logging (#50652)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50652

Changelog: [Internal]

Reviewed By: zeyap

Differential Revision: D72800216

fbshipit-source-id: 722546b4538fce0d30d90a346a737a564bfd21ee
2025-04-11 08:06:06 -07:00
Rubén Norte d18abc8ec7 Use scrollTop for scrolling tests (#50660)
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
2025-04-11 08:05:48 -07:00
Rubén Norte 277d39a216 Add technical documentation for Fantom
Summary:
Changelog: [internal]

This adds some technical documentation for the Fantom testing system.

Reviewed By: andrewdacenko

Differential Revision: D72861981

fbshipit-source-id: edcf71c98bea0b95dfdbb6289aaf7eda4b0b24b1
2025-04-11 07:52:26 -07:00
Rubén Norte d06b32d215 Add usage documentation for Fantom (#50659)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50659

Changelog: [internal]

This adds the user guide documentation for Fantom.

Reviewed By: sammy-SC

Differential Revision: D72860137

fbshipit-source-id: 672224b38d045e29af2468ab05fed98991218bf7

Co-authored-by: Samuel Susla <samuelsusla@meta.com>
2025-04-11 07:52:26 -07:00
Rubén Norte 1ac682ca83 Fix link to main doc in Event Loop documentation (#50650)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50650

Changelog: [internal]

just a fix in the docs

Reviewed By: rshest

Differential Revision: D72855852

fbshipit-source-id: 3919b71861c1a803df755d1917df5bf29fb39462
2025-04-11 07:52:26 -07:00
Rubén Norte c8cbf7f813 Improve documentation for feature flags (#50644)
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
2025-04-11 07:52:26 -07:00
Riccardo Cipolleschi e83ece0d17 Do not generate Apple specific files for Android (#50654)
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
2025-04-11 07:41:38 -07:00
Ruslan Shestopalyuk c50f3e5f66 Migrate Event class (#49887)
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
2025-04-11 07:02:03 -07:00
Mateo Guzmán c134c41cd7 Fix unresolved KDoc references (#50640)
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
2025-04-11 06:25:14 -07:00
Fabrizio Cucci 57768bfbcd Kotlinify ColorPropConverter (#50626)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50626

As per title.

Changelog:
[Android][Breaking] Kotlinify ColorPropConverter

Reviewed By: javache

Differential Revision: D72788490

fbshipit-source-id: 1c81c70566437db36e45e59995093c4c808369d8
2025-04-11 05:14:34 -07:00
Pieter De Baets 398f2068d1 Migrate com.facebook.react.runtime.ReactSurfaceImpl to Kotlin
Summary: Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D72804023

fbshipit-source-id: ceb046ca271e97d8f314c1ba3599c7c65c4295fe
2025-04-11 05:01:45 -07:00
Omar Bafagih 5fe814e38f Convert ReactPropGroup.java to Kotlin (#50629)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50629

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D72770907

fbshipit-source-id: 249bdf84b1d2d27c2f9d4e201d5b4f35285b4b32
2025-04-11 04:05:30 -07:00
Rubén Norte 3839861dbe Clean up feature flag fixMountingCoordinatorReportedPendingTransactionsOnAndroid (#50632)
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
2025-04-11 04:02:33 -07:00