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/53163
# Changelog:
[Internal] -
Adds a Fantom test that tests the `Text.ellipsizeMode` prop.
It also adds a test for the `<Text/>` component without any props
Reviewed By: andrewdacenko
Differential Revision: D79882336
fbshipit-source-id: f938c85092325374f562d610432781e2d412b88e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53140
As per title, this change adds the boilerplate code for a Fantom test on Modal
## Changelog:
[Internal] -
Reviewed By: andrewdacenko
Differential Revision: D79805808
fbshipit-source-id: c8c77e576a09b346cf29b290d68c75e540d5f146
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53135
Our Codegenerated components are not generating code for `getDebugProps`. This change modifies Codegen to add those functions for all the codegen components.
## Changelog:
[General][Added] - Added getDebugProps to codegen
## Facebook:
`getDebugProps` are required by Fantom to write tests. However, we can't generate these function for third party components, because codegen can generate arbitrary structs and we don't have a generic `toString()` method that can be used or automatically generated by C++.
By generating this function only for Core Components, we can ensure that we can write Fantom tests without breaking all the users of React Native.
Reviewed By: rubennorte
Differential Revision: D79805145
fbshipit-source-id: 0e41c65fc30eaa886a05557ca233fb0a9cb18a71
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53144
Changelog: [Internal]
This is a fix to "unset" prop value for Image.
In my previous diff D79600137 I have changed this behaviour to have Cover as a default, but it is not "default" value, but rather "unset" value.
Reviewed By: rshest
Differential Revision: D79813759
fbshipit-source-id: cc6d43742e51fb2087d6023bd0ff50a3d54eed49
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53138
Without this patch, library could break if the user removes the `newArchEnabled=`
property from the `gradle.properties` file.
With this patch instead we hardcode the property to true, so all the libraries can consume
it if they wish.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D79805857
fbshipit-source-id: 88dda707a0d80ac79e96c955ded2ef0823f3d3ff
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:
`#include <ReactCommon/RuntimeExecutor.h>` stopped working in react-native 0.81 when using frameworks because it is not part of ReactCommon anymore when the split happened for iOS.
to fix this I am including RuntimeExecutor in search headers same way we include ReactCommon.
## Changelog:
[IOS] [FIXED] - Fix import RuntimeExecutor.h with USE_FRAMEWORKS
Pull Request resolved: https://github.com/facebook/react-native/pull/53099
Test Plan:
You can enable USE_FRAMEWORKS and do `#include <react/renderer/uimanager/UIManager.h>` (which react-native-reanimated is doing).
Build will fail complaining that it can't find ReactCommon/RuntimeExecutor.h which is included in UIManager.h
Add my patch, it will work and build successfully
Reviewed By: cortinico
Differential Revision: D79796637
Pulled By: cipolleschi
fbshipit-source-id: f8bb669cfb9f4414653655ed98d2cc6bb431a3e5
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:
This is an automatically generated fixup patch to bring fbsource back into sync with
facebook/react on GitHub. Please land this patch as soon as possible, as the difference
reflected on here is already on GitHub and future changes may depend on these
changes!
<< DO NOT EDIT BELOW THIS LINE >>
diff-train-skip-merge
diff-train-source-id: 7da6014535999d256d2846aadbb7fc1373d76253
Generated by: https://www.internalfb.com/intern/sandcastle/job/18014400563434324/
GitHub Repo: facebook/react
Changelog: [Internal]
Reviewed By: jackpope
Differential Revision: D79754431
fbshipit-source-id: 027428142f36683b07cb66112335f75ecfb5dd12
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:
- Switches fmt_config to fast_float_config so it matches what is used in the method
When trying to use a forked version of the Pod it is not possible to set a new repo for Fast Float. This was caused by a typo in the method used to update the configuration of where to find the Pod.
## Changelog:
[IOS] [FIXED] - Fixed variable naming error in set_fast_float_config method in react_native_pods.rb
Pull Request resolved: https://github.com/facebook/react-native/pull/53129
Test Plan: Add the line `set_fast_float_config({:git => 'some-git-repo'})` to an application's Podfile
Reviewed By: cortinico
Differential Revision: D79805939
Pulled By: cipolleschi
fbshipit-source-id: 9705e1f63e21b788362ca94b74e32bce0177a729
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:
Pull Request resolved: https://github.com/facebook/react-native/pull/53117
Sending the mode is no longer needed as you can't opt out of legacy arch any longer, and was only used for printing a (NOBRIDGE) prefix.
Changelog: [Internal]
Reviewed By: shwanton
Differential Revision: D79762592
fbshipit-source-id: 845aabf2a8365c88808990ea481503b23597a8a0
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