Commit Graph

38536 Commits

Author SHA1 Message Date
Phillip Pan c05591b25b add privacy manifest to react native boost
Summary:
Changelog: [Internal]

add this to the framework's resource bundle

from the audit there were callsites to mach_absolute_time and fstat variants in our forked copy of boost, so use 35F9.1 and C617.1 respectively.

current problem with this method is that the required reasons are not currently be aggregated during app store review, so those need to live in the app's. but go ahead and add it here for now, i think apple will try to fix it.

Reviewed By: cipolleschi

Differential Revision: D55625113

fbshipit-source-id: 0dcd216116595d1bb14e6b843f711aac68f84e5c
2024-04-22 16:15:53 -07:00
Phillip Pan 54c9748bb1 add privacy manifest to React-cxxreact
Summary:
Changelog: [Internal]

add this to the framework's resource bundle

reasons:
  - C617.1 (JSBigString)

current problem with this method is that the required reasons are not currently be aggregated during app store review, so those need to live in the app's. but go ahead and add it here for now, i think apple will try to fix it.

Reviewed By: sammy-SC

Differential Revision: D55624716

fbshipit-source-id: 400e9852a64e7f9fd9e32225b199f2664a069fc2
2024-04-22 16:15:53 -07:00
Phillip Pan 14c7794f1d add privacy manifest to React-Core
Summary:
Changelog: [Internal]

add this to the framework's resource bundle

reasons:
 - C617.1 (RCTJavaScriptLoader)
 - CA92.1 (RCTI18nUtil, RCTBundleURLProvider, RCTSettingsManager)

current problem with this method is that the required reasons are not currently be aggregated during app store review, so those need to live in the app's. but go ahead and add it here for now, i think apple will try to fix it.

Reviewed By: sammy-SC

Differential Revision: D55622471

