Commit Graph

12270 Commits

Author SHA1 Message Date
Peter Abbondanzo 8db12225a2 Forward onBlur/onFocus events to Pressability config (#51670)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51670

As the title suggests, forwards `onBlur`/`onFocus` props into the Pressability config that the component creates

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D75238328

fbshipit-source-id: ebc955ab603012362b6fd021333ab61c54ef3f72
2025-06-05 08:26:45 -07:00
Samuel Susla b4cf61901f add fantom tests for pointerevents (#51842)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51842

changelog: [internal]

add tests for pointerevents props.

Reviewed By: rshest

Differential Revision: D75991670

fbshipit-source-id: 16ed5f11bf3d3ec015141587171fe4ff0e914810
2025-06-05 08:22:28 -07:00
Tomasz Żelawski c783128f6e fix: ignore build/ and DerivedData/ dirs in when reading infoPlistFiles (#51833)
Summary:
https://github.com/facebook/react-native/pull/49927 introduced a regression where a Ruby script would read compilation artifacts and fail, when the user has relative build directories set in XCode.

After successful compilation `build/` dir and `DerivedData/` dir have `.plist` files that aren't in UTF-8 encoding and shouldn't be read by the script. If the user tries to reinstall pods at this point, he gets the following error:

![image](https://github.com/user-attachments/assets/6bd31907-66af-4ea5-b2a6-2847e0ee18e1)

This is how you enable relative build directories in XCode.

![Screenshot 2025-06-05 at 11 08 31](https://github.com/user-attachments/assets/22a555b4-a468-481d-8492-02c3b36bfa25)

## Changelog:

[IOS] [FIXED] - Ignore `build/` and `DerivedData/` directories when reading `.plist` files.

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

Test Plan: After applying this patch the problem doesn't occur anymore on my machine.

Reviewed By: cortinico

Differential Revision: D76030133

Pulled By: cipolleschi

fbshipit-source-id: 7ae8c2d0ce28b6925245a9172154e3dcafee126f
2025-06-05 03:21:10 -07:00
Samuel Susla 5661fe9e1f Add test for onScroll events (#51826)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51826

changelog: [internal]

To make this possible, we "fake" a UI tick whenever `flushMessageQueue` is called. This was, after every JavaScript task a UI tick happens.
Result:
- Animations are setup right after mounting automatically.
- Animation happens after Fantom.scrollTo is called.

Reviewed By: lenaic

Differential Revision: D75899915

fbshipit-source-id: 1ccb86df6741ff9124f16073c6d61ba716d7cfe6
2025-06-05 03:14:39 -07:00
Mateo Guzmán d631ec9a6c Migrate ReactTextViewManager to Kotlin (#51721)
Summary:
Migrate com.facebook.react.views.text.ReactTextViewManager to Kotlin.

In this diff, `ReactTextAnchorViewManager` is made public again as it's extended by `ReactTextViewManager`.

## Changelog:

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

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

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

Reviewed By: mdvacca

Differential Revision: D75829457

Pulled By: NickGerleman

fbshipit-source-id: 425e9ec14f17de5470677b73d68873647bf28675
2025-06-04 21:24:00 -07:00
Tim Yung e8e51ac1fb RN: Flowify Remaining Files (#51822)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51822

Adds `flow` to the remaining files without it, in React Native.

After this, every `*.{flow,js}` file in React Native will have either `flow` or `noflow`.

Changelog:
[Internal]

Reviewed By: NickGerleman

Differential Revision: D75980238

fbshipit-source-id: 84cd88e4eb0b0b1dc69df247de79a75c2119bf96
2025-06-04 19:33:54 -07:00
Nick Gerleman 48216b244a FabricUIManager.prepareLayout() -> FabricUIManager.prepareTextLayout() (#51787)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51787

Feedback left on D75826792

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D75896711

fbshipit-source-id: bc55e1e6b4beefbe7071fe3186caeeb49f74a9cd
2025-06-04 19:33:30 -07:00
Nick Gerleman add1113a02 Support ReactTextViewManagerCallback in Facsimile (#51759)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51759

Builds upon the changes in the last diff, to let Facsimile support `ReactTextViewManagerCallback`. We use the same new mechanism, of using `RCTTextViewManager` as the callback, if present, instead of relying on view manager measure function.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D75830964

fbshipit-source-id: 435798e6be08f579579eb0f2d30a67d4b1fcaf10
2025-06-04 19:33:30 -07:00
Nick Gerleman 2ba86caf18 Clean up measurements path and ReactTextViewManagerCallback injection (#51758)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51758

ViewManager’s may implement a measure function (using MapBuffer, or ReadableMap). This isn’t used automatically, but may instead be used, by calling into FabricUIManager via JNI, and passing the component name of the view manager to use.

This is only ever called manually, through specific C++ ShadowNodes. Confusingly, for some cases, like `TextInput`, we use the measure function on `RCTText` instead, because this call to FabricUIManager is hidden behind `TextLayoutManager`. This ends up really breaking Facsimile, since we want to measure these in a different way, while still measuring `TextInput` without preparing a layout.

This mechanism is also used to inject `ReactTextViewManager` from the Text View Manager, into the measurement process, for both Text, and TextInput.

I think we would ideally remove and replace the current View Manager measurement mechanism entirely. The interface doesn’t do what it claims to, and requires calling private Java methods via JNI, which we shouldn’t be encouraging external libraries to do. Only a single 3p librar (react-native-picker) uses this, but we have a lot of internal usages, and the current facility is valuable, for translating surface ID into a context. Ie we could not deprecate it without a well thought out replacement.

Instead, this change:
1. Removes the "generalized" version of this for MapBuffer, only ever used by Text
2. Given ourselves a `measureText` function, that will use a spannable processor provided, but go through TextLayoutManager, instead of trying to use this generalized path
3. Documents some of the weirdness of the current setup, without yet deprecating it

This will let the Facsimile View Manager:
1. Provide a ReactTextViewManagerCallback, like the previous version allowed, that influences measurement of both Text, and TextInput (which is... strange, but... not trying to boil the ocean here)
2. TextInput can now measure text, even if Facsimile View Manager doesn't implement this traditional measure interface

Changelog:
[Android][Breaking] - Remove FabricUIManager.measureMapBuffer() and MapBuffer measure functions on ViewManager. Please use ReadableMap variant.
[Android][Breaking] - Remove FabricUIManager.measure overload which accepts attachment positions

Reviewed By: javache

Differential Revision: D75826792

fbshipit-source-id: 6739b1e2e214351b9b95ba782d73cf4278211ab8
2025-06-04 19:33:30 -07:00
Jorge Cabiedes Acosta 997b7c99f6 Rewrite accessibilityOrder with virtual view hierarchy (#51692)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51692

The original algorithm for accessibilityOrder on Android had unexpected bugs. For some reason `.traversalAfter()` and `traversalBefore()` have unexpected behaviors when dealing with ancestor/descendant relationships getting more and more unexpected the further apart they are.

So we are ditching that approach entirely.

Now we have the view with accessibilityOrder create a virtual view hierarchy. We create a virtual node for each child that is in the order, and set the virtual node's position to be the same as the View it is trying to represent.

We then also populate that node with the same stuff we populate regular ax nodes with the `populateAccessibilityNodeInfo()` function and the content description of the view it is backing so we get matching descriptions with what would otherwise be the normal announcement.

**We have no way to exhaustively check every accessibility use case so we'll have to fine tune this as bugs come up, I'm expecting there to not be many issues since we populate the node the exact same way we populate every other node but anything that happens before React Native handles the node might miss some things**

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D74766296

fbshipit-source-id: 5e77c17bed1644bc5fbf5c1e19c3c6908cc1e3e9
2025-06-04 14:31:21 -07:00
Nick Gerleman c27a8804a6 Bump min Xcode to 16.1 (#51762)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51762

Apple requires Xcode 16 or later to submit to the app store. Let's bump the minimum checked for in build logic as well. https://developer.apple.com/news/upcoming-requirements/?id=02212025

GHA is already only testing against 16.2.0 as of D73924819

Changelog:
[iOS][Breaking] - Bump min Xcode to 16.1

Reviewed By: cipolleschi

Differential Revision: D75835304

fbshipit-source-id: a7ce22f958be3a5448a279439e27b615e9b20a2f
2025-06-04 14:15:45 -07:00
Tim Yung 5ce99e7eb2 RN: Flowify packages/react-native Mocks & Tests (#51794)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51794

Adds `flow` to the remaining mocks and tests that are lacking it in the `packages/react-native` directory.

This required adding numerous type annotations and suppressions.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D75930095

fbshipit-source-id: ebb1280adc656680e00fd579701e31521826b55c
2025-06-04 12:03:52 -07:00
Tim Yung f2ff8c9012 RN: Flowify packages/react-native/Libraries/Alert (#51792)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51792

Adds `flow` to the remaining files that are lacking it in the `packages/react-native/Libraries/Alert` directory.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75921478

fbshipit-source-id: e277cf8241b136da1409af2592fda6ec1f7e9502
2025-06-04 12:03:52 -07:00
Tim Yung d77057741d RN: Flowify Non-Library Files (#51790)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51790

Adds `flow` or `noflow` to the remaining files that are outside of `packages/react-native/{Library,src}`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75904614

fbshipit-source-id: cb2c0969065cf443c3a6e74da0fa3708fda67d18
2025-06-04 12:03:52 -07:00
Tim Yung 13e0965ed5 RN: Flowify packages/helloworld (#51789)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51789

Adds `flow` or `noflow` to the remaining files that are lacking it in the `packages/helloworld` directory.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75899853

fbshipit-source-id: 43990adb0827f35a8ca8c49c1787140ff47b8abb
2025-06-04 12:03:52 -07:00
Tim Yung 3e6423fe65 RN: Flowify packages/rn-tester (#51788)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51788

Adds `flow` to the remaining files that are lacking it in the `packages/rn-tester` directory.

This also adds any necessary type annotations and fixes lint warnings.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75899307

fbshipit-source-id: 27a74ed0007b3b754446a45931c2c148312d5e3a
2025-06-04 12:03:52 -07:00
Tim Yung 71bf0712e3 RN: Flowify packages/virtualized-lists (#51785)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51785

Adds `flow` to the remaining files that are lacking it in the `packages/virtualized-lists` directory. In one of the Jest tests, there are so many failures that for now, I just added `noflow`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75888514

fbshipit-source-id: 29d96292f3d59fd5cf2f5ba09b58fdfb9eabab2e
2025-06-04 12:03:52 -07:00
Tim Yung 3d55f229cb RN: Flowify packages/react-native-fantom (#51784)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51784

Adds `flow` to the remaining files that are lacking it in the `packages/react-native-fantom` directory.

This also adds any necessary type annotations (using comment syntax).

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75886119

fbshipit-source-id: 6045b4037da21791db2a8960fbdb83aa2fb5bbf2
2025-06-04 12:03:52 -07:00
Tim Yung 3728afa85f RN: Add @noflow to packages/react-native-compatibility-check (#51782)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51782

Adds `noflow` to a test in `packages/react-native-compatibility-check`.

In the future, this file should be migrated to use `flow strict-local` or `flow strict`. However, it currently has way too many type errors. Adding `noflow` makes it explicit that this is known to not be typechecked.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75885038

fbshipit-source-id: d0eccda52d39e7cb1938d395c44e4441918f7fcb
2025-06-04 12:03:52 -07:00
Tim Yung 404f3ebde2 RN: Flowify packages/react-native-codegen (#51781)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51781

Adds `flow` to the remaining files that are lacking it in the `packages/react-native-codegen` directory.

This also adds any necessary type annotations (using comment syntax).

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D75884727

fbshipit-source-id: 69e880b2dc63c3d6430f841652506e57436544a8
2025-06-04 12:03:52 -07:00
Tim Yung cc9074884a RN: Add @noflow to Node.js Scripts (#51779)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51779

Adds `noflow` to a bunch of Node.js script files.

In the future, these files could be migrated to use `flow strict-local` or `flow strict` using comment syntax for type annotations. But for now, adding `noflow` makes it explicit that these are known to not be typechecked.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75883703

fbshipit-source-id: a8fed3aaa9c55ecda919a705940f8b34504cb07c
2025-06-04 12:03:52 -07:00
Tim Yung b344aec2ae RN: Add @noflow to ESLint & Babel Preset Files (#51778)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51778

Adds `noflow` to a bunch of ESLint and Babel files that are expected to be evaluated using Node.js without Babel. Additioanlly, these files tend to depend on ESLint and Babel type definitions that are not currently readily available.

In the future, these files could be migrated to use `flow strict-local` or `flow strict` using comment syntax for type annotations. But for now, adding `noflow` makes it explicit that these are known to not be typechecked.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75883642

fbshipit-source-id: 54236d123ca8773de42bce81189dfb5c0671563e
2025-06-04 12:03:52 -07:00
Samuel Susla 27f4801c82 introduce Fantom.unstable_getDirectManipulationProps (#51814)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51814

changelog: [internal]

introduce Fantom.unstable_getDirectManipulationProps to make it possible to inspect what is changed by C++ Animated module before animation finishes.

Reviewed By: zeyap, rubennorte

Differential Revision: D75816105

fbshipit-source-id: 681829ca9d3f77e57213e9f88f4f24b340a982ed
2025-06-04 11:51:54 -07:00
Joe Vilches ed26358f63 Implement textVerticalAlign (#51680)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51680

Right now there are 2 flavors of vertical text alignment: `verticalAlign` and `textVerticalAlign`. Both do the same thing currently. For Facsimile, we actually want to "properly" implement `verticalAlign` so that it matches the web version, while leaving `textVerticalAlign` the same. That will take some time, however, so for now we are just going to implement the way it currently works, while fixing some issues with inline View's

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D75475915

fbshipit-source-id: ba6ff7c831bf769e9e60831ed215ab64faf143a4
2025-06-04 11:39:15 -07:00
Joe Vilches 55fd8b26f8 Move textAlignVertical to paragraph props (#51712)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51712

This prop only works on top level text components, yet it is stored as a TextAttribute. It should be a ParagraphAttribute, so I moved it there.

Changelog: [Android] [Breaking] - Move textAlignVertical to paragraph attributes instead of text attributes

Reviewed By: NickGerleman

Differential Revision: D75684576

fbshipit-source-id: 8ad2496f8a043a6a64924a6c43c7bad4593cf1db
2025-06-04 11:39:15 -07:00
Joe Vilches 573ba02530 Use PreparedLayout as opposed to Layout in PreparedLayoutTextView (#51711)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51711

This is needed to support textVerticalAlign as we are storing that offset in the prepared layout and need to read it from the new text view

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D75643360

fbshipit-source-id: 03620ecf09f525c45d0a60daad1dc1d9a5937362
2025-06-04 11:39:15 -07:00
Nicola Corti c7bbf120e3 Tweak visibility of fields inside NativeModuleRegistry (#51810)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51810

Tweaking the visiblity of some of the fields `NativeModuleRegistry` after the Kotlin migration
of that class.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D75959962

fbshipit-source-id: b3d53fc29af3b0fe32a7bd6a61898814acf90123
2025-06-04 11:19:10 -07:00
Pieter De Baets 2ec21b4679 Remove unneeded folly deps (#51807)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51807

Remove unneeded deps from the build graph. Especially `//xplat/folly:logging_logging` ends up adding 418KB in development which is unused here.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D71316272

fbshipit-source-id: 39a73e26728cee23d4ffbdd5e4760de2029e671b
2025-06-04 11:01:19 -07:00
Gabriel Donadel f2b19608cc generate-artifacts-executor: fix parsing .class in complex classes (#51813)
Summary:
There is an edge case in the codegen `findRCTComponentViewProtocolClass` function where the parsing of the Component Class will fail if there is another `.class` call in the same file after the `Class<RCTComponentViewProtocol>` function. This ends up resulting in a `RCTThirdPartyComponentsProvider.mm` file that looks like the image bellow

<img width="1052" alt="image" src="https://github.com/user-attachments/assets/26ce93be-0370-4852-a949-9da21762ff7f" />

You can reproduce this with the following

```
Class<RCTComponentViewProtocol> XYZCls(void)
{
  return XYZ.class;
}
// this comment breaks codegen .class
```

## Changelog:

[IOS] [FIXED] - Fix codegen extracting `.class` from complex component classes

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

Test Plan: Run codegen locally, use this patch in the expo/expo repo and CI should be green

Reviewed By: cipolleschi

Differential Revision: D75964424

Pulled By: cortinico

fbshipit-source-id: 50e45aa2ac6e43c75ee6fdd76791c591d81d4df7
2025-06-04 10:46:49 -07:00
Riccardo Cipolleschi b266f7854d Back out "Improve e2e times by using deep links to open examples" (#51812)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51812

Commit [8960d9ea2c](https://github.com/facebook/react-native/commit/8960d9ea2cea22451e8f7c9d6c22ed1ed6de131f) fully broke the iOS tests on RNTester in CI.

All 8 of them consistently fails 5 times out of 5 within the workflow and for each retry.

Reverting the change to get CI back to green

## Changelog:
[Internal] - Reverting [8960d9ea2c](https://github.com/facebook/react-native/commit/8960d9ea2cea22451e8f7c9d6c22ed1ed6de131f)

Reviewed By: cortinico

Differential Revision: D75960750

fbshipit-source-id: 63b4a4b4cd830ec48fa60ca6cfcb4dd12a97a331
2025-06-04 09:48:42 -07:00
Samuel Susla 2be44354c0 rename advanceAnimationsByTime to produceFramesForDuration for clarify (#51811)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51811

changelog: [internal]

after a bit of discussion it was clear the name of this method was confusing. Let's rename it to `produceFramesForDuration` to make it more obvious what happens under the hood.

Reviewed By: rubennorte

Differential Revision: D75953355

fbshipit-source-id: a62933894f9d42fbb3692134d117c05208c62699
2025-06-04 09:45:47 -07:00
Samuel Susla 031aa4f8d3 add comment why FabricUIManagerBinding::getScheduler is public (#51801)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51801

changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D75902518

fbshipit-source-id: 4564982d8cc253df575ba93233b2eec0d336479d
2025-06-04 08:38:58 -07:00
Rubén Norte 1dae8d119f Add support for Error.cause in Fantom (#51800)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51800

Changelog: [internal]

This adds support for printing the cause of errors thrown in tests in Fantom, if available.

Reviewed By: lenaic

Differential Revision: D75946044

fbshipit-source-id: 579a2fc547cae92d2a65a4023ba1fb2e34a1f735
2025-06-04 08:28:48 -07:00
Samuel Susla 59fcc57e1a Make ShadowNode::transferRuntimeShadowNodeReference private (#51805)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51805

changelog: [internal]

this overload of transferRuntimeShadowNodeReference is only used within ShadowNode, let's make it private.

Reviewed By: lenaic

Differential Revision: D75903646

fbshipit-source-id: 1ea86b6d0771cdffaff2d425d591f1e58da330ca
2025-06-04 08:26:03 -07:00
Dawid Małecki 0de92b52ba Bring back @flow strict to composeStyles and fix Flow errors (#51803)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51803

The `flow strict` annotation was accidently removed in D74574293. This diff brings it back and fixes flow errors caused by this change. This makes generated TS types for `composeStyles` more relaxed but the main idea of inferring inputs base on output type annotation is preserved.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D75945388

fbshipit-source-id: c24ff8ad5d286e16bca3522e82f02e14f660c0dd
2025-06-04 06:56:05 -07:00
Samuel Susla b338a00467 make per UI tick calculation more predictable (#51802)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51802

changelog: [internal]

avoid conversions when dealing with time in C++ Animated. This makes tests more predictable.

Reviewed By: christophpurrer

Differential Revision: D75813200

fbshipit-source-id: b8934848237e5ea7c350d9a5f0175ac0f9202ffd
2025-06-04 05:05:19 -07:00
Mateo Guzmán dc7be7c7aa Migrate NativeModuleRegistry to Kotlin (#51734)
Summary:
Migrate com.facebook.react.bridge.NativeModuleRegistry to Kotlin.

In this diff, `JavaModuleWrapper` and some of its functions/properties had to be made public again as they are exposed by the migrated class – and if the functions are kept internal, there are crashes in legacy arch due to the C++ usages.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.NativeModuleRegistry to Kotlin

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

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

Reviewed By: rshest

Differential Revision: D75938404

Pulled By: cortinico

fbshipit-source-id: 088286d4b100d1013cff43b81db39c6aec10f4e1
2025-06-04 04:53:45 -07:00
Jakub Piasecki 1c6923d879 Disallow usage of unprefixed (suffixed) Props type name (#51653)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51653

Changelog: [Internal]

Adds a transform that ensures no types and interfaces named `Props` end up in the generated TypeScript definitions. Those are not descriptive and cause duplicate types in the rollup.

Reviewed By: huntie

Differential Revision: D75508800

fbshipit-source-id: 8d64ec19cbabe57495d6462df9d372ba42cda618
2025-06-04 04:38:48 -07:00
Jakub Piasecki 06a7eaad11 Update api-extractor config to reduce number of duplicated symbols (#51796)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51796

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D75940071

fbshipit-source-id: 612aeb12ddb05a7219e69f649e7a490baf7ed7f6
2025-06-04 03:15:11 -07:00
Rubén Norte 773ee9c37c Nullability check for stderr from CLI (#51797)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51797

Changelog: [internal]

Fantom tests are generally very reliable, but a source of flakiness seems to be coming from `result.stderr` being `undefined` and throwing in this callsite. We just add a check to work around it, hoping it's just being set to `undefined` because there really are no errors.

Reviewed By: rshest

Differential Revision: D75942405

fbshipit-source-id: d8920cc2573f029de6bb108310c31f1992e74301
2025-06-04 03:04:08 -07:00
Rubén Norte d1efc5806d Remove unnecessary "using namespace" directives (#51774)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51774

Changelog: [internal]

Just a small refactor to remove some unnecessary `using namespace` directives for code in the `facebook::react` namespace.

Reviewed By: javache

Differential Revision: D75874213

fbshipit-source-id: e63a91b412b2865eb05961d2174b14230ff35e88
2025-06-04 02:31:35 -07:00
Mateo Guzmán 8960d9ea2c Improve e2e times by using deep links to open examples (#51786)
Summary:
This is similar to https://github.com/facebook/react-native/issues/51590, but way better as it improves indirectly the flakiness for tests in the API tab. When the logbox is shown in debug mode, it interferes and sometimes makes that test fail, so this prevents that.

Android also takes more advantage of the improvement with this change, the previous PR only improved significantly iOS.

All the screens inside the RNTester seem to have a deeplink, which makes it easier to open the tests as the test cases are intended to check mostly specific behaviour of RN, and it is not necessary to have a middle step to find the specific components.

Maybe it would be good to run this a few times in CI to see if there are no side effects or flakiness added by opening deep links on CI builds.

## Changelog:

[INTERNAL] - Improve e2e times by using deep links to open examples

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

Test Plan:
```sh
yarn e2e-test-android
yarn e2e-test-ios
```

iOS:

| Before | After |
|--------|-------|
| <img width="387" alt="image" src="https://github.com/user-attachments/assets/03ccd957-d401-4944-bb5c-d3e7db957b2e" /> | <img width="364" alt="image" src="https://github.com/user-attachments/assets/40a14c95-63f8-441d-b718-b5f57a506393" /> |

Android:

| Before | After |
|--------|-------|
| <img width="455" alt="image" src="https://github.com/user-attachments/assets/c71da8d0-df69-44af-b1b2-580995ce55c7" /> | <img width="449" alt="image" src="https://github.com/user-attachments/assets/7357e670-3510-4bbe-8543-68d3bd8c4bea" /> |

Reviewed By: cipolleschi

Differential Revision: D75938844

Pulled By: cortinico

fbshipit-source-id: c7d4063af561e7b0e583eddefcbb289786f3805a
2025-06-04 02:30:59 -07:00
Samuel Susla 1a6d466f18 trigger animations at time 0 in fantom (#51776)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51776

changelog: [internal]

testing animation must be predictable.
When animation takes 1 second and test calls `unstable_advanceAnimationsByTime(1000)`, the expectation is that the animation would have completed.
Previously it was necessary to wait for at least 38ms over the time it took to complete animation. This diff reduces the delta to 22ms.

Reviewed By: andrewdacenko

Differential Revision: D75813087

fbshipit-source-id: 1a27e5c227a0f3f1183ebdf41dc8c18149d68be0
2025-06-03 15:36:01 -07:00
generatedunixname89002005287564 eb6e1b80a7 Fix CQS signal modernize-use-nullptr in xplat/js/react-native-github/packages/react-native/ReactCommon/cxxreact (#51783)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51783

Reviewed By: dtolnay

Differential Revision: D75852593

fbshipit-source-id: 410e0693a65a25eeec9bb26292336cee5072b12c
2025-06-03 14:55:11 -07:00
Nick Gerleman 5f83c774ca Remove Broken Caching Logic in AndroidProgressBarMeasurementsManagaer and AndroidSwitchMeasurementsManager (#51757)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51757

These both have a boolean flag `hasBeenMeasured_` which is never set to true, so the cached measurement is never used, but it would be wrong if it was used, since the cache doesn't respect the content, or measure constraints. Delete the broken code.

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D75817999

fbshipit-source-id: eb062f523840bbac7099b28f7e9b25cf9ad302aa
2025-06-03 14:28:53 -07:00
Rubén Norte 638933418e Fix crash when accessing offsetParent from documentElement (#51773)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51773

Changelog: [internal]

(This isn't a public API yet so not marking it as a bugfix).

This fixes a crash in the `offsetParent` DOM API when called on a node whose parent is the `documentElement`.

Reviewed By: andrewdacenko

Differential Revision: D75876349

fbshipit-source-id: d90fcc3cb98f592c396cb0f5ee6ec80c9570745a
2025-06-03 10:58:00 -07:00
Natalia b4ae5c1de1 refactor: migrated file LazyReactPackage to Kotlin (#51085)
Summary:
This PR migrates LazyReactPackage to Kotlin as requested in https://github.com/facebook/react-native/issues/50513.

## Changelog:

[ANDROID] [CHANGED] - Migrate com.facebook.react.LazyReactPackage to Kotlin.

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

Test Plan:
- replaced `BaseReactPackage` with `LazyReactPackage` in `RNTesterApplication.kt`
- run RN tester on old architecture
- executed legacy native module screen

Reviewed By: javache

Differential Revision: D75783140

Pulled By: cortinico

fbshipit-source-id: 9e93f68c6c7ee821a1e0b74649b2438b0dcd4a1a
2025-06-03 10:56:48 -07:00
Samuel Susla 3a009beaf0 link missing methods to tasks (#51714)
Summary:
changelog: [internal]

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

add tasks to todos in code.

Reviewed By: fabriziocucci

Differential Revision: D75709061

fbshipit-source-id: 2ad976c25a012687fa41fcd6af662f588a54f9d8
2025-06-03 10:31:29 -07:00
Oskar Kwaśniewski d2464d8e7a fix: make sure RNTester builds with USE_HERMES=0 (#51772)
Summary:
This PR makes sure React Native still builds with USE_HERMES=0.

## Changelog:

[IOS] [FIXED] - make RNTester build with USE_HERMES=0

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

Test Plan: CI Green

Reviewed By: andrewdacenko

Differential Revision: D75876484

Pulled By: cipolleschi

fbshipit-source-id: 72f3a7d33c19063b52c4c3e577ad2c5eae049d90
2025-06-03 09:48:36 -07:00
Nicola Corti c8dcf11423 unbreak build_android due to wrong parameter name in ReactViewGroup (#51771)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51771

This made build_android fail because the parameter name mismatched between class and one of the implementation.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D75869827

fbshipit-source-id: a40dd1fb914e0694f1958c8b19eb9672de683c75
2025-06-03 08:22:39 -07:00