Commit Graph

38536 Commits

Author SHA1 Message Date
Mohamed Salama b4dcc9831e Revert D77547628: Fix Dimensions window values on Android < 15
Differential Revision:
D77547628

Original commit changeset: 9d841f642d5b

Original Phabricator Diff: D77547628

fbshipit-source-id: 80ee528740eb4b39816e7873939d74e29d64caec
2025-07-04 04:19:27 -07:00
Nicola Corti 2d0aa1a747 Revert Refactor ViewManagerInterfaces codegen to generate kotlin classes
Summary:
reverting Refactor ViewManagerInterfaces codegen to generate kotlin classes because of warning in OSS, we will reland after 0.81 cut

Changelog: [Android][Breaking] - Revert of Migrate ViewManagerInterfaces to kotlin. Some types in code generated ViewManagerInterfaces might differ. e.g. this will start enforcing nullability in parameters of viewManagerInterface methods (e.g. String commands parameters are not nullable, view params are not nullable in any method, etc)

Reviewed By: lenaic, mlord93

Differential Revision: D77759777

fbshipit-source-id: c24b216b231cdc53296d8c9fca8d789d80daa596
2025-07-04 02:48:42 -07:00
Samuel Susla 0e175ce5b6 Mark ShadowNode::Shared as deprecated and replace all usages (#52393)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52393

## Changelog:
[General][Deprecated] - ShadowNode::Shared is now deprecated. Use `std::shared_ptr<const ShadowNode>` instead.

- Mark ShadowNode::Shared as deprecated in ShadowNode.h
- Replace all uses of ShadowNode::Shared with std::shared_ptr<const ShadowNode>.

This continues the systematic effort to remove ShadowNode type aliases in favor of explicit standard library types for improved code clarity and maintainability.

Reviewed By: christophpurrer

Differential Revision: D77650696

fbshipit-source-id: b4769e2a1e39f49d14d5927be105487ecf69fa3f
2025-07-04 00:29:54 -07:00
Christoph Purrer 2ce7eab5f9 Remove unused RAIICallbackWrapperDestroyer (#52390)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52390

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77710424

fbshipit-source-id: 7c1d7e3181450394311a001af117c6fbdcaeba31
2025-07-03 16:44:16 -07:00
Nicola Corti ccb9edc717 Remove deprecated isStartSamplingProfilerOnInit from DeveloperSettings (#52405)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52405

This field has been deprecated since RN 0.77, we can safely remove it ahead of the branch cut.

Changelog:
[Android] [Removed] - Remove deprecated `isStartSamplingProfilerOnInit` from `DeveloperSettings`

Reviewed By: mdvacca, javache

Differential Revision: D77734913

fbshipit-source-id: 231ecb360921d48ec941a3a214e73b4b89446c13
2025-07-03 15:28:06 -07:00
Nicola Corti f2ecb7e42c Make loadWithFeatureFlags correctly internal (#52395)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52395

This method was exposed as `public` but there is no need for us to expose it in OSS.
So I'm marking it as internal.

Changelog:
[Internal] [Changed] - Make loadWithFeatureFlags correctly internal

Reviewed By: mlord93, mdvacca, javache

Differential Revision: D77734270

fbshipit-source-id: 34e1d7aaa4a5bf3563c78aad570e2310592bcc77
2025-07-03 15:17:38 -07:00
Christoph Purrer 47fe09f505 Make virtual destructors default implemented - instead of empty one (#52382)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52382

Changelog: [Internal]

In C++, both `virtual ~CallInvoker() {}` and `virtual ~CallInvoker() = default` can be used to define a virtual destructor. However, they have slightly different implications:

1. `virtual ~CallInvoker() {}`:
    * This is the traditional way of defining a virtual destructor.
    * It provides an empty implementation for the destructor, which does nothing.
    * The compiler will not generate a default implementation, as you've provided one explicitly.
2. `virtual ~CallInvoker() = default`:
    * This is a more modern way of defining a virtual destructor (introduced in C++11).
    * It tells the compiler to generate a default implementation for the destructor.
    * The default implementation will perform the necessary cleanup operations, such as calling the destructors of base classes and member variables.

In general, `= default` is considered better because it:
* Avoids unnecessary code duplication: By letting the compiler generate the default implementation, you avoid duplicating code that's already generated by the compiler.
* Improves maintainability: If the class has member variables or base classes with non-trivial destructors, using `= default` ensures that the correct cleanup operations are performed without requiring manual updates.
* Conveys intent: Using `= default` clearly indicates that the destructor should perform its default behavior, making the code easier to understand.

So, unless you have a specific reason to provide a custom implementation, `virtual ~CallInvoker() = default` is generally the better choice.

Reviewed By: rshest

Differential Revision: D77685932

fbshipit-source-id: 78c81f8e400069ad38d8d7405dafeb0b6db8e67b
2025-07-03 13:32:28 -07:00
Jorge Cabiedes Acosta c9f1778faf Implement accessibilityOrder by building the accessibilityTree through addChildrenForAccessibility (#52347)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52347

We can build an accessibility tree for Talkback by overriding addChildrenForAccessibility of ViewGroup.

With this we just manually build a tree that contains the elements we care about in the order we want.

We also try to keep most of the tree intact so that coopting works properly
Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D77258926

fbshipit-source-id: 767ebc880a2efbf7934b9e7dee3013dd7822e5ad
2025-07-03 12:56:35 -07:00
Jorge Cabiedes Acosta 5b245767d6 Remove Virtual View accessibilityOrder implementation (#52297)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52297

Doing virtual views is the only way of making it possible to add the host view into the order. This however is too complex for very little gain, we are opting to go for a cleaner solution with the trade off of not being able to add the host view.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D77278752

fbshipit-source-id: 709b995f51a9a03f6d07f2e24f8aea21d62d95c4
2025-07-03 12:56:35 -07:00
David Vacca 76ff1aa5c6 Refactor ViewManagerInterfaces codegen to generate kotlin classes (#51735)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51735

This diff refactors the ViewManagerInterfaces codegen to generate kotlin classes,

As a consequence of this change, there are some ViewManagerInterfaces that have changed their APIs

## Changelog: [Android][Breaking] - Migrate ViewManagerInterfaces to kotlin. Some types in code generated ViewManagerInterfaces might differ. e.g. this will start enforcing nullability in parameters of viewManagerInterface methods (e.g. String commands parameters are not nullable, view params are not nullable in any method, etc)

Reviewed By: javache

Differential Revision: D75719542

fbshipit-source-id: 7e9aa7ccc24e827bd7b6df72b3302e852932e731
2025-07-03 12:19:42 -07:00
Christoph Purrer 253606239b CallInvoker > Remove unused includes (#52381)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52381

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D77685836

fbshipit-source-id: a01aedf51463d228ca14d37dc4a0869e6e9208c9
2025-07-03 11:56:03 -07:00
Ruslan Lesiutin 3561791ff8 fix: rename bottom stack frame (#33680) (#52400)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52400

`react-stack-bottom-frame` -> `react_stack_bottom_frame`.

This survives `babel/plugin-transform-function-name`, but now frames
will be displayed as `at Object.react_stack_bottom_frame (...)` in V8.
Checks that were relying on exact function name match were updated to
use either `.indexOf()` or `.includes()`

For backwards compatibility, both React DevTools and Flight Client will
look for both options. I am not so sure about the latter and if React
version is locked.

DiffTrain build for [91d097b2c588a0977a7a10ed12512dc8a34e3a5b](https://github.com/facebook/react/commit/91d097b2c588a0977a7a10ed12512dc8a34e3a5b)

Reviewed By: jackpope

Differential Revision: D77601866

fbshipit-source-id: 24ed8713af4bebbaeb7a612333cd79c51b696565
2025-07-03 11:38:05 -07:00
Mathieu Acthernoene 85d10ed904 Fix Dimensions window values on Android < 15 (#47554)
Summary:
This PR (initially created for edge-to-edge opt-in support, rebased multiple times) fixes the `Dimensions` API `window` values on Android < 15, when edge-to-edge is enabled.

Currently the window height doesn't include the status and navigation bar heights (but it does on Android >= 15):

<img width="300" alt="Screenshot 2025-06-27 at 16 23 02" src="https://github.com/user-attachments/assets/c7d11334-9298-4f7f-a75c-590df8cc2d8a" />

Using `WindowMetricsCalculator` from AndroidX:

<img width="300" alt="Screenshot 2025-06-27 at 16 34 01" src="https://github.com/user-attachments/assets/7a4e3dc7-a83b-421b-8f6d-fd1344f5fe81" />

Fixes https://github.com/facebook/react-native/issues/47080

## Changelog:

[Android] [Fixed] Fix `Dimensions` `window` values on Android < 15 when edge-to-edge is enabled

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

Test Plan:
Run the example app on an Android < 15 device.

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D77547628

Pulled By: alanleedev

fbshipit-source-id: 9d841f642d5b7ef3294dfbf3868137087a672ad6
2025-07-03 11:37:55 -07:00
Ruslan Lesiutin facdc2f6f4 Support rename of React stack bottom frame (#52398)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52398

# Changelog: [Internal]

Adaptation for https://github.com/facebook/react/pull/33680.

Reviewed By: jackpope

Differential Revision: D77737710

fbshipit-source-id: 6c6893935e8da8175c0cd9ceab21cc05e2092e7a
2025-07-03 09:34:58 -07:00
Enrique López Mañas 477d8df312 Updated targetSdk to 36 (#52355)
Summary:
We need to upgrade the targetSdk to 36, which requires ensuring compatibility with the latest Android APIs and addressing any deprecations or behavior changes introduced in this version.

## Changelog:

[Android] [Changed] - Updated targetSdk to 36 in Android.

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

Test Plan:
- Verified that the app builds and runs successfully with targetSdkVersion 36.

- Ran the full suite of unit and instrumentation tests: all tests passed.

- Manually tested key user flows (login, navigation, data sync) on devices running Android 14 (API 34) and emulator with API 36

- Confirmed that there are no runtime crashes or warnings related to `targetSDK` upgrade.

Behavioral guide for migration: https://developer.android.com/about/versions/16/behavior-changes-16

Reviewed By: fabriziocucci

Differential Revision: D77728391

Pulled By: cortinico

fbshipit-source-id: 3f714f900bbeecc56c0cf46c54b4e42c532c8384
2025-07-03 08:01:47 -07:00
Nicola Corti 2e724e4743 Add changelog for 0.80.1 (#52392)
Summary:
Just the changelog for 0.80.1

## Changelog:

[INTERNAL] - Add changelog for 0.80.1

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

Test Plan: N/A

Reviewed By: fabriziocucci

Differential Revision: D77725130

Pulled By: cortinico

fbshipit-source-id: 2eddb56e8893e0d8e71a6509b1303b3b9cab8769
2025-07-03 06:57:20 -07:00
Alex Hunt f4a9aa3525 Implement connectionTiming and dataReceived NetworkReporter methods (#52335)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52335

Adds support for `Network.requestWillBeSentExtraInfo` and `Network.dataReceived` CDP events in jsinspector-modern and wires up for iOS.

In particular, `Network.requestWillBeSentExtraInfo` is necessary to populate request headers in the UI.

**End of base Network implementation for iOS**

After this diff, we are spec-complete on all CDP Network methods for our V1, on iOS.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D77489476

fbshipit-source-id: 84aa4da9d9fcbdc61eff236fc6bd2136496910a5
2025-07-03 05:01:57 -07:00
Alex Hunt ebb831a0c9 Implement Network.loadingFailed (#52334)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52334

Adds support for `Network.loadingFailed` in jsinspector-modern and wires up for iOS.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D77489477

fbshipit-source-id: dc8156979fe49583819019fa4b88b6eb99dea734
2025-07-03 05:01:57 -07:00
Alex Hunt 68342a4d12 Support CDP response previews for chunked data (#52331)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52331

Updates the iOS inputs to `NetworkReporter` to support incremental string data HTTP responses (`Transfer-Encoding: chunked`).

This means that incremental responses, such as Metro bundle requests, can be displayed as previews in React Native DevTools.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D77457109

fbshipit-source-id: 00a622dbac97c38e07c67b5ee3661c8d586f6fe1
2025-07-03 05:01:57 -07:00
Alex Hunt 94c97db4da Implement Network.getResponseBody (#52332)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52332

Adds support for the [`Network.getResponseBody`](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getResponseBody) CDP event in `jsinspector-modern` and configures this for iOS. This enables us to populate the "Preview" and "Response" tabs in the React Native DevTools Network panel.

This is integrated with `RCTNetworking.mm` to support synchronously received `text` or `blob` data types, with incremental response support added next in D77457109.

**Implementation notes**

- Adds a new `BoundedRequestBuffer` construct to safely buffer response previews at a max memory size.
- `RCTNetworking` will always call `maybeStoreResponseBody` (when feature flag enabled), but is unaware whether there is an active CDP debugging session with network support or not.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D74319394

fbshipit-source-id: c9dbb44551c15d1b1a7cce56b35bf829f8a99dc7
2025-07-03 05:01:57 -07:00
Eric Rozell 9253fc3b42 Defer focus cell render mask updates (#52380)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52380

Apps that rely support focus in FlatList rendered items are missing out on a FlatList optimization that defers rendering for offscreen content updates.

For example, on Android, if you focus and smooth scroll an item into view, the onScroll event will fire first. For most sufficiently large virtualization windows, the next render will be delayed by the render batch timeout as most materialization of virtualized views is not treated as a high pri render.

However, this batch / timeout mechanism isn't being used for cell render updates that occur as a result of a focus change.

This change adds the same timeout mechanism used for scroll events. In most cases, the view that is focused is in the viewport, and the extra rendering needed is already scheduled (or executed with high priority if needed) when the onScroll event is processed.

In cases where the focus change occurs outside the viewport, most platforms will want to do some kind of "bring into view" anyway, and the same applies - onScroll will take care of scheduling the cell rendering priority.

## Changelog

[Internal]

Reviewed By: NickGerleman

Differential Revision: D77681274

fbshipit-source-id: 1ade377e513eca21338a380ff9299dd410606aec
2025-07-03 04:15:41 -07:00
Nicola Corti 45fd7feb9f Convert UIManagerModuleConstantsHelper to Kotlin (#52358)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52358

Another class going from Java to Kotlin.
This is quite involved due to the amount of Raw generics we were using so I'd appreaciate a couple of further eyes here.

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

Reviewed By: mdvacca, javache

Differential Revision: D77589975

fbshipit-source-id: 477c1e2a8dfd31db60047fd1252f6d47c177f5c7
2025-07-03 02:52:01 -07:00
Nicola Corti 6cb8dc37c7 RNGP - Add support for exclusiveEnterpriseRepository (#52378)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52378

This adds a Gradle property called `exclusiveEnterpriseRepository`
that users can set in their `android/gradle.properties` as such:

```diff
# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
hermesEnabled=true

+exclusiveEnterpriseRepository=https://my.internal.proxy.net/
```

This will remove all the existing Maven repositories and only use the internal mirror they have.

Changelog:
[Android] [Added] - RNGP - Add support for `exclusiveEnterpriseRepository` to specify an internal Maven mirror.

Reviewed By: mdvacca

Differential Revision: D77667573

fbshipit-source-id: 835004d2ae7aa4e250b6f7a88a41918b573f5bd5
2025-07-03 02:27:08 -07:00
Joe Vilches cec0de8f99 Change Scroller getter to protected (#52387)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52387

I would like to grab this in a subclass but unfortunately can't. It is kinda jank since this is a val obtained via reflection, but I figure this is better than copy and paste. I think that I could also expose a function that uses this scroller the way I want it to. Let me know if there are strong objections here

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D77684599

fbshipit-source-id: 6f02c1da5135c1cf34fa1483542e06bf8f0be75e
2025-07-02 22:13:16 -07:00
nishan (o^▽^o) 097d482446 fix(ios): Correct gradient interpolation for when transitioning to transparent color (#52249)
Summary:
This change fixes an issue on iOS where gradients that fade to a transparent color-stop appear dark or "muddy." The fix ensures that the color's hue is preserved during the transition, matching the behavior on Android and web.

### The Problem
When creating a gradient on iOS (e.g., linear-gradient(red, transparent)), the transparent keyword is treated as transparent black (rgba(0,0,0,0)). The `CAGradientLayer` on iOS then interpolates all color channels linearly, causing the red, green, and blue components of the start color to fade to 0. This transition through black results in an undesirable dark or "muddy" appearance in the middle of the gradient.

## Changelog:
[IOS][FIXED] - Gradient interpolation for transparent colors
<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

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

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

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

Test Plan:
Checkout `LinearGradient` example in RNTester, checkout the newly added transparent color transition example, it should render same on android and iOS.

| Before | After |
| --- | --- |
| <img src="https://github.com/user-attachments/assets/c0bb54ad-ed0e-4a80-b37f-0458af0f1f77" width="300"> | <img src="https://github.com/user-attachments/assets/02da921a-bd0e-45c1-881c-cf6460d5ed43" width="300"> |
| `linear-gradient(to right, red, transparent)` transitions to black on iOS, creating a dark effect. | The gradient correctly fades the red color's alpha channel to zero |

Reviewed By: javache

Differential Revision: D77312194

Pulled By: NickGerleman

fbshipit-source-id: 053df8e44f52cd22a3f28fd01f583f7d03c66af5
2025-07-02 17:55:45 -07:00
Nick Gerleman 508b1526d9 Avoid array copies on every MapBuffer read (#52386)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52386

Enum `values()` function makes a copy of an underlying array on each call. This happens in a hot path, and seems to show up during profiling. Let's cache it.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D77623705

fbshipit-source-id: 5a33425822f477f63fe104ca9e5ed474385a2022
2025-07-02 17:26:48 -07:00
Nick Gerleman 0d455f3272 buildSpannableFromFragmentsOptimized (#52385)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52385

This replaces `buildSpannableFromFragmentsOptimized()` with a more optimized version. There are a couple main changes.

1. We don't need a complicated structure around ordering, and span priority, that made its way from the Java ShadowNode logic. AttributedString already ensures there are no overlapping attributes per fragment.
2. `SpannableStringBuilder` is a complicated text-editor style data structure, optimized to allow text content to be modified, and spans re-applied. We can use a much lighter `SpannableString`, on top of the ahead-of-time known text content, which is faster, and saves around 500 bytes per string (and prepared layout). If we assign this to an `EditText`, which later gets edited, Android will copy it to a `SpannableStringBuilder`.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D77622848

fbshipit-source-id: 69bbac86e1f0fd4a15dab6bc279cca305f2a53ae
2025-07-02 17:26:48 -07:00
Nick Gerleman a4b0d64395 ReactNativeFeatureFlags.enableAndroidTextMeasurementOptimizations() (#52384)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52384

Adds the feature flag, controlling multiple optimizations up the stack.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D77622983

fbshipit-source-id: 16500e8557d36db627c62faa511eeb4c73dc7484
2025-07-02 17:26:48 -07:00
Nolan O'Brien 22b8b53c77 Fix exhaustive switches (#52383)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52383

Changelog: [General][Fixed] - Add `default:` case to avoid warnings/errors for targets that compile with `-Wswitch-enum` and `-Wswitch-default` enabled

Reviewed By: aary

Differential Revision: D77051150

fbshipit-source-id: a4f18bb7e47f027fd64cc42bacd7246263ef2454
2025-07-02 16:56:07 -07:00
Nolan O'Brien 9079b53c6f Fix exhaustive switches (#52379)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52379

Changelog: [General][Fixed] - Add `default:` case to avoid warnings/errors for targets that compile with `-Wswitch-enum` and `-Wswitch-default` enabled

Reviewed By: aary, yungsters, astreet

Differential Revision: D77051152

fbshipit-source-id: 100b10f97cb3a5d73f1e3dcaf1b284baf6a43982
2025-07-02 14:21:18 -07:00
Nick Lefever da23346c7e Fix UNDEFINED YGValue serialization (#52376)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52376

Correct the expected serialization based on the YogaValue parse implementation:
https://www.internalfb.com/code/fbsource/[ecdf90fe69d0]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaValue.java?lines=66-68

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D77663413

fbshipit-source-id: e8b6091a5d57c6d0301411371c290a867c9b5224
2025-07-02 10:07:01 -07:00
Christoph Purrer ceb5f1dedb Remove unused SharedAttributedString alias (#52362)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52362

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77630091

fbshipit-source-id: df297bc5150416b6ddf719addc3ae926e3b39f48
2025-07-02 08:34:21 -07:00
Fabrizio Cucci faa8c7b8a1 Keep changelog references for previous versions in CHANGELOG (#52372)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52372

This is just a follow-up on top D77025333 to make sure that the links in the blog posts and the GitHub releases keep working.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77654056

fbshipit-source-id: a1c6df44ebee058dd5b59e5b6a60c7c1e060e52c
2025-07-02 06:34:06 -07:00
Nicola Corti e20bb56f3b Bump Gradle to 8.14.2 (#52370)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52370

This is just a patch bump of Gradle ahead of the 0.81 branch cut.

Changelog:
[Android] [Changed] - Bump Gradle to 8.14.2

Reviewed By: fabriziocucci

Differential Revision: D77601121

fbshipit-source-id: b2fdc8b022f2ab43997f412c77e0c924c01f1a5d
2025-07-02 04:36:22 -07:00
Alex Hunt 4274d6f7c7 Tweak RNTester status bar on Android (#52369)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52369

Tiny fix where the system status bar elements were no longer visible under Android edge-to-edge.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77653633

fbshipit-source-id: 1275a0de6665a6ef4599166fb205865cd581bb41
2025-07-02 04:34:10 -07:00
Nicola Corti b578a70bd5 Bump packages for next release (#52359)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52359

This is needed ahead of the 81 branch cut.

Changelog:
[Internal] - Bump all packages to 0.81.0-main

Reviewed By: huntie

Differential Revision: D77602196

fbshipit-source-id: 1b52a7d1577783d72aba8d20f98032f29ffcc7df
2025-07-02 03:53:34 -07:00
Moti Zilberman bf51035e04 Scaffolding for custom RNDT shell binary (#52357)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52357

Changelog: [Internal]

Adds a hyper-minimal build script using `electron/packager` that produces custom binaries for the experimental React Native DevTools standalone shell. The main user-facing benefit of this is replacing the Electron name and icon with our own branding.

NOTE: `electron/packager` is designed to include the application code in the resulting binary. This is arguably overkill for us - the current launch model of `electron src/electron/index.js` is actually wholly sufficient for what we need - but I decided to go with the grain of the available tooling for simplicity.

Icon design courtesy of huntie. 🙏

Reviewed By: huntie

Differential Revision: D77591742

fbshipit-source-id: a968465df4f54fba54c874b6300788e151600ed7
2025-07-02 03:48:51 -07:00
Moti Zilberman 2d68a733f8 Fix run-ci-javascript-tests script (#52364)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52364

Changelog: [Internal]

D76512374 broke error reporting in `run-ci-javascript-tests.js`. This is partly because the file was untyped and we missed that the `.code` check on the result of `execSync` was always going to be falsy. Also, `execSync`'s default error handling mechanism is not human-friendly - it throws an `Error` with `Buffer`s for stdout and stderr (see [example](https://github.com/facebook/react-native/actions/runs/16003656383/job/45144825919?pr=52357&fbclid=IwY2xjawLRyfpleHRuA2FlbQIxMQBicmlkETFZSG1xeWhTWWczR1paS0lKAR4pF46Z-J2CbSk7YdHZJ-N3F9eQJ7hR4EowfLV6mUtzMLg8j-EWdZiGY1la6A_aem_1Zbvn6fD5NS9YO-B7QJssg)).

Here, I'm adding types, removing dead code and preserving stdout and stderr from all child processes in a human-readable format.

Reviewed By: huntie

Differential Revision: D77648312

fbshipit-source-id: c6d98e668d6edf15729fa02fecb3408b9dd6debc
2025-07-02 03:09:18 -07:00
Fabrizio Cucci 326467c856 Add changelog entry for 0.79.5 (#52367)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52367

As per title.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77652098

fbshipit-source-id: c9ab8c7549e1f50b2e3ca7a1c7de6ec321926ee6
2025-07-02 02:52:12 -07:00
Dawid Małecki c1168cf919 Fix deep react native imports eslint rule (#52365)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52365

Adds type imports autofix support and pass `fb_internal` paths in react native deep imports eslint rule. The rule fixes imports with all matched types with static API mapping to prevent splits.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D77445445

fbshipit-source-id: cd5b75b4b3b53792117b8297352dddc4d63dbf70
2025-07-02 02:13:31 -07:00
Samuel Susla 2a6b55f0b1 put optimisation for VirtualView on iOS behind a flag (#52345)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52345

changelog: [internal]

I would like to measure impact of D76597973 to get a better understanding of UIKit's rendering.

Reviewed By: yungsters

Differential Revision: D77542666

fbshipit-source-id: 4c2de4f36d2b374d83df934dd3a98d01b24f487f
2025-07-02 01:46:25 -07:00
Dawid Małecki b41b924b2d Add diff-api-snapshot action to danger (#52045)
Summary:
This PR connects breaking change detection with a danger bot. The action takes snapshot from main branch and from the PR as inputs to`diff-api-snapshot` (saved in runner temp directory).

## Changelog:
[Internal]

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

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

Reviewed By: huntie

Differential Revision: D76735630

Pulled By: coado

fbshipit-source-id: 9208117340c1e0bf10d58b67892727717d22e62f
2025-07-01 08:58:15 -07:00
Dawid Małecki 71f2f05f03 Align breaking change detection with new snapshot format (#52353)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52353

This diff aligns breaking change detection script with new snapshot format. It compares hashes to determine if the API changed for each specifier.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D77377762

fbshipit-source-id: e1c69692ace389fb08ae9470b9f9631e53834206
2025-07-01 08:58:15 -07:00
Dawid Małecki 1c7b04db4a Delete public-api-test (#52342)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52342

This diff deletes `public-api-test` for detecting changes in public API. It is replaced with public API snapshot validation (in D76340729) for better detection and understanding of changes that influence external interfaces.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D77531763

fbshipit-source-id: a8ef2b6f52fa6efb5b312598ea3e4746fc51e4ec
2025-07-01 08:58:15 -07:00
Dawid Małecki 128f5eb9ac Validate RN JS API snapshot on CI (#52352)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52352

This diff adds excution of `yarn build-types --validate` to run RN JS API snapshot validation on CI.

### Motivation

Detect react-native public API changes before they land.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D76340729

fbshipit-source-id: 10c465418e0ba4eb05cf557a16119f9756843d9e
2025-07-01 08:58:15 -07:00
Dawid Małecki 8f9bca5f74 Initial commit of ReactNativeApi.d.ts (#52343)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52343

This diff commits our V2 JavaScript API snapshot for React Native.

This is a new format and workflow that replaces the previous `public-api-test` Jest test.

Please look at the file header for up-to-date instructions on updating the API snapshot.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D77532617

fbshipit-source-id: d5faae815aa5071b0f472fcb02318b73772b11cf
2025-07-01 08:58:15 -07:00
David Vacca dcbbf275cb Reintroduce CppPropsIteratorSetter for Yoga Styles (#52351)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52351

Reintroduce CppPropsIteratorSetter for Yoga Styles

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D77563504

fbshipit-source-id: 969c78e267db3e97ea567ad948489b5991c88678
2025-07-01 07:16:19 -07:00
Tim Yung da520848c9 RN: Always Flatten Animated Styles (#52268)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52268

Ships the feature flag introduced in https://github.com/facebook/react-native/pull/51719 to fix crahes that result from shadowed animated style values.

Changelog:
[General][Changed] - Animated now always flattens `props.style`, which fixes an error that results from `props.style` objects in which `AnimatedNode` instances are shadowed (i.e. flattened to not exist in the resulting `props.style` object).

Reviewed By: javache

Differential Revision: D77314904

fbshipit-source-id: b442d0256aee7a8925e28c7e87aee5e0a3f39425
2025-07-01 07:07:33 -07:00
Pieter De Baets ce306aca34 Remove redundant check for NativeReactNativeFeatureFlags (#52354)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52354

These should no longer be needed as `ReactNativeFeatureFlags` handles the missing native module gracefully.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D77365271

fbshipit-source-id: 92c6789b2175f24c79838118f681107a43c9ff0a
2025-07-01 03:49:58 -07:00
Nick Gerleman 5cc4d0a086 Reland Fix possible invalid measurements when width or height is zero pixels (#52348)
Summary:
X-link: https://github.com/facebook/yoga/pull/1823

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

Fixes https://github.com/facebook/yoga/issues/1819

Yoga has a fast path when measuring a node, if it thinks it knows its dimensions ahead of time.

This path has some eroneous logic, to set both axis to owner size, if *either* will evaluate to zero, while having an `YGMeasureModeAtMost`/`FitContent` constraint. This means that if a node is given a zero width, and Yoga later measures with with `FitContent`, its height will become the maximum allowable height, even if it shouldn't be that large.

We can fix this, by only allowing if both axis are this fixed case, instead of just one.

This bug has existed for about a decade (going back to at least D3312496).

Changelog:
[General][Fixed] - Fix possible invalid measurements with width or height is zero pixels

Reviewed By: yungsters

Differential Revision: D76851589

fbshipit-source-id: 6f5a0e6beccc51f591726c9e83e9b90f3350ed0f
2025-06-30 20:46:39 -07:00