Commit Graph
34076 Commits
Author SHA1 Message Date
Arushi Kesarwani 62e1110af5 Bridgeless -> Runtime (#39099)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39099

Renaming `bridgeless` -> `runtime` in JNI & ReactCommon changes

changelog: [General][Changed] - Renaming bridgeless to runtime

Reviewed By: rshest

Differential Revision: D48492107

fbshipit-source-id: 0c2843848869b41623839c05d7ad4eb72c700dfb
2023-08-28 17:46:27 -07:00
Arushi Kesarwani 1547b81ec1 Bridgeless -> Runtime (#39062)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39062

Renaming `bridgeless` -> `runtime`

Package `com.facebook.react.bridgeless` -> `com.facebook.react.runtime`

changelog: [General][Changed] - Renaming bridgeless to runtime

Reviewed By: rshest

Differential Revision: D48440542

fbshipit-source-id: 5e310cfee13c7d34c7fac36d3eda94280880b1eb
2023-08-28 17:46:27 -07:00
Saad Najmi 046ae12a6d Move kRCTPlatformName to RCTConstants.h (#39141)
Summary:
This PR is another one made with the intent to reduce the number of diffs between React Native and React Native macOS.

In https://github.com/facebook/react-native/commit/f7219ec02d71d2f0f6c71af4d5c3d4850a898fd8#diff-d091f6636e07dc62dd7d892489355707c43923ac15056fd2eb59d9a297d576a6 , we introduced `kRCTPlatformName`, which had already been in React Native macOS for a while (since we ifdef to either "ios" or "macos" in a number of places). This change moves the string up to a common header (dropping the "k" prefix) so we can refactor other strings that currently have a hardcoded "platform=ios" inside them.

## Changelog:

[IOS] [CHANGED] - Add RCTPlatformName to RCTConstants.h

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

Test Plan: CI should pass

Reviewed By: NickGerleman

Differential Revision: D48656197

Pulled By: lunaleaps

fbshipit-source-id: b9ff08e2591d7553a1a452795f36d4405ddaa5b1
2023-08-28 17:04:29 -07:00
Carmen Krol 0c25f19d39 Include accessibilityValue prop values in accessibilityValue (#39184)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39184

Previously, when `props.accessibilityValue` was enabled and other props were enabled, like `props.accessibilityRole`, that are used in the accessibilityValue for iOS, the value from `props.accessibilityValue` wasn't announced.

This is a problem for cases like radio button, which also needs to announce the placement of the radio button within a group, e.g. "[label], radio button, checked, 1 out of 3".

This diff fixes this problem by including the value from `props.acessibilityValue` within the method that builds the `accessibiityValue` for VoiceOver.

Reviewed By: cipolleschi

Differential Revision: D48534155

fbshipit-source-id: 176ba76ff772741a5cdc7d2a56c6cdfb92674477
2023-08-28 14:05:14 -07:00
Intl Scheduler ef7ab56c34 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907940555081
Sandcastle Job Instance ID: 18014399541033695
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D48725051

fbshipit-source-id: 03437f8e49491372e3ee84a220d5f726aa19eb02
2023-08-27 12:31:56 -07:00
Intl Scheduler e5fe7b391c translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907940517829
Sandcastle Job Instance ID: 31525198421678702
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D48717880

fbshipit-source-id: 5200b8b0bc5311b776fc8ff6f6d17a8204efa5b7
2023-08-26 14:50:27 -07:00
Sam Zhou 246b5cf414 Remove CI check jobs on .flowconfig.android in react-native (#39158)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39158

.flowconfig.android is the same as .flowconfig now. The check is meaningless. This diff removes it and the flowconfig.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D48629137

fbshipit-source-id: bc1bee9426eed7bc41dc7a1efe75333e1191e066
2023-08-26 10:00:22 -07:00
Intl Scheduler 31bfed33be translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907940502274
Sandcastle Job Instance ID: 9007200283452584
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D48713231

fbshipit-source-id: eb5fbaeda1a4e8ea9bce81e7c490fabb9bd0a36e
2023-08-26 02:33:17 -07:00
JP 61861d21ff iOS: trigger didUpdateDimensions event when resizing without changing traits (#37649)
Summary:
- when using the `useWindowDimensions()` hook in a component, it's possible for the hook to report incorrect sizes and not update as frequently as it should
- this is most applicable to apps built for iPad and macOS
- closes https://github.com/facebook/react-native/issues/36118

### Existing Behavior - https://youtu.be/NcV6kEDg20E

- either when resizing a React Native app to a different [Size Class](https://developer.apple.com/design/human-interface-guidelines/layout#Device-size-classes) or changing the Appearance, we dispatch an `RCTUserInterfaceStyleDidChangeNotification` notification
- these are then handled in the `interfaceFrameDidChange` method of `RCTDeviceInfo`
  - this results in a `didUpdateDimensions` Device Event, which in turn updates the results of `useWindowDimensions()`
  - see [RCTDeviceInfo.mm#L217-L232](https://github.com/facebook/react-native/blob/v0.72.0-rc.4/packages/react-native/React/CoreModules/RCTDeviceInfo.mm#L217-L232)
  - and [Dimensions.js#L119-L124](https://github.com/facebook/react-native/blob/v0.72.0-rc.4/packages/react-native/Libraries/Utilities/Dimensions.js#L119-L124)

🐛 **However** 🐛
- if you are resizing without triggering a `UITraitCollection` change, the Dimensions reported by `useWindowDimensions()` can become stale, until you either:-
  - hit a certain width that is considered a different Size Class
  - change the Appearance
  - background then resume the app
  - make the app full-screen

### Changed Behavior - https://youtu.be/w9BevpZ2y08

- added a new `RCTRootViewFrameDidChangeNotification` notification
  - the thinking here is to avoid additional overhead by re-using the same `RCTUserInterfaceStyleDidChangeNotification`
  - maybe it's overkill?
- the new notifications are sent from an override of `setFrame` on `RCTRootView`
- the new notifications call the same `interfaceFrameDidChange` method of `RCTDeviceInfo`
- Dimensions are now reported correctly when resizing; even within the same Size Class

## 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
-->

[IOS] [FIXED] - Dimensions could be reported incorrectly when resizing iPad or macOS apps

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

Test Plan:
**Reproduction: https://github.com/jpdriver/Dimensions**

or to recreate it yourself:-

- Generate a new project
- Change App.tsx
```
import * as React from 'react';
import {View, Text, useWindowDimensions} from 'react-native';

export default function App() {
  const {width, height} = useWindowDimensions();

  return (
    <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
      <Text>Width: {width}</Text>
      <Text>Height: {height}</Text>
    </View>
  );
}
```
- Open the iOS project in Xcode and enable iPad support
- Enable the iPad app to be used in any orientation
- Run the app
- Enable Stage Manager
- Drag one of the corners to resize the app

Reviewed By: javache

Differential Revision: D46335537

Pulled By: NickGerleman

fbshipit-source-id: 1533f511cf3805fdc9629a2ee115cc00e204d82c
2023-08-25 17:27:53 -07:00
Ruslan Shestopalyuk 18c4cb1198 Provide more context when shadow tree ops (StubViewTree) consistency error reporting (#39144)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39144

## Changelog:
[Internal] -

This adds more information into internal shadow tree consistency check error reporting, as well as some minor code refactorings.

Note that the code is run only in debug, and normally you don't trigger such issues, unless you look into a new platform implementation (which I did).

Reviewed By: javache

Differential Revision: D48643602

fbshipit-source-id: a6475f2f577c7b461622472af1c6855072ae319e
2023-08-25 12:24:02 -07:00
Alex Hunt dab7738a88 Expose unstable_browserLauncher option
Summary:
Expose a `unstable_browserLauncher` option to `createDevMiddleware()`. This allows integrators to provide a custom implementation for opening URLs in a web browser, initially a `launchDebuggerAppWindow` method.

Customising the browser launcher implementation can be useful in cases where the dev server is running remotely and not on the developer's local machine.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D48647750

fbshipit-source-id: ebf34106ad27899024396b13b22ec4536aad05b9
2023-08-25 10:02:12 -07:00
Pieter De Baets 3c87455c12 Emit warning when props parsing encounters inconsistent duplicate keys (#39149)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39149

Props structs are allowed to references RawValue keys multiple times, however this didn't work correctly if the key was formed out of a different combination of prefix/name/suffix, as the duplicate key entry would've been removed from the `RawPropsKeyMap`. Log an error in such scenarios to help identify these types of problems.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D48641819

fbshipit-source-id: 8cf71366cbf8ae6bee418a6c9d030ebd38784d52
2023-08-25 05:13:39 -07:00
Riccardo Cipolleschi a05858680a Make the e2e tests not land blocking (#39129)
Summary:
Given that the e2e tests are quite flaky, we want to reduce the flakyness making them non land blocking.
The idea is to:
1. always have them green in CircleCI
2. store the test logs in CircleCI artifacts, so we can explore them if needed.
3. use danger to read the artifacts from CircleCI and post a message to inform the user whether the Test ends up successfully or not.

## Changelog:

[Internal] - Make e2e tests non land-blocking. Use Danger to report the status of the E2E jobs

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

Test Plan: CircleCI stays green, logs are uploaded as artifacts.

Reviewed By: rshest

Differential Revision: D48642955

Pulled By: cipolleschi

fbshipit-source-id: 185862f46c47d59f949743a9b893162b2bb3a651
2023-08-25 05:11:28 -07:00
Ergul Azizler a0a544ffd9 Revert D48588376: reduce visibility of getNativeModuleIterator
Differential Revision:
D48588376

Original commit changeset: 6cbff90a4c51

Original Phabricator Diff: D48588376

fbshipit-source-id: 79b481b9784709e20074cda2d16605369568fc84
2023-08-25 03:09:18 -07:00
Ergul Azizler e7168c4a2e Revert D48588377: EZ cleanup of TurboReactPackage
Differential Revision:
D48588377

Original commit changeset: 5645acad938a

Original Phabricator Diff: D48588377

fbshipit-source-id: e0da38e5b721d6bfc7fd6b4607c7712301330a8f
2023-08-25 03:09:18 -07:00
Ergul Azizler c46858ab46 Revert D48588375: Make TurboReactPackage.getModule no nullable
Differential Revision:
D48588375

Original commit changeset: e510f76ea027

Original Phabricator Diff: D48588375

fbshipit-source-id: 62c8b062c8316bb7a90fced6390eb20f8274ea88
2023-08-25 03:09:18 -07:00
Christoph Purrer e716459d66 Fix crash in CompositeTurboModuleManagerDelegate (#39155)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39155

[Changelog]: [Android][Fixed] Fix crash in CompositeTurboModuleManagerDelegate

CompositeTurboModuleManagerDelegate.cpp crashes as we pass in one or multiple
```
jni::alias_ref<TurboModuleManagerDelegate::javaobject> delegate
```
but don't retain a global reference to them. Fix use:
```
jni::make_global(delegate)
```

Differential Revision: D48670217

fbshipit-source-id: e805f28919918b2a867589dbb6e2a70d67dcd8c3
2023-08-24 21:33:09 -07:00
Joe Savona 5cfa125b97 Relax FlatList.onViewableItemsChanged validation (#39153)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39153

`FlatList`'s restriction on not changing the `onViewableItemsChanged` prop forces developers to violate the rules of React, risking bugs and blocking the rollout of other improvements such as React Forget.

This diff relaxes the validation specifically for the seemingly common case in which a developer passes just a onViewableItemsChanged prop instead of viewabilityConfigCallbackPairs. We use an anonymous closure to create a stable identity that will be passed down to the underlying VirtualizedList, where the closure calls the current `props.onViewableItemsChanged`. The intent of this diff is to alleviate the worst impacts of the current restriction with a correct if not ideal solution, giving us time to fix the API more holistically.

Feedback welcome!

## Changelog:
[Changed] - Allow passing different values to `FlatList.onViewableItemsChanged`

## Facebook

See https://fburl.com/workplace/9svfrytw for more context.

Reviewed By: NickGerleman

Differential Revision: D48656586

fbshipit-source-id: 5b0926deada25637786c4cf3b329607d9f515528
2023-08-24 17:22:50 -07:00
David Vacca 7eacf2770e Make TurboReactPackage.getModule no nullable (#39140)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39140

TurboReactPackage.getModule is nullable, although the internals of ReactNative requires this method to be non null (otherwise there will a NPEs)
I'm making TurboReactPackage.getModule no nullable, this is important to simplify API and future migration to kotlin

changelog: [internal] internal/

Reviewed By: cortinico

Differential Revision: D48588375

fbshipit-source-id: e510f76ea0271ff33ab2ebe6c76382c4781e1787
2023-08-24 16:52:01 -07:00
David Vacca 42a7777f2a EZ cleanup of TurboReactPackage (#39139)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39139

EZ cleanup of TurboReactPackage

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D48588377

fbshipit-source-id: 5645acad938a4ebf84b81818dd0a915cc86a2682
2023-08-24 16:52:01 -07:00
David Vacca 40c13951ea reduce visibility of getNativeModuleIterator (#39137)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39137

getNativeModuleIterator is not required to be public, reducing visibillity to package only

changelog: [internal] intenral

Reviewed By: philIip, rshest

Differential Revision: D48588376

fbshipit-source-id: 6cbff90a4c51d2af4b0693b84c1a674ea24b94d1
2023-08-24 16:52:01 -07:00
Ruslan Shestopalyuk 8955bfb87c Export DeviceInfoConstants type from the native module's specs (#39135)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39135

## Changelog:
[Internal] -

Expose constants type from DeviceInfo native module - this makes codegen generate the corresponding data structure, making the native module implementation shorter (in C++ in particular).

Reviewed By: christophpurrer

Differential Revision: D48620784

fbshipit-source-id: 40ae83ebec92e0a470c20ef1ad16f8392e2bf8b0
2023-08-24 14:38:26 -07:00
Andrew Wang 10a076f6e2 Ship the fix for local reference overflow in Yoga (#39132)
Summary:
X-link: https://github.com/facebook/litho/pull/954

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

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

# Context

Reviewed By: NickGerleman, astreet

Differential Revision: D48607502

fbshipit-source-id: 79552bc76879d1fc15341423ae6fbadeab2fb7af
2023-08-24 12:48:56 -07:00
Arushi Kesarwani d5b656c0e7 Kotlinfy ReactNativeConfig (#39142)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39142

X-link: https://github.com/facebookresearch/playtorch/pull/227

`ReactNativeConfig.java` -> `ReactNativeConfig.kt`

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D48585508

fbshipit-source-id: 46035062662eeebddf546814dbcef239e769e17f
2023-08-24 12:02:27 -07:00
Dmitry Rykun 380bff93ce Fix typo in hermes-engine.podspec (#39151)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39151

Changelog: [Internal]
This typo in the condition prevented correspeponding code block form executing ever.

Reviewed By: cipolleschi

Differential Revision: D48648118

fbshipit-source-id: f78291b79182b0f0a6183528dce02e091c2194ae
2023-08-24 11:01:48 -07:00
Alex Hunt 4cb9706331 Add Microsoft Edge support for opening debugger (#39146)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39146

Adds Microsoft Edge fallback for the `/open-debugger` endpoint when no Chrome installation is found.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D48563386

fbshipit-source-id: 74baba7c03a062bd769b2f9ac0cc35bac0b2ae65
2023-08-24 10:57:39 -07:00
Sam Zhou 4b97484650 Rollout support for multiplatform react-native project (#39131)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39131

Docs on the new behavior: https://flow.org/en/docs/react/multiplatform

Changelog: [Internal]

Reviewed By: samwgoldman

Differential Revision: D48085422

fbshipit-source-id: daaa5a7d7d04871ab3da1ad47c6b88ef4226bdfd
2023-08-24 09:54:15 -07:00
Ruslan Shestopalyuk 3c6bf7bf32 Suport type aliases for TM getConstants() return type (#39136)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39136

## Changelog:
[Internal] -

`getConstants()` method  for TM was enforced to only use object literals for the return type specs.

This limits flexibility, in particular those data structures can't be consequently exported and picked up by codegen (not even mentioning the potential need for copypasting those obejct literals around).

This relaxes this restriction.

Note that I've been digging into the development history in order to find out whether there was any particular historical reason for such a limitation, but couldn't find any, so I assume it was rather incidental.

Reviewed By: christophpurrer

Differential Revision: D48620652

fbshipit-source-id: 92d6ba531fc99fb9b25b4957ae123e7832f44ee4
2023-08-24 06:54:03 -07:00
Riccardo Cipolleschi 2692f206a6 Use runtime scheduler in the old architecture (#39057)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39057

## Changelog:
[iOS][Changed] - Use the runtime scheduler in the old Architecture

## Facebook

Reviewed By: sammy-SC

Differential Revision: D48430129

fbshipit-source-id: ed1a1d27da531ba01b46afdd9d33213aea6bdeee
2023-08-24 05:32:04 -07:00
Riccardo Cipolleschi c0f2618443 Add RuntimeScheduler dependency properly (#39058)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39058

## Changelog:
[iOS][Changed] - Extract RuntimeScheduler as separate cocoapod dependency

## Facebook:

Reviewed By: sammy-SC

Differential Revision: D48429964

fbshipit-source-id: 179d957515d15487197163a664f6ae6ec493f908
2023-08-24 05:32:04 -07:00
Riccardo Cipolleschi 2de3f5369a Reduce header dependencies in RuntimeScheduler (#39056)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39056

## Changelog:
[Internal] - Reduce header dependencies in RuntimeScheduler

## Facebook:

Reviewed By: sammy-SC

Differential Revision: D48429842

fbshipit-source-id: 2466d7136a668d0a814c6d80dcec10e782452238
2023-08-24 05:32:04 -07:00
Riccardo Cipolleschi a973a192d7 Remove unused imports (#39055)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39055

## Changelog:
[Internal] - Remove unused imports

## Facebook:

Reviewed By: sammy-SC

Differential Revision: D48429794

fbshipit-source-id: 1473aeaad08f7a38908d0b43d52a644b31affdd1
2023-08-24 05:32:04 -07:00
Dmitry Rykun 45f7e117ad Consume Hermes from local source directory (#38967)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38967

Changelog: [IOS][Added] - Now it is possible to build Hermes form local source directory. Just set REACT_NATIVE_OVERRIDE_HERMES_DIR to the path to that directory.

Known shortcoming: changes made to the Hermes source will not be reflected in the RN project. You should manually delete `Pods/hermes-engine` and rerun `pod install`.

Reviewed By: cipolleschi

Differential Revision: D48121314

fbshipit-source-id: 0389662396921bdf120d390de36a586c52eb47f1
2023-08-24 04:54:14 -07:00
Dmitry Rykun 4b664fc6c2 Refactor hermes-utils.rb (#38963)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38963

This diff refactors `hermes-utils.rb` in the following way:
- Explicitly define all the scenarios how `hermes-engine.podspec` can consume its source.
- Try to be explicit and verbose about when those scenarios take place.
- Split `compute_hermes_source` into two functions:
    - `hermes_source_type` that determines the podspec source type.
    - `podspec_source` that builds the podspec source based on the source type provided.

Also `hermes-engine.podspec` now uses source type returned by `hermes_source_type` instead of derived values `:git` and `:http`, which were not descriptive and granular enough.
This refactoring should make adding new cases and altering existing ones easier. Conditions, precedence and how to act for each scenario is much more explicit.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D48161239

fbshipit-source-id: 3d3d24aa1e05458e1f877153e43ebc2b437352e9
2023-08-24 03:45:24 -07:00
Xin Chen 970ba05127 Add example with side effect in render got triggered directly (#38830)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38830

Changelog:
[Internal] - Add example with side effect in render got triggered directly

Reviewed By: rshest

Differential Revision: D48055836

fbshipit-source-id: 8bf596165741bde93cf44cd96b93fb2efaea1b13
2023-08-23 15:02:10 -07:00
Sam Zhou 06d472c05f Deploy 0.215.1 to xplat (#39133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39133

Changelog: [Internal]

Reviewed By: samwgoldman

Differential Revision: D48615176

fbshipit-source-id: 6fe1d27eff1fb29b63bf982cf8ed6eabc000f3a2
2023-08-23 14:10:27 -07:00
FabianSolheim 0b6e9bf0d8 Converted RNTesterReactHostDelegate.java to RNTesterReactHostDelegate.kt (#38978)
Summary:
This PR converts RNTesterReactHostDelegate into Kotlin as requested in https://github.com/facebook/react-native/issues/38825 .

## Changelog:

[INTERNAL] [CHANGED] - Convert to RNTesterReactHostDelegate.java => Kotlin

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

Test Plan:
Run yarn && yarn android
All tests should pass

Reviewed By: huntie, rshest

Differential Revision: D48598018

Pulled By: cortinico

fbshipit-source-id: f29eaa32c63835e090baf60bbde6c0c72b9041c2
2023-08-23 08:33:41 -07:00
Gijs Weterings e6899326e1 add missing import to find-and-publish-all-bumpted-packages.js after D46131120
Summary: After D46131120 circleci's find_and_publish_bumped_packages job is failing (https://app.circleci.com/pipelines/github/facebook/react-native/30521/workflows/5f896217-b3e2-4ac7-b1ef-ad2e3c30e31f/jobs/984287?invite=true#step-107-304_80). Looks like a missing import

Reviewed By: robhogan

Differential Revision: D48604214

fbshipit-source-id: 352f354a0743f121e4c4fe9fc606c3877e698f07
2023-08-23 08:27:53 -07:00
Alex Hunt 8a21f41782 Add contributing note to dev server packages (#39127)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39127

Will be referenced in https://github.com/react-native-community/cli/pull/2055.

Changelog: [Internal]

bypass-github-export-checks

Reviewed By: motiz88

Differential Revision: D48603224

fbshipit-source-id: 0b31d765f912cf8efe4300f7490ccef3ac843a41
2023-08-23 08:10:09 -07:00
Riccardo Cipolleschi 1be2ac3162 Try to disable test on HermesC for linux (#39123)
Summary:
Build hermesc for linu is failing on a test. Let's try to disable testing of Hermes in React Native CI as it is expensive and not RN responsibility.

## Changelog:

[Internal] - Disable Hermes C++ tests in React Native CI

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

Test Plan: CircleCI get back to green

Reviewed By: cortinico

Differential Revision: D48597809

Pulled By: cipolleschi

fbshipit-source-id: 5eed8dff47d5adaf0da683b19fb4dfca3a4bc219
2023-08-23 05:30:33 -07:00
Alex Hunt f9e936e280 Update devtoolsFrontendUrl value in target list (#39122)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39122

Updates the `devtoolsFrontendUrl` value returned in the `/json/list` endpoint, to match the fixed DevTools frontend revision we set for `/open-debugger` — which now uses this as the source of truth.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D48561005

fbshipit-source-id: 19409d013366f82782a071a0ec01d1ce8fab8c38
2023-08-23 04:17:12 -07:00
Phillip Pan 97efa25afa kill RCTRootViewIntegrationTests (#38871)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38871

Changelog: [Internal]

these tests are the last callsite where we are getting event emitter off of RCTRootView... these particular tests have been disabled and they're like 8 years old, sooooooo i think it's just easier for me to delete them

Reviewed By: cipolleschi

Differential Revision: D48179389

fbshipit-source-id: 9fe36323606f53c9b6fde8b4c20d51a2cb1f6c9c
2023-08-22 19:45:27 -07:00
Phillip Pan ab6349a0e4 delete unused selectors from hosting views (#39118)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39118

## Changelog:

[iOS][Breaking]- After [#38866](https://github.com/facebook/react-native/pull/38866) and [#38868](https://github.com/facebook/react-native/pull/38868), these are not needed anymore. instead of depending on the host view and overriding `createSurfaceWithBridge:` in a subclass create a specialized surface, we just rely on composition instead and provide a surface to the hosting view.

Reviewed By: christophpurrer

Differential Revision: D48577192

fbshipit-source-id: 8dbc96f1844d0ca1ed603cbe446575571c5f3e3b
2023-08-22 19:42:10 -07:00
Xin Chen 21e3e2f798 Add example to compare memoize expensive JS task (#38831)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38831

Changelog:
[Internal] - Add example to compare memoize expensive JS tasks

Reviewed By: NickGerleman

Differential Revision: D48048033

fbshipit-source-id: 6d60ea56a19a25ef2f136aba53ae417b441652ad
2023-08-22 17:21:23 -07:00
Xin Chen cd0ad935e4 Notify ReactMarker C++ from iOS when we log perf markers (#38326)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38326

This diff adds the iOS side of changes that the platform would notify `ReactMarker` in C++ for selected list of events. This helps us collect and send startup performance timing values via the `performance.reactNativeStartupTiming` API.

Changelog:
[iOS][Internal] - Notify ReactMarker in C++ from iOS platform for startup perf API

Reviewed By: rshest

Differential Revision: D43931719

fbshipit-source-id: 480ad8d53e541be6200cf8f7336f698a11d9600e
2023-08-22 16:53:00 -07:00
Sam Zhou e121fee5a2 Fix react-native name_mapper flowconfig (#39119)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39119

The current mapping will map `react-native/foo/bar` to `/path/to/project/root/packages/react-nativefoo/bar`, which is totally incorrect. How things still type check despite this bad config is a mystery, but at least now it's fixed

Changelog: [Internal]

Reviewed By: samwgoldman

Differential Revision: D48581370

fbshipit-source-id: b4bf8e76b255ffa5c44817ce587bdc8e68b62037
2023-08-22 16:00:39 -07:00
Dr. Sergey Pogodin a323249e0a A fix in Codegen for Windows build host (#36542)
Summary:
Android builds with new arch fail on Windows build host (https://github.com/facebook/react-native/issues/36475). This tiny correction fixes generation of `schema.json` (without it codegen failed to find any files, and generated empty schema). Unfortunately, does not fixes the issue with Windows host entirely, as builds still fail later (on ninja build step).

## Changelog:
[Android] [Fixed] - A bug fix for Android builds with new arch on Windows host.

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

Reviewed By: NickGerleman

Differential Revision: D48563587

Pulled By: cortinico

fbshipit-source-id: acd510308ce9768fb17d3a33c7927de3237748ac
2023-08-22 15:14:06 -07:00
Phillip Pan 57b86f7a87 delete hasBridge from root view api (#38870)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38870

## Changelog:

[iOS][Breaking] - hasBridge is removed from RCTRootView and RCTSurfaceHostingProxyRootView

i'm looking to limit callsites to the bridge in new architecture. in GH search i didn't see anyone using this method.

Reviewed By: cipolleschi

Differential Revision: D48175886

fbshipit-source-id: 367bfd549f658a64c5f9defac6eb66b92e681216
2023-08-22 14:59:52 -07:00
Vincent Riemer 269594ba92 Add basic active pointer tracking to the pointer event processor (#38865)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38865

Changelog: [Internal] - Add basic active pointer tracking to the pointer event processor

This diff lays the groundwork for keeping track of all the "active" pointers. The ActivePointer struct right now only contains a copy of the PointerEvent data but in future diffs this will be extended to include additional stateful metadata.

It's important to note that the code as written in this diff only "tracks" pointers when they are down and won't track pointers that are only hovering. I do want to include this in future diffs but I couldn't include that handling here as it requires changes to the iOS native pointer handling to stop deriving its own hover events which ends up snowballing even more changes. I will be making this change in (hopefully) the next diff where I refactor the hover event derivation to the fabric C++ layer.

Reviewed By: rozele

Differential Revision: D48167438

fbshipit-source-id: d1c7146e7b8d46b2f8defd4785618ee1cd54f155
2023-08-22 14:51:16 -07:00
Ruslan Shestopalyuk 6043960e11 Mitigate a corner case of ReactNativeFeatureFlags late initialization order (#39106)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39106

## Changelog:
[Internal] -

`ReactNativeFeatureFlags` are not guaranteed to be initialized before everything else, and one case popped up with this being a problem, in particular when creating `GlobalPerformanceLogger` instance (which may be created quite early on).

If the order of initialization of `ReactNativeFeatureFlags` and reading a value from there is flipped, then we'd just get a default value, without using any `MobileConfig` backing or anything.

This diff works this around for the particular case of `GlobalPerformanceLogger` initialization by making the corresponding flag tri-state (unititalized/true/false) and making sure that its value is only really taken into account after its initialized.

Reviewed By: ryancat

Differential Revision: D48559981

fbshipit-source-id: 7fa842d3b845866e15f89731c7e5c9036b83fb24
2023-08-22 14:47:14 -07:00