Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46057
We have a bunch of prefab targets which are no longer necessary. I'm removing them all in this first round of cleanup
Changelog:
[Android] [Breaking] - Remove several unnecessary android prefab targets. Use ReactAndroid::reactnative instead
Reviewed By: cipolleschi
Differential Revision: D61376497
fbshipit-source-id: e2e3cb38b1db712890f8bd58abadbdcb5cfaeec7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46010
X-link: https://github.com/facebook/hermes/pull/1474
Changelog:
[General][Added]: support for rendering Error object previews in Chrome DevTools console
On web, an array of Error objects have previews. This diff brings the parity to RN DevTools
Reviewed By: huntie
Differential Revision: D61243518
fbshipit-source-id: d9c6af4b44cef44cb63c4462eee649a8e498a429
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45883
Isolate property lets us easily define when a <View> should set a stacking context.
This is particularly useful when used with `mix-blend-mode`
Changelog: [Internal]
Reviewed By: christophpurrer, NickGerleman
Differential Revision: D60604683
fbshipit-source-id: 449079abe45ae57e98315bdf27b54ec5cf9d6fdc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45867
Before mix-blend-mode was blending with everything in the background, now we make it blend with just stacking context parent as spec by doing off-screen rendering.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D60597403
fbshipit-source-id: 3af0c1266fde4ca32846785879d616316349369c
Summary:
Referring to the [iOS Large Content Viewer](https://developer.apple.com/videos/play/wwdc2019/261/):
iOS Tab Bars can't grow with dynamic text, but the Large Content Viewer helps them to be seen by people with low vision.
Currently on React Native we don't expose the properties that can help implementing iOS [UILargeContentViewerItem](https://developer.apple.com/documentation/uikit/uilargecontentvieweritem) protocol.
The goal of this PR is to expose the necessary props.
In this PR, I'm exposing 2 props:
- `accessibilityShowsLargeContentViewer`: to enable the large content viewer
- `accessibilityLargeContentTitle`: to define the large content viewer title
I plan to use this to open a PR on react-navigation so that bottom tabbars can implement largeContentViewer.
Should fix https://github.com/facebook/react-native/issues/30892
## Changelog:
[IOS] [ADDED] - Support LargeContentViewer on iOS for better accessibility
Pull Request resolved: https://github.com/facebook/react-native/pull/45903
Test Plan: <img width="300" src="https://github.com/user-attachments/assets/d8f1dc46-66e7-4945-bc3b-f1d29044441b" />
Reviewed By: cipolleschi
Differential Revision: D61148361
Pulled By: joevilches
fbshipit-source-id: 86dd92f4f79534a58e6e015febdaf217ea291eb4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45985
As title.
We can now create ellipses when using percentages. The algorithm for this is still flawed and to get it to be a 1:1 to web it will probably require a re-write of some of the logic but this should get us closer for now.
Some examples:
1. Border thinning on large single corner radii (100%)
{F1798145800}
2. Thinning gets worse when having irregular border colors (100%)
{F1798148002}
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D61025927
fbshipit-source-id: 218d44af014bc8351c329ff1bca82658aebac38c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46039
Broke during Kotlin conversion I assume
Image onSubmit events were failing with
```
FdingControllerListener E InternalListener exception in onSubmit
E java.lang.NullPointerException: Parameter specified as non-null is null: method com.facebook.react.views.image.ReactImageView$setShouldNotifyLoadEvents$1.onSubmit, parameter
callerContext
E at com.facebook.react.views.image.ReactImageView$setShouldNotifyLoadEvents$1.onSubmit(Unknown Source:9)
E at com.facebook.drawee.controller.ForwardingControllerListener.onSubmit(ForwardingControllerListener.java:75)
E at com.facebook.drawee.controller.AbstractDraweeController.reportSubmit(AbstractDraweeController.java:832)
E at com.facebook.drawee.controller.AbstractDraweeController.submitRequest(AbstractDraweeController.java:578)
E at com.facebook.drawee.controller.AbstractDraweeController.onAttach(AbstractDraweeController.java:468)
E at com.facebook.drawee.view.DraweeHolder.attachController(DraweeHolder.java:252)
E at com.facebook.drawee.view.DraweeHolder.attachOrDetachController(DraweeHolder.java:269)
E at com.facebook.drawee.view.DraweeHolder.onAttach(DraweeHolder.java:87)
E at com.facebook.drawee.view.DraweeView.doAttach(DraweeView.java:208)
E at com.facebook.drawee.view.DraweeView.onAttach(DraweeView.java:194)
E at com.facebook.drawee.view.DraweeView.onAttachedToWindow(DraweeView.java:168)
E at android.view.View.dispatchAttachedToWindow(View.java:20812)
E at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
E at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
E at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
E at android.view.ViewGroup.addViewInner(ViewGroup.java:5290)
E at android.view.ViewGroup.addView(ViewGroup.java:5076)
E at com.facebook.react.views.view.ReactViewGroup.addView(ReactViewGroup.java:591)
E at android.view.ViewGroup.addView(ViewGroup.java:5016)
E at com.facebook.react.views.view.ReactClippingViewManager.addView(ReactClippingViewManager.java:41)
E at com.facebook.react.views.view.ReactClippingViewManager.addView(ReactClippingViewManager.java:21)
E at com.facebook.react.fabric.mounting.SurfaceMountingManager.addViewAt(SurfaceMountingManager.java:412)
E at com.facebook.react.fabric.mounting.mountitems.IntBufferBatchMountItem.execute(IntBufferBatchMountItem.java:119)
E at com.facebook.react.fabric.mounting.MountItemDispatcher.executeOrEnqueue(MountItemDispatcher.java:387)
E at com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchMountItems(MountItemDispatcher.java:294)
E at com.facebook.react.fabric.mounting.MountItemDispatcher.tryDispatchMountItems(MountItemDispatcher.java:127)
E at com.facebook.react.fabric.FabricUIManager$DispatchUIFrameCallback.doFrameGuarded(FabricUIManager.java:1362)
E at com.facebook.react.fabric.GuardedFrameCallback.doFrame(GuardedFrameCallback.kt:22)
E at com.facebook.react.modules.core.ReactChoreographer$frameCallback$1.doFrame(ReactChoreographer.kt:59)
E at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1035)
E at android.view.Choreographer.doCallbacks(Choreographer.java:845)
E at android.view.Choreographer.doFrame(Choreographer.java:775)
E at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1022)
E at android.os.Handler.handleCallback(Handler.java:938)
E at android.os.Handler.dispatchMessage(Handler.java:99)
E at android.os.Looper.loopOnce(Looper.java:214)
E at android.os.Looper.loop(Looper.java:304)
E at android.app.ActivityThread.main(ActivityThread.java:7918)
E at java.lang.reflect.Method.invoke(Native Method)
E at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1010)
```
Changelog: [Internal]
Reviewed By: fabriziocucci
Differential Revision: D61332854
fbshipit-source-id: 48409e2b93abf15e846620580d1f0d07a2e75025
Summary:
Removed UIReturnKeyDefault as it caused bug when there wasn't any type.
## Changelog:
[IOS] [REMOVED]: UIReturnKeyDefault
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/46020
Reviewed By: christophpurrer
Differential Revision: D61277058
Pulled By: cipolleschi
fbshipit-source-id: 18349c49b05d492a2c2ed5713af3ceb6d3728e70
Summary:
If a fatal error is caught in js, and the js pipeline isn't ready, route it through the c++ pipeline.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D60138414
fbshipit-source-id: 333e38e2b904d6434a88469816e39bf1b9d0bc3f
Summary:
If any fatal js error is caught in c++, just route it through js error handler.
Then, make js error handler call into the right pipeline:
1. After the js pipeline is ready: Route the errors through the js pipeline
2. Otherwise: Route errors through the c++ pipeline.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D60138417
fbshipit-source-id: 24c466ffadbd14a9e9a5571548f3d34d2f406a8d
Summary:
## History
1. Originally landed in D60138415
2. Reverted in D60232011 (it broke ios oss builds)
## Motivation
In bridgeless, we want to configure the error handling of runtime scheduler. So that we can route those errors to the C++ error handling pipeline, when necessary.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D60477342
fbshipit-source-id: f14e20d7aff39e0fee42918567ccc6e685674134
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46023
Minimizing and restoring a Mac Catalyst app causes an `interfaceOrientationDidChange` which causes a downstream crash on `application.delegate.window`.
There doesn't seem to be a clean way to get if an app is fullscreen in Mac Catalyst, so just no-oping for now.
Changelog: [Internal]
Reviewed By: shwanton
Differential Revision: D61253706
fbshipit-source-id: 73d260366adcc74e88f43f256cc5aff8a6e3ef71
Summary:
This PR solves [issue](https://github.com/facebook/react-native/issues/45958) with displaying irregular borders on Fabric. The same issue appears on the old architecture, but I am having a problems there, so I am pushing this fix for now.
The problem is solved by decoupling `backgroundColor` from `borderLayer` and setting `zPosition` on `borderLayer` to `1024.0f`, so that the border is always in front of the layer. The `zPosition` is compared within a layer, so it shouldn't impact outside components. I would love to hear your opinion if there is a case in which this could break.
## Changelog:
[IOS] [FIXED] - changed border display
Pull Request resolved: https://github.com/facebook/react-native/pull/45973
Test Plan:
I've checked that on RNTester Images.

Reviewed By: joevilches
Differential Revision: D61119409
Pulled By: cipolleschi
fbshipit-source-id: a88912061c7a8d72eec4f4092adb076dd6ae511e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45927
This was attempted earlier in the year, and was unsuccessful because HelloWorld had a hidden dependency on this.
Changelog: [General][Breaking] Projects that intend to use the community CLI will now have to declare that dependency instead of transitively having the react-native package handle this.
Reviewed By: GijsWeterings
Differential Revision: D60898346
fbshipit-source-id: 1d62615f718e06caf684f48ecfaf610bf1f51f8e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45982
Changelog: [Internal]
Recently `src/private/renderer/errorhandling/ErrorHandlers.js` started showing up in some error stack traces, making LogBox less readable. This diff ensures we collapse these extra stack frames by default (as well as hide them in Fusebox, etc).
Reviewed By: hoxyq
Differential Revision: D61128294
fbshipit-source-id: 2ebcb47265aaf3281b669ed022c29978167f3e81
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45873
I'm removing the Gradle dependency on OSS SoLoader and stubbing it with our own implementation.
This will allow us to implement merging of further .so libraries and
As Fresco also depends on SoLoader, I had to stub the `NativeLoader` dependency as well.
Changelog:
[Android] [Breaking] - Do not depend on OSS SoLoader anymore and do not expose Fresco `api` dependency.
Reviewed By: mdvacca
Differential Revision: D60652007
fbshipit-source-id: 6e70a5c37ba9337fbe8772e192b886ba4693c7f1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46005
The RCTDevLoadingView is clipped in Mac Catalyst, hiding half of it under the toolbar. This change maintains the behavior on iOS of extending past the dynamic island.
{F1803665273}
Changelog: [Internal]
Reviewed By: shwanton
Differential Revision: D61209780
fbshipit-source-id: 6c9c572a9e47a8caf191c40fb53c4a7d43b64281
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45984
A few methods were not synchronized, exposing members like `mTagsToViews` to potential out-of-sync access.
Changelog: [Internal]
Reviewed By: fkgozali
Differential Revision: D61151447
fbshipit-source-id: 696dbec559968cdfc7c6d2e662f4c8f3471039e1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45998
The exact `React.Element` type is deprecated and will be removed in a future version of Flow.
Changelog: [Internal]
Reviewed By: gkz
Differential Revision: D61205640
fbshipit-source-id: a029a3a46c7d8d9f94b0b931b991b2ce461151b2
Summary:
`RCTSharedApplication().delegate.window.safeAreaInsets.bottom;` causes a crash in Mac Catalyst.
There is already precedent of a `#if TARGET_OS_MACCATALYST` in the same file. This just defaults it to 0 in that case, which looks fine.
## Changelog:
[iOS] [Fixed] - Mac Catalyst crash in RCTRedBox
Reviewed By: shwanton
Differential Revision: D61160503
fbshipit-source-id: 5771ebff88242d9dd4b892d8823e15d1f2307728
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45986
This uses SkBlurMaskFilter under the hood, to draw geometry of a solid color with alpha blur, without going the route of full image filter/rasterization. It was not supported under hardware accelerated canvases for a while, but seems to fully work as of API 29.
Requiring Android 10 instead of 12 makes box shadows a lot more palatable (80% support vs 50%), and we see drastically better performance in one case with many large shadows, where creating many large hardware layers previously drastically hurt framerates.
{F1801807696}
At this point, the RenderNode may be redundant, though I think it can technically save us some work on redraws still. It is kept around for now. I simplified some of the math around here as well.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D61162637
fbshipit-source-id: 8f6ff486e655e64a0665c31391359c499c374c8f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45987
This is a confusing public API, because styles layer deals with DIPs, conversion only happens when parsing dynamic, and `POINT` (the `LengthPercentageType`) also maps to DIPs instead of physical pixels.
This moves conversion to physical pixels to drawing layer, so everything above `BackgroundStyleApplicator` works with `style` types which are all in DIPs.
To preserve compatibility with existing APIs using raw radii, we keep it so that (most) views operate in pixel units, while view managers operate under DIPs.
Changelog: [Android][Breaking] Do not implicitly convert parsed LengthPercentage to pixels
Reviewed By: rshest
Differential Revision: D60507151
fbshipit-source-id: b90066af7b221304aded374627fc0e2165dfc08f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45947
This adjusts logic to be similar to InsetBoxShadowDrawable to keep the full ink within RenderNode bounds. This avoids a tiny bit of overdraw, but also means we get correct rendering if RenderNode is promoted to a compositing layer.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D60972085
fbshipit-source-id: 0916733c6abae37e30dd1f64a36c0e211e41917e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45963https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler/#method-takeHeapSnapshot
As per `HeapProfiler.takeHeapSnapshot` documentation, there are a few
more configurable options to what is contained in the snapshot. Adding
a struct and the `captureNumericValue` bool to the interface since
that's what we need right now. In the future, there is the
`exposeInternals` parameters that's currently experimental for Chrome.
Changelog: [Internal]
Reviewed By: neildhar
Differential Revision: D60989352
fbshipit-source-id: fcd269f0db5b24983631206a1b738dea29566f0e