Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46785
changelog: [internal]
Make sure logs match the class name
Reviewed By: rubennorte
Differential Revision: D63757693
fbshipit-source-id: 815e70e8ae38d99b1908d3aa2a9cfffdd9dc9851
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46780
This is primarily a debugger server change to better-align the `title` and `description` fields (visible in via the CDP `/json/list` endpoint), reporting them directly from the device.
For React Native users, the net effect of this change is to improve/align the display name for each debugger target in the CLI multi-select menu (`j` to debug). This change may also be useful for discovery in non-Fusebox frontends such as VS Code (`vscode-expo` extension).
Changes:
- Rename `title` prop on `InspectorPageDescription`/`IInspector::addPage` to `description` (no call site changes).
- Add `deviceName` param to `InspectorPackagerConnection`.
- Move the page `description` to the `description` JSON field.
- Update `InspectorPackagerConnection::Impl::pages()` to return new `title` and `description` fields.
- Align `OpenDebuggerKeyboardHandler` to display `title` field.
- Deprecate the nonstandard `deviceName` field.
**Before**
```
[
{
"id": "3c9f24bedab0e73fca6a1b295030e7af9346a8c0-1",
"title": "React Native Bridgeless [C++ connection]",
"description": "com.facebook.RNTester",
...
}
```
The `description` field was previously the closest thing we had to a target identifier. Today, this is not needed, since we have the stable `reactNative.logicalDeviceId` field.
**After**
```
[
{
"id": "3c9f24bedab0e73fca6a1b295030e7af9346a8c0-1",
"title": "com.facebook.RNTester (iPhone 16 Pro)",
"description": "React Native Bridgeless [C++ connection]",
...
}
```
The `title` field is now more human readable and aligned with what we render in the window title of React Native DevTools. The `description` field describes the type of debugger target (the specific React Native implementation).
Changelog: [Internal]
Reviewed By: vzaidman
Differential Revision: D63329456
fbshipit-source-id: cfe98f77e31c729431005925cfc66e2780ef8c72
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46778
This has been rolled out internally already and is a good cleanup for OSS too. We no longer use this config externally (BRIDGE+FABRIC) so this shouldn't actually affect the new arch rollout.
Changelog: [Internal]
Reviewed By: fabriziocucci
Differential Revision: D63752084
fbshipit-source-id: da3025f7b072dc7b82f8de22ff247b3979ae64d0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46776
All other paths that touch `mAttachedReactRoots` uses this lock. We expect this to address a crash we're seeing in production where `startSurface` is invoked multiple times.
Changelog: [Internal]
Reviewed By: fabriziocucci
Differential Revision: D63752083
fbshipit-source-id: f06d07aa70719945f6956fbf6e0cde3e9c8e8ed0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46746
This change adds `isHighTextContrastEnabled()` to `AccessibilityInfo` to enable access to Android OS's "High contrast text" setting option. It also adds a new event, `highContrastTextChanged`, to enable listeners to subscribe to changes on this setting.
## Changelog
[Android][Added] - Added `isHighTextContrastEnabled()` to `AccessibilityInfo` to read `ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED` setting value
Reviewed By: NickGerleman
Differential Revision: D63155444
fbshipit-source-id: 9829b40e6c183f6beba732190dc318894e9d9a3f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46761
The legacy paths for this is all gone and non functional. We can clean thes up fully now.
Changelog: [Internal]
Reviewed By: rshest, Abbondanzo
Differential Revision: D63652264
fbshipit-source-id: cabc1af0098553c64f834e6bc30000ef7a942a4c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46758
There are some occurrencies where the Modal results not attached to the Window, perhaps when the app is backgrounded.
This trigger an exception `java.lang.IllegalArgumentException: View=DecorView@b9f88af[AdsManagerActivity] not attached to window manager`.\
This was fixed already but the conversion from Java to Kotlin missed a condition in the `||` clause. We are adding it back.
## Changelog
[Android][Fixed] - Fix crash for Modal not attached to window manager
## Facebook
The original fix is in this diff D22264672 by mdvacca
Also see this post: https://fb.workplace.com/groups/rn.support/permalink/27047414764880449/
Reviewed By: cortinico
Differential Revision: D63700769
fbshipit-source-id: bc8a44868d5cacb8822e1646c2b7643682f45e1b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46756
prepareGlog was firing a warning due to a duplicate config.h file. Here I'm setting so that the file is always overridden (which is the desired behavior) to suppress this warning.
Changelog:
[Internal] [Changed] - Fix build warning for prepareGlog
Reviewed By: cipolleschi
Differential Revision: D63696664
fbshipit-source-id: 83b78afea09c4a5d39f341dd5b604cec466470ae
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46754
This method has been deprecated since 0.76, but we're still using it inside our codebase.
I'm cleaning up the only usage of it replacing it with the implementation.
Changelog:
[Internal] [Changed] - Do not reference `setTranslucentBackgroundDrawable`
Reviewed By: cipolleschi
Differential Revision: D63695933
fbshipit-source-id: d39b13b584d3ac1406c61c3bf86b86b05dc984d9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46750
Fixes https://github.com/facebook/react-native/issues/39659
Fix is pretty straightforward, parameter is annotated as Nullable, but is accessed with a `.split` call.
This causes a crash when the `textDecorationLine` property is removed (i.e. is null).
Changelog:
[Android] [Fixed] - Fix NPE on ReactTextInputManager.setTextDecorationLine
Reviewed By: cipolleschi
Differential Revision: D63689492
fbshipit-source-id: 3424897cc40beaeb579e3affd0a87656ff43afee
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46753
Colors can be more than just ints, so we need to use `ColorPropConverter` to convert it correctly. For ViewManagers, this happens automatically through the ReactProp annotation, but since this is a nested field, we need to manually apply it.
Changelog: [Android][Fixed] BoxShadow now supports platformColor.
Reviewed By: fabriziocucci
Differential Revision: D63693048
fbshipit-source-id: 26b1da24db1b6f319af8cef6f62e4739c3f65ee3
Summary:
This further reduces the build warning coming from the Hermes build, which we can't do much about as we don't own that code.
## Changelog:
[Internal] [Changed] - Further Reduce Build Warnings
Pull Request resolved: https://github.com/facebook/react-native/pull/46733
Test Plan: CI
Reviewed By: NickGerleman
Differential Revision: D63644753
Pulled By: cortinico
fbshipit-source-id: d0e65559715ac1fa2b920f4c3d3cf63b6171765d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46705
We have multiple classes in React Native Android acting as a binding layer (between C++ and Java, between C++ and JS). Make it more obvious this Binding is for (Android) FabricUIManager and flatten the (now) unused Binding interface.
Changelog: [Android][Removed] BindingImpl is no longer part of the public interface
Reviewed By: cortinico
Differential Revision: D63536329
fbshipit-source-id: 329d184c1889fbe804995211cdd339b50a7c9234
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46701
Reduce the interface we expose in SurfaceHandler(Binding), and concentrate the logic in the FabricUIManager Binding.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D63536328
fbshipit-source-id: 5882bdd24fd3ca8f3d36210dca80587fee091dcf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46704
Our build log for Gradle is extremely noisy due to Hermes.
Here I'm suppressing all the build output from Hermes as we can't really do much from that side of the build.
This should make it easier for folks on GitHub Actions to immediately spot where are failures.
Changelog:
[Internal] [Changed] - Silence unnecessary Gradle outputs
Reviewed By: GijsWeterings
Differential Revision: D63541175
fbshipit-source-id: d1a60098c317ff9e8c9575b5b8b2aab639f28f2f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46680
Since the parent of a view with mixBlendMode prop set is the one responsible for setting the compositing of the child, when updating mixBlendMode on a child we need to also invalidate the parent.
Changelog: [Android] [Fixed] - mixBlendMode now properly does state updates
Reviewed By: joevilches
Differential Revision: D63424394
fbshipit-source-id: 0eb15520f1087e25683853632943e64a66344481
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46685
This attempts a similar fix to D59566611, but keeps the removedClippedSubviews logic as is, instead moving the current translation done in ReactHorizontalScrollContainerView onLayout to ShadowNode layout metric assignment (so the world is consistent from very early on, and `removeClippedSubviews` never sees coordinates before translation),
I suspect doing this at the ShadowNode layer might also result in some fixes to DevTools in RTL.
This should let us roll out setAndroidLayoutDirection again.
Changelog:
[Android][Fixed] - Fix interactions between removeClippedSubviews and RTL
Reviewed By: mdvacca
Differential Revision: D63318754
fbshipit-source-id: 828e103e2ad21c7e886e39c163474b10ebd5099e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46691
In Bridgeless, ReactSurface would only call `registerSurface` when it started, which did not match the behaviour seen in startSurface(WithConstraints). Instead, make all calls to start the surface go through the FabricUIManager Binding so we can correctly configure `setMountingOverrideDelegate` which is required for layout animations.
Changelog: [Android][FIxed] LayoutAnimations work on full new architecture
Reviewed By: cortinico
Differential Revision: D63533635
fbshipit-source-id: f6d3db020bb2d7245f7b14f2407271d76837d40c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46665
# Changelog: [Internal]
Looks like this module was missing on android for a while.
Reviewed By: huntie
Differential Revision: D63460309
fbshipit-source-id: 7146e7f2104f868d0f2b7271bd2c452608611ea3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46662
# Changelog: [Internal]
This should not have been a public API in the first place.
1. Moving this to `src/private`.
2. Removed some unused APIs, such as profiling settings.
Reviewed By: huntie
Differential Revision: D62965492
fbshipit-source-id: fb97eccaf647ce418f500b02d153263aa8632eee
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46694
The DevMenu module was never implemented on Android. This adds its implementation by mirroring the iOS implementation.
Fixes https://github.com/facebook/react-native/issues/46679
Changelog:
[Android] [Fixed] - Add missing Android implementation for DevMenu Module
Reviewed By: cipolleschi
Differential Revision: D63535172
fbshipit-source-id: 791e72b46b7d3264b98e85a73f2d9025dc3a2c7d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46623
I've just noticed that ReactFragment is not properly instantiating the `ReactDelegate` with a ReactHost
when on Bridgeless. This causes Fragments to crash when the app is on bridgeless mode.
Fixes https://github.com/facebook/react-native/issues/46566
Changelog:
[Android] [Fixed] - ReactFragment should properly instantiate ReactDelegate on Bridgeless
Reviewed By: mdvacca
Differential Revision: D63319977
fbshipit-source-id: 08256e35b2769e18df2d24f870ec5d98e5574f85
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46683
Enabling these Microtask, ModernRuntimeScheduler and NativeViewConfigsInBridgelessMode in BridgeMode is risky and leads to bugs. In this diff I'm ensuring we only enable these flags when newArchitecture is enabled
changelog: [internal] internal
Reviewed By: shwanton
Differential Revision: D63503519
fbshipit-source-id: 4ef757834b8f7fba595b3394735f4b91335d7c98
Summary: Backing out the stack since a same crash that previously effected many apps appeared again, and there are changes soon landing that will add more conflicts.
Reviewed By: Abbondanzo
Differential Revision: D63493332
fbshipit-source-id: 4423bf41c793e00a0aa22d12a77bca69d3b1ae77
Summary: Backing out the stack since a same crash that previously effected many apps appeared again, and there are changes soon landing that will add more conflicts.
Reviewed By: Abbondanzo
Differential Revision: D63493331
fbshipit-source-id: 44658ffc99eb4ebc947f95bb6e6bde105ac88c93
Summary: Backing out the stack since a same crash that previously effected many apps appeared again, and there are changes soon landing that will add more conflicts.
Reviewed By: Abbondanzo
Differential Revision: D63493334
fbshipit-source-id: 175fc7b5b69aa2874c867e460ab102bb077a7cd8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46668
Small tweaks post-Kotlin-conversion:
- Make `overflow` a var
- Replace `+ -` with `-`
- Clean up properties and move up init block
- Iterate over entire allChildren array to clean up listeners
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D63343964
fbshipit-source-id: 2e9022e2d7e54ac338d1003419d8959771f7f270
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46676
Changelog: [internal]
## Context
We recently "fixed" a problem in `MountingCoordinator` on Android where it would report that it doesn't have any pending transactions when, in fact, it does. The fix introduces a new method in that class to delay marking transactions as done until a mount hook is invoked for that surface.
That fixed the issue... by always reporting that there were pending transactions accidentally.
The reason for this bug is that the mount hook doesn't have access to the mounting coordinator of the surface if the surface is registered through some of the methods in `Binding.cpp` that don't add the surface to a registry. In that case, we can never mark the transactions as done and the mounting coordinator for those surfaces always report pending transactions incorrectly.
NOTE: this bug only affects apps that have the `fixMountingCoordinatorReportedPendingTransactionsOnAndroid` feature flag enabled.
## Changes
This fixes the issue by making sure that surfaces are always registered in the registry and that we can access their mounting coordinators in the mount hook to report the transactions as done.
Reviewed By: rubennorte
Differential Revision: D63466672
fbshipit-source-id: a621a12cda89a3ab7331d3c6a16c6cdfa9341821
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46678
I'm investigating some issues with surface management and noticed `surfaceHandlerRegistry_` is not updated in the bridgeless path when using ReactSurfaceView.
Adding a warning to help us validate this is resolved when we do eventually fix it.
Changelog: [Internal]
Reviewed By: fabriziocucci
Differential Revision: D63463521
fbshipit-source-id: 38995924588f1d71b9fc517c76a6e0c572fd0699
Summary:
X-link: https://github.com/facebook/yoga/pull/1701
Pull Request resolved: https://github.com/facebook/react-native/pull/46630
I would like to write some tests for box sizing that will drive a lot of my development as I implement content box. To do that, I need this publicly exposed. Obviously not that ideal since this currently does not do anything. Maybe we can name the value in such a way that its clear it is in development?
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D63135970
fbshipit-source-id: 7520823bf925364eae45341531e012e80ec92284
Summary:
A typo means TextLayoutManager will incorrectly measure text as if `LineBreaker.HYPHENATION_FREQUENCY_NORMAL` is set, instead of the correct default of `LineBreaker.HYPHENATION_FREQUENCY_NONE` which we use to display the `TextView`. This causes truncation if hyphenation would have caused text to be shorter than if not hyphenated. Fix the typo.
Changelog: [Android][Fixed] - Fix measuring text with incorrect hyphenationFrequency
Reviewed By: mellyeliu
Differential Revision: D63293027
fbshipit-source-id: baaf2ae2676548cf0815ae96e324af273be6f99e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46586
When Paint.strokeWidth is set to 0 its not actually 0 but "hairline mode" so the fix is just to make outline not draw at all when outlineWidth = 0 {F1879399325}
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D63136220
fbshipit-source-id: 81ef7ce0b72158c6b7c332191d332008c5a919b4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46567
Switch to a simpler data structure which avoids locking and doesn't require copies when iterating. This is more consistent with other listener arrays in React Native.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D62872893
fbshipit-source-id: b0ce6a904d25057f0217f7de7ec2928c8b2d1f34