Commit Graph

12270 Commits

Author SHA1 Message Date
Joe Vilches db6e000023 Allow Switch to use default UISwitch accessibility annoucements (#50796)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50796

When we render a `Switch` today we are never actually focusing on the native `UISwitch` that gets rendered. We instead focus on the parent `RCTViewComponentView` which houses the `UISwitch` as a `contentView`. That is because of [this logic](https://www.internalfb.com/code/fbsource/[b7e1547dab5a]/xplat/js/react-native-github/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm?lines=1211-1213). This blocks the accessibility of any descendants, including the `contentView`.

What we lose here is the announcement of "on" and "off" based on the toggle state that comes built into `UISwitch`. To do this today you need to add `accessibilityState={{checked: ...}}` which is very unintuitive. Android DOES announce "on" and "off".

We can fix this with an override on the switch class.

Changelog: [iOS][Fixed] - Fix "on" and "off" announcements on `Switch`

Reviewed By: realsoelynn

Differential Revision: D73226500

fbshipit-source-id: ff4eed0b0b4b978e4b59c5e4b37d880373f6506c
2025-04-18 15:33:42 -07:00
Nick Gerleman f6589177ce Fix logic around hiding chrome with deeplinks on small screen (#50806)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50806

1. `useWindowDimensions` is already returning in DIPs, my math was just wrong before
2. Playground is marking itself as a deeplink when it shouldn't be

Changelog: [internal]

Reviewed By: cortinico, joevilches

Differential Revision: D73221335

fbshipit-source-id: 32dfa9d60609faccef8e264aa46d64b79250b64d
2025-04-18 15:31:57 -07:00
Jakub Piasecki 5fd5188172 Fix TextInput onContentSizeChange event being dispatched only once on iOS (#50782)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50782

Changelog: [IOS][FIXED] Fix TextInput `onContentSizeChange` event being dispatched only once on iOS on the new architecture

Currently, the comparison to decide whether to send event happens between the content size before and after layout metrics update. Those values turn out to be the same in all but the first call.

This updates the logic to use the previously send values in the comparison.

Reviewed By: huntie

Differential Revision: D73182563

fbshipit-source-id: 3b764a89c1844e203001d75022a3295a3fd747f2
2025-04-17 23:54:07 -07:00
Nick Gerleman 3e5c609a1e Back out "Mitigate deadlock hazard in RCTUtils.m" (#50795)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50795

This diff causes `rntester-ios` to launch into legacy architecture by default.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D73225574

fbshipit-source-id: 9a4f1967bbabd23936cf2faf9a2bf48a850a4d11
2025-04-17 20:14:06 -07:00
nishan (o^▽^o) 1b45dc8033 feat: radial gradient js prop passing (#50268)
Summary:
Adds JS changes for radial gradient. Previous PR - https://github.com/facebook/react-native/pull/50209

## Changelog:
[GENERAL] [ADDED] - Radial gradient
<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

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

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

Test Plan:
- Added tests in `processBackgroundImage-test.js` in https://github.com/facebook/react-native/pull/50268
- Merge this, https://github.com/facebook/react-native/pull/50266 and https://github.com/facebook/react-native/pull/50269 and check examples in `RadialGradientExample.js`

Reviewed By: NickGerleman

Differential Revision: D71898524

Pulled By: jorge-cab

fbshipit-source-id: 39bdf0f647ba19839b6e6deb09b30a1c337e6457
2025-04-17 16:39:44 -07:00
nishan (o^▽^o) a2409941c2 feat: radial gradient android changes (#50269)
Summary:
Adds android changes for radial gradient. Previous PR - https://github.com/facebook/react-native/pull/50209

## Changelog:
[ANDROID] [ADDED] - Radial gradient
<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

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

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

Test Plan:
- Added tests in processBackgroundImage-test.js in https://github.com/facebook/react-native/pull/50268
- Merge this and [this](https://github.com/facebook/react-native/pull/50268) and check examples in `RadialGradientExample.js`

Reviewed By: NickGerleman

Differential Revision: D71898546

Pulled By: jorge-cab

fbshipit-source-id: 2872bcf16a492c7bc829be10eedb0f6c7dad32c7
2025-04-17 16:39:44 -07:00
nishan (o^▽^o) d7533dce1c feat: radial gradient iOS (#50266)
Summary:
Adds iOS changes for radial gradient. Previous PR - https://github.com/facebook/react-native/pull/50209

## Changelog:
[IOS] [ADDED] - Radial gradient
<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

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

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

Test Plan:
- Added tests in `processBackgroundImage-test.js` in https://github.com/facebook/react-native/pull/50268
- Merge this, https://github.com/facebook/react-native/pull/50268 and check examples in `RadialGradientExample.js`

Reviewed By: joevilches

Differential Revision: D71898565

Pulled By: jorge-cab

fbshipit-source-id: ac00c7c3cc7dcbe9116c2d60dac8eb1a87153908
2025-04-17 16:39:44 -07:00
Mohd. Yasir Ansari 867858df65 refactor: migrate DynamicFromObject to Kotlin (#50754)
Summary:
PR migrates DynamicFromObject class to Kotlin as part of https://github.com/facebook/react-native/issues/50513 work.

## Changelog:

[ANDROID] [CHANGED] - Migrated DynamicFromObject to Kotlin

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

Test Plan: Run RN-Tester application and played around with it a bit.

Reviewed By: mlord93

Differential Revision: D73118014

Pulled By: alanleedev

fbshipit-source-id: 84958ff07ccafea9ec3dbdf06467c638eb92d49d
2025-04-17 15:54:18 -07:00
Ramanpreet Nara fa9d082747 Bridgeless: Fix unstable_hasComponent
Summary:
unstable_hasComponent(component) first registers the component with react native, if possible. Then, it returns you whether registration succeeded.

## Problem
For unregistered components, the initial call returns false. But, all subsequent calls return true.

The reason why: After the initial call fails, react native registers unimplemented view under that component name. So, all subsequent calls return true.

## Solution
Just record the initial loopup result. And always return that initial lookup result from this method.

Changelog: [iOS][Fixed] Fix bug: unstable_hasComponent(*) = true for unregistered components for n > 1th call.

Reviewed By: yungsters

Differential Revision: D73127468

fbshipit-source-id: ee30bde486a6bb970f40f654c65a8946452f49b3
2025-04-17 14:33:26 -07:00
Nick Gerleman f144b53122 Remove "usesMapBufferForStateData" template parameter from ConcreteShadowNode and ConcreteState
Summary:
These internals have leaked pretty far. As we are adding support for JNI reference state wrappers, lets hide this, and make functions for getting MapBuffer work automatically if state data exposes the requisite functions, instead of external users needing to worry about multiple possible `ConcreteState` types for a given state data type.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D73158627

fbshipit-source-id: e3ac2a045368d46fab72e2017fc28d680db6a7c0
2025-04-17 14:25:22 -07:00
Nicola Corti f1f2788410 Re-add an eventName field inside Event.kt to unbreak several libraries (#50787)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50787

Converting Event from Java to Kotlin resulted in a number of breaking changes for Kotlin
libraries that were using an `.eventName` accessors from the `getEventName()` Java method.

This diff re-adds the `eventName` property without backing field.
This could potentially be disruptive in OSS but only one library is affected:
https://github.com/search?type=code&q=%22import+com.facebook.react.uimanager.events.Event%22+%22val+eventName%3A%22+%22%3A+Event%3C%22+language%3AKotlin+path%3A*Event.kt+NOT+is%3Afork+NOT+org%3Afacebook+NOT+path%3AInteropEvent.kt

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D73193202

fbshipit-source-id: a69159950e1ef275c93f265f264525236a19d1db
2025-04-17 13:06:13 -07:00
Alex Hunt 16a61bf2ba Remove .npmignore files from other packages, add lint check (#50786)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50786

Follows https://github.com/facebook/react-native/pull/50784. Having any `.npmignore` files is a gotcha — remove and replace with `package.json#files`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D73193257

fbshipit-source-id: de715d74195e4f53c817c11f244a61c79b8ce5bc
2025-04-17 12:48:28 -07:00
Alex Hunt 09187491a6 Align __test_fixtures__ to __fixtures__ (#50785)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50785

Enables us to simplify exclude patterns in `package.json#files`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D73185320

fbshipit-source-id: 40219a0e440740bec35876fff6e37e4bf4fe9ddc
2025-04-17 12:48:28 -07:00
Alex Hunt d1cf58484d Replace .npmignore files, ignore all test/fixture/docs directories (#50784)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50784

Migrates us from several `.npmignore` files to `package.json#files`, for the main `react-native` package.

This reduces the size of our npm package by 38 files — in particular, catching previously missed `__tests__` and `__docs__` directories.

```diff
- npm notice package size: 4.4 MB
- npm notice unpacked size: 23.7 MB
- npm notice total files: 4533
+ npm notice package size: 4.4 MB
+ npm notice unpacked size: 23.7 MB
+ npm notice total files: 4533
```

NOTE: `"files"` or `.npmignore` — one or the other!
- Having `.npmignore` at the package root does not behave(!). Having `"files"` as one source of truth is better and safer. See https://github.com/npm/cli/issues/6221.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D73185321

fbshipit-source-id: 429c9fec4f447d63440a38bb8e3f3ce3bd155414
2025-04-17 12:48:28 -07:00
generatedunixname89002005287564 cd5991c648 Fix CQS signal. Id] 19045409 -- readability-redundant-string-init in xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/view
Reviewed By: dtolnay

Differential Revision: D73175242

fbshipit-source-id: 4f79d0f661a15fda883eb9f03c42040da9a740c8
2025-04-17 11:59:57 -07:00
Gijs Weterings e2232090d7 Update Danger to 13.0.4
Summary:
parse-git-config is a transitive dep for Danger that hasn't been updated in years and has an unresolved CVE (CVE-2025-25975)

Danger has moved away from this dependency yesterday and cut a new version, so we can update to resolve

Changelog: [General][Fixed] Update Danger to 13.0.4

Reviewed By: cortinico

Differential Revision: D73181590

fbshipit-source-id: e5c512e6f381725eea71d64555018327144e23be
2025-04-17 09:49:03 -07:00
Alex Hunt 2410fc97b7 Reorganise dev tooling/debugging modules as src/private/devsupport/ (#50730)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50730

This is a consolidation of our "dev support" features in the `src/private/` dir.

New grouping:

- `src/private/devsupport/`
    - `devmenu/` — The Dev Menu and in-app inspection features (in-app UI)
        - `elementinspector/` — The Element Inspector overlay (panel with sub-features), accessed from  Dev Menu → Toggle Element Inspector
        - `perfmonitor/` — The Perf Monitor overlay, accessed from Dev Menu → Show Perf Monitor
    - `rndevtools/` — Modules supporting React Native DevTools (external UI)

`NativeReactDevToolsRuntimeSettingsModule.js` and `NativeReactDevToolsSettingsManager.js` are also moved out of `specs_DEPRECATED/`.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D73031559

fbshipit-source-id: 952a469f31f4cd05aeed27dc7023552e723ca078
2025-04-17 09:43:48 -07:00
Nicola Corti a3d38d5722 Kotlin to 2.1.20 (#50780)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50780

This bumps Kotlin to the latest stable: 2.1.20.
I've also fixed several warnings emitted by the new compiler.

Changelog:
[Android] [Changed] - Kotlin to 2.1.20

Reviewed By: rshest

Differential Revision: D73122000

fbshipit-source-id: 019a01d085b2c115a3efcf567056e9990a1ff0ce
2025-04-17 08:40:20 -07:00
Jakub Piasecki 6bc9447506 Update TextInput props, expose more types from the package (#50781)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50781

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D73180987

fbshipit-source-id: e47d8fa674ab7e5e821e9786f8069c0b7466a082
2025-04-17 08:03:30 -07:00
Bogusz Kaszowski 74e8c78268 refactor: migrate DynamicFromArray to Kotlin (#50602)
Summary:
PR migrates DynamicFromArray class to Kotlin as part of https://github.com/facebook/react-native/issues/50513 work.

## Changelog:

[ANDROID] [CHANGED] - Migrated DynamicFromArray to Kotlin

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

Test Plan: Run RN-Tester application and played around with it a bit.

Reviewed By: rshest

Differential Revision: D73179609

Pulled By: cortinico

fbshipit-source-id: e304884fea9f57e152bca4926677d7338dc2403a
2025-04-17 07:23:48 -07:00
Nick Lefever 95ca59eb94 Add unit test for shadow node state on clone (#50774)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50774

Adding a Fantom test for the `useShadowNodeStateOnClone` feature flag, showing that the shadow node state is maintained after commit hook processing only when the feature flag is enabled.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D73121159

fbshipit-source-id: bbd7f46fbf49394ca5015e825a59d2fb1b519ee5
2025-04-17 06:18:36 -07:00
Jakub Piasecki b3c110b0b2 Add a lint rule preventing named type imports from React (#50776)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50776

Changelog: [Internal]

Adds a lint rule that prevents the use of named imports when importing types from React. `flow-api-translator` relies on the `React` namespace being used when generating TypeScript definitions based on Flow.

Reviewed By: huntie

Differential Revision: D73170799

fbshipit-source-id: 96d014b016c7cec8d3b266447dc7a185d2b1da26
2025-04-17 05:39:22 -07:00
Gourav Khunger cb51d25ba8 refactor: FrescoBasedTextInlineImageSpan (#50532)
Summary:
I've migrated `FrescoBasedTextInlineImageSpan.java` to kotlin. Reference https://github.com/facebook/react-native/issues/50513.

## Changelog:

[ANDROID] [CHANGED] - Refactor class `FrescoBasedTextInlineImageSpan` from Java to Kotlin.

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

Pick one each for the category and type tags:

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

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

Test Plan: Tested the RN tester app with `yarn android` on both new and old architecture.

Reviewed By: rshest

Differential Revision: D73031024

Pulled By: cortinico

fbshipit-source-id: e7208bf1103849f38c3dc26d73b31315b2326275
2025-04-17 04:42:23 -07:00
riteshshukla04 f5ae157820 Added more test cases for URL (#50768)
Summary:
I forgot to add toString and protocol in test cases last time when we merged this https://github.com/facebook/react-native/pull/50043

## 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
-->
[INTERNAL][ADDED] More Test cases

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

Test Plan: Tested with yarn jest

Reviewed By: rshest, cipolleschi

Differential Revision: D73169665

Pulled By: cortinico

fbshipit-source-id: 1115c0ccce52a67663fcd60ef376ce7bde502d1f
2025-04-17 03:18:13 -07:00
Rubén Norte 7ff5db3c46 Fix last Excalidraw SVG diagram in docs (#50765)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50765

Changelog: [internal]

TSIA

Reviewed By: andrewdacenko

Differential Revision: D73117512

fbshipit-source-id: fd575e819781e93c3f8bf796415b3ff03797fb07
2025-04-17 01:59:21 -07:00
Nicola Corti 93f161b4bd Unblock binary-compatibility-validator for Kotlin 2.1.0
Summary:
This unblocks the `binary-compatibility-validator` for Kotlin 2.1.0
I've bump the tool to the latest version + re-aligned all the dependencies to the one used by the tool as well
(diff utils, asm, kotlinx-metadata-jvm).

Reviewed By: mdvacca

Differential Revision: D73057557

fbshipit-source-id: 020babea3a4032a8f9919ce7f456c3d4fb9a8e0c
2025-04-17 01:52:49 -07:00
Nicola Corti 9d84909330 Enable CMP0069=NEW for all the targets
Summary:
Since I enabled INTERPROCEDURAL_OPTIMIZATION last week, we're having a warning for gtest that
they're not setting this CMake policy: CMP0069
https://cmake.org/cmake/help/latest/policy/CMP0069.html

As Gtest is not a production dependency, we can safely ignore this warning. So I'm enabling the policy for all the targets.

Changelog:
[Internal] [Changed] -

Reviewed By: alanleedev

Differential Revision: D73122573

fbshipit-source-id: 319a889024f080752f0c9287d011209459dcb013
2025-04-17 00:00:51 -07:00
Nick Gerleman 71c82ce1ad Remove code related to onInlineViewLayout event
Summary:
Afacit from searching both fbsource and GitHub, this should be totally dead.

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D73154613

fbshipit-source-id: 1ed993ae53e7bc97232a8200b5fb4e01f0db7bb4
2025-04-16 19:57:32 -07:00
Nick Lefever 96939f160b Use source shadow node state on clone (#50773)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50773

With shadow node syncing enabled by default, whenever a shadow node has to be cloned, we can be guaranteed that the state on the shadow node will be the most recent state in most cases.

This change fixes state updates being ignored when cloning YogaLayoutableShadowNodes from a commit hook. Since the most recent state gets updated post commit, any clone reading the most recent state might miss state changes done within the commit.

Changelog: [Internal]

Reviewed By: rshest, cipolleschi

Differential Revision: D72315898

fbshipit-source-id: 5e14d03681dd1cc5686a649caa2e8c3685042cfa
2025-04-16 18:58:26 -07:00
Nick Lefever b962646079 Add feature flag for using shadow node state on clone (#50751)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50751

See title

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D73067007

fbshipit-source-id: 2a67ed33ebd35ffaa3470d75ef6f695471820fa6
2025-04-16 18:58:26 -07:00
Nick Lefever 539f2377a4 Add feature flag for RSNRU on commit (#50745)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50745

See title

Changelog: [Internal]

Reviewed By: fabriziocucci

Differential Revision: D73038437

fbshipit-source-id: e304f3521799c893a51ee8da8e85f45352a8d873
2025-04-16 18:58:26 -07:00
riteshshukla04 4fa57f98da Replaced abort with Default value (#50764)
Summary:
Fixes https://github.com/facebook/react-native/issues/50740

## Changelog:
[INTERNAL] - App Crash on wrong prop type

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

Test Plan: Tested with wrong prop on RN Tester

Reviewed By: cipolleschi

Differential Revision: D73130916

Pulled By: NickGerleman

fbshipit-source-id: 21ffc242e6398509584baf27cf3fb98cbaf2582d
2025-04-16 17:16:32 -07:00
generatedunixname89002005287564 986bcdbbfb Fix CQS signal. Id] 42896038 -- modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/hermes/inspector-modern/chrome
Reviewed By: dtolnay

Differential Revision: D73023455

fbshipit-source-id: 394a337d10546308efa4a49aa7e72b67ef41c2f1
2025-04-16 16:52:06 -07:00
Riccardo Cipolleschi 5ed459283a Add deprecation message for receiveCommand (#50770)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50770

OSS CI is failing because the we forgot a deprecation message in ReactScrollViewManager.

## Changelog:
[Internal] - Add deprecation annotation to fix ci build

Reviewed By: sbuggay

Differential Revision: D73136939

fbshipit-source-id: 4f39d7c7ae60aaca1011b70135d9535b16ed58e0
2025-04-16 15:51:37 -07:00
zhongwuzw 692b05e77d CSS Added hwb(H W B / A) notation (#50750)
Summary:
Fixes https://github.com/facebook/react-native/issues/50583. cc NickGerleman

## Changelog:

[GENERAL] [FIXED] - CSS Added hwb(H W B / A) notation

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

Test Plan: Added hwb(H W B / A) notation

Reviewed By: cipolleschi

Differential Revision: D73126316

Pulled By: NickGerleman

fbshipit-source-id: 8e3730c6de44a0b4d8a21339e1f7339cb70e2044
2025-04-16 15:47:28 -07:00
Vitali Zaidman 95af970096 Update debugger-frontend from 26e19a4...bc635fa (#50762)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50762

Changelog: [Internal] - Update `react-native/debugger-frontend` from 26e19a4...bc635fa

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

Reviewed By: huntie

Differential Revision: D73102920

fbshipit-source-id: a6c7c4cee2cf8e2ba4ecf130eafa5e6bf6c71e10
2025-04-16 13:46:04 -07:00
Vitali Zaidman e18e4feb3a react native devtools extra telemetry (#50737)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50737

Changelog: [Internal][General] the debugger can now be opened with the query param "telemetryInfo"

Corresponding PR on debugger: https://github.com/facebook/react-native-devtools-frontend/pull/157

Reviewed By: huntie

Differential Revision: D72972397

fbshipit-source-id: 51612d90fedb489ffa1079bfd86d27d0f38b6eee
2025-04-16 13:46:04 -07:00
Eugene Lin d4f2b02b4d Lower JS Thread Priority by 10
Summary:
## Changelog: [Internal]: [Threading][Added] - Add option to change thread priority
D73074402 handles lowering priority for IWM js and granite threads. this diff handles lowering priority for in game panel js thread

JS thread inherits parent thread priority by default
lowering priority by 10

Reviewed By: rshest

Differential Revision: D72842049

fbshipit-source-id: 6797f7c8406a410956c64bb08a12d2b26c100040
2025-04-16 11:19:29 -07:00
Ramanpreet Nara a6f510003c Mitigate deadlock hazard in RCTUtils.m
Summary:
This structure is unsafe:

```
// In each native module:
+load
  dispatch_once
    NSBundle mainBundle
```

NSBundle mainBundle itself uses dispatch_once during initialization. If that initialization triggers a native module class load, we could end up with a circular dependency chain. This could deadlock the application.

## Changes
Just remove the dispatch_once. Getting the NSBundle mainBundle is very efficient after the first access. And NSBundle objectForInfoDictionaryKey is also very efficient.

Created from CodeHub with https://fburl.com/edit-in-codehub

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D73058551

fbshipit-source-id: 9d14b5556748288227cfb93940f79d44997d7b47
2025-04-16 10:33:53 -07:00
Andrew Datsenko 929099f064 Move rncxx coremodules
Summary: Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D72875329

fbshipit-source-id: 86578362f99210dbe8aa990991829760fa61daf8
2025-04-16 09:53:18 -07:00
Riccardo Cipolleschi 706b6e878d Add warning when app is running with the old architecture (#50735)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50735

This change adds a warning in JS that is printed when the app is running using the old architecture.

The assumption is that, if it is running with Fabric, it is running with the new architecture. So running without Fabric implies old architecture.

## Changelog:
[General][Added] - Add warning when the app runs with the legacy architecture

Reviewed By: cortinico, rubennorte

Differential Revision: D73041156

fbshipit-source-id: 89a14f6370ae54b9d115e0ef672f29084d009a8e
2025-04-16 09:51:23 -07:00
Mateo Guzmán 99153d8ad8 Make HeadlessJsTaskSupportModule internal (#50739)
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.modules.core.HeadlessJsTaskSupportModule).

## Changelog:

[INTERNAL] - Make com.facebook.react.modules.core.HeadlessJsTaskSupportModule internal

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

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

Reviewed By: cortinico

Differential Revision: D73089424

Pulled By: rshest

fbshipit-source-id: efad44f89679932ed6bebcf19fb2beeb096881cb
2025-04-16 09:46:00 -07:00
Riccardo Cipolleschi 6d8a02a666 Fix URL parsing to respect node/chromium convention (#50757)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50757

We received [this issue](https://github.com/facebook/react-native/issues/50747) in OSS where the URL parsing logic does not respect node/chromium specs.

This can cause issue in usercode. This change fixes it

## Changelog:
[General][Fixed] - make sure that URLs are parsed following the node specs

Reviewed By: huntie

Differential Revision: D73101813

fbshipit-source-id: 36f1d23b3ad7882c16524843621d9ebbcc09b95d
2025-04-16 09:45:46 -07:00
Nicola Corti cac27d15be Convert to Kotlin - ReactEditText
Summary:
This diff converts the last java file inside `com.facebook.react.views.textinput` to Kotlin.

As `ReactEditText` is quite involved, reviewing this one is going to be quite critical.
I'm marking this as breaking as a number of nullability types has changed for OSS users.

Changelog:
[Android] [Breaking] - com.facebook.react.views.textinput.ReactEditText is now in Kotlin. If you're subclassing this type you'll need to adjust your signatures.

Reviewed By: rshest

Differential Revision: D72972921

fbshipit-source-id: 92ed112444cbc20daed5466ad20f651479bfac6f
2025-04-16 09:14:55 -07:00
Mateo Guzmán 9397b113b0 Make ToastModule internal (#50741)
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.modules.toast.ToastModule).

GH results are mostly forks and some very old repos (~8, 9 old)

## Changelog:

[INTERNAL] - Make com.facebook.react.modules.toast.ToastModule internal

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

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

Reviewed By: cortinico

Differential Revision: D73089456

Pulled By: rshest

fbshipit-source-id: 0cee12c92e5356c75a7c8b1b1b3c652c9bfce6be
2025-04-16 09:07:26 -07:00
Neil Dhar 6182795081 Remove usage of HERMES_BUILD_APPLE_DSYM (#50738)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50738

The implementation of this in Hermes depends on a deprecated CMake
feature. Since it just needs to run a command to generate the dSYM, it
seems simpler to eliminate the flag and move the work into the RN build
script.

## Changelog:
[Internal] - move dsym generation logic from Hermes to RN

Reviewed By: cortinico, cipolleschi

Differential Revision: D73054511

fbshipit-source-id: 4b8f9d97ef3386154bfe4030e0061f9c0791d7ea
2025-04-16 07:28:46 -07:00
Gijs Weterings b743af0aef Back out "Add KeyboardFocusableNode ShadowNodeTrait"
Summary:
Original commit changeset: dcc2410b408e

Original Phabricator Diff: D72258544

Changelog: [Internal]

Differential Revision: D73103169

fbshipit-source-id: ff51309f8470664a6f0859ff729bd4b155ffb0a4
2025-04-16 07:28:41 -07:00
Gijs Weterings eee1d8b11d Back out "Add fabric implementation to find next focusable view"
Summary:
Original commit changeset: 1a13c82d0678

Original Phabricator Diff: D71558965

Changelog: [Internal]

Differential Revision: D73103165

fbshipit-source-id: b7813a03224dad550ff6d3d99c2b308df5cb4a55
2025-04-16 07:28:41 -07:00
Gijs Weterings 1d5324cba9 Back out "Add fabric implementation to find Top-Most relative and relevant parent of a child view"
Summary:
Original commit changeset: 7b91ea695e23

Original Phabricator Diff: D72178408

Changelog: [Internal]

Differential Revision: D73103168

fbshipit-source-id: 91a469dd74f8941f3295ff594f47c8fd3ae70184
2025-04-16 07:28:41 -07:00
Gijs Weterings 513ff5307c Back out "Fix keyboard navigation for FlatList with removeClippedSubviews enabled"
Summary:
Original commit changeset: b55b7735a307

Original Phabricator Diff: D71324219

Changelog: [Internal]

Differential Revision: D73103167

fbshipit-source-id: 99f2ed13a482958a8c71ba2dd1cfc2a5de4786d3
2025-04-16 07:28:41 -07:00