fbshipit-source-id: f6ab864f51d4fa6e20f5de4fd56d8126d55dea8d
2024-04-22 16:15:53 -07:00
Riccardo Cipolleschi 224ac21568 Fix Symbol not found: (_JSGlobalContextSetInspectable) (#44185)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44185

This change will fix a symbol not found for JSC Runtime.

The `if` check was not a compile time check, therefore the symbol ended up in the binary even if it is not available.

Following this post on [Apple forum](https://forums.developer.apple.com/forums/thread/749534), this changes should do the trick.

## Changelog
[iOS][Fixed] - Fix Symbol not found: (_JSGlobalContextSetInspectable)

Reviewed By: hash3r

Differential Revision: D56425834

fbshipit-source-id: a37af51b078bd47a938e6b65d9d8e0f7506e746f
2024-04-22 13:59:16 -07:00
Nivaldo Bondança 876914be55 Update ktfmt component on FBS:master (#44184)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44184

Reviewed By: zertosh

Differential Revision: D56421174

fbshipit-source-id: 686e23775f53d67980c2e84a17d0a5c490dbec2a
2024-04-22 12:43:18 -07:00
Arushi Kesarwani 57663f7673 Refactor ReactHostImpl to simplify logging (#44170)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44170

Addressing following logging issues with ReactHostImpl
- replacing `ReactSoftExceptionLogger.logSoftException()` directly with private `raiseSoftException()` at all call-sites
- `raiseSoftException()` already has a call to `log()`, hence removing that.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D56335797

fbshipit-source-id: 41e094b5dc25f23fa19cd391a85ea101c3ff9058
2024-04-22 11:11:22 -07:00
Nizam 99f3c241ad fix array enum prop parsing for array enum types (#44123)
Summary:
codegen generates type alias for  array enum props with uint32_t which cause wrong overloaded fromRawValue to call at runtime eventually app to terminate
more detailed info at issue https://github.com/facebook/react-native/issues/43821

## Changelog:

[Internal] [Fixed] - Codegen for array enum props

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

Test Plan: TODO

Reviewed By: cipolleschi

Differential Revision: D56414554

Pulled By: dmytrorykun

fbshipit-source-id: 0ec1b65951bc16ff58dd2b119c97a4e3fac2b161
2024-04-22 10:55:36 -07:00
Alex Hunt c1f5504e3a Add changelog for 0.74.0
Summary: Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D56424487

fbshipit-source-id: 0be20582f38a4674afbd5113526612d1017500e2
2024-04-22 10:21:06 -07:00
Jan Kassens f453d7a254 Apply fixup patch to fbsource
Summary:
This is an automatically generated fixup patch to bring fbsource back into sync with
facebook/react-fbsource-import 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!

Changelog: [Internal]

<< DO NOT EDIT BELOW THIS LINE >>
diff-train-skip-merge
diff-train-source-id: 13710c68616cf643d3cdfd69e5f39b2dc5a801b4

Generated by: https://www.internalfb.com/intern/sandcastle/job/36028798276627863/

GitHub Repo: facebook/react-fbsource-import

Reviewed By: jackpope

Differential Revision: D56357596

fbshipit-source-id: 171ed7b816869348a1cc3c06a78b3803b86eb7c4
2024-04-22 09:27:24 -07:00
Moti Zilberman b1bb0bee41 Align debugger Chrome launch flags with Meta-internal version (#44180)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44180

Changelog: [General][Changed] Update Chrome launch flags for `--experimental-debugger` launch flow

Internally at Meta, we've been testing the experimental debugger launch flow with a different set of Chrome flags than are currently shipped in open source. This diff fixes those differences:

* Removes `--disable-backgrounding-occluded-windows`
* Adds `--guest`

Reviewed By: EdmondChuiHW

Differential Revision: D56418271

fbshipit-source-id: 884c5746e93cad89f17e4ef9e3ef193a2a454eb5
2024-04-22 08:37:32 -07:00
Moti Zilberman d7f28b3ff1 Update debugger-frontend from b6c974c...24b0c81 (#44181)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44181

Changelog: [Internal] - Update `react-native/debugger-frontend` from b6c974c...24b0c81

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

Reviewed By: EdmondChuiHW

Differential Revision: D56419657

fbshipit-source-id: 6b87ffdb190f743926138e16b194abafd8a9508d
2024-04-22 08:12:09 -07:00
Rob Hogan b0f6a05650 Fix @react-native/oss-library-example package.json#exports (#44179)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44179

Fix `package.json#exports` main entry point in `react-native/oss-library-example` (which is actually at `packages/react-native-test-library`), to fix a Metro resolver warning on building RN-tester.

`"./": "./index.js"` is intended as an export map entry for the main export, whereas `".": "./index.js"` is correct (see [`PACKAGE_EXPORTS_RESOLVE`](https://nodejs.org/api/esm.html) spec).

Changelog: [Internal]

(This package is not published)

Reviewed By: cortinico, dmytrorykun

Differential Revision: D56414480

fbshipit-source-id: 01874cf11ae687aaf5aa5aa56075232f03d691b8
2024-04-22 05:23:04 -07:00
Jakub Piasecki b236e154a1 Fix font scaling when numberOfLines is not set on Android on the new arch (#44165)
Summary:
This is a follow-up to https://github.com/facebook/react-native/pull/44075. I've missed the fact that `ReactConstants.UNSET` is `-1` and the default value of `numberOfLines` prop is `0`. This resulted in font size being set to the minimal value when `adjustFontSizeToFit` was used without setting `numberOfLines` to a positive value.

## Changelog:

[ANDROID] [FIXED] - Fixed `adjustFontSizeToFit` when used without `numberOfLines`

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

Test Plan:
<details>
<summary>Tested on the following code</summary>

```jsx
import { Text, SafeAreaView, View, StyleSheet } from 'react-native';

export default function Test() {
  return (
    <SafeAreaView style={styles.container}>
      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }}>
          Some text that fits (no adjust, unlimited height)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} adjustsFontSizeToFit>
          Some text that fits (adjust, unlimited height)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} numberOfLines={1}>
          Some text that fits (no adjust, 1 line)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} adjustsFontSizeToFit numberOfLines={1}>
          Some text that fits (adjust, 1 line)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }}>
          Some longer text that doesn't fit if displayed in one line (no adjust, unlimited height)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} adjustsFontSizeToFit>
          Some longer text that doesn't fit if displayed in one line (adjust, unlimited height)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} numberOfLines={1}>
          Some longer text that doesn't fit if displayed in one line (no adjust, 1 line)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} adjustsFontSizeToFit numberOfLines={1}>
        Some longer text that doesn't fit if displayed in one line (adjust, 1 line)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }}>
          Even longer text that doesn't even fit if it has as much as two entire lines for itself, what a darn shame (no adjust, unlimited height)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} adjustsFontSizeToFit>
          Even longer text that doesn't even fit if it has as much as two entire lines for itself, what a darn shame (adjust, unlimited height)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} numberOfLines={2}>
          Even longer text that doesn't even fit if it has as much as two entire lines for itself, what a darn shame (no adjust, 2 lines)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} numberOfLines={2} adjustsFontSizeToFit>
          Even longer text that doesn't even fit if it has as much as two entire lines for itself, what a darn shame (adjust, 2 lines)
        </Text>
      </View>
    </SafeAreaView>
  );
}
```

</details>

|Old arch|New arch (without this PR)|New arch (with this PR)|
|-|-|-|
|<img width="447" alt="a_old" src="https://github.com/facebook/react-native/assets/21055725/4822f7f1-a19c-4225-9318-0eb2fec6f925">|<img width="447" alt="a_new_no_change" src="https://github.com/facebook/react-native/assets/21055725/ff594673-b362-4a81-8837-624cb1061d28">|<img width="447" alt="a_new_changed" src="https://github.com/facebook/react-native/assets/21055725/1f29c01c-1c91-4c9f-9edd-0950338b5d39">|

Reviewed By: NickGerleman

Differential Revision: D56362020

Pulled By: cortinico

fbshipit-source-id: 2aecbe66043870cf14536850ecbfb7c3890acd72
2024-04-22 04:13:36 -07:00
Moti Zilberman 03a51da727 Populate function descriptions in RemoteObject
Summary:
bypass-github-export-checks

Changelog: [Internal]

[`Runtime.RemoteObject`](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Runtime#type-RemoteObject) 's `description` property is a string, but in
the case of functions, V8 populates it with the result of [toString][1]
and Chrome DevTools uses a [series of regexes][2] to extract structured
information about the function.

Here, we add similar behaviour to Hermes to enable the various Chrome
DevTools UI features that are powered by function descriptions, such as
showing function names on hover and in object previews.

[1]: https://source.chromium.org/chromium/chromium/src/+/main:v8/src/debug/debug-interface.cc;l=138-174;drc=42debe0b0e6bf90175dd0d121eb0e7dc11a6d29c
[2]: https://github.com/facebookexperimental/rn-chrome-devtools-frontend/blob/9a23d4c7c4c2d1a3d9e913af38d6965f474c4284/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts#L311-L391

Reviewed By: dannysu

Differential Revision: D56343190

fbshipit-source-id: a7ef5f09c98f34f486c4db2d4af192f10811d671
2024-04-19 15:00:16 -07:00
Arushi Kesarwani 73b4d67a78 Delete deprecated JSIModule methods (#42115)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42115

React Native Android had a concept called JSIModules, which iOS doesn't have. The JSIModule concept was introduced in the early stages of the Fabric project to represent modules that interact with JS through JSI and they are not NativeModules.

In the new architecture this concept is not really necessary and these interfaces were only used to initialize and destroy the Fabric renderer and TurboModule Manager in react native core. Bridgeless mode doesn’t use JSIModule anymore. Also, it has an explicit list of supported JSI module types, so is not open for extension.
In order to simplify RN concepts and reduce confusion with TurboModules, which also "use JSI", deleting everything related to JSIModule. This was already deprecated in 0.74.0.

Please use ReactInstanceEventListener to subscribe for react instance events instead of getJSIModule() and we recommend using TurboModules instead of JSIModules.

Changelog:
[General][Breaking] Delete JSIModule

Reviewed By: javache, cortinico

Differential Revision: D49597702

fbshipit-source-id: bc2bc190aafaf559336b341b50ffabf413474105
2024-04-19 11:54:36 -07:00
Arushi Kesarwani ac3261ff60 Add ReactSoftException in ReactHostImpl only when onActivityResult, onNewIntent and onWindowFocusChange do not have the context (#44155)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44155

Add ReactSoftException in ReactHostImpl only when `onActivityResult`, `onNewIntent`and `onWindowFocusChange` do not have the context

Changelog:
[Android][Fixed] ReactSoftExceptions in ReactHostImpl only when Context is null

Reviewed By: cortinico

Differential Revision: D56325407

fbshipit-source-id: a9f8fd5772fc05d39e72236fb8edfe5f8a9d6a43
2024-04-19 11:54:24 -07:00
Arushi Kesarwani efb073f46b NIT Changelog (#44156)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44156

Adding the correct account to changelog

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D56334873

fbshipit-source-id: 7e01f8ad7d19ba9708713d847f9ed1fcbecb4802
2024-04-19 11:37:37 -07:00
Samuel Susla cf75d032d0 disable event loop (#44169)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44169

## Changelog:
[General][Changed] Disable new event loop behavior when bridgeless (new architecture) is enabled.

# What is the problem
With event loop, specifically with `batchRenderingUpdatesInEventLoop`, prop change is not delivered to Android mounting layer if the prop change was initiated from state update inside of `useLayoutEffect`, `componentDidMount` or `componentDidUpdate`.  Note this has to be a prop change affecting mounting layer directly, not something consumed by Yoga, e.g. background colour or border colour.

This affects android only.

Minimal repro :
```
import React, {useLayoutEffect, useState} from 'react';
import {Button, SafeAreaView, View} from 'react-native';
function Foo() {
  const [bgColor, setBgColor] = React.useState('red');
  useLayoutEffect(() => {
    console.log('useLayoutEffect');
    setBgColor('blue');
  }, []);
  return (
    <View
      style={{
        backgroundColor: bgColor,
        width: '100%',
        height: '100%',
      }}
    />
  );
}
function RNTesterApp() {
  const [show, setShow] = useState(false);
  return (
    <SafeAreaView>
      <Button title="Toggle" onPress={() => setShow(!show)} />
      {show && <Foo />}
    </SafeAreaView>
  );
}
export default RNTesterApp;
```

# The underlaying problem
The problem is in batched rendering updates and how props are delivered to Android mounting layer.

Here is a step by step what happens in the repro above:
1. React issues asks Fabric to create new shadow node A with background colour **red**.
2. Fabric asks Android to allocate a view for shadow node A with background colour **red**.
3. React commits tree **T1** and calls layout effects. Meanwhile Fabric waits, without trying to mount the tree **T1**, to prevent painting state that is about to be updated and prevent flickering.
4. React clones node A, changing the background colour to **blue** and commits the new tree **T2**.
5. Fabric, will now go ahead and mount the latest tree **T2**. While creating mount instructions, it will drop prop updates because it believes prop updates where delivered already as part of step 2.

At first this might appear as a problem with view preallocation. But the underlaying trouble is that on Android, we currently have no way of knowing how to combine changesets from React into single folly::dynamic.

Reviewed By: javache, cortinico

Differential Revision: D56355863

fbshipit-source-id: f8616ee48e10fc10e129bb632c5d398842220d24
2024-04-19 11:02:54 -07:00
Jakub Piasecki ed7766cee9 Don't enlarge font when adjustFontSizeToFit is set on iOS on the new architecture (#44163)
Summary:
On the old architecture `adjustFontSizeToFit` only shrinks the font size when there's too little space, while on the new arch it's also enlarged when there's too much space so that it always takes the entire width. This PR changes this behavior so that it only shrinks the text.

Fixes https://github.com/facebook/react-native/issues/42044

bypass-github-export-checks

## Changelog:

[IOS] [FIXED] - Fixed font size enlarging when `adjustFontSizeToFit` is set

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

Test Plan:
<details>
<summary>Tested on the following code</summary>

```jsx
import { Text, SafeAreaView, View, StyleSheet } from 'react-native';

export default function Test() {
  return (
    <SafeAreaView style={styles.container}>
      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }}>
          Some text that fits (no adjust, unlimited height)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} adjustsFontSizeToFit>
          Some text that fits (adjust, unlimited height)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} numberOfLines={1}>
          Some text that fits (no adjust, 1 line)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} adjustsFontSizeToFit numberOfLines={1}>
          Some text that fits (adjust, 1 line)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }}>
          Some longer text that doesn't fit if displayed in one line (no adjust, unlimited height)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} adjustsFontSizeToFit>
          Some longer text that doesn't fit if displayed in one line (adjust, unlimited height)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} numberOfLines={1}>
          Some longer text that doesn't fit if displayed in one line (no adjust, 1 line)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} adjustsFontSizeToFit numberOfLines={1}>
        Some longer text that doesn't fit if displayed in one line (adjust, 1 line)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }}>
          Even longer text that doesn't even fit if it has as much as two entire lines for itself, what a darn shame (no adjust, unlimited height)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} adjustsFontSizeToFit>
          Even longer text that doesn't even fit if it has as much as two entire lines for itself, what a darn shame (adjust, unlimited height)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} numberOfLines={2}>
          Even longer text that doesn't even fit if it has as much as two entire lines for itself, what a darn shame (no adjust, 2 lines)
        </Text>
      </View>

      <View style={{margin: 4, borderWidth: 1, borderColor: 'black'}}>
        <Text style={{ fontSize: 16 }} numberOfLines={2} adjustsFontSizeToFit>
          Even longer text that doesn't even fit if it has as much as two entire lines for itself, what a darn shame (adjust, 2 lines)
        </Text>
      </View>
    </SafeAreaView>
  );
}
```

</details>

|Old arch (without this PR)|Old arch (with this PR)|
|-|-|
|<img width="546" alt="old_no_change" src="https://github.com/facebook/react-native/assets/21055725/f9682c0c-9a23-46b3-984d-607f83811d9e">|<img width="546" alt="old_changed" src="https://github.com/facebook/react-native/assets/21055725/c07f88fb-8ca2-415e-95c9-27bf718fc510">|

|New arch (without this PR)|New arch (with this PR)|
|-|-|
|<img width="546" alt="new_no_change" src="https://github.com/facebook/react-native/assets/21055725/173ac140-a836-4a40-83ef-c5365972700f">|<img width="546" alt="new_changed" src="https://github.com/facebook/react-native/assets/21055725/b0b00e45-17d2-4756-8ae5-a21c4ec242d9">|

Reviewed By: cortinico

Differential Revision: D56356139

Pulled By: cipolleschi

fbshipit-source-id: d11a5f4b95fb7da28a24d9136d41349d39851d9e
2024-04-19 10:20:15 -07:00
Jakub Piasecki 8ecbb36492 Remove _textStorageForNSAttributesString which is unused (#44166)
Summary:
`_textStorageForNSAttributesString` seems to be unused and its implementation is exactly the same as `_textStorageAndLayoutManagerWithAttributesString`. This PR removes it.

## Changelog:

[IOS] [REMOVED] - Removed `_textStorageForNSAttributesString` which was unused

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

Test Plan: Built RN Tester on iOS.

Reviewed By: sammy-SC, cipolleschi

Differential Revision: D56355860

Pulled By: javache

fbshipit-source-id: d9672478c1c914a468b480d9e7cbcbb0eaf8371f
2024-04-19 09:18:48 -07:00
Riccardo Cipolleschi b7cd26d908 Split React-Fabric in React-Fabric and React-FabricComponents
Summary:
This change splits the React-Fabric podspec in two podspecs: React-Fabric and React-FabricComponents.

The reson is that we are codegenerating some of the core components and we want for the FabricComponents to depend on ReactCodegen.
Before this change, we had a circular dependency if we make ReactFabric depends on Codegen because ReactCodegen has to depend on ReactFabric.

Now, the dependency graph would be:
`React-FabricComponents --> ReactCodegen --> React-Fabric`
and no cycle is created

## Changelog
[internal] Split React-Fabric in React-Fabric and React-FabricComponents

Reviewed By: cortinico

Differential Revision: D56306355

fbshipit-source-id: 8b609d9c962913d5d730ac1c4e3614777b5953d9
2024-04-19 09:03:25 -07:00
Alan Lee a664d03ce8 rename PopupMenuAndroid.onPopupDismiss (#44109)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44109

(Following up from suggestion of prior diff)
For consistency with `OnSelectionChange` callback, rename `onPopupDismiss` to `onDismiss`.

Changelog:
[Android][Internal] - rename function

Reviewed By: RSNara

Differential Revision: D56168456

fbshipit-source-id: c4a32637951200736202f43294973d783ecf5ace
2024-04-19 08:34:40 -07:00
Rick Hanlon 57aa8b86ca Manual React Native sync for revisions 48b4ecc...b5e5ce8
Summary:
This sync includes the changes from:
- D56103750
- [TODO] A shim for SECRET_INTERNALS

This sync includes the following changes:
- **[b5e5ce8e0](https://github.com/facebook/react/commit/b5e5ce8e0 )**: Update ReactNativeTypes for root options (part 2) ([#28857](https://github.com/facebook/react/pull/28857)) //<Ricky>//
- **[da6ba53b1](https://github.com/facebook/react/commit/da6ba53b1 )**: [UMD] Remove umd builds ([#28735](https://github.com/facebook/react/pull/28735)) //<Josh Story>//
- **[0c245df1d](https://github.com/facebook/react/commit/0c245df1d )**: Complete the typo fix ([#28856](https://github.com/facebook/react/pull/28856)) //<Sebastian Silbermann>//
- **[f82051d7a](https://github.com/facebook/react/commit/f82051d7a )**: console test utils fix: match entire string, not just first letter ([#28855](https://github.com/facebook/react/pull/28855)) //<Andrew Clark>//
- **[4ca20fd36](https://github.com/facebook/react/commit/4ca20fd36 )**: Test top level fragment inside lazy semantics ([#28852](https://github.com/facebook/react/pull/28852)) //<Sebastian Markbåge>//
- **[c0cf7c696](https://github.com/facebook/react/commit/c0cf7c696 )**: Promote ASYNC_ITERATOR symbol to React Symbols ([#28851](https://github.com/facebook/react/pull/28851)) //<Sebastian Markbåge>//
- **[657428a9e](https://github.com/facebook/react/commit/657428a9e )**: Add ReactNativeTypes for root options ([#28850](https://github.com/facebook/react/pull/28850)) //<Ricky>//
- **[7909d8eab](https://github.com/facebook/react/commit/7909d8eab )**: [Flight] Encode ReadableStream and AsyncIterables ([#28847](https://github.com/facebook/react/pull/28847)) //<Sebastian Markbåge>//
- **[13eb61d05](https://github.com/facebook/react/commit/13eb61d05 )**: Move enableUseDeferredValueInitialArg to canary ([#28818](https://github.com/facebook/react/pull/28818)) //<Andrew Clark>//
- **[8afa144bd](https://github.com/facebook/react/commit/8afa144bd )**: Enable flag disableClientCache ([#28846](https://github.com/facebook/react/pull/28846)) //<Jan Kassens>//
- **[734956ace](https://github.com/facebook/react/commit/734956ace )**: Devtools: Add support for useFormStatus ([#28413](https://github.com/facebook/react/pull/28413)) //<Sebastian Silbermann>//
- **[17e920c00](https://github.com/facebook/react/commit/17e920c00 )**: [Flight Reply] Encode Typed Arrays and Blobs ([#28819](https://github.com/facebook/react/pull/28819)) //<Sebastian Markbåge>//
- **[0347fcd00](https://github.com/facebook/react/commit/0347fcd00 )**: Add on(Caught|Uncaught|Recoverable) opts to RN ([#28836](https://github.com/facebook/react/pull/28836)) //<Ricky>//
- **[c113503ad](https://github.com/facebook/react/commit/c113503ad )**: Flush direct streams in Bun ([#28837](https://github.com/facebook/react/pull/28837)) //<Kenta Iwasaki>//
- **[9defcd56b](https://github.com/facebook/react/commit/9defcd56b )**: Remove redundant props assign ([#28829](https://github.com/facebook/react/pull/28829)) //<Sebastian Silbermann>//
- **[ed4023603](https://github.com/facebook/react/commit/ed4023603 )**: Fix mistaken "react-server" condition ([#28835](https://github.com/facebook/react/pull/28835)) //<Sebastian Markbåge>//
- **[c8a035036](https://github.com/facebook/react/commit/c8a035036 )**: [Fizz] hoistables should never flush before the preamble ([#28802](https://github.com/facebook/react/pull/28802)) //<Josh Story>//
- **[4f5c812a3](https://github.com/facebook/react/commit/4f5c812a3 )**: DevTools: Rely on sourcemaps to compute hook name of built-in hooks in newer versions ([#28593](https://github.com/facebook/react/pull/28593)) //<Sebastian Silbermann>//
- **[435415962](https://github.com/facebook/react/commit/435415962 )**: Backwards compatibility for string refs on WWW ([#28826](https://github.com/facebook/react/pull/28826)) //<Jack Pope>//
- **[608edcc90](https://github.com/facebook/react/commit/608edcc90 )**: [tests] add `assertConsole<method>Dev` helpers ([#28732](https://github.com/facebook/react/pull/28732)) //<Ricky>//
- **[da69b6af9](https://github.com/facebook/react/commit/da69b6af9 )**: ReactDOM.requestFormReset  ([#28809](https://github.com/facebook/react/pull/28809)) //<Andrew Clark>//
- **[374b5d26c](https://github.com/facebook/react/commit/374b5d26c )**: Scaffolding for requestFormReset API ([#28808](https://github.com/facebook/react/pull/28808)) //<Andrew Clark>//
- **[41950d14a](https://github.com/facebook/react/commit/41950d14a )**: Automatically reset forms after action finishes ([#28804](https://github.com/facebook/react/pull/28804)) //<Andrew Clark>//
- **[dc6a7e01e](https://github.com/facebook/react/commit/dc6a7e01e )**: [Float] Don't preload images inside `<noscript>` ([#28815](https://github.com/facebook/react/pull/28815)) //<Josh Story>//
- **[3f947b1b4](https://github.com/facebook/react/commit/3f947b1b4 )**: [tests] Assert scheduler log empty in internalAct ([#28737](https://github.com/facebook/react/pull/28737)) //<Ricky>//
- **[bf09089f6](https://github.com/facebook/react/commit/bf09089f6 )**: Remove Scheduler.log from ReactSuspenseFuzz-test ([#28812](https://github.com/facebook/react/pull/28812)) //<Ricky>//
- **[84cb3b4cb](https://github.com/facebook/react/commit/84cb3b4cb )**: Hardcode disableIEWorkarounds for www ([#28811](https://github.com/facebook/react/pull/28811)) //<Ricky>//
- **[2243b40ab](https://github.com/facebook/react/commit/2243b40ab )**: [tests] assertLog before act in useEffectEvent ([#28763](https://github.com/facebook/react/pull/28763)) //<Ricky>//
- **[dfc64c6e3](https://github.com/facebook/react/commit/dfc64c6e3 )**: [tests] assertLog before act in ReactUse ([#28762](https://github.com/facebook/react/pull/28762)) //<Ricky>//
- **[42eff4bc7](https://github.com/facebook/react/commit/42eff4bc7 )**: [tests] Fix assertions not flushed before act ([#28745](https://github.com/facebook/react/pull/28745)) //<Ricky>//
- **[ed3c65caf](https://github.com/facebook/react/commit/ed3c65caf )**: Warn if outdated JSX transform is detected ([#28781](https://github.com/facebook/react/pull/28781)) //<Andrew Clark>//
- **[3f9e237a2](https://github.com/facebook/react/commit/3f9e237a2 )**: Fix: Suspend while recovering from hydration error ([#28800](https://github.com/facebook/react/pull/28800)) //<Andrew Clark>//
- **[7f5d25e23](https://github.com/facebook/react/commit/7f5d25e23 )**: Fix cloneElement using string ref w no owner ([#28797](https://github.com/facebook/react/pull/28797)) //<Joseph Savona>//
- **[bf40b0244](https://github.com/facebook/react/commit/bf40b0244 )**: [Fizz] Stop publishing external-runtime to stable channel ([#28796](https://github.com/facebook/react/pull/28796)) //<Josh Story>//
- **[7f93cb41c](https://github.com/facebook/react/commit/7f93cb41c )**: [DOM] Infer react-server entries bundles if not explicitly configured ([#28795](https://github.com/facebook/react/pull/28795)) //<Josh Story>//
- **[f61316535](https://github.com/facebook/react/commit/f61316535 )**: Rename SECRET INTERNALS to `__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE` ([#28789](https://github.com/facebook/react/pull/28789)) //<Sebastian Markbåge>//
- **[9644d206e](https://github.com/facebook/react/commit/9644d206e )**: Soften useFormState warning ([#28788](https://github.com/facebook/react/pull/28788)) //<Ricky>//
- **[c771016e1](https://github.com/facebook/react/commit/c771016e1 )**: Rename The Secret Export of Server Internals ([#28786](https://github.com/facebook/react/pull/28786)) //<Sebastian Markbåge>//
- **[d50323eb8](https://github.com/facebook/react/commit/d50323eb8 )**: Flatten ReactSharedInternals ([#28783](https://github.com/facebook/react/pull/28783)) //<Sebastian Markbåge>//
- **[f62cf8c62](https://github.com/facebook/react/commit/f62cf8c62 )**: [Float] treat `props.async` in Float consistent with the rest of react-dom ([#26760](https://github.com/facebook/react/pull/26760)) //<Josh Story>//
- **[dfd3d5af8](https://github.com/facebook/react/commit/dfd3d5af8 )**: Add support for transition{run,start,cancel} events ([#27345](https://github.com/facebook/react/pull/27345)) //<Hugo Sales>//
- **[1f8327f83](https://github.com/facebook/react/commit/1f8327f83 )**: [Fiber] Use real event priority for hydration scheduling ([#28765](https://github.com/facebook/react/pull/28765)) //<Josh Story>//
- **[97c90ed88](https://github.com/facebook/react/commit/97c90ed88 )**: [DOM] Shrink ReactDOMCurrentDispatcher method names ([#28770](https://github.com/facebook/react/pull/28770)) //<Josh Story>//
- **[9007fdc8f](https://github.com/facebook/react/commit/9007fdc8f )**: [DOM] Shrink ReactDOMSharedInternals source representation ([#28771](https://github.com/facebook/react/pull/28771)) //<Josh Story>//
- **[14f50ad15](https://github.com/facebook/react/commit/14f50ad15 )**: [Flight] Allow lazily resolving outlined models ([#28780](https://github.com/facebook/react/pull/28780)) //<Sebastian Markbåge>//
- **[4c12339ce](https://github.com/facebook/react/commit/4c12339ce )**: [DOM] move `flushSync` out of the reconciler ([#28500](https://github.com/facebook/react/pull/28500)) //<Josh Story>//
- **[8e1462e8c](https://github.com/facebook/react/commit/8e1462e8c )**: [Fiber] Move updatePriority tracking to renderers ([#28751](https://github.com/facebook/react/pull/28751)) //<Josh Story>//
- **[0b3b8a6a3](https://github.com/facebook/react/commit/0b3b8a6a3 )**: jsx: Remove unnecessary hasOwnProperty check ([#28775](https://github.com/facebook/react/pull/28775)) //<Andrew Clark>//
- **[2acfb7b60](https://github.com/facebook/react/commit/2acfb7b60 )**: [Flight] Support FormData from Server to Client ([#28754](https://github.com/facebook/react/pull/28754)) //<Sebastian Markbåge>//
- **[d1547defe](https://github.com/facebook/react/commit/d1547defe )**: Fast JSX: Don't clone props object ([#28768](https://github.com/facebook/react/pull/28768)) //<Andrew Clark>//
- **[bfd8da807](https://github.com/facebook/react/commit/bfd8da807 )**: Make class prop resolution faster ([#28766](https://github.com/facebook/react/pull/28766)) //<Andrew Clark>//
- **[cbb6f2b54](https://github.com/facebook/react/commit/cbb6f2b54 )**: [Flight] Support Blobs from Server to Client ([#28755](https://github.com/facebook/react/pull/28755)) //<Sebastian Markbåge>//
- **[f33a6b69c](https://github.com/facebook/react/commit/f33a6b69c )**: Track Owner for Server Components in DEV ([#28753](https://github.com/facebook/react/pull/28753)) //<Sebastian Markbåge>//
- **[e3ebcd54b](https://github.com/facebook/react/commit/e3ebcd54b )**: Move string ref coercion to JSX runtime ([#28473](https://github.com/facebook/react/pull/28473)) //<Andrew Clark>//
- **[fd0da3eef](https://github.com/facebook/react/commit/fd0da3eef )**: Remove _owner field from JSX elements in prod if string refs are disabled ([#28739](https://github.com/facebook/react/pull/28739)) //<Sebastian Markbåge>//

Changelog:
[General][Changed] - React Native sync for revisions 48b4ecc...b5e5ce8

jest_e2e[run_all_tests]
bypass-github-export-checks

Reviewed By: kassens

Differential Revision: D56251607

fbshipit-source-id: e16db2fa101fc7ed1e009158c76388206beabd5f
2024-04-19 08:21:16 -07:00
zhongwuzw c0ea79d49b Fixes Android tests build error (#44160)
Summary:
Fixes build_android failure.

```
' file not found
  #include <react/renderer/mounting/stubs.h>
```

bypass-github-export-checks

## Changelog:

[INTERNAL] [FIXED] - Fixes Android tests build error

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

Test Plan: ci green.

Reviewed By: javache

Differential Revision: D56350360

Pulled By: cipolleschi

fbshipit-source-id: 03c0fe524b0725696cde16e693df2a612361e8e8
2024-04-19 07:07:00 -07:00
Kudo Chien 23709f7c61 Improve reusability for RCTRootViewFactory (#43528)
Summary:
RCTRootViewFactory is a great work for creating react binding view. we want to reuse the factory inside expo and would be good to have these improvements.
- exposing `reactHost` property so that we can update the RCTHost instance without recreate a factory.
- break bridgeless creation logic to a specific `createReactHost`, so that we can reuse the method for RCTHost creation

## Changelog:

[IOS][CHANGED] - Improve reusability for RCTRootViewFactory

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

Test Plan: this pr should not introduce any regression and getting all ci passed

Reviewed By: cortinico

Differential Revision: D56056103

Pulled By: cipolleschi

fbshipit-source-id: 9f312707b9013c36863945c9b99a697f949f10b5
2024-04-19 06:12:11 -07:00
Alan Hughes c9b3a3106b 0.72.13 Changelog (#44154)
Summary:
Changelog: [Internal]

## Changelog:

<!-- 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/44154

Reviewed By: cortinico

Differential Revision: D56335973

Pulled By: arushikesarwani94

fbshipit-source-id: b481b04e218f34b0760f21106e6b5b583cb7f760
2024-04-19 04:12:46 -07:00
Ruslan Lesiutin 9e9fbec475 Update debugger-frontend from 1467870...b6c974c (#44161)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44161

Changelog: [Internal] - Update `react-native/debugger-frontend` from 1467870...b6c974c

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

Reviewed By: robhogan

Differential Revision: D56347692

fbshipit-source-id: 5efd6b5339008238aebe50bb5ac060df59c6afd9
2024-04-19 02:40:51 -07:00
Jane Li 727c4040b8 Back out "Use ClassFinder inside ViewManagerPropertyUpdater" (#44152)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44152

We're seeing an increase of crashes on Twilight (https://www.internalfb.com/logview/twilight_android_crashes/d25ec89876821abdd07f98d08a729f7c?trace_tab=0&ds=%7B%22start%22%3A%22-2%20weeks%22%2C%22end%22%3A%22now%22%7D) related to setting fontWeight with Double instead of String.

Original commit changeset: a67195e98377

Original Phabricator Diff: D56191175

Changelog:
[Internal] [Changed] - Revert use ClassFinder inside ViewManagerPropertyUpdater

Reviewed By: cortinico

Differential Revision: D56311183

fbshipit-source-id: e3407ff4858f00f8dadb882221e64a2631105597
2024-04-18 18:02:55 -07:00
Nick Gerleman ed6abc4e83 Use modern Differentiator "sliceChildShadowNodeViewPairs" in tests (#44131)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44131

Stub tree creation is using an old differentiator path we aren't shipping today. This removes that path, so that we can unit test the new one

1. Remove `ForTesting`/`Legacy` functions
3. Update stub view tree code for API/behavior difference of new differentiator functions including unflattened views. Don't create view instructions for those, and use `mountIndex` instead of pair index
4. Remove `V2` suffix, since the old path is deleted
5. Move mounting stub test utils out of the production library

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D56227426

fbshipit-source-id: 0f525097cfb576e0228c9ca20a770fa41ddf1e0d
2024-04-18 17:37:12 -07:00
Alex Taylor (alta) 739a8dfcf4 Deploy 0.234.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D56280192

fbshipit-source-id: 68e0288bb214644d24f3d9f132c3ffff2a3d512a
2024-04-18 16:40:54 -07:00
Alan Lee c631e93341 Remove UIManager.{show|dismiss}PopupMenu (#44096)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44096

These Android only APIs have been deprecated and are being removed for 0.75 release.

Changelog:
[Android][Removed] - UIManager.showPopupMenu() and UIManager.dismissPopupMenu() have been removed

Reviewed By: RSNara

Differential Revision: D56041827

fbshipit-source-id: e2afebf55860f33d2c8d1887e865adb4dd555e6c
2024-04-18 13:52:21 -07:00
Moti Zilberman 4fbc1f2ef8 Include stack traces in console messages (#44150)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44150

Changelog: [Internal]

* Adds the `RuntimeTargetDelegate::captureStackTrace` method for capturing stack traces during JS execution. The returned stack traces are opaque to RN, but may be passed back into the `RuntimeTargetDelegate`, particularly through the `addConsoleMessage` method.
* Implements `captureStackTrace` for Hermes (based on D55757947).
* Integrates `captureStackTrace` into the `console` handler (`RuntimeTargetConsole`)

Reviewed By: hoxyq

Differential Revision: D55474512

fbshipit-source-id: 3547d756844fa24c24cd9bcdc507b33c6ab673a9
2024-04-18 12:44:06 -07:00
Arushi Kesarwani 2c9574eb29 NIT Changelog (#44153)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44153

Adding missing # in the changelog

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D56314996

fbshipit-source-id: 1160685a5d65c2dd49b33a3bfa14f91f5e95b8c4
2024-04-18 12:37:42 -07:00
Alfonso Curbelo 65ae73785b 0.73.7 Changelog (#44149)
Summary:
0.73.7 Changelog

## Changelog:

[INTERNAL] - 0.73.7 Changelog

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

Reviewed By: cipolleschi

Differential Revision: D56307297

Pulled By: cortinico

fbshipit-source-id: 0c57d5ce62bc029eb06060859d8d753fdf5f3de1
2024-04-18 10:51:43 -07:00
Moti Zilberman ddc9bd1ff3 Refactor ConsoleApiTest to use stored Matchers instead of an intermediate struct
Summary:
bypass-github-export-checks

Changelog: [Internal]

Rewrites all `ConsoleApiTest` test cases to use matchers instead of a homegrown solution for buffering `EXPECT_*` calls.

Reviewed By: robhogan

Differential Revision: D55485495

fbshipit-source-id: 1aa50bbbb5a3b02280ed4a0bee59682716b4fd7e
2024-04-18 08:00:37 -07:00
Intl Scheduler 0276500d19 translation auto-update for Apps/Wilde/scripts/intl-config.json on master
Summary:
Chronos Job Instance ID: 1125907948563891
Sandcastle Job Instance ID: 18014399763343604
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D56301324

fbshipit-source-id: 76491a8facd51ac155096a7b07ef29afc630e3c5
2024-04-18 05:25:32 -07:00
Nick Gerleman f21d9afe0b Fixup margin: auto and justification behavior for overflowed containers (#44069)
Summary:
X-link: https://github.com/facebook/yoga/pull/1646

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

Fixes https://github.com/facebook/yoga/issues/978

1. Don't allow auto margin spaces to become a negative length
2. Replicate fallback alignment behavior specified by box-alignment spec that we are using for align-content.

Reviewed By: joevilches

Differential Revision: D56091577

fbshipit-source-id: 3c02f81f969bb947cdc5c80b15faaa0b0d39c0c2
2024-04-17 21:50:55 -07:00
Jane Li b580a071ca Fix logic for mKeepActivity (#44139)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44139

I added logic to make useEffect() work w/ fragment-based nav, but I mixed up some logic. Fixed it here
Changelog: [Internal]

Differential Revision: D56264138

fbshipit-source-id: b551f0cb93cb4a0291733edbd341d3508b61e392
2024-04-17 20:17:47 -07:00
Intl Scheduler 72e262eb5b translation auto-update for i18n/oculus-mirage.config.json on master
Summary:
Chronos Job Instance ID: 1125907948552357
Sandcastle Job Instance ID: 9007200506994282
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D56284224

fbshipit-source-id: 9e91ccd825f78960dc0e09ff923867f544f7883d
2024-04-17 20:16:15 -07:00
Soe Lynn 41a14962fc Expose Gap Percentage to ReactNative (#44129)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44129

X-link: https://github.com/facebook/litho/pull/983

X-link: https://github.com/facebook/yoga/pull/1647

Expose the Gap Percent from Yoga to RN Layer

Changelog:
[Android][Breaking] Enable flex gap percentage value for RN.

Reviewed By: NickGerleman

Differential Revision: D56160597

fbshipit-source-id: 34c05d39a03cf013f279a2cf9eb9762772ee11de
2024-04-17 17:24:00 -07:00
Arushi Kesarwani daf3f8a30f JSI Module Breaking Change in Changelog (#44138)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44138

Adding the missing breaking change in 0.74.0-rc0 changelog for https://github.com/facebook/react-native/commit/65552055392a5996bf50548018953875dde4560b

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D56261881

fbshipit-source-id: 00f9f0a8707812eeb37e7d64e579e429388c3484
2024-04-17 14:14:52 -07:00
Ruslan Lesiutin fe9942a19d Update debugger-frontend from fa52bd7...1467870
Summary:
Changelog: [Internal] - Update `react-native/debugger-frontend` from fa52bd7...1467870

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

Reviewed By: EdmondChuiHW

Differential Revision: D56249192

fbshipit-source-id: 7c1de5780c86222d48b2f277aaebe21afbfa153d
2024-04-17 10:00:47 -07:00
Arushi Kesarwani 4595351310 Remove getJavaScriptContextHolder() from BridgelessReactContext (#44124)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44124

This API was introduced as part of Backwards Compat effort recently but now this backwards comptability is supported through BridgelessCatalystInstance. The major OSS usages are through Catalyst Instance and not through Bridgeless React Context which is why deleting this makes sense so that people do not start depending on this.

Changelog:
[Android][Removed] - Remove getJavaScriptContextHolder() from BridgelessReactContext since now it can be accessed through BridgelessCatalystInstance in Bridgeless mode

Reviewed By: RSNara

Differential Revision: D56205699

fbshipit-source-id: 175463e17c526359c2e04fec4b2104aea3949d5d
2024-04-17 09:53:35 -07:00
Arushi Kesarwani f7b9aafd10 Remove getRuntimeExecutor() from ReactContext (#44102)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44102

Remove `getRuntimeExecutor()` from ReactContext since now it can be accessed through BridgelessCatalystInstance.getRuntimeExecutor() directly

Changelog:
[Android][Removed] - Remove getRuntimeExecutor() from ReactContext since now it can be accessed through BridgelessCatalystInstance in Bridgeless mode

Reviewed By: RSNara

Differential Revision: D56151365

fbshipit-source-id: 42bb6a6a3d729339cfb83ffdd3f7cbec314b687a
2024-04-17 09:53:35 -07:00
Ruslan Lesiutin 1d1b40cbbe fix: always subscribe RDT listeners, even if frontend is already connected (#44133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44133

# Changelog: [Internal]

Previous implementation doesn't have support for one specific case, when RN runtime was initialized and frontend is ready to be connected, but then it gets disconnected and re-connected again for the same runtime.

The issues were:
- For Fusebox: backend and frontend are correctly re-connected if user had Chrome DevTools opened, frontend invalidated via reload, then Chrome DevTools closed and re-opened again
- For DebuggingOverlayRegistry: it didn't subscribe to events from new `react-devtools-agent`, which emits events such as `showNativeHighlight` or `drawTraceUpdates`

Reviewed By: motiz88

Differential Revision: D56239185

fbshipit-source-id: ffa886b396790cb46de1d86fb000ff907edc1437
2024-04-17 09:46:19 -07:00
Alex Hunt 38d5232cc9 Remove leftover fields from root package.json (#44076)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44076

Removes fields in the root `package.json` manifest left over from the monorepo migration. `react-native/monorepo` is not a package published to npm, but is a root project configuration for the monorepo. Therefore it **doesn't need**:

- npm metadata fields (or even a `name` or `version` — I'm leaving these included due to 1/ references in fbsource, 2/ some non-Yarn tooling may complain).
- Fields used by tooling that are present in packages/react-native: `jest-junit`, `types`.
- A `peerDependency` on `react` (again, present in packages/react-native/package.json).

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D56134668

fbshipit-source-id: bc3449eb4c122eb5d885fabda9af7d19bb71faff
2024-04-17 09:26:41 -07:00
Jakub Piasecki 747a96b7b3 Add implementation of adjustsFontSizeToFit on the new architecture on Android (#44075)
Summary:
`adjustsFontSizeToFit` prop is exposed on both platforms but is missing implementation on the new arch on Android. This Pr adds it.

Fixes https://github.com/facebook/react-native/issues/43104

## Changelog:

[ANDROID] [FIXED] - Fixed `adjustsFontSizeToFit`  not working on Android when using the new architecture

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

Test Plan:
Tested on the RN Tester app using the `AdjustingFontSize` test:

| Old architecture | New architecture |
|------------------|------------------|
| <video src="https://github.com/facebook/react-native/assets/21055725/9243317c-1917-4ddb-9b8a-e9e99638409d">           | <video src="https://github.com/facebook/react-native/assets/21055725/39a7a9f2-21e4-4ba7-9ceb-dfec4ca6f643">         |

Reviewed By: javache

Differential Revision: D56134348

Pulled By: cortinico

fbshipit-source-id: b8339e3bec08e307abb0c6e4bd3f5fe143303014
2024-04-17 08:57:41 -07:00
Andrew Datsenko 46366867f7 //xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/module/model:modelAndroid (#44134)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44134

Changelog: [Internal]

Reviewed By: strulovich

Differential Revision: D56138858

fbshipit-source-id: 5ea349b6c8565f825de273adbb192c6005a2a357
2024-04-17 08:50:34 -07:00
Moti Zilberman 3220825782 Don't autosize text in "Paused in debugger" overlay
Summary:
Changelog: [Internal]

bypass-github-export-checks

Reviewed By: EdmondChuiHW, huntie

Differential Revision: D56244413

fbshipit-source-id: 99218114a7cefb9a305f504d45550f10bd6f1586
2024-04-17 08:40:48 -07:00
zhongwuzw 297ae37367 Fix rn-tester Animated example label color in dark mode (#44127)
Summary:
Fix rn-tester Animated example label color in dark mode

## Changelog:

[INTERNAL] [FIXED] - Fix rn-tester Animated example label color in dark mode

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

Test Plan:
Animated examples render incorrectly in dark mode. So let's fix them. :)

![image](https://github.com/facebook/react-native/assets/5061845/ad882ee2-d156-4b24-8ddb-0ec27dc27cba)

Reviewed By: fabriziocucci

Differential Revision: D56234954

Pulled By: javache

fbshipit-source-id: 5fd8604077ced9aa3acd23a7dc9ebd8476a7330b
2024-04-17 08:21:38 -07:00