Commit Graph

38536 Commits

Author SHA1 Message Date
Phillip Pan e881a1184c convert TurboReactPackage to BaseReactPackage in oss (#46055)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46055

Changelog: [Android][Breaking]

BaseReactPackage is a 1:1 replacement for the deprecated TurboReactPackage. TurboReactPackage has been deprecated since 0.74. let's move the codebase to the recommended standard.

Reviewed By: cortinico

Differential Revision: D61329022

fbshipit-source-id: cef69e37bb2be7f6dccbab70d0996c33a8abf091
2024-08-16 17:41:32 -07:00
SamChou19815 (Meta Employee) 39c338ff8d Eliminate a few React.Element type that will be synced to react-native (#30719)
Summary:
## Summary

Flow will eventually remove the specific `React.Element` type. For most
of the code, it can be replaced with `React.MixedElement` or
`React.Node`.

When specific react elements are required, it needs to be replaced with
either `React$Element` which will trigger a `internal-type` lint error
that can be disabled project-wide, or use
`ExactReactElement_DEPRECATED`.

Fortunately in this case, this one can be replaced with just
`React.MixedElement`.

## How did you test this change?

`flow`

DiffTrain build for commit https://github.com/facebook/react/commit/85fb95cdffdd95f2f908ee71974cae06b1c866e1.

bypass-github-export-checks

Reviewed By: poteto

Differential Revision: D61397212

Pulled By: SamChou19815

fbshipit-source-id: c0aa5a4ed3922f88b7e557738f76f872c02a9d07
2024-08-16 16:37:25 -07:00
Sam Zhou 77154c64f0 Eliminate exact React.Element types in react-native codebase
Summary: Changelog: [Internal]

Reviewed By: alexmckenley

Differential Revision: D61389820

fbshipit-source-id: 566a4904c570e24f5beb965734020f8b9c1ed819
2024-08-16 07:30:09 -07:00
Nicola Corti db80d78d7a Merge all the remaining .so libraries into libreactnative.so (#46059)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46059

This merges all the remaining dynamic libraries into libreactnative.so.
Sadly I couldn't split this in smaller diffs as all the libraries are connected with each other.

I also had to introduce 2 other SOs: `libhermestooling.so` and `libjsctooling.so` which contains
all the necessary libs used when loading either JSC or Hermes. They need to be isolated
as RNGP will remove those libraries based on the library the user decides to pick.

Changelog:
[Android] [Breaking] - Merge all the remaining .so libraries into libreactnative.so

Reviewed By: hezi

Differential Revision: D61376496

fbshipit-source-id: ab9e725b7acbebdfd8fa3ff36ad34d080044bf0e
2024-08-16 05:42:46 -07:00
Nicola Corti 7916f7e120 Merge libuimanagerjni.so inside libreactnative.so (#46056)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46056

This merges another library inside libreactnative.so

Changelog:
[Android] [Changed] - Merge libuimanagerjni.so inside libreactnative.so

Reviewed By: cipolleschi

Differential Revision: D61376498

fbshipit-source-id: db646721a5a4b56f2cf098d5087a3e45d2076743
2024-08-16 05:42:46 -07:00
Nicola Corti 6e5227bd83 First round of prefab cleanup (#46057)
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
2024-08-16 05:42:46 -07:00
Nicola Corti 80c3aea48d Move libyoga.so and libturbomodulejsijni.so inside libreactnative.so (#46058)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46058

This moves other 2 libraries inside libreactnative.so

Changelog:
[Android] [Changed] - Move libyoga.so and libturbomodulejsijni.so inside libreactnative.so

Reviewed By: cipolleschi

Differential Revision: D61376499

fbshipit-source-id: 8780831491a5d57c4bb747fccf8a872ad30dc09e
2024-08-16 05:42:46 -07:00
Riccardo Cipolleschi e39aaf5da5 Make sure we can create a .xcode.env.local (#46060)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46060

Closures in ruby don't need the `return` statement. They exit from the calling function!

## Changelog
[Internal] - fix .xcode.env.local.generation

Reviewed By: cortinico

Differential Revision: D61343918

fbshipit-source-id: 39073ead7ad596f48403a5c2d4c066d410355698
2024-08-16 02:20:18 -07:00
zhongwuzw 1d1646afd1 Fixes findNodeAtPoint when views were inverted (#45519)
Summary:
FIxes https://github.com/facebook/react-native/issues/45502 .  cc realsoelynn

## Changelog:

[GENERAL] [FIXED] - Fixes findNodeAtPoint when views were inverted

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

Test Plan: Demo in https://github.com/facebook/react-native/issues/45502 .

Reviewed By: cipolleschi

Differential Revision: D59920660

Pulled By: realsoelynn

fbshipit-source-id: 9e1075406830aa3a3ec436d70d539ca0674f8d34
2024-08-16 01:00:07 -07:00
Nicola Corti e864910a4d Move more libraries to so-merging: rninstance, react_featureflagsjni, hermesinstancejni, fabricjni (#46036)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46036

This is a round of merging of .so libraries inside libreactnative.so

Changelog:
[Android] [Changed] - Move more libraries to so-merging: rninstance, react_featureflagsjni, hermesinstancejni, fabricjni

Reviewed By: javache

Differential Revision: D61331552

fbshipit-source-id: ac93e844b304038eefd4679680180eb3be2d5e1d
2024-08-16 00:42:51 -07:00
Nicola Corti 7fa9bc85c4 Remove unnecessary circular dependency on bridgeless<->hermes (#46048)
Summary:
Remove unnecessary circular dependency on bridgeless<->hermes

## Changelog:

[INTERNAL] - Remove unnecessary circular dependency on bridgeless<->hermes

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

Test Plan: CI

Reviewed By: christophpurrer

Differential Revision: D61343505

Pulled By: cortinico

fbshipit-source-id: 5e182c724e80d419a5af1e0ea9dfb96595e4abe2
2024-08-16 00:36:59 -07:00
Joe Vilches d490354cd8 Add View box shadow e2e tests (#46054)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46054

tsia, more test = good

Changelog: [Internal]

Reviewed By: necolas

Differential Revision: D60938608

fbshipit-source-id: abce5ab7d42a7f7f626f0edc852aa1374f8029f0
2024-08-15 20:59:11 -07:00
Joe Vilches de39ebb9f8 Make default shadow color black (#46053)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46053

tsia, default should be black like android

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D61370471

fbshipit-source-id: a69933049f9db30a17322bd53ef30035ae145a63
2024-08-15 20:59:11 -07:00
Edmond Chui cae9ae5b48 console preview for Error objects (#46010)
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
2024-08-15 19:42:52 -07:00
Edmond Chui 1740a56a46 Render Error objects in CDT (#45990)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45990

X-link: https://github.com/facebook/hermes/pull/1471

Changelog:
[General][Added]: support for rendering Error objects in Chrome DevTools console

As discussed in [Linkifying and symbolicating JavaScript Error stacks in Fusebox](https://docs.google.com/document/d/1JI_PPzxFRwRNii6pcx-4Cb7g8UTrqnZHCxaoynntIrM/edit) by hoxyq, Error objects in CDT currently displays a big blob of string.

In this diff, we send the correct CDT params.

Reviewed By: hoxyq

Differential Revision: D60598446

fbshipit-source-id: 527c4e5858dfb879a32b40e5ad4df73a22e694e5
2024-08-15 19:42:52 -07:00
Jorge Cabiedes Acosta 17017d2b81 Add isolate property (#45883)
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
2024-08-15 16:55:26 -07:00
Jorge Cabiedes Acosta 0a698e5971 Make mix-blend-mode only blend with stacking context parent (#45867)
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
2024-08-15 16:55:26 -07:00
bacarybruno 6cc44d765a feat(accessibility): support large content viewer on iOS (#45903)
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
2024-08-15 13:38:15 -07:00
Jorge Cabiedes Acosta d69dbd6f15 Add support for assymetrical bonder radii when using % (#45985)
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
2024-08-15 12:35:15 -07:00
Vincent Riemer abc322c708 fix erroneous pointerenter events firing when pointer leaves app bounds (#46024)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46024

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D61298649

fbshipit-source-id: 16ee8084fa31297ee12db26ee86254eed6da248f
2024-08-15 11:27:41 -07:00
Pieter De Baets f8aa7867f1 Fix type of callerContext (#46039)
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
2024-08-15 08:59:18 -07:00
Alex Hunt 2469c67641 Disable connection read timeout for Network.loadNetworkResource (Android) (#46041)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46041

We observed that large or remotely loaded source maps could time out. This change aligns `OkHttpClient` timeout values with `CxxInspectorPackagerConnection`.

https://github.com/facebook/react-native/blob/a77f26827fee0fc18a11faccd0b5e51d1b222735/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/CxxInspectorPackagerConnection.java#L87-L91

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D61333240

fbshipit-source-id: 605b1fbf1b050d8e80ed569b25cb5694e2d14ec7
2024-08-15 08:45:54 -07:00
Thomas Nardone 49fa92e016 ReactViewGroup - use safer removeViewInLayout (#45980)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45980

Use a safe remove method that won't crash on IndexOutOfBounds.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D61132496

fbshipit-source-id: edd887611c47f236b495986fc29e2d0b9ce56b8e
2024-08-15 08:44:32 -07:00
Elene Botchoradze 26aff664c0 fix(ios): removed default value (#46020)
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
2024-08-15 08:10:08 -07:00
Blake Friedman 15c9961c88 Fix publish template url for GHA action (#46040)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46040

The URL to dispatch the workflow was not correct, see [0].

## Changelog: [Internal]

[0] https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event

## Internal:

For S441191, see the job launched:
- https://github.com/react-native-community/template/actions/runs/10404141179/job/28811993693

 {F1806960111}

Reviewed By: cipolleschi

Differential Revision: D61333084

fbshipit-source-id: 62b20d792b9c667b3ee80d6d446423a6d24a67c2
2024-08-15 07:27:45 -07:00
Riccardo Cipolleschi 7d088f8020 Add changelog for 0.75.1 (#46038)
Summary:
Add changelog for 0.75.1

## Changelog:
[Internal] - Add changelog

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D61333096

Pulled By: cipolleschi

fbshipit-source-id: 19ba0bce60056be12d1b0427939c5896c22e215b
2024-08-15 06:41:10 -07:00
Riccardo Cipolleschi b4a2a4e756 Backport Fixes for Create Release Workflow (#46034)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46034

The create release workflow was not working properly for 0.75:

* the latest tag was not pushed because we were using the wrong input
* the latest tag was not deleted because we were not fetching all the tags
* the create release job 'dry-run' defaults to false, which is a bit dangerous

This change is a backport from 0.75 to main of these changes.

## Changelog
[Internal] - Make sure that the Latest tag is properly pushed to github while releasing

Reviewed By: cortinico

Differential Revision: D61331247

fbshipit-source-id: 89bf0698c45ec6c766e25b11599dbe926d8a6297
2024-08-15 06:40:40 -07:00
zhongwuzw a77f26827f Add missing pod dependency of jserrorhandler (#46030)
Summary:
Fixes build error like https://github.com/facebook/react-native/actions/runs/10398775597/job/28797041872. cc RSNara

## Changelog:

[IOS] [FIXED] - Add missing pod dependency of jserrorhandler

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

Test Plan: CI green.

Reviewed By: cortinico

Differential Revision: D61329173

Pulled By: cipolleschi

fbshipit-source-id: c7dc6d7af3b57f748ae3464d9f4231ff4fb36e63
2024-08-15 03:22:28 -07:00
Ramanpreet Nara 8c26048df6 ReactInstance: Remove redundant try/catch in loadScript (#45617)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45617

This isn't necessary.

RuntimeScheduler will catch and report via js error handler.

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D60139055

fbshipit-source-id: 511f384ede71d88b81ef5c031fa67b1fb03f7631
2024-08-14 20:43:11 -07:00
Ramanpreet Nara 7fce71709e Route fatal js errors caught in js through JsErrorHandler
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
2024-08-14 20:43:11 -07:00
Ramanpreet Nara dd7be8de05 Route all js errors caught in C++ through JsErrorHandler
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
2024-08-14 20:43:11 -07:00
Ramanpreet Nara bc930441cf Refactor: RuntimeScheduler: Make error hander configurable
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
2024-08-14 20:43:11 -07:00
Bowen Xie 68c0720e34 - Change RawPropsParser logs to WARNING (#46025)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46025

Changelog:
[General][Fixed] - Change RawPropsParser logs from ERROR level to WARNING

Reviewed By: christophpurrer

Differential Revision: D61304854

fbshipit-source-id: bc16df4916a54cb7c1fa57f359eab3d9eed4e2f4
2024-08-14 19:27:20 -07:00
Devan Buggay 9bc32a0101 Fix minimize/restore crash (#46023)
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
2024-08-14 15:22:58 -07:00
Dawid 94407f56d1 fix(iOS): displaying irregular borders on iOS Fabric (#45973)
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.

![border-issues-screen](https://github.com/user-attachments/assets/e12add82-8016-4c42-833d-f396307e9423)

Reviewed By: joevilches

Differential Revision: D61119409

Pulled By: cipolleschi

fbshipit-source-id: a88912061c7a8d72eec4f4092adb076dd6ae511e
2024-08-14 13:16:10 -07:00
Blake Friedman bd3a3e3de0 Remove @react-native-community/cli direct dependencies (#45927)
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
2024-08-14 12:55:50 -07:00
Pieter De Baets e39b916966 Revert D60143747: Fix debug logging of IntBufferBatchMountItem
Differential Revision:
D60143747

Original commit changeset: 6f1a9ea1cf95

Original Phabricator Diff: D60143747

fbshipit-source-id: c07088c4591ca344dbdc31c9f86b1a44a575c0ae
2024-08-14 08:26:45 -07:00
Riccardo Cipolleschi 9f77287a0c Update changelog for 0.75.0 (#45814)
Summary:
Changelog for 0.75.0

## Changelog:

[Internal] - Changelog for 0.75.0

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D60446949

Pulled By: cipolleschi

fbshipit-source-id: e26e3486e3c9d224678f3df913368fa280c2e431
2024-08-14 08:09:41 -07:00
Moti Zilberman 730885863d Collapse stack frames in new renderer error handling file (#45982)
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
2024-08-14 06:56:51 -07:00
Pieter De Baets 59c1adbfdb Rethrow original exception in DefaultReactHostDelegate (#46016)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46016

Wrapping the JavaScriptException with a RuntimException means we lose JS specific metadata on the top-level exceptions, and can break categorization in crash-reporting tools.

We could also use the same logic as [DefaultJSExceptionHandler](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/DefaultJSExceptionHandler.java) but that doesn't seem to be required for Kotlin.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D61261515

fbshipit-source-id: fa85c8818834905759cbc984ea3c45403eb87e8c
2024-08-14 05:33:41 -07:00
Nicola Corti 5b761ff15c Move libmapbufferjni.so inside libreactnative.so (#46003)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46003

Another library going inside libreactnative.so

Changelog:
[Android] [Changed] - Move libmapbufferjni.so inside libreactnative.so

Reviewed By: cipolleschi

Differential Revision: D61211105

fbshipit-source-id: 38fce9ff9025fc6d2cd9eff3ee57303babed8852
2024-08-14 05:07:56 -07:00
Nicola Corti 0caf3e824d Move libreact_newarchdefaults.so inside libreactnative.so (#46004)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46004

This is the first library I'm moving over inside libreactnative.so

Changelog:
[Android] [Changed] - Move libreact_newarchdefaults.so inside libreactnative.so

Reviewed By: cipolleschi

Differential Revision: D61211104

fbshipit-source-id: 2526395a246df9ebf6387ca434e07b4ed4484f1e
2024-08-14 05:07:56 -07:00
Nicola Corti 6dc01dad09 Do not depend on OSS SoLoader anymore (#45873)
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
2024-08-14 05:07:56 -07:00
Daniel Strebinger 53969cb8d0 Enable third-party podspec sources to be fetched from mirrored git repositories (#45566)
Summary:
At OEBB we currently facing an issue we're not able to use our mirrored git repositories for third-party podspecs. This is due to the fact podspecs contain hardcoded git repository urls. With this change we could specify urls to our mirrored git repositories.

## Changelog:

[IOS] [ADDED] Enable third-party podspec sources to be fetched from mirrored git repositories

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

Test Plan:
```bash
# Define env vars for git mirrors

export FMT_GIT_URL="https://my-git-host.com/my-mirrored-repo.git"
export GLOG_GIT_URL="https://my-git-host.com/my-mirrored-repo.git"
export FOLLY_GIT_URL="https://my-git-host.com/my-mirrored-repo.git"
export DOUBLE_CONVERSION_GIT_URL="https://my-git-host.com/my-mirrored-repo.git"
export BOOST_GIT_URL="https://my-git-host.com/my-mirrored-repo.git"

# Pod install command run from ios app folder
pod install
```

Reviewed By: cortinico

Differential Revision: D61209204

Pulled By: cipolleschi

fbshipit-source-id: b19f7b8262c860b5c4d553732da50c9bd0373397
2024-08-14 04:42:58 -07:00
Soe Lynn 7bb7a6037b Back out "Fixes NSDataBigString length calculation" (#46011)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46011

Backing out D58561775 in the meantime while we are trying to do proper fix in Hermes engine D61058869

Changelog: [Internal]
Temporarily revert this diff https://github.com/facebook/react-native/pull/44900 while we wait for https://github.com/facebook/react-native/pull/45966 to land

Reviewed By: makovkastar

Differential Revision: D61246120

fbshipit-source-id: 8c205efe9d29cd34f24676c4a48d55f0493d73ab
2024-08-13 20:12:48 -07:00
Devan Buggay f9abe96d19 Fix RCTDevLoadingView position (#46005)
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
2024-08-13 16:23:15 -07:00
Alex Hunt bd90a076f7 Update debugger-frontend from 7b143e5...c98a122 (#46000)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46000

Changelog: [Internal] - Update `react-native/debugger-frontend` from 7b143e5...c98a122

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebookexperimental/rn-chrome-devtools-frontend/compare/7b143e5d05a102c8c9cc7e282bab7b0751f75d61...c98a12218022a329f39b30dc20cf4de34e459749).

Reviewed By: robhogan

Differential Revision: D61208000

fbshipit-source-id: 8884d7946f4f62bbfe48e3fddc6c873f952d826c
2024-08-13 16:00:25 -07:00
Thomas Nardone 66ff4d3515 Fully synchronize NativeViewHierarchyManager (#45984)
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
2024-08-13 13:16:41 -07:00
Sam Zhou a622a43764 Replace all exact React.Element type in react-native with ExactReactElement_DEPRECATED (#45998)
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
2024-08-13 09:08:44 -07:00
Pieter De Baets 5f88c659c8 Fix debug logging of IntBufferBatchMountItem (#45637)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45637

This breaks when `setAndroidLayoutDirection` is enabled.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D60143747

fbshipit-source-id: 6f1a9ea1cf95f9be0451460201e49b4ce80ce204
2024-08-13 08:35:38 -07:00