Skip to content

Conversation

Saadnajmi
Copy link
Collaborator

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary:

Merge to 0.73.0 upstream, putting up on track for our React Native macOS 0.73 release. Note we will not release the NPM package after this merges, as we still have some bug fixes to do for our package.

Changelog:

[INTERNAL] [CHANGED] - Merge to 0.73.0 upstream

Test Plan:

Launched RNTester-macOS.

huntie and others added 30 commits September 26, 2023 10:24
#publish-packages-to-npm
Summary:
Pull Request resolved: facebook#39476

This diff enables native view config interop layer in bridgeless mode by default for OSS.
It also removes redundant `enableNativeViewConfigsInBridgelessMode` JS feature flag.
Changelog: [General][Added] - Native view config interop layer enabled in bridgeless mode.

Reviewed By: luluwu2032

Differential Revision: D49318325

fbshipit-source-id: ea2e38b2ea10637b578d98e38d97eed923498fb3
Summary:
Pull Request resolved: facebook#39661

Changelog:
[Android][Changed] - Enable Template with Bridgeless

Reviewed By: cortinico

Differential Revision: D49464580

fbshipit-source-id: 26dd8e2a0b9a66421d58f147eed4d2fd28817dc7
#publish-packages-to-npm
Summary:
Pull Request resolved: facebook#39640

changelog: [internal] internal

Reducing visibility from public to package only for `ReactHostImpl.getDefaultHardwareBackBtnHandler()` since it's only used within package

Reviewed By: mdvacca

Differential Revision: D49612859

fbshipit-source-id: 3c40888da732f33dc046d9363b08119e707f4ea4
Summary:
Pull Request resolved: facebook#39687

Bridgeless mode is releasing in 0.73.

Bridgeless mode isn't stable inside RNTester (in 0.73) without the TurboModule interop layer: T164853040.

**Changes:** Enable the TurboModule interop layer in RNTester (Bridgeless Mode).

**Urgency:** This will unblock the 0.73.

Changelog: [General][Added] - Enable TurboModule interop in Bridgeless mode

Reviewed By: fkgozali, dmytrorykun, luluwu2032

Differential Revision: D49653919

