Commit Graph

12270 Commits

Author SHA1 Message Date
Christian Kruse cc83f6e84a Fix extra semi colon (#53483)
Summary:
Changelog: [Internal]
Fix extra semi colon warning

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

Reviewed By: cortinico, kuwerty

Differential Revision: D81032496

fbshipit-source-id: da7d6f8355fd6ae228033a380d38d677632bafaf
2025-09-03 07:11:08 -07:00
Oskar Kwaśniewski 3a0c402d26 fix(iOS): modal swipe dismissal works only for the first time (#53499)
Summary:
This PR fixes swipe dismissal to work each time the modal is shown. Previously modalInPresentation was set on the view controller which gets destroyed every time user dismisses the modal. This makes sure that modal in presentation is correctly preserved when showing multiple modals.

https://github.com/user-attachments/assets/c7f140e5-1c4f-4809-8453-148d4becc9eb

## Changelog:

[IOS] [FIXED] - modal swipe dismissal works only for the first time

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

Test Plan:
1. Open RN Tester
2. Check allow swipe dismissal
3. Check closing it multiple times

Reviewed By: javache

Differential Revision: D81312918

Pulled By: cipolleschi

fbshipit-source-id: 4f7cc60762660e5d5310f4973fe8df340c1ba52b
2025-09-03 07:07:39 -07:00
Riccardo Cipolleschi 87a1b510b7 Fix build with Cocopaods and Dynamic frameworks (#53367)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53367

We are missing a dependency in the React-jsinspector podspec that prevents React Native from building with dynamic frameworks.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D80619664

fbshipit-source-id: 1c87ef4d3614ceea3a23196831479ecae0a5acc8
2025-09-03 06:24:23 -07:00
Pieter De Baets 2ed6a08ef3 Mark JavaTimerManager idle callback methods as @LegacyArchitecture (#53570)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53570

Idle callbacks are implemented as a C++ module in the new architecture, this code should not be used.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D81485912

fbshipit-source-id: 18103bb96441880ff3de423aa6c03a176f6ff5de
2025-09-03 06:17:35 -07:00
Pieter De Baets dc54eaebac Decouple TimerExecutor creation from ReactInstance (#53569)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53569

Simplify construction to save a JNI call, slightly more efficient on binary size too (1KiB hah)

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D81445834

fbshipit-source-id: b0ec84d5e04d364e34eef4c3b712c62f878325cf
2025-09-03 06:17:35 -07:00
Phil Pluckthun f170db412b Use autolinking react-native-config output in iOS artifacts generator (#53503)
Summary:
Resolves https://github.com/facebook/react-native/issues/53501

This is a pretty major oversight of (presumably) the old autolinking refactor. The iOS autolinking's second stage, invoked in `use_react_native!` does not accept the `react-native-config` sub-command's `react-native-config` output. This is only invoked and used in the prior step, `use_native_modules`.

The second step instead invokes old code that does something _similar_ to the new autolinking in `scripts/generate-artifacts-executor`, and happens to align in most cases. (But it does "autolinking" from scratch). tl;dr: When the results don't match up, things go wrong.

Instead, we now write the autolinking (react native config) results to a file, then read the output back in the second step.

This doesn't affect Android/Gradle, which are implemented correctly.

## Changelog:

[IOS] [FIXED] - Use autolinking-generated react-native-config output in second step of cocoapods linking that generates artifacts and generated source

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

Test Plan:
- See https://github.com/facebook/react-native/issues/53501 for failing repro
- Clone for working repro: https://github.com/byCedric/react-native-codegen-ios-autolinking/tree/fix-54503
  - Note: Contains this PR's changes as a patch
  - `bun install`
  - `bun expo run:ios`

Reviewed By: cortinico

Differential Revision: D81490755

Pulled By: cipolleschi

fbshipit-source-id: eefe786a116404f4ed24bd7125dfb108a811f71e
2025-09-03 05:34:11 -07:00
Samuel Susla 3895831c2b ship releaseImageDataWhenConsumed (#53576)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53576

## Changelog:

[iOS] [Fixed] - Images are removed from memory more aggressively to prevent OOMs

Reviewed By: rshest

Differential Revision: D81490116

fbshipit-source-id: d6b12af2d80e1c0a9ab3c624a549088b300feb3e
2025-09-03 04:41:32 -07:00
Nicola Corti 9fbce3eff1 Fix build from source for 0.82 due to Gradle 9.0 (#53560)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53560

Since Gradle 9.0, all the projects in the path must have an existing folder.
As we build :packages:react-native:ReactAndroid, we need to declare the folders
for :packages and :packages:react-native as well as otherwise the build from
source will fail with a missing folder exception.

Changelog:
[Android] [Fixed] - Fix build from source due to missing folder error on Gradle 9.0

Reviewed By: fabriziocucci

Differential Revision: D81482789

fbshipit-source-id: 609b503755486e10060a0f321bd0a38bd71864a1
2025-09-03 03:55:49 -07:00
Alex Hunt 7aef79bd78 Remove UNSAFE-ALLOW-SUBPATHS exports condition (#53566)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53566

TLDR; we never advertised this and it's not in use. We have an updated incoming plan for exposing internal private code to Expo / other frameworks.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D81490655

fbshipit-source-id: f3d64582f5e6092e4928865d868ea26867ee7e47
2025-09-03 03:05:31 -07:00
Christoph Purrer 9ef0d21344 Pass surfaceId to imageRequest (#53572)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53572

Changelog: [Internal]

Code refactoring to pass actual `surfaceid` to PrefetchResourcesMountItem

Reviewed By: andrewdacenko

Differential Revision: D81506929

fbshipit-source-id: 6c1cb91180cc23930986b258e2a8842560c0851a
2025-09-03 00:07:26 -07:00
Sam Zhou 4365c1c9f7 Cleanup codeless suppressions in xplat/js (#53573)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53573

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D81552699

fbshipit-source-id: 71b104174a8ad7fbf360cdd87109ce034f49ec70
2025-09-02 21:56:09 -07:00
Christoph Purrer f33a1cd260 Android: Schedule image prefetching on tree commit (#53555)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53555

Changelog: [Internal]

## TLDR;
We run the `ReactVitoImageManager.kt` on the Java Message Queue Thread (`mqt`) > Maybe running it on the `UiThread` (as Android view creation) solves the QE reegressions

## Issue
> Your experiment [qe:enable_image_prefetching_android_v4] is significantly moving important metric(s)

T235749297 > e.g negatively impact `sp_core` (Scroll Performance Core)

https://fburl.com/deltoid3/ef2fd92e

{F1981479985}

## Observation

After adding Perfetto traces in D80717558 and building a `automation_fbandroid_art_arm64_for_perftest_profileable` build > I see 'larger amounts' of `experimental_prefetchResource` on the JavaScript Message Queue Thread

 {F1981479808}

We do run this entire logic on the JavaScript Message Queue Thread

https://www.internalfb.com/code/fbsource/[368503303835439955d87d79439a3d19d979cd40]/fbandroid/java/com/facebook/fresco/vito/rn/ReactVitoImageManager.kt?lines=253-260

However when normally `mounting` Shadow Nodes in RN Android we jump from the  JavaScript Message Queue Thread to the Android UI Thread

https://www.internalfb.com/code/fbsource/[68603b276cb9de1ae2ecb83ec4a789ae3db3b051]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp?lines=626%2C638

->

https://www.internalfb.com/code/fbsource/[68603b276cb9de1ae2ecb83ec4a789ae3db3b051]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp?lines=690%2C701%2C872-883

->

https://www.internalfb.com/code/fbsource/[68603b276cb9de1ae2ecb83ec4a789ae3db3b051]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java?lines=897%2C943

->

https://www.internalfb.com/code/fbsource/[68603b276cb9de1ae2ecb83ec4a789ae3db3b051]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java?lines=938-946

## Idea

Run `imagePrefetcher?.prefetchResource` also on the UI thread

## Resources

### :: GDoc
- Image Prefetching for Android https://docs.google.com/document/d/1Yc5G5vuollx0I4tdXpE8Hgwn2DuIhJKwOTHak3g4Gu8/edit?fbclid=IwY2xjawLjgcBleHRuA2FlbQIxMQBicmlkETFra3N5WHg3OGV6UndYUmVTAR5KiXIDgrH2FW4HEBdezFBr2NqX4KPT6FzYQXD1sBRjEfq8d_x0JwQfeL_TXg_aem_ZqWb9dAJ59pHFfoHsrzwbw&pli=1&tab=t.0#heading=h.udv4z3lhwhf7
- React Field of View https://docs.google.com/document/d/1gHLF3oAv9JhKKcztM56iZZUPPWp0mBbjqDlosBkL1kE/edit?tab=t.0#heading=h.36p5puf8ufz7

### :: Fb4A (Facebook for Android)
The debug package name for fb4a `com.facebook.katana` is typically `com.facebook.wakizashi`

### :: Links
- How to Perfetto profile fb4a https://www.internalfb.com/wiki/Luna_Wei/Building_a_fb4a_Profile_Build/
- Building Catalyst Profile Build https://www.internalfb.com/wiki/Luna_Wei/Building_Catalyst_Profile_Build/
- Marketplace QE Regression Guide https://www.internalfb.com/intern/staticdocs/marketplace/performance/my-experiment-is-regressing-perf/
- Install for Profileable build https://www.internalfb.com/wiki/Metatrace/Metatrace-install_for_Profileable_build/
- Metatrace https://www.internalfb.com/wiki/Metatrace/

### Android Java Debug
https://www.internalfb.com/wiki/Platfrom_Health_Learnings/Onboarding_Material_or_New-hired_Engineers/How_to_Debug_FB4A_0/

```
arc focus clean --invalidate-caches-only
arc focus --targets <YOUR_TARGET> --open
```
in this case
```
arc focus --targets fb4a --open
```
It creates a `monoproject` now

 {F1981501090}

Reviewed By: javache

Differential Revision: D80950423

fbshipit-source-id: 5f1c4c096adab218a2d765d262901521bab2e6b3
2025-09-02 17:48:39 -07:00
Tim Yung d6ed32f8d6 VirtualView: Configurable Hidden Layout (#53571)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53571

Changes `VirtualView` so that its layout when hidden can be configured by call sites.

Previously, it was hardcoded to only retain the last known height. However, this logic only works for `VirtualView` children oriented in a column layout.

This change enables the use of `VirtualView` in more flexible abstractions that require different hidden styles (e.g. row or grid orientations).

Also, this changes the default behavior to set `minWidth` and `minHeight`, so that the default behavior is more general and more likely to work in a reasonable manner in more use cases.

NOTE: Ideally, we would be able to default to using `flexBasis` instead. However, the `hiddenStyle` function receives a `Rect` and does not know whether the parent's flex direction is row or column to influence whether to use `targetRect.width` or `targetRect.height`. This is an opportunity for future improvement.

Changelog:
[Internal]

Reviewed By: lunaleaps

Differential Revision: D81344126

fbshipit-source-id: 33d9e81601b671059f97b4590816243cbd24734a
2025-09-02 16:28:02 -07:00
Tim Yung 1604232e8d VirtualView: Create Experimental Feature Flag (#53533)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53533

Creates a new `enableVirtualViewExperimental` feature flag that determines whether `VirtualView` uses the old or new implementation.

Changelog:
[Internal]

Reviewed By: lunaleaps

Differential Revision: D81340963

fbshipit-source-id: f550fe4e4573e080eb8668077d0ad3ca53cd4d33
2025-09-02 16:28:02 -07:00
generatedunixname537391475639613 c1320eb2e1 xplat/js/react-native-github/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt (#53559)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53559

Reviewed By: cortinico

Differential Revision: D81476261

fbshipit-source-id: f3f38664a7dc63a11b027ab2b6a5a65ca374ebaa
2025-09-02 14:58:53 -07:00
Oskar Kwaśniewski 05c4321b19 fix: fallback alert controller to UIScreen size (#53500)
Summary:
This PR falls back to UIScreen when windowScene is not available.

<img width="500" alt="CleanShot 2025-08-28 at 14 30 59@2x" src="https://github.com/user-attachments/assets/9dda3153-dfe7-48a5-9d0e-5416c2e34c64" />

## Changelog:

[IOS] [FIXED] - Simplify RCTAlertController, don't create additional UIWindow

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

Test Plan:
Open the alert multiple times to check if everything works as expected.

Rollback Plan:

Reviewed By: javache

Differential Revision: D81410450

Pulled By: cipolleschi

fbshipit-source-id: c27ea98d9e811c2f259f0ff3c6689482d116c418
2025-09-02 11:19:42 -07:00
Christoph Purrer 61deab7f94 Add feature flag to trigger Android image prefetch request on the UI thread (#53554)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53554

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D81468680

fbshipit-source-id: 9da40feaf90756645d2aed5c051dc137d7a90534
2025-09-02 10:44:59 -07:00
Jorge Cabiedes Acosta e1071ce683 Clean up legacy CSSBackgroundDrawable.java and enablNewBackgroundAndBorderDrawables featureflag (#53534)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53534

BackgroundDrawable and BorderDrawable have already substituted CSSBackgroundDrawable en every Android surface.
- Deleting CSSBackgroundDrawable.java and its callsites
- Deleting enableNewBackgroundAndDrawable featureflag

Just cleaning up what at this point is just dead code.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D81330969

fbshipit-source-id: bcf66ec8d3225802432ae1d93a2b26ea65cfcda0
2025-09-02 10:19:57 -07:00
generatedunixname537391475639613 b2b992c5bb xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/image/ImageLoaderModule.kt (#53545)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53545

Reviewed By: cortinico

Differential Revision: D81428987

fbshipit-source-id: 7bd04528384bd96f659cf969806d367296665d97
2025-09-02 08:11:47 -07:00
Zeya Peng 716cbae68d support ObjectAnimatedNode (#53517)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53517

## Changelog:

[Internal] [Added] - support ObjectAnimatedNode

Reviewed By: christophpurrer, fabriziocucci

Differential Revision: D81260836

fbshipit-source-id: 82bdda59d54140189684003adfb1adf5c8e2904d
2025-09-02 07:06:09 -07:00
Nick Lefever 8f0713fd4b Add test for empty layout culling skip (#53551)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53551

See title.

Follow up on D81044841

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D81447133

fbshipit-source-id: 7e6ca4523401c30c4861606c795f306193d97a15
2025-09-02 03:25:54 -07:00
Phil Pluckthun 9731e8ebc5 Replace execSync with spawnSync for tarball extraction paths that need to be escaped (#53540)
Summary:
Follow-up to https://github.com/facebook/react-native/issues/53194

This wasn't previously visible in testing without prebuilds and without a release build. This doesn't show up in debug builds.

When testing more against paths that contain spaces, I noticed that release builds can still run into trouble due to the use of `execSync` without escaping paths. While, in other scripts that aren't used in user-projects (afaict), we often escape with quotes and rely on `execSync` calling the shell (due to its `shell: true` default), in some scripts we don't have quote escapes.

That said, since paths could in theory contain quotes, adding quotes wouldn't be sufficient. Instead, since the affected `tar` calls are really trivial, we can instead use `spawnSync` with the `shell: false` default, which escapes arguments automatically.

## Changelog:

[IOS] [FIXED] - fix Node scripts related to prebuilt tarball extraction for paths containing whitespaces

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

Test Plan: - Create a project in a folder `with spaces` and build a release build

Reviewed By: cipolleschi, cortinico

Differential Revision: D81406841

Pulled By: robhogan

fbshipit-source-id: 08bb06b2cd2b15dc17c2f95fab9024129deca6f3
2025-09-01 13:32:10 -07:00
Rubén Norte 727caca09c Set up modern performance APIs if the native module is available (#53431)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53431

Changelog: [internal]

This renames `setUpPerformanceObserver` as `setUpPerformanceModern` and removes the need to call it manually. If the native module is defined, we define the whole new API.

Reviewed By: javache

Differential Revision: D80803626

fbshipit-source-id: ef41cb9aa959ee898d32724c102d7597e6bee84e
2025-09-01 09:18:19 -07:00
Rubén Norte 1716b3ca5c Implement private constructors for Performance APIs (#53430)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53430

Changelog: [internal]

This fixes the spec-compliance of several classes in the Performance API by not allowing userland code to instantiate them directly.

This also exposes some missing interfaces from the Performance API in the global scope.

Reviewed By: rshest

Differential Revision: D80800076

fbshipit-source-id: f6439b9c7914817ef552e78fd61646ccab1e1de2
2025-09-01 09:18:19 -07:00
Rubén Norte bb508a4d94 Refactor PerformanceEntry and subclasses to use interfaces for initialization (#53429)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53429

Changelog: [internal]

This is a refactor of the types in `PerformanceEntry` and subclasses to accept interfaces instead of objects. This allows us to pass down the init object from subclasses to the superclass without having to create intermediate objects.

Additionally, this is also more semantically correct, as existing APIs don't need those options to be own properties of the init object.

Existing benchmark for Performance doesn't show any significant impact.

Reviewed By: rshest

Differential Revision: D80800075

fbshipit-source-id: ab439d70f4db9ce60e3089d89ccb105a91e7ef48
2025-09-01 09:18:19 -07:00
Rubén Norte 81f8b0a6bf Implement PerformanceObserver.takeRecords() (#53428)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53428

Changelog: [internal]

This is the last method in `PerformanceObserver` to implement. For some reason we never added it, even though it was trivial.

Reviewed By: rshest

Differential Revision: D80717237

fbshipit-source-id: ae3bd243d0f3f0fe4f0705437d78d14c532515f7
2025-09-01 09:18:19 -07:00
Rubén Norte 8ed0fa8dda Remove unnecessary references to internal types in performance tests (#53427)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53427

Changelog: [internal]

Migrate the imported types to the globally defined ones, so we follow the good practice of only accessing the public API in Fantom tests.

Reviewed By: rshest

Differential Revision: D80807160

fbshipit-source-id: 77d792b56b53c8da8409dd9133cd111afb8084f1
2025-09-01 09:18:19 -07:00
Rubén Norte 05be3742d4 Define Flow types for Performance APIs (#53433)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53433

Changelog: [internal]

This adds the definitions for the Web Performance APIs in the global scope.

Reviewed By: zeyap

Differential Revision: D80811659

fbshipit-source-id: a81117a27a480ba03f8feb2e813a3a66a10307f9
2025-09-01 09:18:19 -07:00
Alex Hunt 0a0b48b5ff Expose ListViewToken type as root export (#53539)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53539

Resolves https://github.com/react-native-community/discussions-and-proposals/discussions/893#discussioncomment-14190663.

Changelog:
[General][Added] - `ListViewToken` is now exposed when using `"react-native-strict-api"`

Reviewed By: rshest

Differential Revision: D81380882

fbshipit-source-id: 1da5c50eaec2f8dc4a8cde60e7441249556053a8
2025-09-01 08:39:22 -07:00
Pieter De Baets 46278e30e3 Dedupe Accessibility enum string conversions (#53550)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53550

Noticed some duplication between `getDiffProps` and `accessibilityPropsConversion`

Changelog: [Internal]

Reviewed By: lenaic, rshest

Differential Revision: D81435037

fbshipit-source-id: b2701f1aec5e647c165a0212f6180edba90fd9f9
2025-09-01 08:38:27 -07:00
Ruslan Lesiutin e64dce582a Set threshold for a number of unique nodes in ProfileChunk (#53536)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53536

# Changelog: [Internal]

For every chunk, we already have a threshold for the number of samples captured in this chunk.

There could be really tall call stacks, where we could record hundreds of unique nodes, which makes the chunk already big enough for a CDP traffic on android.

We are adding a threshold for a number of unique nodes in a single chunk. If the chunk has a greater number of nodes recorded, it will be dispatched over CDP.

Reviewed By: huntie

Differential Revision: D81339677

fbshipit-source-id: 388d14c64c4c3f60918a8526025f79d19d397cb4
2025-09-01 07:12:55 -07:00
Ruslan Lesiutin 8eea1660f4 Add support for recording Runtime Profiles for multiple JavaScript threads (#53535)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53535

# Changelog: [Internal]

This primarily addressed the case when we have captured a Runtime Profile during the app startup. The Hermes Runtime is created on the main thread, so the first few samples will be recorded there, but then it will be moved to JavaScript thread.

Reviewed By: huntie

Differential Revision: D81339676

fbshipit-source-id: 8202ca03df54134330aa921a9a0a97816c51cea5
2025-09-01 07:12:55 -07:00
Pieter De Baets bae99efc26 Add test for aria-hidden to View (#53548)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53548

Add tests to View similar to D81043503, and clarify why `accessibilityElementsHidden` does not show up in the rendered component tree (because Fantom uses the Android platform for bundling, and Android does not have accessibilityElementsHidden in its BaseViewConfig.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D81437063

fbshipit-source-id: aa10573aee686d1d650b152365607877f34f8508
2025-09-01 06:31:04 -07:00
Maciej Jastrzębski 0f39fc3000 fix(a11y): aria-hidden support for Text, non-editable TextInput and Image (#53364)
Summary:
Fixes https://github.com/facebook/react-native/issues/53350

This PR adds support for missing `aria-hidden` prop handling on:
- `Text`
- non-editable `TextInput`
- `Image`

The changes are pretty simple and analogous to `View` logic:
- iOS: setting `accessibilityElementsHidden`, `accessible` (for `Image`)
- Android: setting `importantForAccessibility="no-hide-descendents"

Note: [according to MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-hidden) `aria-hidden` should not be used on focusable elements, which excludes editable `TextInput`

## Changelog:

[GENERAL] [FIXED] `aria-hidden` support for `Text`, non-editable `TextInput` and `Image`

<!-- 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/53364

Test Plan:
Added new section to RN Tester (APIs => Accessibility => aria-hidden

### After (iOS/Android)

https://github.com/user-attachments/assets/c62f8beb-7cb1-4919-833d-3fb906309cac

https://github.com/user-attachments/assets/78ca5e28-a858-4fd6-ac1c-5ec87872f3fc

### Before (iOS/Android)

https://github.com/user-attachments/assets/84560373-4b31-4793-8997-ee14daa77990

https://github.com/user-attachments/assets/b20074c9-f021-4a90-bce5-75e440a4bbc3

Reviewed By: rshest

Differential Revision: D81043503

Pulled By: javache

fbshipit-source-id: 26b2660a75afcdedba07bee980d8c7f154087ae2
2025-09-01 06:05:43 -07:00
Nicola Corti 2246e2b82c Fix wrong default for jsBundleAssetPath on DefaultReactHost (#53546)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53546

The default for `DefaultReactHost.getDefaultReactHost(...,jsBundleAssetPath,...)` is wrong.
The default should be `index.android.bundle`.

That's the same value we had for the same field in ReactNativeHost:
https://www.internalfb.com/code/fbsource/[76a814c7d27036f7056c9f2c7e1370746ed4ccd4]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.java?lines=225-227

Having just `index` as default cause the app to instacrash on release because the bundle can't be found.

Reviewed By: fabriziocucci

Differential Revision: D81435921

fbshipit-source-id: ea871f771fd61e9d838a800e988f2edc308ec8ea
2025-09-01 04:49:17 -07:00
Alex Hunt 024d25794a Expose Animated.CompositeAnimation type (#53538)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53538

Resolves https://github.com/react-native-community/discussions-and-proposals/discussions/893#discussioncomment-14190598.

Changelog:
[General][Added] - `Animated.CompositeAnomation` is now exposed when using `"react-native-strict-api"`

Reviewed By: rshest

Differential Revision: D81380950

fbshipit-source-id: f90f175cfd6f34c6a9564a8e340156103887d710
2025-09-01 02:57:25 -07:00
Christoph Purrer 544f3b345d Android: Schedule image prefetching on tree commit (#53491)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53491

Changelog: [Internal]

Reviewed By: lenaic, cipolleschi

Differential Revision: D81106112

fbshipit-source-id: b06643312836bd018bfc9a1565b76976cd55dac9
2025-08-31 08:32:54 -07:00
Alex Hunt 83e19813ff Deprecate StyleSheet.absoluteFillObject (#53530)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53530

Deprecate the `StyleSheet.absoluteFillObject` API in favour of `StyleSheet.absoluteFill` (functionally identical).

Secondly, refine the type definitions in our source code (and Strict TS API) from `any` → `AbsoluteFillStyle` — resolves https://github.com/facebook/react-native/issues/53470.

This will be followed with updates to our docs.

Changelog:
[General][Deprecated] - `StyleSheet.absoluteFillObject` is deprecated in favor of `StyleSheet.absoluteFill` (equivalent).

Reviewed By: yungsters

Differential Revision: D81327548

fbshipit-source-id: 2bcf14694dc1bd959419629ce717760086b80ec3
2025-08-30 03:58:51 -07:00
Christoph Purrer e30f34eda6 Android: Image Prefetching send ImageResizeMode as enum value (#53516)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53516

Changelog: [General][Breaking] Android: Image Prefetching send ImageResizeMode as enum value

Idea: Reduce JNI payload by sending int values instead of strings

Reviewed By: lenaic

Differential Revision: D81252246

fbshipit-source-id: 7ba128725900422f8654b3019014fd49ec8152b6
2025-08-29 22:33:49 -07:00
generatedunixname537391475639613 d1c5dae2e6 xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewShadowNode.cpp (#53525)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53525

Reviewed By: rshest

Differential Revision: D81217006

fbshipit-source-id: 8c156b24438f8427a5ce953ebdcdf7d223bf1b60
2025-08-29 22:25:30 -07:00
Intl Scheduler d3574313c8 translation auto-update for batch 0/60 on master
Summary:
Chronos Job Instance ID: 1125907998678314
Sandcastle Job Instance ID: 36028799140146546

Processed xml files:
android_res/com/facebook/common/util/res/values/strings.xml
android_res/com/oculus/auth/authenticator/meta/res/values/strings.xml
android_res/com/oculus/os/q4b/mma/res/values/strings.xml
android_res/com/oculus/horizon/common/res/values/strings.xml
android_res/com/oculus/horizon/platformplugin/res/values/strings.xml
android_res/com/oculus/horizon/try_before_you_buy/res/values/strings.xml
android_res/com/oculus/horizon/mediaupload/res/values/strings.xml
android_res/com/oculus/horizon/linkedaccounts/res/values/strings.xml
android_res/com/oculus/auth/authenticator/work/res/values/strings.xml
android_res/com/oculus/auth/authenticator/oculus/res/values/strings.xml
android_res/com/oculus/auth/authenticator/instagramsso/res/values/strings.xml
android_res/com/oculus/auth/authenticator/horizonworldsplatform/res/values/strings.xml
android_res/com/oculus/auth/authenticator/facebooksso/res/values/strings.xml
android_res/com/oculus/auth/authenticator/facebook/res/values/strings.xml
android_res/com/oculus/demoapp/res/values/strings.xml
apps/fblite/xMob-android/scripts/strings/values/strings.xml
apps/fblite/xMob-android/res/values/strings.xml
android_res/com/facebook/resources/res/values/strings.xml
android_res/com/facebook/liblite/res/values/strings.xml
android_res/com/facebook/iorg/common/upsell/res/values/strings.xml
android_res/com/facebook/iorg/common/res/values/strings.xml
android_res/com/facebook/iorg/lib/res/values/strings.xml
android_res/com/facebook/iorg/app/res/values/strings.xml
android_res/rendercore/res/values/strings.xml
android_res/com/facebook/content/res/values/strings.xml
../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings.xml
../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/systeminfo/values/strings.xml
../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/devsupport/values/strings.xml
android_res/com/facebook/common/i18n/res/values/strings.xml
android_res/com/facebook/common/timeformat/res/values/strings.xml
android_res/com/facebook/common/strings/external/res/values/strings.xml
android_res/com/facebook/common/strings/res/values/strings.xml
android_res/com/facebook/fbui/widget/pagerindicator/res/values/strings.xml
android_res/com/facebook/fbui/widget/contentview/res/values/strings.xml
android_res/com/facebookpay/widget/res/values/strings.xml
android_res/com/facebookpay/ecpexception/res/values/strings.xml
android_res/com/facebookpay/expresscheckout/res/values/strings.xml
android_res/com/fbpay/auth/res/values/strings.xml
android_res/com/facebook/widget/res/values/strings.xml
android_res/com/facebook/config/appspecific/res/values/strings.xml
android_res/com/facebook/ui/mainview/res/values/strings.xml
android_res/com/facebook/audience/stories/storysurface/activity/main/res/values/strings.xml
android_res/com/facebook/ui/emoji/res/values/strings.xml
android_res/com/facebook/ui/emoji/common/res/values/strings.xml
android_res/com/facebook/nativetemplates/res/values/strings.xml
android_res/com/facebook/dialtone/res/values/strings.xml
android_res/com/facebook/zero/messenger/semi/res/values/strings.xml
android_res/com/facebook/zero/res/values/strings.xml
android_res/com/facebook/zero/common/res/values/strings.xml
android_res/com/facebook/widget/facepile/res/values/strings.xml
android_res/com/facebook/tabbar/res/values/strings.xml
android_res/com/facebook/ui/toolbar/res/values/strings.xml
android_res/com/facebook/dialtone/messenger/res/values/strings.xml
android_res/com/facebook/feedback/reactions/res/values/strings.xml
android_res/com/facebook/ufiservices/res/values/strings.xml
android_res/com/facebook/ui/edithistory/res/values/strings.xml
android_res/com/facebook/pages/common/userinviter/res/values/strings.xml
android_res/com/facebook/pages/common/bannedusers/res/values/strings.xml
android_res/com/facebook/friending/common/res/values/strings.xml
android_res/com/facebook/messaging/ui/stickerstore/res/values/strings.xml
android_res/com/facebook/stickers/res/values/strings.xml
android_res/com/facebook/messaging/shared/res/values/strings.xml
android_res/com/facebook/caspian/res/values/strings.xml
android_res/com/facebook/timeline/widget/actionbar/res/values/strings.xml
android_res/com/facebook/showpages/res/values/strings.xml
android_res/com/facebook/nux/res/values/strings.xml
android_res/com/facebook/facecast/common/badge/res/values/strings.xml
android_res/com/facebook/feedbase/res/values/strings.xml
android_res/com/facebook/feedback/ui/res/values/strings.xml
android_res/com/facebook/video/player/res/values/strings.xml
android_res/com/facebook/spherical/res/values/strings.xml
android_res/com/facebook/saved/common/res/values/strings.xml
android_res/com/facebook/video/comments/res/values/strings.xml
android_res/com/facebook/messaging/media/picker/res/values/strings.xml
android_res/com/facebook/messaging/media/res/values/strings.xml
android_res/com/facebook/messaging/res/values/strings.xml
android_res/com/facebook/ui/media/contentsearch/res/values/strings.xml
android_res/com/facebook/transliteration/res/values/strings.xml
android_res/com/facebook/bookmark/res/values/strings.xml
android_res/com/facebook/orca/res/values/strings.xml
android_res/com/facebook/workshared/userstatus/donotdisturb/res/values/strings.xml
android_res/com/facebook/widget/tokenizedtypeahead/res/values/strings.xml
android_res/com/facebook/widget/refreshableview/res/values/strings.xml
android_res/com/facebook/rtc/common/res/values/strings.xml
android_res/com/facebook/payments/ui/res/values/strings.xml
android_res/com/facebook/fig/mediagrid/res/values/strings.xml
android_res/com/facebook/pages/app/clicktomessengerads/messagesuggestion/ui/res/values/strings.xml
android_res/com/facebook/messagingneue/res/values/strings.xml
android_res/com/facebook/messaging/widget/toolbar/res/values/strings.xml
android_res/com/facebook/messaging/users/username/res/values/strings.xml
android_res/com/facebook/messaging/tincan/messenger/res/values/strings.xml
android_res/com/facebook/messaging/threadview/quickpromotion/res/values/strings.xml
android_res/com/facebook/messaging/threadview/message/res/values/strings.xml
android_res/com/facebook/messaging/threadview/games/res/values/strings.xml
android_res/com/facebook/messaging/xma/res/values/strings.xml
android_res/com/facebook/messaging/threadview/admin/res/values/strings.xml
android_res/com/facebook/messaging/reactions/res/values/strings.xml
android_res/com/facebook/messaging/threadview/attachment/video/res/values/strings.xml
android_res/com/facebook/messaging/settings/res/values/strings.xml
android_res/com/facebook/messaging/searchnullstate/res/values/strings.xml

allow-large-files
ignore-conflict-markers
opt-out-review
drop-conflicts

Differential Revision: D81370215

fbshipit-source-id: 3263546330d3930944d0666759960859918c4a7e
2025-08-29 18:51:42 -07:00
Ramanpreet Nara 9539cd2626 both: Deprecate c++ legacy core classes (#53454)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53454

Let's deprecate all the classes that aren't used by interop or the new architecture.

Changelog: [General][Deprecated] - Deprecate all the c++ classes not used by interop, or the new architecture.

Reviewed By: arushikesarwani94

Differential Revision: D80575767

fbshipit-source-id: 1d485300cbe24260d77bbeac75fe5b839121b6c8
2025-08-29 17:54:23 -07:00
Chi Tsai 028e582043 Make jsi::Object constructor explicit (#53521)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53521

Make `jsi::Object` constructor explicit, so its creation is explicit and
intentional. This prevents any sad foot-gun of constructing an Object
implicitly from a Runtime, which is certainly not a JS object.

Changelog: [Internal]

Reviewed By: avp

Differential Revision: D81274439

fbshipit-source-id: 5a9d9907f9deff7625dcff9c1072eb135ab7840e
2025-08-29 12:46:38 -07:00
Alan Lee 1ad2ec099a replace getWindowDisplayMetrics with getScreenDisplayMetrics (#53523)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53523

update `DisplayMetricsHolder.getWindowDisplayMetrics()` to `getScreenDisplayMetrics()`.

Where window width and height is not needed, prefer to use `screenDisplayMetrics` as with upcoming diff `windowDisplayMetrics` initialization only happen using UiContext and have potential to cause more issues if used unnecessarily.

Changelog: [Internal] Update `DisplayMetricsHolder.getWindowDisplayMetrics()` to use `.getScreenDisplayMetrics()`

 ---

Reviewed By: mlord93

Differential Revision: D81270196

fbshipit-source-id: 5b392d67449ddceebbc0fe81db15fa61ae44108f
2025-08-29 12:21:57 -07:00
Alex Hunt a4581ecd8b Fix/simplify invariant for ColorSchemeName, align manual typedef (#53397)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53397

This is a runtime behaviour fix and an API change to `Appearance.setColorScheme`, motivated by a user report where providing `'unspecified'` (valid) to this function would trigger an incorrect invariant throw. Furthermore, there is already a [first party use](https://github.com/facebook/react-native/blob/aec35b896053d9372ccdaf67c939b2eb216d3455/packages/react-native/Libraries/Utilities/Appearance.js#L101) where we call `Appearance.setColorScheme('unspecified')`.

**Changes**

- `Appearance.d.ts` (current public API, manual types): Fix `ColorSchemeName` type to include `'unspecified'` value, and narrow to remove nullability — aligning with existing Flow source for this type in `NativeAppearance`.
- `Appearance.js` (implementation): Fix the invariant throw by **removing it**, and instead narrowing the input type to non-nullable. Redundant work in `getState` and `getColorScheme` is removed.

Changelog: [General][Breaking] `Appearance.setColorScheme` no longer accepts a nullable value

Reviewed By: andrewdacenko

Differential Revision: D80705652

fbshipit-source-id: cf221a33447606653050d471ca2d0347ab30db81
2025-08-29 11:42:14 -07:00
Andrew Datsenko b7e64bea29 Ignore unusually early timestamps (#53514)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53514

Changelog: [Internal]
Add a way to ignore unusually early timestamps, in our example those are artificial marks to create web tracks in correct order, coming from console.timeStamp via React. These markers are ignore in RNDT on Chrome, but not excluded in perfetto.

Reviewed By: hoxyq

Differential Revision: D81246527

fbshipit-source-id: d3342036698d1607c98e5bb4273ea1a3716fcb03
2025-08-29 11:30:34 -07:00
Christoph Purrer 0121208a96 Simplify ImageRequest conversion (#53492)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53492

Changelog: [Internal]

Goal is to simplify code and to lower the JNI payload

- Send values as `int` instead of `Double` if they are converted to `int` on the Java side
- We only have 2 optional values - all others are mandatory

Reviewed By: lenaic

Differential Revision: D81202196

fbshipit-source-id: df8b7d9e6a98e7c919de9be6a277876684f0383c
2025-08-29 10:03:16 -07:00
Sam Zhou 6c7c518d42 Turn on experimental.natural_inference.local_object_literals.followup_fix in xplat (#53528)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53528

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D81289138

fbshipit-source-id: 05e2f5ad337f616a92df97ea52af8891448e122f
2025-08-29 06:25:57 -07:00
generatedunixname537391475639613 8f8d6f0689 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.kt (#53524)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53524

Reviewed By: rshest

Differential Revision: D81210918

fbshipit-source-id: 9c68952d658b846194fbcb0ccf79d3dc6878ef2b
2025-08-29 03:36:29 -07:00
Devan Buggay 52937337c3 Remove legacy perf overlay from DevMenu (#53328)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53328

Disables the legacy performance overlay toggle from the Android DevMenu to make way for V2.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D79791703

fbshipit-source-id: c99ac95e2907ce978ef0c2711ad304c9a3f278ec
2025-08-29 03:14:56 -07:00