Commit Graph

38536 Commits

Author SHA1 Message Date
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
Riccardo Cipolleschi a67916fdd2 Bump windows to latests as GH will remove windows-2019 EOM (#51798)
Summary:
As per title, GH is [removing windows-2019](https://github.com/facebook/react-native/actions/runs/15421451006/job/43403215354) at the end of the month. We need to migrate away from them.

## Changelog:
[Internal] - Bump windows runners

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

Test Plan: GHA

Reviewed By: cortinico

Differential Revision: D75946994

Pulled By: cipolleschi

fbshipit-source-id: 972b60300c918c0eae0403ed4149347a4ffa8bd0
2025-06-04 04:28:10 -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
React Native Bot 5324ae2831 Add changelog for v0.80.0-rc.4 (#51747)
Summary:
Add Changelog for 0.80.0-rc.4

## Changelog:
[Internal] - Add Changelog for 0.80.0-rc.4

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

Test Plan: N/A

Reviewed By: rshest

Differential Revision: D75863681

Pulled By: cortinico

fbshipit-source-id: cac04b7b033977e67deb605787640bc70c7fcd98
2025-06-03 10:44:05 -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
Pieter De Baets 0486604c89 Use delegate to handle commands when available (#51769)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51769

Generated delegate has this

```
  Override
  public void receiveCommand(T view, String commandName, Nullable ReadableArray args) {
    switch (commandName) {
      case "highlightTraceUpdates":
        mViewManager.highlightTraceUpdates(view, args.getArray(0));
        break;
      case "highlightElements":
        mViewManager.highlightElements(view, args.getArray(0));
        break;
      case "clearElementsHighlights":
        mViewManager.clearElementsHighlights(view);
        break;
    }
  }
````

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D75797948

fbshipit-source-id: c05f09f0afbc41b83b759e62ae020b6a7ebc6f0f
2025-06-03 07:28:18 -07:00
Moti Zilberman ab2c81faeb Bring RNDT shell to front when paused on breakpoint (#51748)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51748

Changelog: [Internal]

Implements the first RNDT shell-specific feature based on https://github.com/facebook/react-native-devtools-frontend/pull/168 - namely, the ability for RNDT to foreground itself when certain events occur. This is most noticeable when pausing on a breakpoint.

Reviewed By: huntie, vzaidman

Differential Revision: D75795689

fbshipit-source-id: a073bf8ea96ba70d835007f5af6069d49a693d81
2025-06-03 06:37:35 -07:00
Jakub Piasecki 75be907aa9 Integrate building a type snapshot into typegen script (#51765)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51765

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D70093373

fbshipit-source-id: 1b536f86b205f71c8a708c4ab6aaaedc3b8e9450
2025-06-03 06:15:25 -07:00
Nicola Corti 48395d346b Convert ReactViewGroup to Kotlin (#51767)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51767

This is going to convert the last class inside `com.facebook.react.views.view` to Kotlin.

I still need to assess if this is going to be breaking or not for our users. Potentially some
breakages for Kotlin consumer could happen (see changes on ReactViewManager).
I'll follow-up with an investigation on that one.

Changelog:
[Android] [Changed] - Convert ReactViewGroup to Kotlin

Reviewed By: mdvacca

Differential Revision: D75797215

fbshipit-source-id: 5d58faa651d5959909a4b0237aad9c4209895083
2025-06-03 04:56:24 -07:00
Samuel Susla 747eb3c8ae Introduce Fantom.unstable_advanceAnimationsByTime (#51752)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51752

changelog: [internal]

Introduce a way to test animations: `unstable_advanceAnimationsByTime`. An API that fakes passage of time and triggers UI ticks to simulate how animations are run on iOS and Android.

The API is marked as unstable because it might evolve as we write more tests for C++ Animated.

Reviewed By: mdvacca

Differential Revision: D75787082

fbshipit-source-id: 24e29732bbbf581871e7868289257ab60d891ddf
2025-06-03 04:43:35 -07:00
Samuel Susla dd590c5b58 Remove outdated asserts from StubViewTree (#51751)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51751

changelog: [internal]

these asserts are not correct with C++ Animated or anything that overrides pull transaction. When pull transaction is overriden, the modified mounting instructions are not stored in shadow tree. Therefore, these asserts fail.

Reviewed By: rshest

Differential Revision: D75787083

fbshipit-source-id: ac08b96f6dea89a9f127b179a5d05e351b281c35
2025-06-03 04:43:35 -07:00
Samuel Susla d0e402f3d9 Call onRender inline instead of from startRenderCallbackIfNeeded (#51750)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51750

changelog: [internal]

inline call `onRender()` instead of calling it from `startRenderCallbackIfNeeded`. This has identical functionality but allows to use Fantom to test C++ Animated. In Fantom, there is only one thread the existing mechanism in C++ Animated uses thread locals to capture which thread in the UI thread. Therefore, some assumptions are broken. This is just an easy workaround around the problem.

Reviewed By: javache, zeyap

Differential Revision: D75787084

fbshipit-source-id: 8d70ef2d13e4ab14807deb7ca4cb0844980f5901
2025-06-03 04:43:35 -07:00
Samuel Susla 116fb6dab0 Make time in C++ Animated injectable (#51749)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51749

changelog: [internal]

Make it possible to inject time via `now` argument to C++ Animated. This will be used in testing.

Reviewed By: javache

Differential Revision: D75710463

fbshipit-source-id: 2d6da875c7379c4b229f8b7af0fa665cebc2ca8b
2025-06-03 04:43:35 -07:00
Riccardo Cipolleschi 80e8a6a161 Fix build after unifying RNCore in FBReactNativeSpec (#51766)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51766

Yesterday we landed [95ed8a6123](https://github.com/facebook/react-native/commit/95ed8a6123024afd03227358ab4b165fdf87b270) where we unified `rncore` and `FBReactNativeSpec` into the latter.

This of course broke the current setup of SwiftPM. This diff fixes it.

## Changelog:
[Internal] - Exclude rncore components

Reviewed By: javache

Differential Revision: D75863335

fbshipit-source-id: ad2739bed5645e41048a8bc466736712db18c3b6
2025-06-03 04:12:13 -07:00
Riccardo Cipolleschi 9c1a55a0b8 simplify searchPaths for FBLazyVectorPath (#51726)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51726

Previously we were spreading the searchPath on the FBLazyVectorPath everywhere, but that's not needed.

This change ensure that only the targets that nedds visibility over the FBLazyVectorPath depends on them.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D75756304

fbshipit-source-id: 41abe073bf271fd5059f9cb8536cc4a8948a03dd
2025-06-03 04:12:13 -07:00
Riccardo Cipolleschi 004726eeca simplify searchPaths for ReactFBReactNativeSpecPath (#51727)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51727

Previously we were spreading the searchPath on the ReactFBReactNativeSpecPath everywhere, but that's not needed.

This change ensure that only the targets that nedds visibility over the ReactFBReactNativeSpecPath depends on them.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D75756302

fbshipit-source-id: 41680b98dd07ea1abb09cebb1a1b8321f08929a0
2025-06-03 04:12:13 -07:00
Riccardo Cipolleschi dbbf0f8cf8 simplify searchPaths for CallInvoker (#51728)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51728

Previously we were spreading the searchPath on the CallInvoker everywhere, but that's not needed.

This change ensure that only the targets that nedds visibility over the CallInvoker depends on them.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D75756303

fbshipit-source-id: d6fe70e43f65d8e9da5f1d18dc58491217575734
2025-06-03 04:12:13 -07:00
Riccardo Cipolleschi 7ef7736130 simplify searchPaths for RuntimeExecutor (#51729)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51729

Previously we were spreading the searchPAth on the Runtime Executor everywhere, but that's not needed.

This change ensure that only the targets that nedds visibility over the runtimeExecutor depends on them.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D75756305

fbshipit-source-id: e54f1939d72049e7f4e8d3d14f7a33eacd5ac46f
2025-06-03 04:12:13 -07:00
Riccardo Cipolleschi 0e775ba378 Cleanup header search paths (#51730)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51730

This change cleans up the header search paths that are now mostly computed starting from other informations of the target.

There are still some execptions, for example for header only target for which we can't have a SwiftPM target. Therefore targets that depends on header only targets need to specify them in their search path.

Plus there are a small number of other exceptions, such as some circular dependencies on header only files.
We will fix them later on, by introducing separated targets

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D75756307

fbshipit-source-id: 53f24dcb08947648c8fce5c520a949b3b896c2fa
2025-06-03 04:12:13 -07:00
Riccardo Cipolleschi c38007a875 Improve searchPath transitive computation (#51731)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51731

With this change, we are computing the headerSearchPaths starting from the path, and the source's path. In this way we can greatly reduce the amount of searchPaths we have to manually specify, making it much easier to maintain the SwiftPM package in the long run.

## Changelog:
[Internal] -

## Facebook:
The next diff  in the stack proceeds with the cleanup.

Reviewed By: cortinico

Differential Revision: D75756306

fbshipit-source-id: 411ba6b598e568648488921c3ee62b8111f76749
2025-06-03 04:12:13 -07:00
Riccardo Cipolleschi 527e39a470 Move scrollView to ReactFabric (#51691)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51691

In cocoapods infrastructure, Scrollview is part of ReactFabric.
In the SwiftPM implementation we erroneously moved that to reactFabricComponents. However, the new view culling features in reactFabric imports scrollview and that was broken in Swift PM.

This change fixes it.

## Changelog:
[Internal] - move scrollview to reactFabric

Reviewed By: lenaic

Differential Revision: D75638510

fbshipit-source-id: 00828956093aaa87e15c22d15ca3a647876182f5
2025-06-03 04:12:13 -07:00
Rubén Norte 8ac0ccbb91 Add tracing section for event loop tick work for IntersectionObserver (#51744)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51744

Changelog: [internal]

TSIA

Reviewed By: rshest

Differential Revision: D75789346

fbshipit-source-id: fa32cd3e5d9809bcbad48f0a6f1706efcce34d7f
2025-06-03 02:42:38 -07:00
Nick Gerleman 7979c7ce06 Remove YogaLayoutableShadowNode::cleanLayout() and Fix ParagraphShadowNode Font Size Invalidation Logic (#51760)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51760

This API is evil.

Yoga's public API never allows a dirty node to become clean again, until its laid out, but this API requires doing that, since we will otherwise automatically dirty by default.

Let's replace it with `YogaLayoutableShadowNode::shouldNewRevisionDirtyMeasurement()`, which lets individual ShadowNodes represent whether a new revision's state and props should cause dirtying, defaulting to true.

Changelog:
[General][Removed] - Remove `YogaLayoutableShadowNode::cleanLayout()`

Reviewed By: lenaic

Differential Revision: D75479902

fbshipit-source-id: a40aa531522a76dc49feb7d12bae5a8d877c6c06
2025-06-02 19:52:31 -07:00
Tim Yung 5c8c5388fc RN: Fix Shadowing of Animated Styles (#51719)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51719

When `Animated` traverses props for instances of `AnimatedNode`, it flattens `props.style` before traversing it so that we correctly ignore any `AnimatedNode` instances that may be shadowed by static values:

```
{
  style: [
    {transform: [{translateX: new Animated.Value(0)}]},
    {transform: [{translateX: 100}]},
  ],
}
```

However, there is a bug that occurs when *every* `AnimatedNode` instance is shadowed. In this case, `AnimatedProps` assumes that there are *no* `AnimatedNode` instances in the entire `props.style`.

It then incorrectly operates on the unflattened `props.style`, which *does* have `AnimatedNode` instances. When this is passed to `View`, the `AnimatedNode` instances are encountered and can cause a crash in `processTransform`, as reported by: https://github.com/facebook/react-native/issues/51395

The fix for this was originally attempted by riteshshukla04 in https://github.com/facebook/react-native/pull/51442. This diff reuses the same unit test case, but it applies a different fix that does not involve re-traversing the `props.style` object.

The fix is gated behind a feature flag, `alwaysFlattenAnimatedStyles`. This will enable us to validate correctness of the new behavior before enabling it for everyone. (Beyond fixing the bug described above, this also causes styles to flatten more aggressively, so production testing is important to ensure stability.)

Changelog:
[General][Changed] - Creates a feature flag that changes Animated to no longer produce invalid `props.style` if every `AnimatedNode` instance is shadowed via style flattening.

Reviewed By: javache

Differential Revision: D75723284

fbshipit-source-id: 504f63e8edf836243d615783e119137a920ad271
2025-06-02 19:19:03 -07:00
Chang Hua 3353579946 fix ReactScrollViewHelper.kt remove listeners logic (#51718)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51718

## what

the current removing listeners code is not working. in prod, when removeScrollListener is called, it creates a new weakReference of the scroll listener and it would never match any existing weakreference listeners in the list. The remove action would end up removing nothing from the list.

This diff fixes the issue by iterating through the list and compare the obj
reference: https://stackoverflow.com/questions/6296051/how-to-remove-a-weakreference-from-a-list

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D75716993

fbshipit-source-id: af9eed218deb44e87317c19ffca7d227b96de8e2
2025-06-02 18:26:58 -07:00
Soe Lynn ab9ff886fc Remove unused header import (#51754)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51754

Changelog: [Internal]

Remove unused header import from RuntimeScheduler_Modern.cpp

Reviewed By: mdvacca

Differential Revision: D75815960

fbshipit-source-id: 32f7cab30216b3a76452dc9ef6354517fe3fcaf2
2025-06-02 16:10:59 -07:00
Tim Yung 0a951c1867 RN: Create virtualViewPrerenderRatio Feature Flag (#51716)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51716

Adds a feature flag to experiment with different `prerenderRatio` values from the `VirtualView` native component. Notably, this is the first time that the a feature flag has a non-boolean type.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D75713594

fbshipit-source-id: ff3feb8d8bb3292fea6e04a4cfccd87e8249144e
2025-06-02 15:48:22 -07:00
Tim Yung 746376af00 RN: Represent Numeric Feature Flags as Double (#51713)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51713

Changes the React Native Feature Flags system so that numeric feature flags are represented in native languages as double instead of int, in order to avoid loss of precision for non-integral JavaScript numbers.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D75709111

fbshipit-source-id: d4b2d553ce1e719a5f4b136a4f8d2e46446ef8d8
2025-06-02 15:48:22 -07:00
David Vacca 46e70fbcfd Rename root -> view in ViewManager parameters (#51755)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51755

this diff renames root -> view in ViewManager parameters

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D75803186

fbshipit-source-id: e70708b5b504c13d617be3becac340d65471e67c
2025-06-02 14:56:59 -07:00
Riccardo Cipolleschi 5f0d508390 Stop testing the legacy architecture (#51738)
Summary:
Following up the announcement made at AppJS, this change stops testing the legacy architecture in our CI

## Changelog:
[Internal] - Stop testing the legacy architecture in CI

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

Test Plan: waiting for GHA

Reviewed By: cortinico

Differential Revision: D75791359

Pulled By: cipolleschi

fbshipit-source-id: cb3159338835f49589fa6f495cfb9f47750825fe
2025-06-02 10:23:32 -07:00
Mateo Guzmán df6eff4f8c Improve e2e times and flakiness by using the search (#51590)
Summary:
I'm writing some tests for some APIs/components, and I see some opportunity for improvement in the way how we can write e2e cases for the RNTester.

This diff improves two things:

1. e2e execution times: right now as we are using the `scrollUntilVisible` functionality, it takes quite some time *for some cases*, as some of the items are not very up in the lists and getting to them it's not always very fast.
2. Flakiness: I ran the tests multiple times locally, and in multiple occasions, the `scrollUntilVisible ` did not find anything as the scroll was too fast so the test ended up failing.

Instead of using `scrollUntilVisible` for all cases, we can simply use the search bar which we have in both Components and APIs tabs. This runs faster and we can also share the search flow across multiple test cases, so writing the tests becomes a bit simpler as well.

Initially, I did this for all cases but not all cases benefit from this change as some of them are easier to find than others – the improvement was most notable in iOS (keyboard visibility seems to make a big difference), but I still think it is a good baseline to use the search as if more test cases are added, likely, many of them are not going to be so easy to find.

## Changelog:

[INTERNAL] - Improve e2e times and flakiness by using the search

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

Test Plan:
These are the differences in the time it takes to pass the tests locally.

iOS:

| Before | After |
|--------|-------|
| <img width="336" alt="image" src="https://github.com/user-attachments/assets/6bc80de6-5a10-4c0c-b6b0-f7850d746781" /> | <img width="329" alt="image" src="https://github.com/user-attachments/assets/de47a7ff-84cf-4916-abce-9b3df96a03e1" /> |

<details>
<summary>Android (no significant difference):</summary>

| Before | After |
|--------|-------|
| <img width="328" alt="image" src="https://github.com/user-attachments/assets/73023669-af8e-410c-aee2-529d1cce7acf" /> | <img width="336" alt="image" src="https://github.com/user-attachments/assets/3fb868a9-36f5-43c3-9261-6f2753e28e5f" /> |

</details>

Reviewed By: cortinico

Differential Revision: D75389138

Pulled By: cipolleschi

fbshipit-source-id: cf9d11ab0f84c91eaa20ee5c4441766729925571
2025-06-02 10:16:48 -07:00
Riccardo Cipolleschi f2c9d74f11 Remove continue-on-error from e2e test in GHA (#51746)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51746

I observed that when continue-on-error is set to true, Github reports the outcome of a job as success even if it fails.

With this change, we should ensure that when an E2E test fails, the pipeline fails, so that we can retry the jobs properly.

## Changelog:
[Internal] - Remove continue-on-error from e2e tests in GHA

Reviewed By: cortinico

Differential Revision: D75796284

fbshipit-source-id: 0e769f53d7355ae6c985aace334b23205780673a
2025-06-02 10:09:13 -07:00
Moti Zilberman fedc7f2b7a Generate rich changelog in debugger-frontend sync script, add --no-build flag for testing (#51745)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51745

Changelog: [Internal]

1. Updates debugger-frontend's sync-and-build script to include a simple Markdown changelog inline and -mention authors who are Meta employees.
2. Also adds a `--no-build` flag that is mainly helpful for iterating on changelog generation logic.

Reviewed By: hoxyq

Differential Revision: D75789680

fbshipit-source-id: b30b49a9c50e93e7161a2dad012b92ef124a3a16
2025-06-02 10:07:23 -07:00
Krystof Woldrich 8f189fce03 fix(types): Devtools.d.ts (#51737)
Summary:
- This is similar to https://github.com/facebook/react-native/pull/43566, but include also updated `StackFrame` type.

The current `Devtools.d.ts` doesn't match the `parseErrorStack.js` and `symbolicateStackTrace.js` implementations.

I've tried to run `build-types`, but only `symbolicateStackTrace.d.ts` was generated. I've not checked why.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[GENERAL] [FIXED] - Devtools TS Types

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

Test Plan: Call `parseErrorStack` and `symbolicateStackTrace` in TS.

Reviewed By: rshest

Differential Revision: D75782013

Pulled By: huntie

fbshipit-source-id: 91fe560f079731af2a5834c8de8eafb723d00bf9
2025-06-02 09:39:26 -07:00
Zeya Peng 581097b8ea (Redo PR #51264) Remove native animation fabric sync in JS and infinite animation loop workaround
Summary:
## Changelog:

[General] [Changed] - Remove native animation fabric sync in JS and infinite animation loop workaround, when cxxNativeAnimated is enabled

when cxxNativeAnimated is enabled, we'll sync native animation props back to Fabric in native, when that happens we can remove the code in JS for same purpose

Reviewed By: sammy-SC

Differential Revision: D75789100

fbshipit-source-id: 966e2b187f43e8743ccbf7ba97b8e8a27273fe0c
2025-06-02 09:29:40 -07:00
Pieter De Baets 68ed4071e2 Add missing tests references to buck targets (#51743)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51743

Noticed some of these were missing, which may lose us useful test signal, or prevent tests from being ran at all.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D75789456

fbshipit-source-id: 75645866c672c77d3dac34383105955ef6d25e60
2025-06-02 09:05:14 -07:00
Pieter De Baets 95ed8a6123 Merge all core codegen into FBReactNativeSpec (#50317)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50317

`rncore`, `FBReactNativeSpec` and `FBReactNativeComponentSpec` contain the same symbols, which leads to conflicts when we try to merge them into a single shared library. Cleanup the duplication and standardize on `FBReactNativeSpec` everywhere. I've left the Android OSS targets names as is, to avoid breaking deps.

This aligns react-native's package.json with the codegen tooling supported across iOS and Android, which is a single target for all all type-derived codegen.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D55037569

fbshipit-source-id: dbf3c0a427c9d0df96e439b04e5b123cd1069c51
2025-06-02 08:47:05 -07:00
Tim Yung 95113e9dfd RN: Default featureflags Script to Update (#51708)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51708

Changes `yarn featureflags` to default to `--update` when no options are supplied.

Provides a way to display the available options with a new `--help` option.

Changelog:
[Internal]

Reviewed By: sammy-SC

Differential Revision: D75692119

fbshipit-source-id: 50d25c5f12c7646159872661c93ebe8c42f44788
2025-06-02 08:40:55 -07:00
Tim Yung 8343045404 RN: Support Non-Boolean Feature Flags (#51707)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51707

Currently, the feature flag system does not properly support non-boolean feature flags. The type definitions and generated code make assumptions about the value type being `boolean`.

This diff fixes these assumptions so that non-boolean feature flags are supported.

Changelog:
[Internal]

Reviewed By: sammy-SC

Differential Revision: D75690997

fbshipit-source-id: 870063ff979d0650ce6d0a2f6b340d97c28d7d0b
2025-06-02 07:36:53 -07:00
Moti Zilberman 8037e20206 Update debugger-frontend from 343405b...41bf86b (#51739)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51739

Changelog: [Internal] - Update `react-native/debugger-frontend` from 343405b...41bf86b

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/343405ba784fca9290486cbce57e7f2ca953dc14...41bf86bdbb3e59e7711f11527efac67c050bca75).

Reviewed By: huntie

Differential Revision: D75785047

fbshipit-source-id: 5b2a611237e78811f140e8f3cdb8dec4a8b8a2be
2025-06-02 07:19:30 -07:00