Commit Graph

3802 Commits

Author SHA1 Message Date
Mateo Guzmán 4340dcbae8 Migrate YogaValue to Kotlin
Summary:
Migrate com.facebook.yoga.YogaValue to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1838

Reviewed By: rshest

Differential Revision: D79897668

Pulled By: cortinico

fbshipit-source-id: dffe2b29087c35e4797f46dea756c51f841590d8
2025-08-13 16:45:06 -07:00
Luna Wei 3d12d81126 VirtualViewExperimental - opt out of update if no rect changes (#53255)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53255

Avoid updates to VirtualViewContainer if the rect dimensions haven't changed.

This is an attempt to simulate what ReactVirtualView does with `checkRectChange`.

Changelog:
[Internal]

Reviewed By: yungsters

Differential Revision: D80182750

fbshipit-source-id: f0f45ac508c1f93e6dbb64ea11c0b44b80d6c3b3
2025-08-13 15:45:52 -07:00
Mateo Guzmán bc54a06fcb Migrate YogaNative to Kotlin
Summary:
Migrate com.facebook.yoga.YogaNative to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1839

Reviewed By: rshest

Differential Revision: D79897725

Pulled By: cortinico

fbshipit-source-id: 6fc98565368d831b8698464fe26ad47f8fff6a74
2025-08-13 08:56:03 -07:00
Mateo Guzmán 33ca53d9db Migrate YogaConfigFactory to Kotlin
Summary:
Migrate com.facebook.yoga.YogaConfigFactory to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1833

Reviewed By: rshest

Differential Revision: D79897762

Pulled By: cortinico

fbshipit-source-id: 9457b307204f2066a02690f96a88fce6755f915e
2025-08-13 06:46:48 -07:00
Mateo Guzmán 35d8086881 Migrate DoNotStrip to Kotlin
Summary:
Migrate com.facebook.yoga.annotations.DoNotStrip to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1840

Reviewed By: rshest

Differential Revision: D79897758

Pulled By: cortinico

fbshipit-source-id: 79585e6ab793bd72e04440581d866f7721667db3
2025-08-12 10:54:27 -07:00
Mateo Guzmán 7e461003c6 Migrate YogaLayoutType to Kotlin
Summary:
Migrate com.facebook.yoga.YogaLayoutType to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1837

Reviewed By: rshest

Differential Revision: D79897708

Pulled By: cortinico

fbshipit-source-id: e3c8a3cc60f806d151d2be956b26dd98963254a6
2025-08-12 09:49:31 -07:00
Mateo Guzmán db2a9c089c Migrate LayoutPassReason to Kotlin
Summary:
Migrate com.facebook.yoga.LayoutPassReason to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1836

Reviewed By: rshest

Differential Revision: D79897685

Pulled By: cortinico

fbshipit-source-id: 87d2e4b95fbdbfe48d84019e9ffb50deb9286d8c
2025-08-12 09:10:30 -07:00
Mateo Guzmán 40afa75a7c Migrate YogaNodeFactory to Kotlin
Summary:
Migrate com.facebook.yoga.YogaNodeFactory to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1832

Reviewed By: zielinskimz

Differential Revision: D79897733

Pulled By: cortinico

fbshipit-source-id: 3ea4f5635eb8c910719c13d3087356b96b6f0746
2025-08-12 08:57:43 -07:00
Mateo Guzmán 453508ada8 Migrate YogaMeasureOutput to Kotlin
Summary:
Migrate com.facebook.yoga.YogaMeasureOutput to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1842

Reviewed By: rshest

Differential Revision: D79897681

Pulled By: cortinico

fbshipit-source-id: 63280b6aed9bbeeb1e71458a1793c9647dcf0726
2025-08-12 07:55:41 -07:00
Mateo Guzmán 05eddd354e Migrate YogaMeasureFunction to Kotlin
Summary:
Migrate com.facebook.yoga.YogaMeasureFunction to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1835

Reviewed By: mdvacca

Differential Revision: D79897728

Pulled By: cortinico

fbshipit-source-id: 959ae976622838147685cf6088674dce25f5cc99
2025-08-12 07:40:31 -07:00
Mateo Guzmán 001736000f Migrate YogaStyleInputs to Kotlin
Summary:
Migrate com.facebook.yoga.YogaStyleInputs to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1830

Reviewed By: rshest

Differential Revision: D79897662

Pulled By: cortinico

fbshipit-source-id: a4063a8c0f608050162cd3707834040e35f9ebf7
2025-08-12 03:34:21 -07:00
Nick Lefever cc71f9c550 Create tryDispatchMountItems runnable only when needed (#53196)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53196

In the FabricUIManager, the runnable created for scheduled mounts is only used if currently running on the UI thread.

With this diff the runnable only gets created when needed.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D79969412

fbshipit-source-id: ee78890322af8580357389aad8357f7c0d18490f
2025-08-11 14:45:36 -07:00
Mateo Guzmán a2eb3b299d Migrate YogaBaselineFunction to Kotlin
Summary:
Migrate com.facebook.yoga.YogaBaselineFunction to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1831

Reviewed By: joevilches, mdvacca

Differential Revision: D79897676

Pulled By: cortinico

fbshipit-source-id: 2f175bf60a871c4635d1575faec1096f9c970f48
2025-08-11 10:51:55 -07:00
Mateo Guzmán 9c9a39b58e Migrate YogaLogger to Kotlin
Summary:
Migrate com.facebook.yoga.YogaLogger to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1834

Reviewed By: rshest

Differential Revision: D79897742

Pulled By: cortinico

fbshipit-source-id: 79b926a7abadce9038fc55ad0f608e92bc77a55a
2025-08-11 08:47:34 -07:00
Peter Abbondanzo 07835d3d67 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java (#53116)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53116

Converts ReactAccessibilityDelegate to Kotlin

Changelog: [Internal]

Reviewed By: andrewdacenko

Differential Revision: D79749812

fbshipit-source-id: bdfbd61f61339d8332a4fa3f5cc4ccd4b4355323
2025-08-11 07:54:09 -07:00
David Vacca d3bbbd893a Deprecate com/facebook/react Legacy Architecture classes (#53104)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53104

Deprecate com/facebook/react Legacy Architecture classes

changelog: [Android][Changed] Depreacate CoreModulesPackage and NativeModuleRegistryBuilder legacy architecture classes, these classes unused in the new architecture and will be deleted in the future

Reviewed By: shwanton

Differential Revision: D79676942

fbshipit-source-id: a2c447bee251fdac79d3dc81a17851eaf5271413
2025-08-09 04:39:35 -07:00
David Vacca da74d5da2c Deprecate Legacy Architecture ViewManagers (#53107)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53107

Deprecate Legacy Architecture ViewManagers, these classes are not used as part of the new architecture and will be deleted in the future

changelog: [Android][Changed] Deprecate Legacy Architecture ViewManagers, these classes are not used as part of the new architecture and will be deleted in the future

Reviewed By: shwanton

Differential Revision: D79676585

fbshipit-source-id: 72cb6fe0bbe666cfa317cf28d6aec475f1c38c35
2025-08-09 04:39:35 -07:00
David Vacca 07091a9ae8 Deprecate custom ShadowNode classes included in React Native (#53192)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53192

In this diff I'm deprecating ShadowNode classes included in React Native library

These classes are part of the legacy architecture and will be deleted in the future

changelog: [Android][Changed] Deprecate LegacyArchitecture ShadowNode classes included in React Native

Reviewed By: mlord93

Differential Revision: D79676584

fbshipit-source-id: a39267e6e430fcf4f6a73c96cd28d02eafc88a32
2025-08-09 04:39:35 -07:00
David Vacca c1f7c5e321 Depreacte remaining LegacyArchitecture classes from the bridge package (#53191)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53191

Depreacte remaining LegacyArchitecture classes from the bridge package

changelog: [Android][Changed] Depreacte all LegacyArchitecture classes from the bridge package

Reviewed By: mlord93

Differential Revision: D79674635

fbshipit-source-id: 6a873d05157e17ef0434821e1c8a77959d7f079a
2025-08-09 04:39:35 -07:00
David Vacca b29b86f275 Deprecate LegacyArchitecture class UIManagerProvider (#53190)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53190

Deprecate LegacyArchitecture class UIManagerProvider

changelog: [Android][Changed] Deprecate LegacyArchitecture class UIManagerProvider

Reviewed By: mlord93

Differential Revision: D79674639

fbshipit-source-id: 6802a35c4bd643f138a54b4f22f3804743f89249
2025-08-09 04:39:35 -07:00
David Vacca 25c011eb4d Deprecate BridgeDevSupportManager and JSInstance (#53108)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53108

Deprecate BridgeDevSupportManager and JSInstance

changelog: [Android][Changed] Deprecate BridgeDevSupportManager and JSInstance

Reviewed By: mlord93

Differential Revision: D79674636

fbshipit-source-id: c34c4ed386ab6c130fc12e03659fe2d15b42658d
2025-08-09 04:39:35 -07:00
David Vacca 3306cdbbe9 Update deprecation message for BridgeReactContext class (#53110)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53110

Update deprecation message for BridgeReactContext class

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D79674637

fbshipit-source-id: 0942b0c8479cd1eba8e29bd9dcfc4547790910f1
2025-08-09 04:39:35 -07:00
David Vacca 22e4c25211 Deprecate NativeModuleRegistry Legacy Architecture class (#53123)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53123

Deprecate NativeModuleRegistry Legacy Architecture class

changelog: [Android][Changed] Deprecate NativeModuleRegistry Legacy Architecture class

Reviewed By: mlord93

Differential Revision: D79674638

fbshipit-source-id: 7791ceb53545aa456e92f051ed4c1f070305b5fc
2025-08-09 04:39:35 -07:00
David Vacca 78a3ff81eb Deprecate subset of LegacyArchitecture classes in com/facebook/react/bridge (#53106)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53106

Deprecate subset of LegacyArchitecture classes in com/facebook/react/bridge

changelog: [Android][Changed] Deprecate subset of LegacyArchitecture classes in com/facebook/react/bridge

Reviewed By: mlord93

Differential Revision: D79674640

fbshipit-source-id: 58b8fde8bed739fd04272215e399cfbed7a0188a
2025-08-09 04:39:35 -07:00
David Vacca 25f466cc4d Deprecate FrescoBasedReactTextInlineImageShadowNode (#53121)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53121

Deprecate FrescoBasedReactTextInlineImageShadowNode

changelog: [Android][Changed] Deprecate LegacyArchitecture class FrescoBasedReactTextInlineImageShadowNode

Reviewed By: mlord93

Differential Revision: D79672291

fbshipit-source-id: 482939981b735e7f96d7cde874430e2895c0d10c
2025-08-09 04:39:35 -07:00
David Vacca 718126fcf0 Deprecate Legacy Architecture class CallbackImpl (#53105)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53105

Deprecate Legacy Architecture class CallbackImpl

changelog: [Android][Changed] Deprecate Legacy Architecture class CallbackImpl

Reviewed By: mlord93

Differential Revision: D79672292

fbshipit-source-id: d35ae53093f464f2bb088a8247dbbde8591572c6
2025-08-09 04:39:35 -07:00
David Vacca 19a99dd088 Deprecate JavaMethodWrapper (#53124)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53124

Deprecate LegacyArchitecture class JavaMethodWrapperchagelog:

changelog: [Android][Changed] Deprecate LegacyArchitecture class JavaMethodWrapper

Reviewed By: mlord93

Differential Revision: D79672296

fbshipit-source-id: 05432263c4452294c667226cb8e062c50f036931
2025-08-09 04:39:35 -07:00
David Vacca c4715886a9 Deprecate Legacy Architecture ShadowNode classes
Summary:
Deprecate Legacy Architecture ShadowNode classes

Changelog: [Android][Changed] Deprecate Legacy Architecture ShadowNode classes

Reviewed By: mlord93

Differential Revision: D79672295

fbshipit-source-id: e510debd3718e6bc9e42c9b61d6a63858970077d
2025-08-09 04:39:35 -07:00
David Vacca d2912e7997 EZ fix naming in kotlin file (#53109)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53109

EZ fix naming in kotlin file

changelog: [internal] internal

Reviewed By: cortinico, shwanton, mlord93

Differential Revision: D79735705

fbshipit-source-id: b1061a9aa0f245de29efb1b0f3d6c9ada9c43660
2025-08-08 16:43:31 -07:00
Mateo Guzmán 8ccfff9a46 Migrate ReactBaseTextShadowNode to Kotlin (#52449)
Summary:
Migrate com.facebook.react.views.text.ReactBaseTextShadowNode to Kotlin.

## Changelog:

[Android][Changed] - Migrated ReactBaseTextShadowNode to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation.

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

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

Reviewed By: mdvacca

Differential Revision: D79341403

Pulled By: cortinico

fbshipit-source-id: ff5dd7a8c3e0220812dd3a214d8d680ccd83f4d8
2025-08-08 10:36:32 -07:00
Nicola Corti e16def43c9 Reland: Add tests for DisplayMetricsHolder (#53165)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53165

This is a re-land of D78981753
Those tests were OOM-ing because we were using a old version of robolectric.
I've bumped it and this should fix it.

Changelog:
[Internal] [Changed] -

Reviewed By: lenaic

Differential Revision: D79883742

fbshipit-source-id: 4c2c640d6b601ec07d0a4a12cd7b86a879740a41
2025-08-08 07:09:32 -07:00
David Vacca 85610c8b43 Deprecate Legacy Architecture UIManagerModules class (#53122)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53122

Deprecate LegacyArchitecture UIManagerModules class

changelog: [Android][Changed] Deprecate LegacyArchitecture UIManagerModules class

Reviewed By: mlord93

Differential Revision: D79672294

fbshipit-source-id: 8a22df4a4341a2ab501fc003ee213fb0047847fc
2025-08-08 02:52:36 -07:00
David Vacca 7f5b2b8f84 Deprecate Legacy Architecture classes belonging to com/facebook/react/uimanager (#53102)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53102

Deprecate large subset of Legacy Architecture classes belonging to com/facebook/react/uimanager

changelog: [Android][Changed] Deprecate LegacyArchitecture classes from com/facebook/react/uimanager

Reviewed By: mlord93

Differential Revision: D79672293

fbshipit-source-id: 2d32eb885af3ec2928510608330740229abf93db
2025-08-08 02:52:36 -07:00
David Vacca 39d24bade3 Deprecate LegacyArchitecture classes from package com.facebook.react.uimanager (#53120)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53120

Deprecate com.facebook.react.uimanager classes

changelog: [Android][Changed] Deprecate LegacyArchitecture classes from package com.facebook.react.uimanager

Reviewed By: mlord93

Differential Revision: D79660036

fbshipit-source-id: 981f7938e54e40f810caec72fa485cc4a00029f6
2025-08-08 02:52:36 -07:00
David Vacca 9831b03860 Rename BridgeSoLoader -> ReactNativeJNISoLoader (#53153)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53153

In this diff I'm renaming BridgeSoLoader -> ReactNativeJNISoLoader and removing LegacyArchitecture becuase this class loads jni classes that are required in new architecture

changelog: [internal] internal

Reviewed By: RSNara

Differential Revision: D79827295

fbshipit-source-id: 2d02fa1de49b2e4ee838f14e976ae3ab2ca98aef
2025-08-08 01:20:42 -07:00
Alan Lee f21a89078c Revert D79571226: replace getWindowDisplayMetrics with getScreenDisplayMetrics
Differential Revision:
D79571226

Original commit changeset: d90fca36c119

Original Phabricator Diff: D79571226

fbshipit-source-id: 670ae66f9db758d29673134adbac44780569771b
2025-08-08 00:48:14 -07:00
Alan Lee 352e440459 Back out "Fix Dimensions window values on Android < 15" (#53149)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53149

Reverting PR https://github.com/facebook/react-native/pull/52738

Changelog: [Internal]
reverting D78738516

Original commit changeset: fdb22f3cc76b

Original Phabricator Diff: D78738516

Reviewed By: mdvacca, lenaic, Abbondanzo

Differential Revision: D79835424

fbshipit-source-id: 44b5ee34b4df6752e5a6f959a54e104eef20ffca
2025-08-08 00:40:42 -07:00
David Vacca aaf471278c Back out "Add tests for DisplayMetricsHolder" (#53148)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53148

Reverting D78981753 because it's causing tests to OOM
https://github.com/facebook/react-native/commit/384677f58ea0af498f548a043be86e6876af58b1

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D79828375

fbshipit-source-id: 3de01dca3d9a9fc4530c84855049eb4ec132a485
2025-08-07 14:33:33 -07:00
Nicola Corti 384677f58e Add tests for DisplayMetricsHolder (#52946)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52946

This just add a set of unit tests for `DisplayMetricsHolder` as I'm working on this class recently.

Changelog:
[Internal] [Changed] -

Reviewed By: rshest, mdvacca

Differential Revision: D78981753

fbshipit-source-id: 5800d44d3131a58770a0049eb2d08306874b7183
2025-08-07 11:01:37 -07:00
Nicola Corti 2e76fc8e8e Correctly create the first modal state (#52835)
Summary:
There is currently a bug with Modals with New Architecture where the first frame is rendered incorrectly, specifically not accounting for all the vertical insets (only the status bar). This fixes it.

Specifically:
1. I've removed the caching of the statusbar height from `ReactModalHostView` as that was not working correctly. Sometimes the value returned `0` meaning that it was not yet computed when Fabric was asking for it. In the updated implementation we now query `FabricUIManager` given the `surfaceId` of the modal.
2. I've modified the logic to account for all the vertical insets, not just the status bar.

## Changelog:

[ANDROID] [FIXED] - Correctly account for insets on first render of Modals on New Arch

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

Test Plan:
Tested on Marketplace Location Picker and the picker is still working correctly:

 https://pxl.cl/7NjtJ

Reviewed By: mdvacca

Differential Revision: D78975126

Pulled By: cortinico

fbshipit-source-id: d7afb4fa5d2f43a7e33da3860432fa6dfe0dc8d7
2025-08-07 11:01:37 -07:00
Nicola Corti e92da16a9b Migrate ClipboardModuleTest to use BridgelessReactContext (#53131)
Summary:
This test was still using the old `BridgeReactContext`, I'm migrating it to `BridgelessReactContext`.

## Changelog:

[INTERNAL] -

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

Test Plan: CI

Reviewed By: mdvacca

Differential Revision: D79801564

Pulled By: cortinico

fbshipit-source-id: 9bb96185505703a773597aeadfeeaeeb194532de
2025-08-07 10:42:26 -07:00
Nicola Corti ede037ade7 Cleanup heightOfTallestInlineImage field (#52978)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52978

This field is never written anywhere (neither in the internal codebase, nor in OSS).
I'm cleaning this us and simplifying the logic:
- Deprecating `effectiveLineHeight`
- Replacing all the usage of `effectiveLineHeight` with just `lineHeight`

Changelog:
[Android] [Changed] - Deprecate the field `TextAttributeProps.effectiveLineHeight`. This field was public but never used in OSS.

Reviewed By: mdvacca

Differential Revision: D79442393

fbshipit-source-id: c424a6def0257264cd160a2d7be48c2d0f47135e
2025-08-07 09:49:46 -07:00
Mateo Guzmán fa921b3c7b Migrate TextAttributeProps to Kotlin (#52452)
Summary:
Migrate com.facebook.react.views.text.TextAttributeProps to Kotlin.

## Changelog:

[Android][Changed] - Migrated TextAttributeProps to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation.

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

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

Reviewed By: rshest

Differential Revision: D79341238

Pulled By: cortinico

fbshipit-source-id: 455c7b48f47a0cf240aaf330e1fa3674798e7237
2025-08-07 09:49:46 -07:00
Nicola Corti 026e22bb8d Deprecate the DefaultDevSupportManagerFactory.create() method used for Old Arch (#53137)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53137

One of those 2 methods can be deprecated as it was used only for old architecture.
We'll be removing it at some point in the future.

Changelog:
[Android] [Deprecated] - DefaultDevSupportManagerFactory.create() method used for Old Arch

Reviewed By: rshest

Differential Revision: D79806116

fbshipit-source-id: ad2d5515f93bb85e3b7c495b369078f4c66d143b
2025-08-07 08:56:26 -07:00
Mateo Guzmán f1894393ca Initial Kotlin setup and migrate YogaConstants (#53133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53133

# Changelog:
[Internal] -

As part of the ongoing effort to migrate the React Native codebase to Kotlin, this PR introduces the initial setup required for Kotlin support in Yoga.

- Added initial basic Kotlin configuration to the project.
- Migrated `YogaConstants` as an initial file to try out the first migration steps.

X-link: https://github.com/facebook/yoga/pull/1829

Test Plan:
- Tested the migrated class directly against facebook/react-native, see the PR [here](https://github.com/facebook/react-native/pull/52998).
- Run: `./gradlew :yoga:assembleDebug` & `./gradlew :yoga:compileDebugSources`

I am not able to run the Java tests in this repo (even before the initial Kotlin setup) – not sure if I am missing something there but any pointers are welcome – it seems like there is some missing configuration. Currently trying with `./gradlew :yoga:test`

Reviewed By: cortinico

Differential Revision: D79545992

Pulled By: rshest

fbshipit-source-id: 8257ff53e6b6f2436980be98b6c94e1ac526b207
2025-08-07 08:17:56 -07:00
David Vacca f67078df07 Deprecate all LegacyArchitecture classes on LayoutAnimation package (#53101)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53101

Deprecate all LegacyArchitecture classes on LayoutAnimation package

changelog: [Android][Changed] Deprecate LegacyArchitecture classes from LayoutAnimation package

Reviewed By: alanleedev

Differential Revision: D79658935

fbshipit-source-id: 34ab2f674868dbee459f2018e82a7d50d0d7333a
2025-08-07 05:11:31 -07:00
Mathieu Acthernoene 3b185e4bce Fix Dimensions window values on Android < 15 (#52738)
Summary:
This PR (initially created for edge-to-edge opt-in support, rebased multiple times) fixes the `Dimensions` API `window` values on Android < 15, when edge-to-edge is enabled.

Currently the window height doesn't include the status and navigation bar heights (but it does on Android >= 15):

<img width="300" alt="Screenshot 2025-06-27 at 16 23 02" src="https://github.com/user-attachments/assets/c7d11334-9298-4f7f-a75c-590df8cc2d8a" />

Using `WindowMetricsCalculator` from AndroidX:

<img width="300" alt="Screenshot 2025-06-27 at 16 34 01" src="https://github.com/user-attachments/assets/7a4e3dc7-a83b-421b-8f6d-fd1344f5fe81" />

Fixes https://github.com/facebook/react-native/issues/47080

## Changelog:

[Android] [Fixed] Fix `Dimensions` `window` values on Android < 15 when edge-to-edge is enabled

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

Test Plan:
Run the example app on an Android < 15 device.

Rollback Plan:

Reviewed By: cipolleschi, Abbondanzo

Differential Revision: D78738516

Pulled By: alanleedev

fbshipit-source-id: fdb22f3cc76b0bda987db426cb015124bcacdc84
2025-08-07 02:17:14 -07:00
Alan Lee 8b2e309479 replace getWindowDisplayMetrics with getScreenDisplayMetrics (#53041)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53041

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

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

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

Reviewed By: mlord93

Differential Revision: D79571226

fbshipit-source-id: d90fca36c119318e7a2dfa6953fc2148b35e83d4
2025-08-07 02:17:14 -07:00
David Vacca d4bf644e47 Update deprecation message for ReactNativeHost class (#53118)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53118

Update deprecation message for ReactNativeHost class

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D79677829

fbshipit-source-id: 5013e0988a1ffbfea49a261fd23ac71af76c3313
2025-08-06 23:58:34 -07:00
Tim Yung c861804325 VirtualView: Simplify Window Focus Detection
Summary:
Refactors the window focus detection feature flag logic in `VirtualView` (Android) to eliminate one instance property and instead utilize the existence of the focus listener to determine whether window focus detection is enabled.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D79743782

fbshipit-source-id: d12e70d8e52b72d546ff097c3b1bcfbd29fb9129
2025-08-06 20:49:05 -07:00