fbshipit-source-id: a4a09a99544c2ef8713484dbeab5cb04f29256cc
…nabled (facebook#39696)

Summary:
Pull Request resolved: facebook#39696

`Commands` and `Constants` should be set in native only if component data is instantiated via native view config interop layer.
Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D49684166

fbshipit-source-id: ceaa29c2ed3336aa6e21a116a3f5f94e03c225c1
#publish-packages-to-npm
Summary:
Pull Request resolved: facebook#39710

Last week Apple released Xcode 15, which required us to ship a workaround for the new linker.
Unfortunately, the previous fix was not good enough and there were some edge cases that were not covered.
For example, in some occasions the flags are read as an array and the `-Wl` and the `-ld_classic` flags were separated and not properly removed when moving from Xcode 15 to Xcpde 14.3.1.

This change fixes those edge cases, with a more robust solution where:
- We convert the flags to a string.
- We trim the string and the values properly.
- We add the flags when running `pod install` with Xcode 15 as the default iOS toolchain.
- We remove the flags when running `pod install` with Xcode <15 as the default iOS toolchain.

## Changelog:
[Internal] - Make the Xcode 15 workaround more robust.

Reviewed By: dmytrorykun

Differential Revision: D49748844

fbshipit-source-id: 34976d148f123c5aacba6487a500874bb938fe99
Summary:
Sync latest `debugger-frontend` artifacts, based on motiz88/rn-chrome-devtools-frontend#12.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D49502838

fbshipit-source-id: 25805066670ac35ec976dc820a73a722ee182dd2
Summary:
Pull Request resolved: facebook#39755

The goal of this diff is to fix:
```
JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.NoSuchMethodError: no static or non-static method
"Lcom/facebook/react/jscexecutor/JSCExecutor;.initHybrid(Lcom/facebook/react/bridge/ReadableNativeMap;)Lcom/facebook/jni/HybridData;"

```

changelog: [internal] internal

Reviewed By: luluwu2032

Differential Revision: D49831595

fbshipit-source-id: 9ce22cdccdd02af74edb27be2df72a469d3166c9
#publish-packages-to-npm
This is an eager cherry pick of facebook#39784 for `0.73-stable`.
Applies correct fix for `_formatVersion` misalignment — based on facebook#36657.
This is an eager cherry pick of facebook#39788 for `0.73-stable`.
#publish-packages-to-npm
Luna Wei and others added 25 commits November 16, 2023 23:15
#publish-packages-to-npm
#publish-packages-to-npm
…acebook#41573)

Summary:
Pull Request resolved: facebook#41573

Changelog: [iOS][Fixed] RNTester-ios / RCTAppDelegate > correctly check for USE_HERMES Flag

On iOS we check for ENV flags if Hermes should be used:
- https://github.com/facebook/react-native/blob/b4d4aef057ebf90176287f22d72b4b3b8b280c9a/packages/react-native/React-Core.podspec#L24
- https://github.com/facebook/react-native/blob/b4d4aef057ebf90176287f22d72b4b3b8b280c9a/packages/react-native/React/React-RCTFabric.podspec#L90

and add necessary C++ packages based on that flag.

In code we do check for those imports
https://github.com/facebook/react-native/blob/b4d4aef057ebf90176287f22d72b4b3b8b280c9a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h#L16-L27

and decided if we should use Hermes or not.

However the .mm check is faulty and does not check for the `RCT_USE_HERMES` flag set in code.

Reviewed By: fkgozali

Differential Revision: D51483740

fbshipit-source-id: 428c27aae80fe6f9799cf6ae21a5d3801fe6ca11
Summary:
Pull Request resolved: facebook#41535

## Context

**Remote JS Debugging removal**

In React Native 0.73, we have deprecated Remote JS Debugging (execution of JavaScript in a separate V8 process) and also removed the Dev Menu launcher (facebook#36754).

## This diff

Follows D46187942 — this option wasn't correctly removed for Android when running JSC. This is now consistent with iOS.

Changelog:
[Android][Changed] "Open Debugger" is no longer available for remote JS debugging from the Dev Menu (non-Hermes). Please use `NativeDevSettings.setIsDebuggingRemotely()`.

Reviewed By: blakef

Differential Revision: D50555095

fbshipit-source-id: 1aeb48ab1390dc12ce300d6f321c30de5343cf0a
Summary:
Pull Request resolved: facebook#41614

Fixes facebook#41545

SafeAreaView works by adding padding in order to shift content out of the safe area. This may change the layout dimensions of the SafeAreaView, in turn effecting its safe area insets.

This can cause layout results to change, which in turn changes the inset value. Because of this, there is a tolerance, where safe area inset changes do not trigger a new update.

Yoga is instructed to round layout dimensions to the closest physical pixel, so a very small difference in layout may result being off by about a pixel. Right now the tolerance is exactly one physical pixel, and if there is FP error here, we may not pass the test, and start oscillating with different layout values.

After changing affected ShadowNode order to always be root-first, the first call to set the frame of the `SafeAreaView` happens when a non-zero-sized RootView is present, which I think may lead to a safe area inset update communicated that wasn't before? Or other cosmic butterflies. Layout rounds to one physical pixel in difference, and our tolerance is `0.00001` dips off (not helped that 1/3 screen scale cannot be represented as decimal, even without FP error).

This adds a small tolerance beyond just the pixel boundary, matching the logic in Fabric, which seems to resolve the issue.

Changelog:
[iOS][Fixed] - FP Tolerance in iOS Paper SafeAreaView debouncing

Reviewed By: philIip

Differential Revision: D51539091

fbshipit-source-id: 88bddc38c7cd8d93feef5f12da64b124af22f46d
…ok#41621)

Summary:
Pull Request resolved: facebook#41621

Currently, if you have a dependency that is alphabetically smaller than `app`, it's evaluation will happen before `app`.
This means that the namespace auto-discovery and the JVM toolchain configuration won't be working and the project will fail to buid.

This fixes it by introducing a root-project Gradle Plugin that takes care of enforcing the evaluation order on the `app` project.

Fixes facebook#41620

Changelog:
[Android] [Fixed] - Fix projects being broken on dependencies starting with `a..`

Reviewed By: huntie

Differential Revision: D51547294

fbshipit-source-id: 65df7149548b7087dd8928e556fb803b3baf7b79
#publish-packages-to-npm
In pnpm setups, codegen will fail during build because it cannot find
its dependencies. Some of the dependencies it relies on at runtime are
currently declared under `devDependencies`. This change moves them to
`dependencies`.
…ps (facebook#41399)

Summary:
`build_codegen!` currently assumes that `react-native/codegen` gets installed next to `react-native`. In a pnpm setup, it's found under `/~/react-native/node_modules/react-native/codegen` instead.

However, as dmytrorykun pointed out, we don't actually need to build it outside of this repository.

## Changelog:

[GENERAL] [FIXED] - `react-native/codegen` shouldn't be built unless it's in the repo — fixes `pod install` failures in pnpm setups

Pull Request resolved: facebook#41399

Test Plan: We have a patched version of `react-native` working in a pnpm setup here: microsoft/rnx-kit#2811

Reviewed By: dmytrorykun

Differential Revision: D51201643

Pulled By: cipolleschi

fbshipit-source-id: 53767ae08686a20f03b3b93abcbc7d5383083872
#publish-packages-to-npm
…book#41678)

Summary:
This is my proposed solution to facebook#41677.

Fixes facebook#41677.

## Changelog:

[ANDROID] [FIXED] - Fix android root view group removal during instance re-creation

Pull Request resolved: facebook#41678

Test Plan:
Both with fabric enabled and disabled (new architecture):

1. Clone repro repo: https://github.com/wschurman/rn-reload-repro
2. Build and run on android (I use android studio)
3. Click reload button, see timestamp doesn't change (indicating that the view is not removed)
4. Apply this PR as a patch.
5. Re-build and run.
6. Click reload button, see view is correctly disposed of and the new view is set.

Reviewed By: cortinico

Differential Revision: D51658524

Pulled By: javache

fbshipit-source-id: d9a026cde677ad1ec113230bc31bd9297bca8bfc
…tive][PR] fix: Text cut off issues when adjusting text size and font weight in system settings" for test or build failures

Summary:
This diff is reverting D49509633
D49509633: [react-native][PR] fix: Text cut off issues when adjusting text size and font weight in system settings by ryancat has been identified to be causing the following test or build failures:

Tests affected:
- [xplat/endtoend/jest-e2e/apps/facebook_xplat/ReactNativeTTRCTester/__tests__/ReactNativeTTRCTester-errorReportedManually-android-e2e.js](https://www.internalfb.com/intern/test/281475019301157/)

Here's the Multisect link:
https://www.internalfb.com/multisect/3131615
Here are the tasks that are relevant to this breakage:

We're generating a revert to back out the changes in this diff, please note the backout may land if someone accepts it.

If you believe this diff has been generated in error you may Commandeer and Abandon it.

Reviewed By: NickGerleman

Differential Revision: D49645585

fbshipit-source-id: 414531e067cffa109d0663d6af185dcaf8fb9c4e
@Saadnajmi Saadnajmi requested a review from a team as a code owner December 7, 2023 00:20
@Saadnajmi Saadnajmi merged commit 184bc75 into microsoft:0.73-stable Dec 27, 2023
@Saadnajmi Saadnajmi deleted the merge-to-stable branch December 27, 2023 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.