Commit Graph

38536 Commits

Author SHA1 Message Date
Nick Gerleman 74caed5d3f Remove YGNodeMarkDirtyAndPropagateToDescendants (#41305)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41305

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

This should not be part of Yoga's API. If benchmarks want to do this, they still can (though I don't know the ones we have for it are super valuable).

Reviewed By: javache

Differential Revision: D50963933

fbshipit-source-id: 6482bd269928188b6469a358ffde5c4f9f5f9527
2023-11-07 21:27:59 -08:00
Luna Wei 5f65f21668 Update changelog for 0.73.0-rc.4 (#41349)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41349

Reviewed By: fkgozali

Differential Revision: D51081295

Pulled By: lunaleaps

fbshipit-source-id: 02f9ecbeb922186cd7745772260380586f1a9561
2023-11-07 18:50:22 -08:00
Arushi Kesarwani 16fb64a9ef Adding FabricUIManager() getter & setter and setter for TurboModuleRegistry (#41302)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41302

Adding  `setTurboModuleRegistry(TurboModuleRegistry turboModuleRegistry)`, `setFabricUIManager(UIManager fabricUIManager)`, `getFabricUIManager()` new APIs

Changelog:
[General][Added] Introduce APIs for FabricUIManager

Reviewed By: philIip

Differential Revision: D50832557

fbshipit-source-id: 9a27a5683f312fb93f09bb4d97a615988269876e
2023-11-07 17:20:49 -08:00
Arushi Kesarwani 3e158217df Adding new APIs for creating UIManager in FabricUIManagerProviderImpl (#41301)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41301

Adding the new API for creating UIManager(`FabricUIManager`) for Fabric initialization:
```
createUIManager(ReactApplicationContext reactApplicationContext)
```

and `FabricUIManagerProviderImpl()` and making it also implement the `UIManagerProvider` interface

NOTE:

Letting the older implementations in place and will be removed once the references have been removed from the apps and similarly for old constructor `FabricUIManagerProviderImpl()` and similarly for old implement relationship with `JSIModuleProvider`

Changelog:
[Internal] internal

Reviewed By: javache, philIip, mdvacca

Differential Revision: D50783295

fbshipit-source-id: 767f27c7f0d42840a5dad693e98cf5b6a243f933
2023-11-07 14:58:06 -08:00
Arushi Kesarwani bc68794c67 Rename FabricJSIModuleProvider -> FabricUIManagerProviderImpl (#41296)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41296

As part of adding new implementation for `FabricUIManagerProviderImpl` APIs renaming the old class `FabricJSIModuleProvider` -> `FabricUIManagerProviderImpl` so as to add the new APIs later and preserve history.

Changelog:
[Internal] internal

Reviewed By: philIip

Differential Revision: D50949208

fbshipit-source-id: b833c4783b383c175fa682c558d31d8ecfa9f0ac
2023-11-07 12:38:20 -08:00
Eric Rozell 4023e45439 Eliminate static const UndefinedColor from SharedColor (#41364)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41364

Initializing UndefinedColor on iOS and Android is trivial because the platform color is an int32_t. On platforms where the HostPlatformColor header defines a color as a struct (e.g., Windows) it is less trivial to compose a constexpr for the undefined color representation to initialize this static const value with.

As it turns out, UndefinedColor is only used for operator bool in SharedColor, so it's reasonably safe to remove this "public" API (also good to limit the surface of SharedColor).

## Changelog:
[Internal]

Reviewed By: sammy-SC

Differential Revision: D51073395

fbshipit-source-id: 375e43aa9a30d394d35ce2946224563738d8973c
2023-11-07 11:54:44 -08:00
Moti Zilberman 0614479042 Silence console logs in individual tests to prevent spam (#41363)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41363

TSIA

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D51070939

fbshipit-source-id: 0d764b1e8a7594b7ee795a00349595d72e071cbf
2023-11-07 11:16:02 -08:00
Moti Zilberman 7f82e16c7d Reenable console.log in tests (#41330)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41330

D41564032 made `console.log` (as well as `debug` and `info`) a noop in tests within the React Native repo. Here we allow them through while still throwing errors on `console.error` and `console.warn`.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D51002264

fbshipit-source-id: 44ca8bef38695dd76fe509341adced887bef2e6b
2023-11-07 11:16:02 -08:00
Joe Vilches 9847bcab51 Fix issue where absolute children of row-reverse containers would inset on the wrong side (#41293)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41293

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

NickGerleman pointed out that my recent changes to fix the slew of row-reverse problems in Yoga actually ended up regressing some parts. Specifically, absolute children of row-reverse containers would have their insets set to the wrong side. So if you set left: 10 it would apply it to the right.

Turns out, in `layoutAbsoluteChild` there were cases where we were applying inlineStart/End values to the flexStart/End edge, which can never be right. So I changed the values to also be flexStart/End as the fix here.

Reviewed By: NickGerleman

Differential Revision: D50945475

fbshipit-source-id: 290de06dcc04e8e644a3a32c127af12fdabb2f75
2023-11-07 11:02:20 -08:00
Joe Vilches 3b13d3c7d0 Introduce isDefined() and remove cases of !isUndefined() (#41209)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41209

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

There are so many instances in this code base where we use the double negative of `!yoga::isUndefined(<something>)`. This is not as easy to read since because of this double negative imo. Additionally, sometimes we have really long chains like `!longVariableName.longFunctionName(longArgumentName).isUndefined()` and it is hard to see that this undefined is inverted.

This just replaces all instances of inverted `isUndefined()` with `isDefined()` so its easier to read.

Reviewed By: NickGerleman

Differential Revision: D50705523

fbshipit-source-id: edc7d3f2cbbae38ddaeb2030a419320caf73feff
2023-11-07 11:02:20 -08:00
Joe Vilches 1984bcc0c1 Simplify getting padding + border for cross axis in algorithm (#41208)
Summary:
X-link: https://github.com/facebook/yoga/pull/1437

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

Reading through the sizing logic and this seemed a bit redundant/confusing. Lets use the same function we just used for the main axis for the cross axis as well so people do not think its special. Also we will need one less variable. The reason this was done it seems is because we need the leading padding + border elsewhere so this is technically a few less steps but this is cleaner

Reviewed By: NickGerleman

Differential Revision: D50704177

fbshipit-source-id: 1a091edbfee6482a2bf472aca2980702bd75ad94
2023-11-07 11:02:20 -08:00
Moti Zilberman d2e8225887 Revert import order change in dangerfile.js (#41366)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41366

Changelog: [Internal]

D51025812 broke Danger runs in the React Native repo, so let's revert the changes to `dangerfile.js`.

Reviewed By: hoxyq

Differential Revision: D51075476

fbshipit-source-id: 66dc08e10a44e9a9a371af28d9a7440167470702
2023-11-07 09:41:35 -08:00
David Vacca 45dce98533 Fix rendering of RN Tester New Architecture examples in Android
Summary:
When bridgeless is enabled, RN Tester New Architecture examples crashed with a StackOverflow Exception
The root cause of this issue is that MyLegacyViewManager is sending an event to JS during the execution of MyLegacyViewManager.createViewInstance() method.

This is a problem because the delivery of events depend on the "id" of the view, but the "id" of the view is set after MyLegacyViewManager.createViewInstance() finishes executing.

The documentations "implicitly" mentions to not set props during the execution of the ViewManager.createViewInstance() method:

https://reactnative.dev/docs/native-components-android#2-implement-method-createviewinstance

To fix this issue I'm removing the execution of the method that triggers the event.

bypass-github-export-checks

changelog: [Android][Fix] Fix rendering of 'RN Tester New Architecture examples' when bridgeless is enabled

Reviewed By: fkgozali

Differential Revision: D51047007

fbshipit-source-id: 17be493f79114fa402029063e79fabc1d90efc17
2023-11-07 09:41:23 -08:00
kassens (Meta Employee) b561d46b06 rename unstable_Offscreen to unstable_Activity (#27640)
Summary:
`Activity` is the current candidate name. This PR starts the rename work
by renaming the exported unstable component name.

NOTE: downstream consumers need to rename the import when updating to
this commit.

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

Reviewed By: tyao1

Differential Revision: D50945046

Pulled By: kassens

fbshipit-source-id: be9b3254c7a98840b0769135770e9bf7858cf1a3
2023-11-07 07:10:58 -08:00
Alex Zelensky 016b62c549 Add missing ping() method into WebSocket interface (#41071)
Summary:
The `ping()` method seems missing in `WebSocket` interface. The implementation can be found in different places :

https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java#L323

https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/WebSocket/NativeWebSocketModule.js#L24

https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/WebSocket/WebSocket.js#L209

The change adds missing `ping()` method into `WebSocket` TypeScript interface.

## Changelog:

[GENERAL] [FIXED] - Add missing `ping()` method into `WebSocket` interface

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

Test Plan: Running `yarn test-typescript` and `yarn test-typescript-offline` works with no errors.

Reviewed By: NickGerleman

Differential Revision: D50975349

Pulled By: javache

fbshipit-source-id: fc3d62091f7a1543ac92faa1bd9a804c699f725d
2023-11-07 05:34:01 -08:00
Ruslan Shestopalyuk d11d5f3832 Expose EventEmitter::dispatchEvent APIs for all platforms (#41345)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41345

## Changelog:
[Internal] -

This API was already accessible on the Android platform, now other platforms (C++) would benefit from having it available as well.

Arguably, it's perfectly fine to have it as public class members - based on empiric experience with the use case we have had.

Reviewed By: christophpurrer

Differential Revision: D51031340

fbshipit-source-id: 0426deede5d9e5c552c92f8a25d30fe2274a1941
2023-11-06 17:15:07 -08:00
Moti Zilberman d6e0bc714a Enable lint/sort-imports everywhere (#41334)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41334

TSIA.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D51025812

fbshipit-source-id: e10d437be775a6b80946483aa96460f34927f870
2023-11-06 12:59:38 -08:00
Moti Zilberman fda7d69b38 Enable lint/sort-imports everywhere (#41333)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41333

Enables the `sort-imports` lint rule introduced in D39907799 in ~all files, rather than just in `react-native/Libraries`.

We exclude only `packages/react-native/template`, in order to (1) minimise noise for projects that are tracking updates to the template, (2) avoid the possibility of something breaking if the `react-native` import isn't at the top of `template/index.js`, (3) avoid leaking a reference to `lint/sort-imports` to the template (which doesn't ship with this rule) via an ESLint suppression comment.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D51025811

fbshipit-source-id: a62b0d6ebc5323116a4b2f1b69c4e8d48cde3215
2023-11-06 12:59:38 -08:00
George Zahariev 1e21e34695 Update hermes-parser and related packages in fbsource to 0.17.1 (#41328)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41328

Update hermes-parser and related packages in fbsource to 0.17.1

Changes are just bug fixes: https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D50999408

fbshipit-source-id: 0d8e01719fecff648fb0c3800296c335962d7fd9
2023-11-06 11:56:03 -08:00
Moti Zilberman 68930f78d1 Add rejectUnauthorized option to ws types (#41337)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41337

X-link: https://github.com/facebook/metro/pull/1133

Changelog: [Internal]

Adds a Flow definition that allows passing the [`rejectUnauthorized`](https://nodejs.org/api/tls.html#tlscreateserveroptions-secureconnectionlistener:~:text=(120%20seconds).-,rejectUnauthorized,-%3Cboolean%3E%20If) option to a WebSocket client. (See [example usage](https://github.com/websockets/ws/blob/a049674d936746c36fe928cc1baaaafd3029a83e/examples/ssl.js#L33) in the `ws` repo.)

Reviewed By: robhogan

Differential Revision: D51014312

fbshipit-source-id: 25794b1867ca5f15fab1592e8f80cdad8cdf897a
2023-11-06 11:01:25 -08:00
Moti Zilberman 1d6b0f1420 Use exact, read-only types for protocol data structures (#41315)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41315

TSIA

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D50980466

fbshipit-source-id: 1f289b868f5c735396fe07899c558e417a4ee2ff
2023-11-06 11:01:02 -08:00
Jon Thysell (JAUNTY) c90485eb10 Add detection of logical assignment operators to react-native-babel-preset (#39186)
Summary:
Though not currently in use in the RN code, when `react-native-windows` tried to integrate changes up to 7/28/23 (see PR https://github.com/microsoft/react-native-windows/pull/11970) there happened to be a `??=` operator in the `virtualized-lists` package (see [diff here](https://github.com/facebook/react-native/compare/ccc50ddd2...c168a4f88#diff-abeff2daf5909e54a23562e43569de1d5b8db1d7170119eed485b618cdf04ec7R322)). (The offending line was removed in a later commit).

The default RNW engine is still Chakra and it couldn't handle the syntax. It looks like the `babel/plugin-proposal-nullish-coalescing-operator` plugin only handles `??`, so to handle `??=` I've added `babel/plugin-proposal-logical-assignment-operators`, which also happens to handle the logical assignment operators `||=` and `&&=`.

Closes https://github.com/facebook/react-native/issues/31704

## Changelog:

[GENERAL] [FIXED] - Add detection of logical assignment operators to `react-native-babel-preset`

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

Test Plan: We started using these plugins in RNW's babel config to resolve the issue in our integrate PR.

Reviewed By: motiz88

Differential Revision: D50936554

Pulled By: rozele

fbshipit-source-id: 0a924b6085524d8c9551a158b91195b1f7448c19
2023-11-06 08:52:25 -08:00
Riccardo Cipolleschi d09c02f9e2 Backport e2e script changes to main (#41332)
Summary:
Last week, I modified the e2e script to make sure it was working properly with 0.73.
This change backport those changes in main

## Changelog:
[Internal] - Backport e2e script changes

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

Test Plan: Tested locally

Reviewed By: dmytrorykun

Differential Revision: D51025796

Pulled By: cipolleschi

fbshipit-source-id: 89ecd3701eaac4ba4bdde2c640df45a158329158
2023-11-06 06:05:07 -08:00
Oskar Kwaśniewski c637f06f57 fix: typo in build-ios-framework.sh (#41325)
Summary:
This PR fixes a small typo in `build-ios-framework.sh`

## Changelog:

[INTERNAL] [FIXED] - Typo in `build-ios-framework.sh`

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

Test Plan: Check if correct error message is printed out

Reviewed By: dmytrorykun

Differential Revision: D51022361

Pulled By: cipolleschi

fbshipit-source-id: 93c3e85eff8e410bcb18302dcb3ac76583d6e304
2023-11-06 02:57:13 -08:00
szymonrybczak d077239fff Upgrade CLI to v12.0.0 (#41249)
Summary:
Related https://github.com/react-native-community/cli/issues/2143

## Changelog:

[General] [Changed] - Upgrade CLI to v12.0.0

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

Test Plan: CI

Reviewed By: NickGerleman

Differential Revision: D50810438

Pulled By: lunaleaps

fbshipit-source-id: de96015557019446d268489c5ae534c255b3ddc8
2023-11-04 00:04:33 -07:00
Arushi Kesarwani 361556d649 NIT FabricUIManager (#41319)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41319

The comment in FabricUIManager about `invalidate()` being called from JS thread is not relevant.

Even in Bridgeless it's also called from Background Thread: https://www.internalfb.com/code/fbsource/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java?lines=1383

Similarly the tag rename was missed in the rename onCatalystInstanceDestroy -> invalidate.

Changelog:
[Internal] internal

Reviewed By: mdvacca

Differential Revision: D50996760

fbshipit-source-id: 4e4f089474d02b83c0c4667af61277b70f6e08ad
2023-11-03 23:21:10 -07:00
Jorge Luis Calleja Alvarado b36505bf06 fix: fixed types props tabIndex in view and userSelect in text (#41312)
Summary:
zfrankdesign reported that in RN 0.72.6, they receive warnings that some new props listed in the documents are missing:
View tabIndex https://reactnative.dev/docs/view#tabindex-android and Text userSelect https://reactnative.dev/docs/text#userselect. It seems the components accept these props but they were not typed.

## Changelog:

[GENERAL] [FIXED] - Missing typings for the props `tabIndex` for **View** and `userSelect` in the **Text** props were added.

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

Test Plan:
1. Instantiate a component of type View
   1.1. Should add the property tabIndex to the View component.
   1.2. Should not see a warning about the missing tabIndex property.

2. Instantiate a component of type Text
   2.1. Should add the property userSelect to the Text component.
   2.2. Should not see a warning about the missing userSelect property.

Reviewed By: NickGerleman

Differential Revision: D50982156

Pulled By: lunaleaps

fbshipit-source-id: 75b55cfb897738be0cf426912a7c10c7412d5032
2023-11-03 21:48:03 -07:00
ehsemloh 36ef6460f0 fixed (iOS) setState is not working properly for text inline image #41236 (#41287)
Summary:
Closes https://github.com/facebook/react-native/issues/41236

`setState` is not working properly for text inline image

## Fixed demo (please see the animation as in rendering pass rather than re-mounting pass)

https://github.com/facebook/react-native/assets/149237137/d4b894bf-2283-4963-8dc7-b8f5a9f81315

## How it works

**Background**

Inline views are not included in the Yoga node tree, rather, they are retained as attachments of `NSAttributedString` and are managed by the respective text fragment (`RCTTextShadowView`) that includes them (Code snippet 1).

```
<div layout="width: 393; height: 852; top: 0; left: 0;" style="" >
  <div layout="width: 393; height: 852; top: 0; left: 0;" style="flex: 1; " >
    <div layout="width: 393; height: 852; top: 0; left: 0;" style="flex: 1; " >
      <div layout="width: 393; height: 241; top: 0; left: 0;" style="padding-top: 59px; " >
        <div layout="width: 393; height: 50; top: 59; left: 0;" style="width: 100%; height: 50px; " >
          <div layout="width: 393; height: 17.3333; top: 0; left: 0;" style="" has-custom-measure="true"></div>
        </div>
        <div layout="width: 393; height: 50; top: 109; left: 0;" style="width: 100%; height: 50px; " >
          <div layout="width: 393; height: 17.3333; top: 0; left: 0;" style="" has-custom-measure="true"></div>
        </div>
        /* Text node that does not contain inline view that is supposed to be there */
        <div layout="width: 393; height: 74.3333; top: 167; left: 0;" style="margin-top: 8px; " has-custom-measure="true"></div>
      </div>
    </div>
  </div>
</div>
```
**Code snippet 1, output of  YGNodePrint() in _normal layout_ flow**

The layout of such node is handled ad-hoc (_inline layout_) inside `RCTTextShadowView` (Code snippet 2)

```
/* Inline node is calculated on its own */
<div layout="width: 48; height: 48; top: 0; left: 0;" style="overflow: hidden; width: 48px; height: 48px; min-width: 0px; min-height: 0px; " ></div>
```
**Code snippet 2, output of  YGNodePrint() in _inline layout_ flow**

**Problem description**

The issue happens when the sizes given by `setState()` are smaller than those in the last round `setState()`. Since the `min-width` and `min-height` are already populated (Code snippet 3) with greater values, the new layout pass gives rather a `noop`.

```
/* min sizes are greater than them in the new style */
<div layout="width: 48; height: 48; top: 0; left: 0;" style="overflow: hidden; width: 32px; height: 32px; min-width: 48px; min-height: 48px; " ></div>
```

**Code snippet 3, output of  YGNodePrint() in _inline layout (issue)_ flow**

**Fix description**

This biased `min-width` and `min-height` are given using the **current frame size** (i.e., sizes set in the last round `setState()`) in the _inline layout_ (in `RCTTextShadowView` § Background), whilst the same parameters are given as ~~CGSizeZero~~ `_minimumSize` in _normal layout_ (§ Background).

The change of this PR is to unify this behavior of _normal layout_ by using ~~CGSizeZero~~ `_minimumSize` as the input also for _inline layout_.

## Changelog:

[IOS] [FIXED] - `setState` is not working properly for text inline image

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

Test Plan:
- Using **rn-tester** for basic verification
- Complete plan: https://docs.google.com/spreadsheets/d/1QLuqNvqX0dM4K68ygRoHDR3S0wcK5umptmjoR7KtkaY/edit?usp=sharing

Reviewed By: cipolleschi

Differential Revision: D50967547

Pulled By: NickGerleman

fbshipit-source-id: b3b6d6919fd9d3302977dc771a41c22f7b796ba5
2023-11-03 17:49:05 -07:00
Sam Zhou 2a9caecf31 Deploy 0.220.1 to xplat (#41318)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41318

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D50992189

fbshipit-source-id: 0b3b9adfdef6cffbb9f3dacce3ced8b8dbbffc4e
2023-11-03 17:08:45 -07:00
Pieter De Baets 9b613855eb Remove CxxModuleWrapper.makeDSO (#41309)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41309

Changelog: [Internal][Removed] CxxModuleWrapper.makeDSO is not actively used and has been replaced by TurboModule infra.

Reviewed By: NickGerleman

Differential Revision: D50878589

fbshipit-source-id: 9fd11c1ee860ea65f1e985a132de3216ed042752
2023-11-03 12:13:20 -07:00
Samuel Susla 87c2453120 use c++20 likely and unlikely (#41149)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41149

changelog: [internal]

RN now builds with C++ 20 and we can move away from folly::Likely.

More about [[likely]] and [[unlikely]] https://en.cppreference.com/w/cpp/language/attributes/likely

Reviewed By: cipolleschi

Differential Revision: D50540008

fbshipit-source-id: 3a59e814a62f1ee33a6af69a0c88065f23f1ef2b
2023-11-03 08:27:36 -07:00
Rubén Norte aa5141c381 Remove Systrace annotation that is breaking logged data
Summary:
We're logging a systrace section that for some reason is breaking the data in application traces. That section isn't especially relevant so we can just remove it.

Changelog: [internal]

Reviewed By: sammy-SC

Differential Revision: D50939346

fbshipit-source-id: 350a528d83c6fe6e7100275644d3d02a96700e59
2023-11-03 08:10:58 -07:00
Oskar Kwaśniewski b955fc2a8d chore: update RNTester Cocoapods to 1.13 (#41248)
Summary:
This PR updates the internal version of cocoapods to 1.13, template already uses this version. I've also removed the root folder Gemfile as it's not necessary anymore.

## Changelog:

[INTERNAL] [CHANGED] - Update RNTester Cocoapods to 1.13

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

Test Plan:
Check if cocoapods installs correctly by running:

1. `bundle install`
2. `bundle exec pod install`

Reviewed By: dmytrorykun

Differential Revision: D50972135

Pulled By: cipolleschi

fbshipit-source-id: b7d6a4671e641b7b8f50242a3374f623e023daf4
2023-11-03 07:35:22 -07:00
Pieter De Baets 80d816a8ee Remove unused reportStackTraces option from FrameRateLogger
Summary:
This is not supported by any native implementation.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D50641812

fbshipit-source-id: e90a1998d2239b6f96c0c4db7b112f7e75cfc6dc
2023-11-03 04:38:20 -07:00
Ruslan Shestopalyuk b19386976c Adjust export semantics for WebPerformance symbols (#41300)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41300

## Changelog:
[Internal] -
Makes the corresponding module exports more uniform.

Reviewed By: rubennorte

Differential Revision: D50960468

fbshipit-source-id: 11ae849daeba2be38604bed4c678d37188ad1f78
2023-11-03 04:08:49 -07:00
Ruslan Shestopalyuk 53a2742e13 Remove web performance logging from GlobalPerformanceLogger (#41299)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41299

## Changelog:

It makes sense to keep Web Performance logging mechanism separate from the GlobalPerformanceLogger, removing.

Reviewed By: rubennorte

Differential Revision: D50930312

fbshipit-source-id: 3b76ff28eae8c5a2bf41faceb33cf188d8318610
2023-11-02 19:41:46 -07:00
Phillip Pan fcda37f6e9 remove warning to tell user to set requiresMainQueueSetup (#41294)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41294

Changelog: [Internal]

i believe this warning is outdated, i don't think having a custom initializer or exporting constants means that your module needs to be setup on main.

Reviewed By: cipolleschi

Differential Revision: D50919152

fbshipit-source-id: dc91af5fc88eca4f07a5f35adb888160b978cc38
2023-11-02 17:21:13 -07:00
Phillip Pan 1301da8e02 remove unnecessary requiresMainQueueSetup (#41295)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41295

Changelog: [Internal]

modules will be setup on main queue for any the following criteria:
- override requiresMainQueueSetup and set it to yes
- have a method that starts with `init`
- have `constantsToExport` implemented

these methods return `NO` but don't fulfill the latter criteria, so we should just delete them

Reviewed By: cipolleschi

Differential Revision: D50919151

fbshipit-source-id: 662bd067a1bae0f81acfabfc95b2a2af0c0a3180
2023-11-02 17:21:13 -07:00
Rick a2a219c27e eslint-config: add rule for config to work properly (#41272)
Summary:
add [no-global-assign](https://eslint.org/docs/latest/rules/no-global-assign#rule-details) to react-native/eslint-config package.

without this rule, redefine global variable there is no hint,
<img width="462" alt="截屏2023-11-01 14 20 40" src="https://github.com/facebook/react-native/assets/130942798/ff87633d-b1a1-4a8f-9f3f-e2e30f5b87ab">
with this rule enabled:
<img width="648" alt="截屏2023-11-01 14 27 09" src="https://github.com/facebook/react-native/assets/130942798/23ec322f-66e2-49a3-b6df-b3ba2549681b">

platform: vscode@latest, macos@14.0 (23A344)
## Changelog:

[General] [Fixed]  - eslint config global vars redefine there is no message tip

<!-- Help reviewers and the release process by writing your own changelog entry.
- add `no-global-assign` to eslint config to enable globals
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/41272

Test Plan: tested locally

Reviewed By: yungsters

Differential Revision: D50893943

Pulled By: cipolleschi

fbshipit-source-id: 2d418e1ca64722ebf48b52c2c0fe36fb392d7cb9
2023-11-02 16:23:56 -07:00
Ruslan Shestopalyuk 22c4099aef Feature flag removal: isGlobalWebPerformanceLoggerEnabled
Summary:
## Changelog:
[Internal] -

There is no need for this feature flag anymore, cleaning up.

Reviewed By: rubennorte

Differential Revision: D50925309

fbshipit-source-id: 39ff3d1f85c1df5ba2be287d4b7df2a4222acdba
2023-11-02 15:25:43 -07:00
David Vacca d5e1eb8a86 Expose JSEngineResolutionAlgorithm into ReactHost interface
Summary:
Expose JSEngineResolutionAlgorithm into ReactHost interface

This is another step to reduce visibility of ReactHostImpl class and rely only on ReactHost

changelog: [internal] internal

Reviewed By: philIip

Differential Revision: D50910031

fbshipit-source-id: da893ef0574c26bc90867f45b55d5b1e244885fc
2023-11-02 14:52:41 -07:00
George Zahariev 9c135eb928 Update scripts to support AsExpressions
Summary:
Update various scripts to support AsExpressions, found by looking for scripts currently handling `TypeCastExpression`

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D50822952

fbshipit-source-id: c88c04a507d94ddbc6458a68fd36509463e91953
2023-11-02 14:09:03 -07:00
Pieter De Baets 9240d5160d Merge JSException and JavaScriptException
Summary:
Consolidate JSException and JavaScriptException. `JSException` was only ever created by `JMessageQueueThread`.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D50641818

fbshipit-source-id: 46686468891fe1498e17f3b40b619e8c2324d7a9
2023-11-02 12:01:40 -07:00
Sunbreak 310a21d0fb fix: remove unused exclude in podspec (#41265)
Summary:
Remove unused `s.exclude_files` since `React-logger.podspec` doesn't include `SampleCxxModule.*`

## Changelog:

[INTERNAL] [FIXED] - remove unused exclude in podspec

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

Test Plan: None

Reviewed By: fkgozali

Differential Revision: D50930461

Pulled By: cipolleschi

fbshipit-source-id: ff6d4b3a9f2258de5c5f8f0448a269c9cc0548e1
2023-11-02 09:54:33 -07:00
Saúl Ibarra Corretgé 79eac9666d Fix running iOS timers when the proximity sensor is engaged (#41262)
Summary:
When the proximity sensor is engaged and it detects "close", the screen is disabled so timers stop working. Treat the close proximity status as if the app went into the background so CADisplayLink based timers are not used.

bypass-github-export-checks

## Changelog:

[iOS] [Fixed] - Fix running timers when the proximity sensor detects close

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

Reviewed By: dmytrorykun

Differential Revision: D50839017

Pulled By: cipolleschi

fbshipit-source-id: 3f7dc47d346eb88b687c8219fc905cf2a42262fe
2023-11-02 09:48:50 -07:00
zhongwuzw a257e9f5f0 Fixes Dev menu pop up multiple times when Tap command D continuously (#41234)
Summary:
Fixes Dev menu pop up multiple times when Tap command `D` continuously, demo like below:
https://github.com/facebook/react-native/assets/5061845/b4c2b38d-ece6-4d4e-a823-23eaa7cad001

## Changelog:

[IOS] [FIXED] - Fixes Dev menu pop up multiple times when Tap command `D` continuously

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

Test Plan: Press `D` continuously, the menu pop up and dismiss correctly.

Reviewed By: cipolleschi

Differential Revision: D50925959

Pulled By: blakef

fbshipit-source-id: 50fac9b4cea94c15a06ebc1b6092ebc9909cd9d2
2023-11-02 07:39:30 -07:00
Gabriel Donadel d6163d7f43 Update ios pod post_install logic for detecting if hermes is enabled (#41286)
Summary:
Follow up of https://github.com/facebook/react-native/pull/41284#issuecomment-1789516046

We should not rely on  checking if the `React-hermes` pod is present to determine if hermes is enabled

## Changelog:

[IOS] [CHANGED] - Update ios pod post_install logic for detecting if hermes is enabled

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

Test Plan: Run `use_react_native!(hermes => false)` should not add `USE_HERMES = true;` to `project.pbxproj`

Reviewed By: blakef

Differential Revision: D50899654

Pulled By: cipolleschi

fbshipit-source-id: a5ab5b0117c61014e77b780c50bf349da92c6342
2023-11-02 07:26:02 -07:00
Arushi Kesarwani f3474cc8a1 Changing interface of UIManagerProvider to be a functional interface for the return type of getUIManagerProvider()
Summary:
Changing interface of UIManagerProvider to be a [functional(SAM) interface](https://kotlinlang.org/docs/fun-interfaces.html) for the return type of getUIManagerProvider() to be used in various apps for clarity.

Changelog:
[Internal] internal

Reviewed By: javache

Differential Revision: D50846818

fbshipit-source-id: c22977b45b0118d70b994e14ff79ea8990248e3c
2023-11-01 18:32:42 -07:00
David Vacca cf305772c3 Refactor gating that tests removal of ReactModuleInfoProvider in TurboModule system
Summary:
Refactor gating that tests removal of ReactModuleInfoProvider in TurboModule system

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D50895575

fbshipit-source-id: c9050fcc22bcb2b23208a31a05b3367909094f33
2023-11-01 15:44:14 -07:00
Gabriel Donadel 0f8a83eb49 Fix ios pod post_install logic for detecting if fabric is enabled (#41284)
Summary:
There is a problem in the way that we check if Fabric is enabled inside `react_native_post_install`.

https://github.com/facebook/react-native/blob/899e7cdb55197fc17a96a93af4f8bcc7519553c2/packages/react-native/scripts/react_native_pods.rb#L239

We're determining if fabric is enabled by checking if the `React-Fabric pod `is present, but since we always call `setup_fabric!(:react_native_path => prefix)`  (https://github.com/facebook/react-native/pull/39057) inside `use_react_native` the `React-Fabric` pod is always present causing the `-DRN_FABRIC_ENABLED` flag to always be added to `project.pbxproj` even if the new arch is disabled.

## Changelog:

[IOS] [FIXED] - Fix ios pod post_install logic for detecting if fabric is enabled

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

Test Plan: Run `use_react_native!(fabric => false)` should not add the `-DRN_FABRIC_ENABLED` flag to `project.pbxproj`

Reviewed By: fkgozali

Differential Revision: D50896487

Pulled By: cipolleschi

fbshipit-source-id: 78154407ce52b09fd3a317b7dc64bd4bba56363e
2023-11-01 13:43:34 -07:00