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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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