Commit Graph
28751 Commits
Author SHA1 Message Date
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
Neil Dhar 9edbd78363 Return the true size for ArrayBuffers (#39084)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39084

The current behaviour of `jsi::ArrayBuffer::size` with Hermes is to
return the value of the `byteLength` property. While this is
superficially more consistent with the behaviour for `Array`, which
reads the length property, it is a problem in practice since the
`byteLength` property is easily overridden in JS, making it unsafe
to use when indexing into the backing storage.

While this is a behaviour change, it should be fine because:

1. This is already the behaviour with JSC (the newly added test also
runs against the JSC implementation) and also seems to be the behaviour
of Microsoft's [V8 implementation](https://github.com/microsoft/v8-jsi/blob/db1ca30d6e5d39ee3a88a9f81b258c3825735917/src/V8JsiRuntime.cpp#L1239C48-L1239C58).
2. The current behaviour is counterintuitive and likely to lead to
bugs.

Changelog: [Internal]

Reviewed By: tmikov

Differential Revision: D48226661

fbshipit-source-id: 043d60deeb9dc189705594415f4f262f7de1095a
2023-08-22 14:44:33 -07:00
Yupeng Li d4d323cbc2 Remove deprecated removeSubscription from the type of NativeEventEmitter (#39115)
Summary:
Removed deprecated function removeSubscription from the type of NativeEventEmitter, so that it lines up with its implementation. This is a fix for https://github.com/facebook/react-native/issues/39111 .

## 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
-->
[General] [Fixed] - Fix a type issue of NativeEventEmitter

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

Test Plan: Not applicable

Reviewed By: NickGerleman

Differential Revision: D48573676

Pulled By: lunaleaps

fbshipit-source-id: e70c951e230e0d236e0bf0a1ba02b450bdc98ac5
2023-08-22 13:54:39 -07:00
Riccardo Cipolleschi 4f7cdd5727 Make Glog defines modules (#39116)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39116

This changes updates the Glog pod to defines module.
This makes it easier to work with Glog using Swift and to work on React Native Modules

## Changelog:
[Internal] - Make Glog define modules

Reviewed By: dmytrorykun

Differential Revision: D48564026

fbshipit-source-id: 83bb45fa6387321d089528107517ffbf0874c70d
2023-08-22 13:00:18 -07:00
Alex Hunt 921cad6e59 Bump community-cli-plugin and dev-middleware, sync changes (#39074)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39074

Changelog: [Internal]

Publish new versions of `react-native/community-cli-plugin` and `react-native/dev-middleware` (which are now in a minimum viable state) for early integrators.

Also syncs final upstream changes from CLI:
- https://github.com/react-native-community/cli/pull/2035
- https://github.com/react-native-community/cli/pull/2052

#publish-packages-to-npm
bypass-github-export-checks

Reviewed By: motiz88

Differential Revision: D48465522

fbshipit-source-id: 987280996938af35b752b998969ea112a15deb57
2023-08-22 12:56:19 -07:00
Alex Hunt 13eda31d43 Simplify occupied port handling in start command (#39078)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39078

Simplifies and hardens behaviour for detecting other processes / dev server instances when running `react-native start`.

- New flow:
    - Exits with error message if port is taken by another process (*no longer suggests next port*).
    - Exits with info message if port is taken by another instance of this dev server (**unchanged**).
    - Continues if result unknown.
    - *(No longer logs dedicated message for another RN server running in a different project root.)*
- This now checks if the TCP port is in use before attempting an HTTP fetch.

Previous behaviour: [`handlePortUnavailable`](https://github.com/react-native-community/cli/blob/734222118707fff41c71463528e4e0c227b31cc6/packages/cli-tools/src/handlePortUnavailable.ts#L8). This decouples us from some lower-level `react-native-community/cli-tools` utils, which remain reused by the `android` and `ios` commands.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D48433285

fbshipit-source-id: 7056001d5fe2f90faf52143f2777c9e2bdf0646e
2023-08-22 12:56:19 -07:00
Alex Hunt 5276599c45 Refactor CLI command entry points (#39075)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39075

Small refactor: reorganise command entry points and types into a consistent pattern.

Changelog: [Internal]

Reviewed By: blakef

Differential Revision: D48433284

fbshipit-source-id: 30f5780c8965e5a8a70603aec531fedcc82eeb73
2023-08-22 12:56:19 -07:00
Alex Hunt a002fbbd6c Upgrade CLI, restore prev status check value (#39077)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39077

Follow-up to https://github.com/facebook/react-native/pull/38988.

- Upgrade to RN CLI `12.0.0-alpha.11`.
- Restore previous value check against `/status` response in test scripts (restored in above CLI alpha).

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D48432629

fbshipit-source-id: 175241ad75676281f4638e179873b2ce32f0ea3e
2023-08-22 12:56:19 -07:00
Moti Zilberman 8b62200605 Annotate debugger events with frontend User-Agent if available (#39110)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39110

TSIA.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D48560563

fbshipit-source-id: a268173e5e7b3e6e497ab79a8b362caa897afec6
2023-08-22 11:11:50 -07:00
Moti Zilberman cbbf169b06 Annotate debugger events with app ID, device name etc (#39108)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39108

TSIA

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D48484712

fbshipit-source-id: 3d875fdd098f2ef98b3bccb03f0053d0e5cc3be7
2023-08-22 11:11:50 -07:00
Moti Zilberman d10a8098b2 Log debugger command latency and status (#39107)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39107

Augments D48466760 to report debugger commands (request/response pairs) through `EventReporter`. With the appropriate backend integration, this can help validate the correctness/completeness of the CDP implementation (in the client, proxy and server) and measure the latency of debugger commands - more accurately, the time between the proxy receiving a command from the client and receiving the corresponding response from the server.

Most of the new logic here is in the `DeviceEventReporter` class, which is responsible for associating responses with requests. Requests are kept in a buffer with a 10s TTL which serves as a timeout in case of an unresponsive server.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D48480372

fbshipit-source-id: 55360a14bbea05ef8ad1622e0d54f18b47483809
2023-08-22 11:11:50 -07:00
Dmitry Rykun cd30bc3888 Fix PROJECT_ROOT for RNTester Xcode project (#39112)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39112

RNTester's `PROJECT_ROOT` should point to `packages/rn-tester` but for some reason it points to the `react-native` monorepo root.
Changelog: [iOS][Fixed] - RNTester's PROJECT_ROOT points to `packages/rn-tester`

Reviewed By: cipolleschi

Differential Revision: D48526552

fbshipit-source-id: 79047ddcbea96eb31f010a8f802aba8c6a2c403b
2023-08-22 09:09:35 -07:00
Samuel Susla 1708863711 Wire up enableDefaultAsyncBatchedPriority feature flag on iOS and Android
Summary:
changelog: [internal]

bypass-githubexport-checks

Reviewed By: NickGerleman

Differential Revision: D48522515

fbshipit-source-id: aaa184982094e006f4273468584d52b9b2cb5493
2023-08-22 09:00:56 -07:00
Michał Mąka 565e06f8d0 On setting the same state for ShadowNodeFamily, don't mark it as obsolete (#39095)
Summary:
During investigation of impact of PR https://github.com/facebook/react-native/pull/38706 on `reanimated` I found out that when:
- state reconciliation is turned on
- `progressState` in `ShadowTree::tryCommit` quite often returns a new pointer to updated shadow tree
- above happened due to `newState->getMostRecentStateIfObsolete()` returning precisely the same ptr as `newState` in `progressState`
- this is caused by calling `ShadowNodeFamily::setMostRecentState` with the same state as currently held and marking those states as obsolete

This PR adds additional check whether `ShadowNodeFamily::setMostRecentState` is called with the same `state` as currently set and skips setting obsolete flag if that happens.

## Changelog:

[INTERNAL][FIXED] Setting the same most recent state for ShadowNodeFamily, doesn't mark it as obsolete

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

Test Plan: None

Reviewed By: cipolleschi

Differential Revision: D48526395

Pulled By: sammy-SC

fbshipit-source-id: f77cea2364611a42a3363285b4732f33aae8a0a7
2023-08-22 08:50:47 -07:00
imalgrab 172e2d0c7e refactor: migrate MyLegacyViewManager to kotlin (#39014)
Summary:
Migrate MyLegacyViewManager to Kotlin (https://github.com/facebook/react-native/issues/38825)

## Changelog:

[INTERNAL] [CHANGED]  - Moved MyLegacyViewManager to Kotlin

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

Test Plan: Run `yarn && yarn android`

Reviewed By: rshest

Differential Revision: D48519780

Pulled By: cortinico

fbshipit-source-id: b43a2cfacad977c52b8552c464246b812de30855
2023-08-22 08:11:49 -07:00
Alex Hunt 3c943bbe3a Integrate dev-middleware into start command (#39059)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39059

## Context

RFC: Decoupling Flipper from React Native core: https://github.com/react-native-community/discussions-and-proposals/pull/641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: https://github.com/react-native-community/cli/pull/2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: 123039961f93bd8183a32a2d3f30c447f7c0f132
2023-08-22 08:08:15 -07:00
Jesse Watts-Russell 211f3145db Fixing nested horizontal scrollview scrolling on Android (#39097)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39097

Changelog:
[Internal][Added] - Created mechanism to have nested horizontal scrollviews (or flatlists/sectionlists) by prioritizing scrolling on deeper nested scrollviews which have the enableNestedScroll prop equal to true.

Reviewed By: NickGerleman

Differential Revision: D48504762

fbshipit-source-id: 1a6d01f68e142d99ea494e2b5630979c7be2ecce
2023-08-22 07:30:44 -07:00
Jesse Watts-Russell 08f0cda867 Allow incremental payloads from Native->JS (#39109)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39109

Changelog:
[Internal][Added] - Allowed metro to also receive incremental data payloads from the native side bit by bit, offloading memory to the JS side (which would have been used anyways when the final copy was done).

Reviewed By: motiz88

Differential Revision: D48449495

fbshipit-source-id: 8cb2b43c35cce28e4b82d3f0e993c0f6d5f9c008
2023-08-22 07:29:19 -07:00
fortmarek f4f6c58172 Add 0.71.13 changelog (#39102)
Summary:
Adds changelog for the 0.71.13 patch.

[Internal] [Changed] - Add 0.71.13 changelog

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

Reviewed By: cipolleschi

Differential Revision: D48557426

Pulled By: huntie

fbshipit-source-id: d3055ec9fdc5a40ce20aa98663a8046eec89d313
2023-08-22 07:20:40 -07:00
Samuel Susla 4d85e112a3 Delete use of folly::function (#39093)
Summary:
Changelog: [internal]

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

I was looking at Folly containers and found we were using folly::function. According to the compiler, we don't need it. It should fail during build time if its properties were needed.
Documentation for folly function: https://github.com/facebook/folly/blob/main/folly/docs/Function.md

Reviewed By: christophpurrer

Differential Revision: D48519164

fbshipit-source-id: 88002ca3a1302db2a397fc7f5e3cae354669a9ff
2023-08-22 06:35:14 -07:00
Intl Scheduler ccaae31a13 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907940357720
Sandcastle Job Instance ID: 4503600652998134
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D48560682

fbshipit-source-id: 4d7f7e7c311f720c220e2fa6aef0f50223336f71
2023-08-22 05:57:36 -07:00
Lulu Wu a6b0984893 Upgrade OSS target sdk version to 34 (#39103)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39103

Changelog:
[Android][Changed] - Upgrade target sdk version to 34

Reviewed By: cortinico

Differential Revision: D48555585

fbshipit-source-id: 05a89fecdea52d73d35ba3fed8df76fc6bf51fe6
2023-08-22 05:25:40 -07:00
Pieter De Baets c22cc8f2d3 Optimize arg conversion in SurfaceRegistryBinding (#39094)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39094

We can construct the outer jsi::Object directly instead of going through `valueFromDynamic` for the whole thing.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D48519751

fbshipit-source-id: d3efd60472103ce7c9d13646d0a9bf4164bf73e2
2023-08-22 04:47:57 -07:00
Nick Gerleman 4f8a8ce316 Fix inverted contentOffset in scroll events in RTL (#39031)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39031

`UIScrollView` `contentOffset` is flow-relative, so `x` is relative to the right edge of the screen. This coordinate space disagrees with layout events, `scrollTo` coordinates, and other platforms.

This applies the same logic we use for inverting `scrollTo` coordinates to invert `contentOffset` in scroll events, in both Paper and Fabric. We then remove the iOS specific workaround we have in VirtualizedList.

I did not test `contentInset` as part of this, whose structure has explicit edges like `left` and `right`.

Changelog:
[iOS][Fixed] - Fix inverted `contentOffset` in scroll events in RTL

Reviewed By: rozele

Differential Revision: D48379915

fbshipit-source-id: 8a9cbb01608e79ef3b179a76fbe3997a0cd23845
2023-08-21 18:03:43 -07:00
Ramanpreet Nara 145659241a Introduce SampleLegacyModule example in RNTester (#38539)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38539

We will use this example to:
- Showcase legacy module support in the TurboModule system in RNTester
- E2E test legacy module support in the TurboModule system

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D47529295

fbshipit-source-id: b98e315741bed7740c36997d706f48e375b0c815
2023-08-21 17:58:46 -07:00
yardenPhy a384e076e0 Fix no support Schemes names contain spaces (#39009)
Summary:
i just moved to the new react native 0.72.1 with the new Architecture and I encountered a problem when tried to archive my develop version(i have 2 Schemes one for prod and one for dev).

so i did some digging and got to the problem that was found in script file named "generate-artifacts-executor.js".

i found that after generating lib content into the temp directory(tmpOutputDir)
it copy all the content into the real output directory(iosOutputDir).

the problem was that the real output directory(iosOutputDir) containing the selected scheme name and mine was with backspace(AppTest Develop) so the cp -r command was failing.

in order to fix that i wrapped the real output directory(iosOutputDir) with double quotes.

Also updated the related test ("executeNodes with the right arguments") to include the double quotes.

## Changelog:

[GENERAL] [FIXED] - Add support to archive Schemes names with backspaces

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

Test Plan:
1. After updating the related test ("executeNodes with the right arguments") to include the double quotes i run all tests by
run yarn test and yarn flow and All tests passed.

2. Also after i changed locally the script file in my project from the node_modules
    i successfully Archived both my Schemes dev and prod (one with backspace and one without).

Reviewed By: cipolleschi

Differential Revision: D48414256

Pulled By: NickGerleman

fbshipit-source-id: 829440b33799251fe5ef1c0f83d0fdef7a1cc254
2023-08-21 17:47:03 -07:00