Commit Graph

38536 Commits

Author SHA1 Message Date
Jakub Piasecki 30fd5a3c05 Update Accessibility, Animated and Appearance type exports (#50421)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50421

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72224821

fbshipit-source-id: 604fcdcabc1b6eeca7df3a32faf2505ddf268547
2025-04-01 03:54:49 -07:00
Jakub Piasecki f446ac346d Make selected props not required (#50417)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50417

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72223589

fbshipit-source-id: 7a88d585edca4dd9c028244c7bd456afc87e0faf
2025-04-01 03:50:38 -07:00
Jakub Piasecki ad5f5a332a Make VirtualizedList use ScrollViewProps directly (#50416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50416

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72223126

fbshipit-source-id: 8598a02c31e16302a3f2ce8678602a33fc090c8a
2025-04-01 03:46:00 -07:00
Evghenii Nicolaev d3daabfe2b Revert D71805075: Update hermes-parser and related packages in fbsource to 0.27.0
Differential Revision:
D71805075

Original commit changeset: 685194c12ac0

Original Phabricator Diff: D71805075

fbshipit-source-id: b28f0f83ad8b4f4f6b5e62fdc9ff323af79c1d43
2025-04-01 03:45:23 -07:00
Iwo Plaza be8393c41b Limit @react-native/virtualized-lists subpath imports (#50392)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50392

## This diff
Defines an exports field for the "react-native/virtualized-lists" package. Limits internal use of subpath
imports to virtualized-lists package, and exports all currently used APIs one the root level.

Changelog:
[General][Breaking] - Subpath imports to the internal react-native/virtualized-lists package are not allowed.

Reviewed By: huntie

Differential Revision: D72162344

fbshipit-source-id: 828dab8e569f019fc48084af475e152b898f5bb5
2025-04-01 03:26:25 -07:00
Fabrizio Cucci 9a87bb2223 Add changelog entry for v0.79.0-rc.4 (#50424)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50424

As per title.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D72233212

fbshipit-source-id: c0d78d06dbb1dd697a86cdae4c21038dba7c3ae4
2025-04-01 03:14:16 -07:00
Pieter De Baets fdf396b964 Remove unique_ptr for globalRootComponentDescriptor (#50391)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50391

No need for the indirection here of a heap allocated pointer.

Since we have the RootComponentDescriptor we generally don't need it in any other component registry.

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D72058916

fbshipit-source-id: 0c29f26f4c56c4353eda251fe06a475e3b6085da
2025-04-01 02:18:44 -07:00
Alex Hunt f13c8a7417 Update hermes-parser and related packages in fbsource to 0.27.0 (#50241)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50241

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

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D71805075

fbshipit-source-id: 685194c12ac037f74cc4fd54eb0d777a74507727
2025-04-01 01:01:05 -07:00
generatedunixname89002005232357 411af39f97 Revert D71908601 (#50409)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50409

Reviewed By: rozele

Differential Revision: D72190428

fbshipit-source-id: 00d2be5eda7fd6b89883a27c5ccb463b76428258
2025-03-31 20:05:04 -07:00
generatedunixname89002005232357 0670e382a5 Revert D71582553 (#50410)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50410

Reviewed By: rozele

Differential Revision: D72190404

fbshipit-source-id: c24fe997ccad22bef018b635140126b3d729a00c
2025-03-31 20:05:04 -07:00
Peter Abbondanzo ad8be9ada6 Remove Android image prefetching feature flag (#50412)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50412

Removes the `enableImagePrefetchingAndroid` feature flag.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D72198491

fbshipit-source-id: bd9bb9ecc7b58ac1fe6a507ec9caf1ce99e0ba63
2025-03-31 18:50:54 -07:00
Zeya Peng 4912958812 synchronouslyUpdateViewOnUIThread on UIManager (#50379)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50379

## Changelog:

[Android] [Added] - Allow invoking `synchronouslyUpdateViewOnUIThread` from c++ via `UIManager`
implementation is provided by SchedulerDelegate on the platform

Reviewed By: javache

Differential Revision: D71648772

fbshipit-source-id: bba0f7e9e2deafd074d28ff5cece6b7738c4d123
2025-03-31 13:17:56 -07:00
Jakub Piasecki 97324abc0e Type Animated.event listener argument (#50390)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50390

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72151986

fbshipit-source-id: 26c9b6dff669fac6fcb8db1f6a0b23648f6f4afb
2025-03-31 09:36:57 -07:00
Tim Yung bff5c30118 Revert D71968187: Define "exports" field on main package
Differential Revision:
D71968187

Original commit changeset: 28ff941692d1

Original Phabricator Diff: D71968187

fbshipit-source-id: a6843ab57da7b8a2c436dbdf23644fe2d8954520
2025-03-31 09:21:06 -07:00
Innei ce47d6a131 fix(typo): RCTBridgeProxy.mm methid to method (#50394)
Summary:
Fix typo

## Changelog:
[Internal] - typo `RCTBridgeProxy.mm` `methid` to `method`

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

Test Plan: N/A

Reviewed By: NSProgrammer, cortinico

Differential Revision: D72168477

Pulled By: cipolleschi

fbshipit-source-id: 6442aa87e90b9be9c18a2e2535939630848907d9
2025-03-31 08:58:56 -07:00
Adam Ernst ac23323da1 RCTDeviceInfo: fix crash due to failure to get AccessibilityManager (#50398)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50398

Reviewed By: philIip

Differential Revision: D72020801

fbshipit-source-id: 556e6d5a3e8492e8283ee10aa5829186d172b28f
2025-03-31 08:43:06 -07:00
Mateo Guzmán 8985c6be48 Make CallbackImpl internal (#50378)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+NOT+user%3Acortinico+NOT+repo%3AMaxdev18%2Fpowersync_app+NOT+repo%3Acarter-0%2Finstagram-decompiled+NOT+repo%3Am0mosenpai%2Finstadamn+NOT+repo%3AA-Star100%2FA-Star100-AUG2-2024+NOT+repo%3Alclnrd%2Fdetox-scrollview-reproductible+NOT+repo%3ADionisisChytiris%2FWorldWiseTrivia_Main+NOT+repo%3Apast3l%2Fhi2+NOT+repo%3AoneDotpy%2FCaribouQuest+NOT+repo%3Abejayoharen%2Fdailytodo+NOT+repo%3Amolangning%2Freversing-discord+NOT+repo%3AScottPrzy%2Freact-native+NOT+repo%3Agabrieldonadel%2Freact-native-visionos+NOT+repo%3AGabriel2308%2FTestes-Soft+NOT+repo%3Adawnzs03%2FflakyBuild+NOT+repo%3Acga2351%2Fcode+NOT+repo%3Astreeg%2Ftcc+NOT+repo%3Asoftware-mansion-labs%2Freact-native-swiftui+NOT+repo%3Apkcsecurity%2Fdecompiled-lightbulb+com.facebook.react.bridge.CallbackImpl).

All GH search results are forks.

## Changelog:

[INTERNAL] - Make com.facebook.react.bridge.CallbackImpl internal

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

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

Reviewed By: cortinico

Differential Revision: D72159376

Pulled By: javache

fbshipit-source-id: 1a3335431d46615262747e3d5b8cf6e8cab192a3
2025-03-31 06:35:39 -07:00
Mateo Guzmán c094f924dc Make InvalidIteratorException internal (#50383)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+NOT+user%3Acortinico+NOT+repo%3AMaxdev18%2Fpowersync_app+NOT+repo%3Acarter-0%2Finstagram-decompiled+NOT+repo%3Am0mosenpai%2Finstadamn+NOT+repo%3AA-Star100%2FA-Star100-AUG2-2024+NOT+repo%3Alclnrd%2Fdetox-scrollview-reproductible+NOT+repo%3ADionisisChytiris%2FWorldWiseTrivia_Main+NOT+repo%3Apast3l%2Fhi2+NOT+repo%3AoneDotpy%2FCaribouQuest+NOT+repo%3Abejayoharen%2Fdailytodo+NOT+repo%3Amolangning%2Freversing-discord+NOT+repo%3AScottPrzy%2Freact-native+NOT+repo%3Agabrieldonadel%2Freact-native-visionos+NOT+repo%3AGabriel2308%2FTestes-Soft+NOT+repo%3Adawnzs03%2FflakyBuild+NOT+repo%3Acga2351%2Fcode+NOT+repo%3Astreeg%2Ftcc+NOT+repo%3Asoftware-mansion-labs%2Freact-native-swiftui+NOT+repo%3Apkcsecurity%2Fdecompiled-lightbulb+com.facebook.react.bridge.InvalidIteratorException).

All GH search results are forks.

## Changelog:

[INTERNAL] - Make com.facebook.react.bridge.InvalidIteratorException internal

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

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

Reviewed By: cortinico

Differential Revision: D72159343

Pulled By: javache

fbshipit-source-id: 7ed30a4691fe8d7646e64b382b3459e7ab76508e
2025-03-31 06:23:16 -07:00
Andrew Wang 63160341d9 Revert D70615310: Collection of small type updates
Differential Revision:
D70615310

Original commit changeset: 11dc833aeeeb

Original Phabricator Diff: D70615310

fbshipit-source-id: 6508f8e27e1a17f6086fdecb5177472233dc3480
2025-03-31 06:14:37 -07:00
Jakub Piasecki f8a4f80b6e Collection of small type updates (#50312)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50312

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70615310

fbshipit-source-id: 11dc833aeeeb67e03808b18b50ff79ae6aa956ec
2025-03-31 04:13:04 -07:00
Pieter De Baets d4778e31ab Add diagram of Android event lifecycle (#50324)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50324

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D71976930

fbshipit-source-id: 5bfaccfd1e1967c691cfbf3f5584d6052c0bec2c
2025-03-31 03:53:58 -07:00
Alex Hunt 9fc2a9b9e6 Define "exports" field on main package (#50320)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50320

Define `"exports"` field on the main `react-native` package.

**Notes**

Module resolution should be equivalent to the previous implicit `"main"` field (backwards compatible).

- Exports all module subpaths to JavaScript (Flow) source files, with and without `.js` suffix (unchanged )
    - These are restricted to the `flow/` and `Libraries/` subdirectories (ℹ️ this should be unchanged, matching any JS imports apps may have today)
        - Still includes 3P integration scripts such as `./jest-preset.js` and `./rn-get-polyfills.js` (unchanged )
- Exports `./package.json` (unchanged )
- TypeScript should:
    - fall back to the `"types"` field (unchanged )
    - OR to `"."`,`"./*"` when Package Exports support is enabled via `compilerOptions`, and use the *adjacent `.d.ts` file* (unchanged )

Changelog:
[General][Breaking] - The `react-native` package now defines package.json `"exports"`.
- While these expose existing JavaScript and TypeScript modules, this change may affect deep imports of non-JS files via Node in third party tools.
- Imports from `src/` and `src/private/` directories are disallowed.

Reviewed By: robhogan

Differential Revision: D71968187

fbshipit-source-id: 28ff941692d1822a916457c4fb891e200e3bca61
2025-03-31 02:37:13 -07:00
Sam Zhou 398ac1f716 Deploy 0.266.1 to xplat (#50387)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50387

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D72133412

fbshipit-source-id: f7719284db67537a2c652ea56d9f9050210da7d4
2025-03-30 11:01:43 -07:00
David Vacca 46cd9165c1 Remove @LegacyArchitecture annotation from CxxCallbackImpl class (#50308)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50308

CxxCallbackImpl is used in new architecture, in this diff i'm removing LegacyArchitecture annotation from CxxCallbackImpl class

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D71820292

fbshipit-source-id: 54748cc23aa7091841a025e41ad43dcaa60923cd
2025-03-28 21:36:54 -07:00
David Vacca a90bc9a766 Mark SingleThreadAsserter as @LegacyArchitecture (#50307)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50307

Mark SingleThreadAsserter as LegacyArchitecture

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D71820293

fbshipit-source-id: a974ee65b2659028d14f73504f73db2b3ae63f70
2025-03-28 21:36:54 -07:00
Panos Vekris 6d5dde6393 pre-suppress errors for natural_inference.local_primitive_literals=partial in fbsource (#50380)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50380

Pre-suppresses errors in xplat/js and arvr/js for phase 1 of Natural Inference for Primitive Literals

See https://fb.workplace.com/groups/floweng/permalink/28092444257044156/

Reviewed By: gkz

Differential Revision: D72088386

fbshipit-source-id: 0827822199cb31a80afbca2a16f74aea4b6c4957
2025-03-28 20:35:51 -07:00
Alex Taylor (alta) 798c3dd842 Deploy 0.266.0 to xplat (#50373)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50373

Changelog: [Internal]

Reviewed By: jbrown215, SamChou19815, panagosg7

Differential Revision: D72061660

fbshipit-source-id: a6862fe0e1f62992b76145006b3f8bc3ad788258
2025-03-28 13:07:06 -07:00
Nick Gerleman e861949ccd Make SafeReleaseJniRef more generic (#50376)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50376

This makes a couple of tweaks to `SafeReleaseJniRef` to let it be used in more places:

1. Add a default ctor for null state
2. Bridge `get()` to return raw JNI ref, for use when calling Java functions directly (compared to current use case of hybrid objects)
3. Keep JNI environment attached to thread longer term, instead of repeated attach/detach, to allow use for higher frequency objects.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D71933838

fbshipit-source-id: 622cc70d2d7483475406314abcbcf92d3d2ff227
2025-03-28 12:32:20 -07:00
zhongwuzw 7441127040 Added slash of alpha support using rgb() (#50281)
Summary:
Fixes https://github.com/facebook/react-native/issues/50207

Added slash alpha support like `rgb(255 122 127 / 0.2);`, currently seems we don't support it.

## Changelog:

[GENERAL] [ADDED] - Added slash of alpha support using rgb()

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

Test Plan: `rgb(255 122 127 / 0.2)` can shows correctly.

Reviewed By: cipolleschi

Differential Revision: D72009174

Pulled By: NickGerleman

fbshipit-source-id: f53e550cfdc8f481785a1fb134cd0fab810f8f38
2025-03-28 11:46:00 -07:00
Riccardo Cipolleschi a29d5a2401 Automate the draft release creation (#50346)
Summary:
This PR automates the creation of Draft releases on Github that we have to do manually every time we create a new release.

## Changelog:
[Internal] - Automate the creation of draft releases on Github

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

Test Plan:
GHA - tested as a separate workflow: https://github.com/facebook/react-native/actions/runs/14132774202/job/39597050776?pr=50346

The drafted release is at: https://github.com/facebook/react-native/releases/tag/untagged-e78c788fe9c861ad28ff

Reviewed By: cortinico

Differential Revision: D72061067

Pulled By: cipolleschi

fbshipit-source-id: ddcdae701e272a59c18f58ba431d1eb3b8cd5b36
2025-03-28 10:57:31 -07:00
Ritesh Shukla af1f1e4fe5 Implementation of URLSearchParams Methods (#50043)
Summary:
This PR addresses the following issues and enhances the functionality of `URLSearchParams`:

1. Extended Initialization Parameters: Previously, only `Record<string, string>` was supported while initialising  URLSearchParams. Now supports `string`, `Record<string, string>`, and `Array<[string, string]>` (aligning with web standards).

2. Added Implementation for `delete()`, `get()`, `getAll()`, `has()`, `sort()`, and `set()`.

3. Addition of Iteration Methods: Added  `keys()`, `values()`, `entries()`, and `forEach()`  methods.  Outputs are identical to web.

4. Bug Fix: Incorrect Initialization from URL. Previously, `URLSearchParams` was initialized with an empty value when accessed via `url.searchParams`, even if the `URL` contained search parameters.

## Changelog:
[General][Added] Implementation for URLSearchParams

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

Test Plan:
Can be tested by below code
```js
  const isHermes = () => !!global.HermesInternal;
  const params = new URLSearchParams("");
  console.log("Is Hermes Enabled:-",isHermes())
  console.log("Values:", Array.from(params.values())); //  ["value1", "value2"]
  console.log("Keys:", Array.from(params.keys())); //  ["key1", "key2"]
  console.log("Entries:", Array.from(params.entries())); //  [["key1", "value1"], ["key2", "value2"]]
  params.forEach((value, key) => {
      console.log(`${key}: ${value}`);
  });
  console.log("Has 'key1'", params.has("key1")); //  true
  console.log("Has 'key3'", params.has("key3")); //  false
  console.log("Get 'key1':", params.get("key1")); //  "value1"
  console.log("Get 'key3':", params.get("key3")); //  null
```

Tested on both hermes and JSC.

Hermes:-
![image](https://github.com/user-attachments/assets/9a467001-693a-4e38-b349-e8d92f961808)

JSC:-
![image](https://github.com/user-attachments/assets/e5f89375-ede4-4ea0-9c62-f98f63c67188)

Reviewed By: cipolleschi

Differential Revision: D71965101

Pulled By: huntie

fbshipit-source-id: c0a0f965ac1ff9577cdc8b3c11f0dd0ced538868
2025-03-28 10:18:59 -07:00
Vitali Zaidman aadb1f1116 improve error reporting when a debugger for an unknown device is opened (#50330)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50330

Changelog: [Internal]

Make the error reported when a debugger is created for a device that does not exist generic, and not including any specific details to make them easier to aggregate

Reviewed By: hoxyq

Differential Revision: D71979796

fbshipit-source-id: 88badc51043e35ff91d7db81c5966ed5ffce9109
2025-03-28 09:16:49 -07:00
zhongwuzw 44810f7498 Reland: avoid race condition crash in [RCTDataRequestHandler invalidate (#50342)
Summary:
Reland https://github.com/facebook/react-native/commit/6bc5ddea3ea3ca20060ea0181630539931948085, the reason the previous commit has an issue is `weakOp` would always `nil` when captured in block :https://github.com/facebook/react-native/blob/6bc5ddea3ea3ca20060ea0181630539931948085/packages/react-native/Libraries/Network/RCTDataRequestHandler.mm#L52-L54

Now, we can create an `NSBlockOperation` and use `addExecutionBlock` instead. `weakOp` can be captured correctly.

## Changelog:

[IOS] [FIXED] - Reland: avoid race condition crash in [RCTDataRequestHandler invalidate

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D72047232

Pulled By: javache

fbshipit-source-id: c3a5a9fca909f7eac16d78b650c9ea9f5b8e64e4
2025-03-28 09:05:01 -07:00
Tim Yung da1bf8d1d1 RN: Ship scheduleAnimatedCleanupInMicrotask (#50341)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50341

Ships tge `scheduleAnimatedCleanupInMicrotask` feature flag, which changes the cleanup of `AnimatedProps` to occur in a microtask instead of synchronously during effect cleanup (for unmount) or subsequent mounts (for updates).

Changelog:
[General][Changed] - When an `Animated` component is unmounted, any completion callbacks will now be called in a microtask instead of during the commit phase.

Reviewed By: javache

Differential Revision: D71942778

fbshipit-source-id: cbe636d5cff84dfeca2f21ead374609c536e91ad
2025-03-28 08:13:39 -07:00
Tim Yung e704f8ac2f RN/Metro: Set reactRuntimeTarget on Hermes Parser (#50339)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50339

Explicitly sets the default `reactRuntimeTarget` when invoking `require('hermes-parser').parse` so that it'll be easier to find these configurations when upgrading to `'19'`.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D72006705

fbshipit-source-id: 4994917152a2a4a767b871d4a36092c0c5391324
2025-03-28 08:02:09 -07:00
Riccardo Cipolleschi 7f550e2c62 Bump Podfile.lock automatically (#50345)
Summary:
This workflow bumps the Podfile.lock automatically when a new release happens.
I decided not to use a js script in this case because all the commands are bash commands for git or cocoapods, therefore wrapping them all in a JS file would have added little to no benefit and only overheads.

## Changelog:
[Internal] - Bumps podfile.lock automatically

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

Test Plan:
GHA - tested as a separate workflow first, hardcoding the latest RC
https://github.com/facebook/react-native/actions/runs/14127895380/job/39581024861?pr=50345

The flow correctly fails as the Podfile.lock has already been bumped in the release branch.

Reviewed By: fabriziocucci

Differential Revision: D72050261

Pulled By: cipolleschi

fbshipit-source-id: 5c0666e80b037319c365fcf4d52e8e367c3445ea
2025-03-28 07:00:12 -07:00
Ruslan Lesiutin 6b72fd2dbf Send Profile in smaller chunk to prevent WebSocket disconnections on android (#50337)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50337

# Changelog: [Internal]

This should not have any functional changes, it only prevents the WebSocket from being killed on Android, when we are sending Profile-related Trace Events.

For large traces, a single message could be more than 16MB, because we send a unique string url for every call frame.

Reviewed By: huntie

Differential Revision: D71993748

fbshipit-source-id: f0bfddfb0bb87631e72b573142abdf0d7d87ba48
2025-03-28 05:43:41 -07:00
Rubén Norte c6eb714035 Add basic documentation for MutationObserver (#50335)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50335

Changelog: [internal]

This defines the internal technical documentation for the MutationObserver API, as an example of how to define docs using the new strategy and structure.

Reviewed By: javache

Differential Revision: D71890748

fbshipit-source-id: 3ef19c784dff7aea7a2e2d08302640d5eefacc30
2025-03-28 05:28:44 -07:00
Rubén Norte 435d58d215 Align feature flags documentation with new guidelines (#50334)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50334

Changelog: [internal]

This updates the documentation for the feature flag system to adhere to the new documentation strategy and structure.

Reviewed By: javache, rshest

Differential Revision: D71889753

fbshipit-source-id: 7ff47cf613ac01012e7329485d2b97e997a97c07
2025-03-28 05:28:44 -07:00
Rubén Norte 6d415d6202 Define root README.md for technical docs (#50333)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50333

Changelog: [internal]

This defines a placeholder for the main entrypoint for the React Native internal technical documentation.

Reviewed By: javache, mdvacca, rshest

Differential Revision: D71889755

fbshipit-source-id: 453518a0b7ec2cf433884a87446a7a622418d0b2
2025-03-28 05:28:44 -07:00
Rubén Norte 907185333a Define technical documentation guidance and template (#50332)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50332

Changelog: [internal]

This defines a detailed strategy on how to approach internal technical documentation in React Native, including defining a template for subsystem documentation.

Reviewed By: javache, rshest

Differential Revision: D71889754

fbshipit-source-id: 5ce630b2e71f8c7b6aaf027a5833bcbdf0dfa5de
2025-03-28 05:28:44 -07:00
Riccardo Cipolleschi 2c343d18a7 Generate the changelog automatically (#50323)
Summary:
This change implements the automatic generation of the Changelog in CI while doing a release.
The output is a PR opened by the react-native-bot that can be manipulated and imported by Meta engineers

## Changelog:
[Internal] - Generate the changelog automatically

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

Test Plan:
Tested as a separated workflow first:
<img width="1624" alt="Screenshot 2025-03-27 at 17 44 47" src="https://github.com/user-attachments/assets/b8877cdb-f63b-4d82-b340-54f612ac0cd4" />
this generated the PR:
https://github.com/facebook/react-native/pull/50328

I also added jest tests:
<img width="516" alt="Screenshot 2025-03-27 at 17 45 39" src="https://github.com/user-attachments/assets/7ebbc310-e41e-48fc-997e-21366c7306cf" />

Reviewed By: cortinico

Differential Revision: D71986909

Pulled By: cipolleschi

fbshipit-source-id: 10ffaf342bb0642a6992a107185b6704815b16e3
2025-03-28 04:25:06 -07:00
Pieter De Baets 6dd5a838c3 Do not crash when event is emitted when ReactInstance is reloaded
Summary:
Regression introduced in D71735505 where I tried to ensure fabricEventEmitter was always non-null. Instead log a soft error when this happens, so we don't drop the event silently.

Changelog: [Android][Fixed] Fixed crash when event is emitted after instance is shutdown

Reviewed By: mdvacca

Differential Revision: D71967092

fbshipit-source-id: 990b6414b41a2709d70a6deae38f5aa043203a20
2025-03-28 04:17:20 -07:00
Dawid Małecki 6877263003 Align Flow with TS types and export relevant modules (#50322)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50322

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D71973327

fbshipit-source-id: ef3a6ad4c0ba6d32bfd1e4cc2ac8e0afac51e9fe
2025-03-28 02:47:22 -07:00
Jorge Cabiedes Acosta 1f8d824e67 Ignore unexisting nativeIDs on accessibilityOrder (#50325)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50325

axOrderViews is an optimization I came up with so that we could find and queue all the views on a single tree traversal. It initializes the array with the size of the accessibilityOrder array and places each view where its nativeID is. If there is no view corresponding to the nativeID then that axOrderViews element will be null. So to fully ignore nativeIDs that don't correspond to any View we can just filter the nulls

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D71977739

fbshipit-source-id: a3f2138eebe06808ce413355df5d9beb2f4ff388
2025-03-27 16:02:55 -07:00
Tim Yung 05fe502821 Animated: Manually Manage Connected viewTag (#50230)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50230

Currently, `AnimatedProps` invokes `findNodeHandle` to both connect and disconnect the native `AnimatedNode` instances to corresponding `viewTag`s.

Not only is this slow and wasteful (because `findNodeHandle` requires traversing the fiber tree), but it prevents deferring disconnection to after the fiber tree has been unmounted.

Disconnecting after unmount is necessary when the `scheduleAnimatedCleanupInMicrotask` feature flag is enabled, which is necessary to avoid invoking animation completion callbacks in the commit phase that unmounts animated views.

I have verified that `disconnectAnimatedNodeFromView` is needed and handles being called after fibers are unmounted.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D71745805

fbshipit-source-id: ce8c2c95d38c4d5adbb79bac3c07b0872211cf51
2025-03-27 15:41:39 -07:00
Sam Zhou 185c809afd Move jest libdef in react-native (#50329)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50329

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D71986203

fbshipit-source-id: 5ec9d9238da54277faef6af09fed3ff2c9a8ac3f
2025-03-27 14:21:17 -07:00
David Vacca 6f8a27d0c3 Fix AssertionError:com.facebook.react.views.text.ReactTextView.onLayout in legacy architecture (#50336)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50336

This diff is fixin an assertion error being triggered in ReactTextView:

`
AssertionError:com.facebook.react.views.text.ReactTextView.onLayout
`

changelog: [internal] internal

Reviewed By: Abbondanzo

Differential Revision: D71990566

fbshipit-source-id: f94b27252ae62472544369ab285d72bc35ec8afc
2025-03-27 13:26:19 -07:00
Alex Stein 24ba7dfe6f Update TS docs for contentInsetAdjustmentBehavior (#50069)
Summary:
Update the TS docs to reflect the default value for `contentInsetAdjustmentBehavior`. The TS docs suggest it will be `automatic` however it's actually `never`.

The default behaviour is correctly specified in the JS docs: https://github.com/facebook/react-native/blob/850760ab6112d1f38a5a9014282ae5186ab814d6/packages/react-native/Libraries/Components/ScrollView/ScrollView.js#L306

It's also documented as the default in the native module: https://github.com/facebook/react-native/blob/main/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm#L34

## Changelog:

[General] [Fixed] - Fix TS docs for `contentInsetAdjustmentBehavior`

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

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

Reviewed By: NickGerleman

Differential Revision: D71491433

Pulled By: lunaleaps

fbshipit-source-id: 08b3f273824be570589095bf0640d7d0b7c93e7d
2025-03-27 12:25:44 -07:00
Joe Vilches d509bb5824 Add experimental prefix to accessibilityOrder (#50311)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50311

We are going to initially expose this with the `experimental_` prefix to indicate that it has not been battle tested yet.

Changelog: [Internal]

Reviewed By: jorge-cab

Differential Revision: D71939365

fbshipit-source-id: e9481b6bd4f253fb97c11fc9d7bf3708ffe79635
2025-03-27 12:07:17 -07:00