Commit Graph

12270 Commits

Author SHA1 Message Date
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
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
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 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 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
Jack Pope 3eeda07a69 Align AttributeConfiguration type in ReactNativeTypes (#33671)
Summary: DiffTrain build for [1e0d12b6f273d7345e32c16cd937475ed7c512ad](https://github.com/facebook/react/commit/1e0d12b6f273d7345e32c16cd937475ed7c512ad)

Reviewed By: kassens

Differential Revision: D77541776

fbshipit-source-id: ef9a99bfc7f16feee1d27685de62a970305f8e5a
2025-06-30 17:19:32 -07:00
Mateo Guzmán 7d01060a8b Kotlin: fix static code analysis weak warnings (6/n) (#52338)
Summary:
Static code analysis reports several weak warnings, many of which seem to be leftovers after Kotlin migration. This PR addresses quite a few:

- [Accessor call that can be replaced with property access syntax](https://www.jetbrains.com/help/inspectopedia/UsePropertyAccessSyntax.html)

## Changelog:

[INTERNAL] - Kotlin: fix static code analysis weak warnings (6/n)

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

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

Reviewed By: NickGerleman

Differential Revision: D77504913

Pulled By: cortinico

fbshipit-source-id: 62661ba6adafb7893ce27811357020966d5ea4c1
2025-06-30 15:54:57 -07:00
Pieter De Baets 69e4252ccb Fix access to observers outside lock in ImageResponseObserverCoordinator (#52346)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52346

This is bypassing the mutex, and potentially not thread-safe.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D77541041

fbshipit-source-id: f97415d066786864806836768dbce2d5e68487ef
2025-06-30 13:22:36 -07:00
Ruslan Lesiutin 69a55d7b76 Console: prioritize original console.timeStamp implementation (#52319)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52319

# Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D77315831

fbshipit-source-id: b4d7fd9c816dcb4b76cc7d026f509a6a24da58f8
2025-06-30 12:55:28 -07:00
Ruslan Lesiutin 5340a00ac0 Define isProfiling option when Fusebox is used in Production mode (#52320)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52320

# Changelog [Internal]

We are gating `__RCTProfileIsProfiling` global definition under this `isProfiling` option - [1].

Reviewed By: vzaidman

Differential Revision: D77315833

fbshipit-source-id: f71175a573aa6d77c16a657475c59820f9830aa6
2025-06-30 12:55:28 -07:00
generatedunixname89002005287564 b8b79a3fc1 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon (#52344)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52344

Reviewed By: javache

Differential Revision: D77526780

fbshipit-source-id: 6ec8cac95cd0cf9bfc29c57b7ad85fb5e9ab65cb
2025-06-30 12:22:37 -07:00
Nicola Corti c4325c335b Fix broken Modal OSS E2E test due to createNewDialog setter (#52341)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52341

The setter for `createNewDialog` is now wrong (after D76834213).
If the `createNewDialog` has been set to `true` by any other field, we should respect it and not set it to true/false regardless
(only considering the `isEdgeToEdgeFeatureFlagOn`) property.

This fixes it.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D77539533

fbshipit-source-id: a1deaf1f1b856895304e8b73fa5d0c0367e677af
2025-06-30 10:16:55 -07:00
Mateo Guzmán 73e513280d Kotlin: fix static code analysis weak warnings (5/n) (#52337)
Summary:
Static code analysis reports several weak warnings, many of which seem to be leftovers after Kotlin migration. This PR addresses quite a few:

- [Unnecessary type argument](https://www.jetbrains.com/help/inspectopedia/RemoveExplicitTypeArguments.html)
- [Variable declaration could be moved inside 'when'](https://www.jetbrains.com/help/inspectopedia/MoveVariableDeclarationIntoWhen.html)
- [Assignment can be replaced with operator assignment](https://www.jetbrains.com/help/inspectopedia/AssignmentReplaceableWithOperatorAssignment.html)
- [Negated call can be simplified](https://www.jetbrains.com/help/inspectopedia/SimplifyNegatedBinaryExpression.html)

## Changelog:

[INTERNAL] - Kotlin: fix static code analysis weak warnings (5/n)

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

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

Reviewed By: cortinico

Differential Revision: D77525702

Pulled By: rshest

fbshipit-source-id: b0bd2e7616340c22b22e7f58387c53c51cbf073e
2025-06-30 03:38:26 -07:00
George Zahariev 2e6cf96e47 Update hermes-parser and related packages in xplat/arvr/socialvr to 0.29.1 (#52316)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52316

Bump hermes-parser and related packages to [0.29.1](https://github.com/facebook/hermes/blob/static_h/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [internal]

Reviewed By: rshest

Differential Revision: D77431991

fbshipit-source-id: d0ab4d7a338fdb68a529ed8151c7e1924600a809
2025-06-27 21:48:28 -07:00
Joe Vilches 132c2cdf12 Fix keyboard navigation if snapToAlignment is set
Summary:
There is an issue with keyboard navigation if some scroll view sets `snapToAlignment`. In this case, we are unable to find potential focus candidates if clipping is enabled since this prop will make it so that certain views in the hierarchy under the scroll view form a native view without any traits being set. The fix we have in place currently relies on `FormsStackingContext` to be set to discover potential candidates so it will break in this case. To fix this, we just return the entire ancestor list, since native will know how to deal with the cases that are not actual views, and in general has the official knowledge of what can be in the hierarchy or not.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D77467933

fbshipit-source-id: 35daaba06347c738cf7a85eef86adb7944a9cb26
2025-06-27 18:02:06 -07:00
Nick Gerleman 2d1db71bc0 Add global cache for Facsimile Layouts (#52308)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52308

Experimentation shows, that we very heavily rely on the global text cache for performance (not sure how much of this is invalidation, vs repeated text, or revisiting previous surfaces).

This adds a global LRU cache, of prepared layouts, given a specific AttributedString and constraints. This is similar to the existing cache, with the caveat, that we need to have separate entries for any display states, instead of just those that effect metrics.

I sized it at 200 elements for now, since an Android `Layout` is much heavier than a `Size` (in practice, each seem to weight 1-3KB (though this will be significantly reduced with future change to move from `SpannableStringBuilder` to `SpannableString` and also contributes to the global JNI ref table, but set this up to be customizable via flag, so we can experiment, on perf impact, vs memory.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D77341994

fbshipit-source-id: b453250dc475f6a281a3260b876bf80f301dd5dd
2025-06-27 14:37:33 -07:00
Soe Lynn d96bbcdf0c Back out "Back out "Adding shouldForwardToReactInstance check in ReactDelegate for Bridgeless"" (#52323)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52323

Original commit changeset: b144ca6db6f7

Original Phabricator Diff: D77388413

Reverting the revert since it did not fix our javascript crash problem for v270 https://fburl.com/scuba/errorreporting_system_vros_javascripterrors/mtexik9e

Original diff stack: D76908041
Revert diff stack: D77388940

Changelog[Internal]:
Puting back the Kotlin Migration for ReactDelegate file

Reviewed By: cortinico

Differential Revision: D77448293

fbshipit-source-id: ed40836c3ecb4ca551b23cb64de2c34cfda0dea1
2025-06-27 11:55:44 -07:00
Soe Lynn faef2b1252 Back out "Back out "[react-native][PR] Migrate ReactDelegate to Kotlin"" (#52322)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52322

Original commit changeset: 4a366205ea9c

Original Phabricator Diff: D77388940

Reverting the revert since it did not fix our javascript crash problem for v270 https://fburl.com/scuba/errorreporting_system_vros_javascripterrors/mtexik9e

Original diff stack: D76908041
Revert diff stack: D77388940

Changelog[Internal]:
Puting back the Kotlin Migration for ReactDelegate file

Reviewed By: cortinico

Differential Revision: D77448238

fbshipit-source-id: f41faa19f6761b7ed644e804019f5ec4738326a7
2025-06-27 11:55:44 -07:00
Vitali Zaidman d5cd6ed152 Update debugger-frontend from d95ac13...35c4630 (#52317)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52317

Changelog: [Internal] - Update `react-native/debugger-frontend` from d95ac13...35c4630

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/d95ac13bf0ab64a5e6c2eb18eb138587063b9c34...35c4630bd58bbcbc6f4c54c084b4e52994dc4940).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [35c4630bd](https://github.com/facebook/react-native-devtools-frontend/commit/35c4630bd) | Vitali Zaidman (vzaidman@gmail.com) | 2025-06-26T09:47:45+01:00 | [track stack trace symbolication failures (#183)](https://github.com/facebook/react-native-devtools-frontend/commit/35c4630bd) |
| [e4487ef2e](https://github.com/facebook/react-native-devtools-frontend/commit/e4487ef2e) | Vitali Zaidman (vzaidman@gmail.com) | 2025-06-24T14:29:35+01:00 | [support symbolication with native frames (#181)](https://github.com/facebook/react-native-devtools-frontend/commit/e4487ef2e) |

Reviewed By: huntie

Differential Revision: D77437936

fbshipit-source-id: 5b64195064aa5e157ae1adad01a3f2dc94045f98
2025-06-27 07:57:58 -07:00
Mathieu Acthernoene 09ef774ff6 Add edge-to-edge opt-in support (#52088)
Summary:
This follows https://github.com/facebook/react-native/pull/47554

Compared to the initial proposal, I had to remove the `edgeToEdgeEnabled` property from the root `gradle.properties` and put it in the app `gradle.properties` instead (explaining the `AgpConfiguratorUtils.kt` / `GenerateEntryPointTask.kt` / `ProjectUtils.kt` / `PropertyUtils.kt` changes)

This PR:
- Enable edge-to-edge for `MainActivity` (when `edgeToEdgeEnabled` is set to `true`)
- Disable `StatusBar` `backgroundColor` and `translucent` (when `edgeToEdgeEnabled` is set to `true`)
- Enforce `statusBarTranslucent` and `navigationBarTranslucent` on `Modal` when edge-to-edge is enabled
- Add an `isEdgeToEdge` constant to `DeviceInfoModule` for [`react-native-is-edge-to-edge`](https://github.com/zoontek/react-native-edge-to-edge/tree/main/react-native-is-edge-to-edge) detection

## 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
-->

- [Android] [Added] - Add edge-to-edge opt-in support

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

Test Plan:
- Update `enableEdgeToEdge` value in `packages/rn-tester/android/app/gradle.properties`
- Recompile

https://github.com/user-attachments/assets/4c6beb98-fa88-427c-b62d-a42ffe5330f0

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D76834213

Pulled By: alanleedev

fbshipit-source-id: c39b2cff1a5e94e31306e3b35651aa2de83d2fe6
2025-06-27 06:16:23 -07:00
Nicola Corti 78c9671c24 Migrate ThemedReactContext to Kotlin (#52309)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52309

This is another class going from Java to Kotlin.
Thish should have no breaking changes, but I'll keep an eye to see if this is disruptive for users in the ecosystem.

I also haven't removed any of the Deprecated method, which can be cleaned up afterwards.

Changelog:
[Android] [Changed] - Migrate ThemedReactContext to Kotlin

Reviewed By: javache

Differential Revision: D77374236

fbshipit-source-id: d1787b21897b01c45bbf841fdda00972e0be58db
2025-06-27 05:00:05 -07:00
generatedunixname89002005287564 a0d4e18020 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/jni/react/hermes/instrumentation (#52285)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52285

Reviewed By: cortinico

Differential Revision: D77359122

fbshipit-source-id: ad425cdfecf57210ae79a8bad25fde4896b476c1
2025-06-27 01:20:27 -07:00
Soe Lynn fbd8281ab2 Back out "Migrate ReactDelegate to Kotlin" (#52304)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52304

Investigating javascript crash regression between Store APK v269 and v270 T228736366 with mid https://www.internalfb.com/logview/system_vros_javascripterrors/4a0131b8b79e3994b639c7ca212db717?ds=%7B%22start%22%3A%221750796919%22%2C%22constraints%22%3A[]%2C%22end%22%3A%22now%22%7D&ds_nux_type=task

We suspect that this diff stack may be causing the issue could be caused by this Kotlin migration diff stack D76908041

Changelog: [Internal]
Reverting Kotlin migration for `ReactDelegate`

Reviewed By: gorodscy, mullender

Differential Revision: D77388940

fbshipit-source-id: 4a366205ea9c515a1561a4624b8d29e81ab9bae9
2025-06-26 14:44:36 -07:00
Soe Lynn c360251b4a Back out "Adding shouldForwardToReactInstance check in ReactDelegate for Bridgeless" (#52303)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52303

Investigating javascript crash regression between Store APK v269 and v270 T228736366 with mid https://www.internalfb.com/logview/system_vros_javascripterrors/4a0131b8b79e3994b639c7ca212db717?ds=%7B%22start%22%3A%221750796919%22%2C%22constraints%22%3A[]%2C%22end%22%3A%22now%22%7D&ds_nux_type=task

We suspect that this diff stack may be causing the issue could be caused by this Kotlin migration diff stack D76908041

Changelog: [Internal]
Reverting Kotlin migration for ReactDelegate

Reviewed By: mullender

Differential Revision: D77388413

fbshipit-source-id: b144ca6db6f75614c7988e474ef89f19714a4a09
2025-06-26 14:44:36 -07:00
Zeya Peng 793023a4e2 Fewer calls to direct manipulation callback (#52296)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52296

## Changelog:

[Internal] [Changed] - Fewer calls to direct manipulation callback

`NativeAnimatedNodesManager::onRender` is supposed to run each frame for c++ animation, from the callstack sample trace, the vast majority of time is spent on `updateNodes` (run update on all AnimatedNodes) and `commitProps` (where either Fabric ShadowTree commit or direct manipulation is called). Change in this PR is supposed to reduce time spent in `commitProps`

{F1979788964}

Reviewed By: sammy-SC

Differential Revision: D77380842

fbshipit-source-id: 2f25ca1fba4171a7b3e485298738379d0daff3ad
2025-06-26 14:17:27 -07:00
Riccardo Cipolleschi ffd6e5537d Remove RCTPushNotificationManager from umbrella header (#52306)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52306

The RCTPushNotificationManager is deprecated and not part of the prebuilds as it is optional.
We mistakenly added it to the umbrella header and nightlies do not work with prebuilds.

This change removes the header ad should fix the build.

## Changelog:
[Internal] -

Reviewed By: philIip

Differential Revision: D77395754

fbshipit-source-id: 66371650dc56f5be16a00319d9e4a1078a7b68bd
2025-06-26 14:15:45 -07:00
Sam Zhou 505588b9aa Add annotations or make things readonly to prepare for object literal soundness fix in react-native (#52305)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52305

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D77386425

fbshipit-source-id: d69184abb1c8f7c516229aafe24dd418b5dd887e
2025-06-26 13:24:24 -07:00
Nick Gerleman a6a2884d63 Fix onTextLayout metrics not incorporating ReactTextViewManagerCallback (#52276)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52276

The line metrics reported do not process the Spannable, meaning their layout results may disagree with those used for measurement and display.

Changelog:
[Android][Fixed] - Fix onTextLayout metrics not incorporating ReactTextViewManagerCallback

Reviewed By: lenaic

Differential Revision: D77261839

fbshipit-source-id: 87bdc86ce16a2ae9fa69532c5721c19567a53595
2025-06-26 12:09:54 -07:00
Soe Lynn ed756edd92 Back out "Revert D76757706: [iOS][RN] Fix LegacyViewManagerInteropComponentDescriptor" (#52269)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52269

Relanding the reverted PR.

Differential Revision: D77282452

fbshipit-source-id: 1480d8ab067bbbb1b41a9cd03315748c1311f910
2025-06-26 11:21:43 -07:00
Samuel Susla e3f029fd17 make VirtualView hidden when it is not visible on screen (#52294)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52294

changelog: [internal]

Views that are hidden provide couple perf benefits:
- The layer is skipped during hit-testing, so the view no longer receives touches.
- Compositing work for the layer is skipped, so nothing is uploaded to the GPU for that view.

Note, VirtualView still occupies space in memory and because this is infinite list and its numbers will grow unbounded.

In this diff, hidden = YES is only set when VirtualView does not participate in accessibility features.

Reviewed By: yungsters

Differential Revision: D76597973

fbshipit-source-id: 10eb36fccabba9e37cc6322ed5969b8502193a5f
2025-06-26 10:51:32 -07:00
Riccardo Cipolleschi afb2afec26 Fix React-Fabric podspec to only use the sources for iOS (#52295)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52295

The current setup for several of our podspecs abuses the `**` globbing mechanism, forcing us to specify some excluded folders.
By excplicitly mention the folders that we want to use on iOS, we can avoid the usage of the `exclude_files` property.

This should make the setup more reliable and it will also avoid to leak to OSS the presence of some folders we only use internally like `platform/macos` and `platform/windows`

## Changelog:
[Internal] -

Reviewed By: huntie

Differential Revision: D77381512

fbshipit-source-id: 4cb9118bf9f0ecd253d7d871341f733564d84c83
2025-06-26 10:46:39 -07:00
Ruslan Shestopalyuk ffa6630243 Add API to get image loader instance from rncxx IMountingManager interface (#52293)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52293

# Changelog:
[Internal] -

Adds a helper method to the `IMountingManager` API in order to get the platform specific image loader implementation, if available.

Reviewed By: christophpurrer

Differential Revision: D77379053

fbshipit-source-id: b7595d78c83e9270ec1818daf2d0f1d342661e52
2025-06-26 10:34:38 -07:00
Christian Falch 47b2fe4140 Refactored how we create umbrella, modulemap and header files (#52286)
Summary:
To make sure we are exposing the same public API to swift as without prebuilt, this commit changes the follow:

- ModuleMap / Umbrella file is generated from template, not dynamically to align with non-prebuilt (cocoapods). This is temporary, we are already working toward a solution to generate them dynamically.
- Headers are extracted by reading from podspec files and expanding their globs. This is now easy since we can use the podspec_sources function to look for file globs.

## Changelog:
[Internal] -  refactored header/umbrella/modulemap generation for prebuild

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

Test Plan:
- Run RN-tester with/without prebuilts
- Create new RN app based on nightly, build with/without prebuiltsTo make sure we expose all the swift features that we should, we expose and declare a variable from React_RCTAppDelegate

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D77368255

Pulled By: cipolleschi

fbshipit-source-id: 88e2c9d1622753895c8667a9b5aeae4a0d332cc4
2025-06-26 10:25:35 -07:00
Ruslan Lesiutin ff97ca3134 Re-land Implement console.timeStamp
Summary:
# Changelog: [Internal]

Adds support for experimental non-standardized `console.timeStamp` API for capturing performance entries on a timeline. The main idea of the API is to be highly performant. More details in the corresponding RCP [1].

NOTE: Because of the `jsinspector-modern` stack gating logic, this won't be installed in production builds. `console.timeStamp` will be polyfilled with a stub - D76987507.

Reviewed By: rubennorte

Differential Revision: D77374707

fbshipit-source-id: cb66b9fda06168f4b13af764afe95a63a0a8d5a0
2025-06-26 09:57:32 -07:00
pchalupa 0386b9bd51 Rename arguments of onContentSizeChange callback (#52291)
Summary:
The argument names in the `onContentSizeChange` callback's type definition differ from the [documentation](https://reactnative.dev/docs/scrollview#oncontentsizechange).

## 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] - Renamed argument names in the `onContentSizeChange` callback's type definition

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

Test Plan:
The IDE reflects updated argument names.
![Screenshot 2025-06-26 at 14 59 40](https://github.com/user-attachments/assets/1579998a-d9a8-4b98-a664-e5106ffb42f5)

Reviewed By: fabriziocucci

Differential Revision: D77373877

Pulled By: rshest

fbshipit-source-id: 2a171e1bc16103320f5ec31efab896f6b840fb96
2025-06-26 08:00:31 -07:00
Moti Zilberman 49b7fff2a0 Support IPv6 dev server URLs in legacy standalone RDT connection
Summary:
Changelog: [Internal]

A minimal tweak to a legacy code path for React DevTools in React Native (**NOT** Fusebox!) that enables it to work / not crash when encountering an IPv6 dev server address. See doc comment for more.

Reviewed By: hoxyq

Differential Revision: D77150288

fbshipit-source-id: c11c742aad7b83861a1242dd13c5ed2753fbdf29
2025-06-26 07:59:16 -07:00
Zeya Peng 63d8d978f5 Reduce call to folly::dynamic::object insert and remove unnecessary AnimatedNode::update calls (#52270)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52270

## Changelog:

[Internal] [Changed] - Reduce call to `folly::dynamic::object` insert and remove unnecessary AnimatedNode::update calls

Reviewed By: christophpurrer

Differential Revision: D77315659

fbshipit-source-id: 656d7bcc957126ee8fa5a7463223273a93d31369
2025-06-26 06:52:05 -07:00
Jim Jetsada Machom 556957d458 Revert D76284119: Implement console.timeStamp
Differential Revision:
D76284119

Original commit changeset: c87c6645fe32

Original Phabricator Diff: D76284119

fbshipit-source-id: 186b09de34c3bb3a80eb62d5c14b47d04ca5a8e0
2025-06-26 06:09:05 -07:00
Ruslan Lesiutin df0a2c847b Implement console.timeStamp (#52091)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52091

# Changelog: [Internal]

Adds support for experimental non-standardized `console.timeStamp` API for capturing performance entries on a timeline. The main idea of the API is to be highly performant. More details in the corresponding RCP [1].

NOTE: Because of the `jsinspector-modern` stack gating logic, this won't be installed in production builds. `console.timeStamp` will be polyfilled with a stub - D76987507.

Reviewed By: rubennorte

Differential Revision: D76284119

fbshipit-source-id: c87c6645fe32f56d84f5915ff57865cfd9723a47
2025-06-26 05:25:09 -07:00
Ruslan Lesiutin 53d7e0f43b Move up forwardToOriginalConsole declaration (#52193)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52193

# Changelog: [Internal]

Will be re-used for `console.timeStamp` installation.

Reviewed By: motiz88

Differential Revision: D77027561

fbshipit-source-id: ef251541d67011acd21fe9b2be87f9ac1a85a01e
2025-06-26 05:25:09 -07:00
Ruslan Lesiutin c612ae424a @react-native/js-polyfills: polyfill console.timeStamp (#52168)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52168

# Changelog: [Internal]

The main reason for the stub is to make sure this method is always installed. The actual implementation will be part of the `jsinspector-modern` stack, which is fully initialized in production builds.

Once there is a gurantee that RuntimeTarget globals are always installed in any environments, we can remove polyfills altogether.

Reviewed By: rubennorte, GijsWeterings

Differential Revision: D76987507

fbshipit-source-id: 2602af28f9e4359cf58dfafdf84802c0bf92372d
2025-06-26 05:25:09 -07:00