Commit Graph

38536 Commits

Author SHA1 Message Date
Joe Vilches c9e6567881 Fix issue where state updating text to remove link would break TalkBack
Summary:
Whenever we remove a link in some text we do not properly update the accessibility delegate to respond to this change. As a result we still think that there are nodes to access around the spans

Changelog: [Android][Fixed] - Fix text link accessibility on state update removal

Reviewed By: NickGerleman, mdvacca

Differential Revision: D69551906

fbshipit-source-id: f43fcf72219e76d2d0bbb29d31ab219d73413671
2025-02-21 16:10:03 -08:00
Joe Vilches d65d846ccf Move text-specific a11y logic in ReactAccessibilityDelegate to subclass (#49377)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49377

ReactAccessibilityDelegate exists to handle much of the accessibility tasks in the various Views in RN. There is quite a bit of text specific logic, mostly related to virtual views and nested links within a TextView.

I decided to subclass this into a TextView-specific version because I need this delegate to reference TextView or ReactClickableSpan, which live under `react/views` while ReactAccessibilityDelegate live under `react/uimanager`. The former depends on the latter, so making the latter depend on the former would for a dependency cycle that would break builds. I thought about making a separate package for this but both `react/views` and `react/uimanager` need to include ReactAccessibilityDelegate so we would still have a cycle.

mAccessibilityLinks is only set on ReactTextViewManager, so this is purely a text thing. Subclassing is not the most ideal as it extends the inheritance chain some more but I do not see a better option.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D69499115

fbshipit-source-id: 1720d20bb56ba1e1b5bd114d32bc70e80e3b4558
2025-02-21 16:10:03 -08:00
Nicola Corti 50878c248d Reland: Make PerftestDevSupportManager internal (#49595)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49595

This is a reland of D69934544 which was previously reverted.

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

I'm making this class internal as I verified that there are no meaningful OSS usages.

[Source](https://www.google.com/url?q=https://github.com/search?type%3Dcode%26q%3DNOT%2Bis%253Afork%2BNOT%2Borg%253Afacebook%2BNOT%2Brepo%253Areact-native-tvos%252Freact-native-tvos%2BNOT%2Brepo%253Anuagoz%252Freact-native%2BNOT%2Brepo%253A2lambda123%252Freact-native%2BNOT%2Brepo%253Abeanchips%252Ffacebookreactnative%2BNOT%2Brepo%253AfabOnReact%252Freact-native-notes%2BNOT%2Buser%253Ahuntie%2BNOT%2Buser%253Acortinico%2BNOT%2Brepo%253AMaxdev18%252Fpowersync_app%2BNOT%2Brepo%253Acarter-0%252Finstagram-decompiled%2BNOT%2Brepo%253Am0mosenpai%252Finstadamn%2BNOT%2Brepo%253AA-Star100%252FA-Star100-AUG2-2024%2BNOT%2Brepo%253Alclnrd%252Fdetox-scrollview-reproductible%2BNOT%2Brepo%253ADionisisChytiris%252FWorldWiseTrivia_Main%2BNOT%2Brepo%253Apast3l%252Fhi2%2BNOT%2Brepo%253AoneDotpy%252FCaribouQuest%2BNOT%2Brepo%253Abejayoharen%252Fdailytodo%2BNOT%2Brepo%253Amolangning%252Freversing-discord%2BNOT%2Brepo%253AScottPrzy%252Freact-native%2BNOT%2Brepo%253Agabrieldonadel%252Freact-native-visionos%2BNOT%2Brepo%253AGabriel2308%252FTestes-Soft%2BNOT%2Brepo%253Adawnzs03%252FflakyBuild%2BNOT%2Brepo%253Acga2351%252Fcode%2BNOT%2Brepo%253Astreeg%252Ftcc%2BNOT%2Brepo%253Asoftware-mansion-labs%252Freact-native-swiftui%2Bcom.facebook.react.devsupport.PerftestDevSupportManager&sa=D&source=editors&ust=1740080026490626&usg=AOvVaw2lrtsZSaLDgxSkejXVrRrp)

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D69988162

fbshipit-source-id: 475b509417c4e6974d62bab01c089588625fcd8c
2025-02-21 14:57:12 -08:00
Nicola Corti 8cc772da9a Make PackagerStatusCheck Internal (#49575)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49575

I've verified that this class is not used in OSS so I'm making it internal.

[Source](https://www.google.com/url?q=https://github.com/search?type%3Dcode%26q%3DNOT%2Bis%253Afork%2BNOT%2Borg%253Afacebook%2BNOT%2Brepo%253Areact-native-tvos%252Freact-native-tvos%2BNOT%2Brepo%253Anuagoz%252Freact-native%2BNOT%2Brepo%253A2lambda123%252Freact-native%2BNOT%2Brepo%253Abeanchips%252Ffacebookreactnative%2BNOT%2Brepo%253AfabOnReact%252Freact-native-notes%2BNOT%2Buser%253Ahuntie%2BNOT%2Buser%253Acortinico%2BNOT%2Brepo%253AMaxdev18%252Fpowersync_app%2BNOT%2Brepo%253Acarter-0%252Finstagram-decompiled%2BNOT%2Brepo%253Am0mosenpai%252Finstadamn%2BNOT%2Brepo%253AA-Star100%252FA-Star100-AUG2-2024%2BNOT%2Brepo%253Alclnrd%252Fdetox-scrollview-reproductible%2BNOT%2Brepo%253ADionisisChytiris%252FWorldWiseTrivia_Main%2BNOT%2Brepo%253Apast3l%252Fhi2%2BNOT%2Brepo%253AoneDotpy%252FCaribouQuest%2BNOT%2Brepo%253Abejayoharen%252Fdailytodo%2BNOT%2Brepo%253Amolangning%252Freversing-discord%2BNOT%2Brepo%253AScottPrzy%252Freact-native%2BNOT%2Brepo%253Agabrieldonadel%252Freact-native-visionos%2BNOT%2Brepo%253AGabriel2308%252FTestes-Soft%2BNOT%2Brepo%253Adawnzs03%252FflakyBuild%2BNOT%2Brepo%253Acga2351%252Fcode%2BNOT%2Brepo%253Astreeg%252Ftcc%2BNOT%2Brepo%253Asoftware-mansion-labs%252Freact-native-swiftui%2Bcom.facebook.react.devsupport.PackagerStatusCheck&sa=D&source=editors&ust=1740079563838123&usg=AOvVaw09B3GTFOynL-bbMHF6M4m2)

Changelog:
[Internal] [Changed] -

Reviewed By: arushikesarwani94

Differential Revision: D69933995

fbshipit-source-id: 77e308bd01fb4d51d4cf54e4666f15b532b43453
2025-02-21 14:47:32 -08:00
Mateo Guzmán 4bb03f3549 Migrate com.facebook.react.bridge.queue.MessageQueueThreadHandler to Kotlin (#49583)
Summary:
Migrate com.facebook.react.bridge.queue.MessageQueueThreadHandler to Kotlin

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.queue.MessageQueueThreadHandler to Kotlin

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

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

Reviewed By: javache

Differential Revision: D69950075

Pulled By: arushikesarwani94

fbshipit-source-id: ddca07860a57816b2ff3b2b8902151686700f5c2
2025-02-21 14:31:13 -08:00
Jack Pope 07d9cf3ed0 Back out "cleanup feature flag enableFabricCompleteRootInCommitPhase" (#49565)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49565

Original commit changeset: 6ed54f0fab45

Original Phabricator Diff: D69473992

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D69924542

fbshipit-source-id: 6438d1f6e21728de662a060893b0f08f9285be73
2025-02-21 14:26:37 -08:00
Joe Vilches 441744a0eb Implement view finding by native id (#49581)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49581

I need to be able to find a View with a specific nativeId as part of my implementation of accessibility ordered children. This already exists in Android in `ReactFindViewUtil.kt`.

Not much to this implementation. Recursive tree searching. I do not think perf is a big deal here but if we want to optimize this we could implement some nativeId registry and try and get the UIView * from that at the expense of storing that map somewhere.

Changelog: [Internal]

Reviewed By: vincentriemer

Differential Revision: D69868430

fbshipit-source-id: b3648a8dca351bed50534cac2144d7e8ea0a207f
2025-02-21 14:10:01 -08:00
Mateo Guzmán 0aa8af906d Migrate com.facebook.react.modules.network.RequestBodyUtil to Kotlin (#49584)
Summary:
Migrate com.facebook.react.modules.network.RequestBodyUtil to Kotlin

## Changelog:

[INTERNAL] - Migrate com.facebook.react.modules.network.RequestBodyUtil to Kotlin

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

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

Reviewed By: arushikesarwani94

Differential Revision: D69980421

Pulled By: cortinico

fbshipit-source-id: aa66661b2b79afdfd41963e7896b9a01f12af5cb
2025-02-21 12:45:00 -08:00
Henry Garant f85cca0ee5 Back out D69855097 & D69874923 to unblock Twilight headset pairing/discovery (#49600)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49600

changelog: [internal]

# Context
Recent reports of unable to pair or connect to headsets in the Twilight app started ~1 day ago.

I used a bisect to narrow down the range of changes https://www.internalfb.com/mobile-bisect/Bi653128483872339, which lead to [changelog](https://www.internalfb.com/intern/changelog/?search=%7B%22key%22%3A%22AND%22%2C%22children%22%3A[%7B%22key%22%3A%22buck_target_is%22%2C%22field%22%3A%22buck_target%22%2C%22value%22%3A%22%2F%2Ffbobjc%2FApps%2FOculus%2FTwilight%3ATwilight%22%7D%2C%7B%22key%22%3A%22branch_first%22%2C%22field%22%3A%22branch%22%2C%22value%22%3A%22master%22%7D%2C%7B%22key%22%3A%22revision_first%22%2C%22field%22%3A%22revision%22%2C%22value%22%3A%22e835199c51fd1b55c3c13c5504f9b5527e201b41%22%7D%2C%7B%22key%22%3A%22branch_last%22%2C%22field%22%3A%22branch%22%2C%22value%22%3A%22master%22%7D%2C%7B%22key%22%3A%22revision_last%22%2C%22field%22%3A%22revision%22%2C%22value%22%3A%22d19e5a6cd5949d65aee30f7e8ce185979b7448af%22%7D]%7D)

From there I continued until I found the threshold
D69855097 (bad) and D69803512 (good).

I tried a direct revert of D69855097 but the changes we spread across another diff
D69874923.

Reverting the stack of these gets us to here.

Could use help understanding what's going on.

Reviewed By: sammy-SC

Differential Revision: D69987736

fbshipit-source-id: f9d16a460112374f163d235dc3e576d7ad506ebf
2025-02-21 10:56:37 -08:00
Dawid Małecki 0d454285c7 Add Switch to buildTypes and align Flow with TS types. (#49597)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49597

Changelog:
[Internal] - Added Switch to buildTypes and aligned Flow with TS types.

Reviewed By: huntie

Differential Revision: D69984618

fbshipit-source-id: 1fb978bb712be20f0e685af80bef0ac6d78b73ba
2025-02-21 09:09:01 -08:00
Nicola Corti 6dbc0558ff Cleanup enableEventEmitterRetentionDuringGesturesOnAndroid feature flag (#49590)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49590

This feature flag was used to validate a fix for handling of events during
gesture on pressable. It can now be removed as the flag has been set to true for several
internal app (Twilight among others) for several months.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D69983235

fbshipit-source-id: 89b96b3e4c98ae258982341f56ddc13aa2fe51bd
2025-02-21 09:01:19 -08:00
Phil Pluckthun 55acb42105 chore(community-cli-plugin): Remove extraneous @react-native/metro-babel-transformer (#49558)
Summary:
Opening this as a separate PR, since I'm not sure if I'm missing something, or if there's any intention behind this.

`react-native/metro-babel-transformer` is used by `react-native/metro-config` and is referenced in code there and as a dependency there. It's also sometimes mentioned as package for community CLI users to install directly. However, there's seemingly no reason `react-native/metro-babel-transformer` needs to depend on it, or any code that relies on it directly.

## Changelog:

[INTERNAL] [CHANGED] - Remove extraneous `react-native/metro-babel-transformer` dependency from community-cli-plugin

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

Test Plan: - n/a

Reviewed By: robhogan

Differential Revision: D69926109

Pulled By: huntie

fbshipit-source-id: b89b54890248de4954e5c0ce4afe3a5cb5bfa2c1
2025-02-21 08:43:56 -08:00
Janic Duplessis b0fd9c1556 Update androidx app compat to 1.7.0 (#49594)
Summary:
Update androidx app compat to the latest version.

This is needed as part of https://github.com/facebook/react-native/pull/49486 to have access to `fullyDrawnReporter`.

## Changelog:

[ANDROID] [CHANGED] - Update androidx app compat to 1.7.0

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

Test Plan: Tested in RN tester that it builds fine and works properly.

Reviewed By: Abbondanzo

Differential Revision: D69988202

Pulled By: cortinico

fbshipit-source-id: 0329aa84a76327db535ddba8acf059ebbf1dbdfc
2025-02-21 08:40:01 -08:00
Phil Pluckthun 28458a0c79 chore(dev-middleware): Move selfsigned to package.json:devDependencies (#49556)
Summary:
This package does not seem to be referenced by anything but the tests in `packages/dev-middleware`, so seems like a pretty straightforward change to drop it from `dependencies`.

It only seems to be referenced in `packages/dev-middleware/src/__tests__/ServerUtils.js`

## Changelog:

[INTERNAL] [CHANGED] - Remove selfsigned from dev-middleware dependencies

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

Test Plan: - n/a

Reviewed By: cipolleschi

Differential Revision: D69925928

Pulled By: huntie

fbshipit-source-id: bba41f81dba054505ebf196ad37c7a718a6b16da
2025-02-21 07:50:03 -08:00
Mateo Guzmán 4bc2c5298c Make HermesMemoryDumper internal (#49585)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. 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+com.facebook.hermes.instrumentation.HermesMemoryDumper).

## Changelog:

[INTERNAL] - Make com.facebook.hermes.instrumentation.HermesMemoryDumper internal

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

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

Reviewed By: javache

Differential Revision: D69980382

Pulled By: cortinico

fbshipit-source-id: 654d62e0961ab471d494fa9769fafa02d3808432
2025-02-21 07:28:21 -08:00
Samat Osmonov bd8c19739a Revert D69934544: Make PerftestDevSupportManager internal
Differential Revision:
D69934544

Original commit changeset: 00fc90907a27

Original Phabricator Diff: D69934544

fbshipit-source-id: 03aa1de1e594266b88b624dacec8891b1907a07f
2025-02-21 06:08:39 -08:00
Samat Osmonov e7d0271c67 Revert D69934543: Make RedBoxContentView internal
Differential Revision:
D69934543

Original commit changeset: 1fdf74a4aa34

Original Phabricator Diff: D69934543

fbshipit-source-id: 20a3f0011945fc5e1fb9efe25b81cd5e4fdd1b70
2025-02-21 06:07:03 -08:00
Phil Pluckthun fd3b911533 chore(community-cli-plugin): Drop shadowed readline module (#49557)
Summary:
While `readline` is referenced in `packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js`, this references the `node:readline` module by default. The extra package seems to have been installed and included accidentally, as the `attachKeyHandlers` file uses an export from `node:readline` that's never been present in `npm:readline`.

Since the name matches but Node.js will always prefer built-in/code modules, this dependency is dangling and can never be reached, since it's name is shadowed (as also stated in their readme). This can be reproduced by comparing `require('readline')` and `require('../../node_modules/readline')` in `packages/community-cli-plugin`. The flow types also confirm this.

This overall seems highly safe to drop.

## Changelog:

[INTERNAL] [CHANGED] - Remove shadowed and unused readline npm package from community-cli-plugin

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

Test Plan:
Prior to changes applied:

```sh
$ node -e 'console.log(require("readline") === require("node:readline"))'
true
```

Reviewed By: cipolleschi

Differential Revision: D69925999

Pulled By: huntie

fbshipit-source-id: 802fdaa396630b44d5aacefeb9c2473fb53d167e
2025-02-21 05:56:51 -08:00
Jakub Piasecki 289dba8cf2 Align InteractionManager and PanResponder types with OSS (#49517)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49517

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69742877

fbshipit-source-id: ccd99b29aed4ec4ef8c0b7b2a57763f716be411e
2025-02-21 05:18:56 -08:00
Nicola Corti 5a01b0061d Make PerftestDevSupportManager internal (#49577)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49577

I'm making this class internal as I verified that there are no meaningful OSS usages.

[Source](https://www.google.com/url?q=https://github.com/search?type%3Dcode%26q%3DNOT%2Bis%253Afork%2BNOT%2Borg%253Afacebook%2BNOT%2Brepo%253Areact-native-tvos%252Freact-native-tvos%2BNOT%2Brepo%253Anuagoz%252Freact-native%2BNOT%2Brepo%253A2lambda123%252Freact-native%2BNOT%2Brepo%253Abeanchips%252Ffacebookreactnative%2BNOT%2Brepo%253AfabOnReact%252Freact-native-notes%2BNOT%2Buser%253Ahuntie%2BNOT%2Buser%253Acortinico%2BNOT%2Brepo%253AMaxdev18%252Fpowersync_app%2BNOT%2Brepo%253Acarter-0%252Finstagram-decompiled%2BNOT%2Brepo%253Am0mosenpai%252Finstadamn%2BNOT%2Brepo%253AA-Star100%252FA-Star100-AUG2-2024%2BNOT%2Brepo%253Alclnrd%252Fdetox-scrollview-reproductible%2BNOT%2Brepo%253ADionisisChytiris%252FWorldWiseTrivia_Main%2BNOT%2Brepo%253Apast3l%252Fhi2%2BNOT%2Brepo%253AoneDotpy%252FCaribouQuest%2BNOT%2Brepo%253Abejayoharen%252Fdailytodo%2BNOT%2Brepo%253Amolangning%252Freversing-discord%2BNOT%2Brepo%253AScottPrzy%252Freact-native%2BNOT%2Brepo%253Agabrieldonadel%252Freact-native-visionos%2BNOT%2Brepo%253AGabriel2308%252FTestes-Soft%2BNOT%2Brepo%253Adawnzs03%252FflakyBuild%2BNOT%2Brepo%253Acga2351%252Fcode%2BNOT%2Brepo%253Astreeg%252Ftcc%2BNOT%2Brepo%253Asoftware-mansion-labs%252Freact-native-swiftui%2Bcom.facebook.react.devsupport.PerftestDevSupportManager&sa=D&source=editors&ust=1740080026490626&usg=AOvVaw2lrtsZSaLDgxSkejXVrRrp)

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D69934544

fbshipit-source-id: 00fc90907a27026269592e4cdfa8aed6e70a7c6e
2025-02-21 04:56:43 -08:00
Nicola Corti 303d379144 Make RedBoxContentView internal (#49578)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49578

I'm making this class internal as I've verified that there are no meaningful usages.

[Source](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+com.facebook.react.devsupport.RedBoxContentView)

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D69934543

fbshipit-source-id: 1fdf74a4aa34a641974aae71534555b86fe02d9c
2025-02-21 04:46:50 -08:00
Nicola Corti ffd426aff4 Unbreak CI due to AP Kotlin code which fails to compile (#49589)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49589

We should not be attempting to compile anything related to the annotation
processor in either Kotlin or Java.
This excludes those folders from the Kotlin compilation task as the
CI is currently red because of it.

Changelog:
[Internal] [Changed] -

Reviewed By: huntie

Differential Revision: D69981620

fbshipit-source-id: 7e2d534023ab1c00e5aadf8546440a4cc4c01ec0
2025-02-21 04:41:50 -08:00
Dawid Małecki f5837bf9f4 Add TouchableHighlight to buildTypes and move comments from TS definitions (#49560)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49560

Changelog:
[Internal] - Added TouchableHighlight to buildTypes and moved comments from TS definitions

Reviewed By: huntie

Differential Revision: D69919248

fbshipit-source-id: 66b615df60862a53132bd7b2ae9f54065c444e22
2025-02-21 04:00:06 -08:00
Dawid Małecki e96e0de756 Add TouchableNativeFeedback to buildTypes and align Flow types (#49561)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49561

Changelog:
[Internal] - Added TouchableNativeFeedback to buildTypes and aligned Flow types

Reviewed By: huntie

Differential Revision: D69858177

fbshipit-source-id: 4bd55cba9a9eb1a1d304911cf929b363205a20d5
2025-02-21 04:00:06 -08:00
Dawid Małecki b418aacd85 Add TouchableWithoutFeedback to buildTypes and align Flow with TS types (#49529)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49529

Changelog:
[Internal] - Added TouchableWithoutFeedback to buildTypes and aligned Flow with TS types

Reviewed By: huntie

Differential Revision: D69855221

fbshipit-source-id: a1de660e02a90f8e1c181b8e0c5dfdbaa4d2c75c
2025-02-21 04:00:06 -08:00
Rubén Norte f200b70354 Add Fantom test for synchronous state updates + UI consistency (#49572)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49572

Changelog: [internal]

This adds a test to verify the behavior of 2 feature flags: synchronous state updates and UI consistency.

Reviewed By: javache

Differential Revision: D69932313

fbshipit-source-id: 341cfff3fa533503a293f6ccd0282442ba63d430
2025-02-21 03:21:07 -08:00
Vitali Zaidman 4535e62414 add the event tracking when connection to debugger is closed (#49574)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49574

Changelog:
[General][Internal] add the event tracking when connection to debugger is closed

Reviewed By: huntie

Differential Revision: D69917816

fbshipit-source-id: 4a15288333c0d5b7fb821d046fa9c615bb25223e
2025-02-21 02:38:12 -08:00
Alan Lee bce6aa2828 Back out "Migrate ReactClippingViewGroup to Kotlin" (#49586)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49586

Reverting https://github.com/facebook/react-native/pull/49413 as it was causing a crash with assertion failure in ReactViewGroup.addViewWithSubviewClippingEnabled()

Changelog:
[INTERNAL] revert Kotlin conversion due to crash

Reviewed By: sbuggay

Differential Revision: D69953848

fbshipit-source-id: b438fb928a4849f3dbad6a9d59d0f48449035fd6
2025-02-20 17:51:32 -08:00
David Vacca e6d0ef2832 Introduce script to generate list of legacy architecture types (#49579)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49579

Introduce script to generate list of legacy architecture types

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D69937113

fbshipit-source-id: 54ba2a982128dab402acec1c40d833c71df2fabb
2025-02-20 17:06:11 -08:00
David Vacca e8afcbbc38 Migrate ReactLegacyArchitectureProcessor to kotlin (#49571)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49571

Migrate ReactLegacyArchitectureProcessor to kotlin

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D69929877

fbshipit-source-id: 448c8de54cbb1f72eeee747edaf4cbb2a5fd365d
2025-02-20 17:06:11 -08:00
David Vacca 14bb32f4fc Create initial version of ReactLegacyArchitectureProcessor (#49570)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49570

This diff creates a initial version of the annotation processor to output the list of types that are annotated with LegacyArchitecture

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D69929875

fbshipit-source-id: 90a8d299f4667ab8d103c061d287991dbdb291df
2025-02-20 17:06:11 -08:00
David Vacca c612662999 Mark subset of bridge classes as LegacyArchitecture (#49569)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49569

In this diff I'm annotating a subset of bridge classes with LegacyArchitecture

The goal is to test the annotation processor in next diffs

changelog: [internal] internal

Reviewed By: cortinico, Abbondanzo

Differential Revision: D69929878

fbshipit-source-id: 8be4d010f6519617d334da361983dce0fa66e3b4
2025-02-20 17:06:11 -08:00
David Vacca 339297f095 Introduce ReactLegacyArchitectureProcessor annotation processor (#49568)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49568

The goal of this annotation processor is to generate a file with all the types that belong to Legacy Architecture of React Native

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D69929876

fbshipit-source-id: c21bf1a868258b20be91721006d7fc8fa85adcd1
2025-02-20 17:06:11 -08:00
Douglas Lowder 2c4a9d2a1b chore: make iOS glog script compatible with tvOS (#49539)
Summary:
This upstreams a change from [RNTV](https://github.com/react-native-tvos/react-native-tvos/) to allow the glog prepare script to work on both iOS and tvOS.

## Changelog:

[Internal][Changed] make iOS glog script compatible with tvOS

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

Test Plan:
- This change works well on the TV repo
- CI should pass, and iOS compilation and operation should be unchanged

Reviewed By: cortinico

Differential Revision: D69928586

Pulled By: cipolleschi

fbshipit-source-id: b5fec438151e659e98834a83effbc7e166df6aa5
2025-02-20 11:00:36 -08:00
Vitali Zaidman a91cafd8cd add debuggerSessionIDs fields to debugger events (#49552)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49552

Changelog:
[General][Internal] - expand debugger events to have DebuggerSessionIDs

Also moved the handling of these to a shared function

Reviewed By: huntie

Differential Revision: D69917817

fbshipit-source-id: 2374ac5b5dc0040b0e15028ab89fbe78026bc296
2025-02-20 10:07:19 -08:00
Jakub Piasecki c079d5218f Partially align Utilities with OSS types (#49471)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49471

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69747254

fbshipit-source-id: 70bfe94d0950d31e7f4f3c3bc4df47121e8be9c1
2025-02-20 09:12:43 -08:00
Samuel Susla a5e853b812 initialise member variable in RCTWindowSafeAreaProxy startObservingSafeArea to prevent potential race (#49515)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49515

changelog: [internal]

_currentSafeAreaInsets should be initialised as part of `startObservingSafeArea` to make sure it is set before accessed.

Even though, right now _currentSafeAreaInsets is always set before it is read because notification RCTUserInterfaceStyleDidChangeNotification fires eagerly, it might change in the future and introduce a bug.

Reviewed By: lenaic

Differential Revision: D69846681

fbshipit-source-id: f8be8a53e82020112abd170b9f20429bf7ba7011
2025-02-20 08:28:39 -08:00
Jon Thysell 94ea10c693 Fix implicit cast from double to PointerIndentifier in NativeDOM.cpp (#48578)
Summary:
When building `react-native-windows` our code analysis tools complained about an implicit `double` to `PointerIdentifier` in NativeDOM.cpp.

This PR adds an explicit cast.

Temporary downstream patch: https://github.com/microsoft/react-native-windows/commit/5957d0af6944d64513cead28186dfbcc74bbfea0

## Changelog:

[GENERAL] [FIXED] - Add explicit casts for pointerIds for PointerEvents in NativeDOM

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

Test Plan: React Native Windows builds with this change and no more warnings.

Reviewed By: rubennorte

Differential Revision: D69920656

Pulled By: cipolleschi

fbshipit-source-id: 1d81f1fbfd91fadfb676d3e65c3c9cb729c1d3dd
2025-02-20 08:25:30 -08:00
Samuel Susla 3d1c1b50fe remove incorrect call of removeObserver from RCTDeviceInfo (#49551)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49551

changelog: [internal]

in recent commit, https://github.com/facebook/react-native/commit/470bc4088957920aa55c8e5ccf3c9f4259c0694c, use of KVO was removed.
But `removeObserver` when `addObserver` was not called leads to a crash and must be removed as well.

Reviewed By: cipolleschi

Differential Revision: D69918158

fbshipit-source-id: ad65273e74545eba77ab35c5e22c28bddf072f9f
2025-02-20 08:25:29 -08:00
Mateo Guzmán 38190f530f Migrate StateWrapper to Kotlin (#49544)
Summary:
Migrate com.facebook.react.uimanager.StateWrapper to Kotlin

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.StateWrapper to Kotlin

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

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

Reviewed By: cortinico, NickGerleman

Differential Revision: D69890013

Pulled By: Abbondanzo

fbshipit-source-id: 859ae727167638a0ef7fa6158d27f5429921a9f9
2025-02-20 07:03:29 -08:00
Riccardo Cipolleschi 0b67218a8a Add dummy cpp for renderercss (#49553)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49553

The new React-renderercss pod is an header only pod. These are not allowed by Cocoapods, because it will not materialize the framework when building with then turned on.

the solution is to just add an empty source file to frorce cocoapods to materialize the .framework file and solve the dependency graph properly.

## Changelog:
[Internal] - Add dummy file to React-renderercss

Reviewed By: huntie

Differential Revision: D69920318

fbshipit-source-id: e5cc092a480f7c86eeb295ed966f85b6f55fdc54
2025-02-20 06:31:34 -08:00
Riccardo Cipolleschi 3eec4a3ea9 Back out "Throw exception with name of TurboModule instead of deadlock during sync rendering" (#49554)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49554

For some reason, this diff completely breaks the linker on iOS.

I tried to look for a fix forward, but unsuccessfully.

I'm reverting this diff to get CI green again, but this requires more investigation.

## Changelog:
[Internal] - Revert D69805065

Reviewed By: sammy-SC, huntie

Differential Revision: D69920338

fbshipit-source-id: 8e1d34b5314d8ead51c127208ae2d2250f7d3724
2025-02-20 06:31:34 -08:00
Fabrizio Cucci feb27cbf0f js1 publish react-native 0.79.0-main (#49550)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49550

Align remaining packages.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D69916099

fbshipit-source-id: d6f5c19c8b33e91ff0e2adac20cfe625a15e96b5
2025-02-20 06:04:34 -08:00
Riccardo Cipolleschi 3ab568d472 Add utility function to validate args (#49522)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49522

While testing the script, sometime I obtained undesired results because I was passing the wrong values for the arguments.

This change add a simple validation function to inform the user when the arguments that are passed are not valid.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D69851416

fbshipit-source-id: c378a3ca5db942cca5178274204a0d01d1eefdf7
2025-02-20 03:28:49 -08:00
Riccardo Cipolleschi 07f05cedd5 fix typo in configuration check (#49523)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49523

There was a typo when checking the configuration. The default parameter is `all`, not `All`.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D69851429

fbshipit-source-id: 7f16f5f89c90824ceb57f9980bc38a31be33ccfe
2025-02-20 03:28:49 -08:00
Riccardo Cipolleschi b8af3ad599 Cleanup old xcframework (#49524)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49524

If there is already an XCFramework in the current location. xcodebuild fails to create and override the xcframework.

This change allows us to override an old xcframework and to iterate more quickly.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D69851428

fbshipit-source-id: 723b3035cec008e2bd177da4f960f2bb085ff493
2025-02-20 03:28:49 -08:00
Nicola Corti e49f2d5c50 Enable Gradle Configuration Caching on CI (#49514)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49514

This attemps to enable Config Caching on CI. I'm curious to see how much time this is going to save.
There might be some problems with nigthlies so I want to make sure this is running for some days before the branch cut.

Changelog:
[Internal] [Changed] -

Reviewed By: NickGerleman

Differential Revision: D69846848

fbshipit-source-id: 0d5c292e65a6107df62f6494a1aae9abd0e8b6cc
2025-02-20 02:42:24 -08:00
Samuel Susla 9ece93ea67 add unit test for view culling when parent has transform (#49535)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49535

changelog: [internal]

Add a unit test to cover scenario where ScrollView's parent has a transform

Reviewed By: NickGerleman

Differential Revision: D69860855

fbshipit-source-id: 1b64665c5b15ad2e5e068d4c6d56f9694ac7cf03
2025-02-20 02:32:50 -08:00
Nick Gerleman c99b71780b Add validation to Fabric parsing for transform and transformOrigin objects (#49546)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49546

Right now we rely on the ViewConfig processor to fire an invariant if the values are incorrect. We really don't want to redbox in the future on invalid properties, and this won't be around for the native CSS parsing path.

This code has some problems, like... radian parsing allowing potential out-of-bounds reads, firing a native assert for valid 9 digit matrices, or the layers in conjunction treating `0.5r.degoggos00` as a valid way to say 0.5 radians. Wheeee!

This change mostly just ports over the checks from `processTransform` to validate parameters before we use them, treating the whole transform list as invalid if any part of it is broken. I moved radian and percentage parsing the the CSS data type parsers as well.

I avoided changing props structures again here.

Changelog:

[General][Changed] - Add validation to Fabric parsing for transform options

Reviewed By: javache

Differential Revision: D69823064

fbshipit-source-id: 87c6da448a4b55e0507382b98aabd62ce3e4587f
2025-02-19 19:00:55 -08:00
Nick Gerleman 4631f6b061 Increase number tokenization precision (#49545)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49545

During tokenization we use 32 bit integers to store the digits before and after a decimal place.

Code interpolating strings may produce float strings with the part after digits being greater than max int, in which case we encounter integer overflow caught by UBSAN.

I was curious how libc functions for decoding floats handled this, and musl libc goes really out there, storing each intermediate digit in an array of 128 or more digits, and later using `long double`, in a shockingly complicated function. https://github.com/kraj/musl/blob/1880359b54ff7dd9f5016002bfdae4b136007dde/src/internal/floatscan.c#L63

We... probably don't need to go that far, but storing these intermediate digits as doubles should be precise enough and allow large enough values in the vast majority of cases.

Changelog: [Internal]

Reviewed By: sammy-SC, jorge-cab

Differential Revision: D69881560

fbshipit-source-id: b2158ce2c5d85157426cea9850c7f62c2eee5611
2025-02-19 19:00:55 -08:00