Commit Graph
29759 Commits
Author SHA1 Message Date
Riccardo Cipolleschi 0056fc89ff Cleanup fabricEnabled callsites (#41556)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41556

Followup after [#41500](https://github.com/facebook/react-native/pull/41500) to cleanup some callsites that does not need the flag anymore.

## Changelog
[Internal] - Callsite cleanup

Reviewed By: dmytrorykun

Differential Revision: D51465124

fbshipit-source-id: 61c0ac047f6eeb528f9a8aafd6d3f339c0399be9
2023-11-20 06:41:25 -08:00
Oskar Kwaśniewski e2d708875c fix: typo in cli.js (#41523)
Summary:
This PR fixes a typo in `cli.js`.

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

[INTERNAL] [FIXED] - typo in react-native/cli.js

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

Test Plan: Not needed

Reviewed By: christophpurrer

Differential Revision: D51452866

Pulled By: arushikesarwani94

fbshipit-source-id: 61f1da70621bfe1a159ec63da0014141b182c5ac
2023-11-19 22:46:36 -08:00
Ramanpreet Nara 9fd1c6872f Integrate default tmm delegate with CxxReactPackage (#41464)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41464

Now, DefaultTurboModuleManagerDelegate can be created with a CxxReactPackage.

If it exists, DefaultTurobModuleManager will use the CxxReactPackage to create C++-only turbo modules.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D51166524

fbshipit-source-id: 2fdc404e79213d685c4f41b2a152b68226bb71b2
2023-11-19 18:46:12 -08:00
Ramanpreet Nara a2558d15ab Introduce CxxReactPackage
Summary:
CxxReactPackage is supposed to be the way apps register C++-only turbo modules with React Native.

Applications are meant to subclass this jni::HybridObject.

Since this is a jni::HybridObject, applications are meant to create this CxxReactPackage in java, and initialize it with java dependencies.

React Native will reach into its c++ part, and use it create C++-only turbo modules.

NOTE: This is a **temporary** abstraction meant to unblock the stable API effort of removing the turbomodulemanagerdelegate builder from ReactHostDelegate:

https://www.internalfb.com/code/fbsource/[e7efced3018f6178b7187a2358f3b76d40e2b43c]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostDelegate.kt?lines=50-51

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D51166523

fbshipit-source-id: 51a22411239fbba32f3a70cc363e59947c2782dc
2023-11-19 18:46:12 -08:00
Ramanpreet Nara 1394cf7da7 Make default classes load their own so's (#41467)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41467

Make the DefaultTurboModuleManagerDelegate and the DefaultComponentRegistry load their own so's when they're created.

**Motivation:** We are going to use these two classes in Meta apps. And Meta apps will not invoke DefaultNewArchitectureEntryPoint.load.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D51036133

fbshipit-source-id: 5ebd4d3b85f435229c9b5950493310aa7fa36ba0
2023-11-19 18:46:12 -08:00
Ramanpreet Nara 66051047e0 Make default tmm delegate provide eager initialized module names (#41544)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41544

## Change
Extend DefaultTurboModuleManagerDelegate's API so that it specify which modules should be eagerly initialized.

## Rationale
This information was originally stored on the module's ReactModuleInfo object.

But, we're running an experiment (i.e: lazy mode) that gets rid of the ReactModuleInfo object. See D51093697 for more details.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D51307434

fbshipit-source-id: 6d867436588de2f9b8dd084327e74bd51ed61a2d
2023-11-19 18:46:12 -08:00
Ramanpreet Nara 90b2c3fe43 Merge ReactModuleInfo removal logic into core (#41468)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41468

Currently ReactPackageTurboModuleManagerDelegate uses ReactModuleInfos to create turbo modules. We want to see if it's possible to remove ReactModuleInfo from React Native's public API.

Therefore, we are forking the implementation of each each method inside ReactPackageTurboModuleManagerDelegate:
- **lazy mode:** doesn't use ReactModuleInfo
- **control:** uses ReactModuleInfo

This optimization was previosuly implemented outside of ReactPackageTurboModuleManagerDelegate. But, to simplify things, we are just pulling it inside the ReactPackageTurboModuleManagerDelegate.

Changelog: [Internal]

Reviewed By: philIip, mdvacca

Differential Revision: D51093697

fbshipit-source-id: 6eb11020e0bf87eb704b35b990a0f14f157eea66
2023-11-19 18:46:12 -08:00
Phillip Pan 9b1f8a81e9 hook up RCTDeprecation to [RCTBridgeModule bridge] (#41415)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41415

Changelog: [iOS][Deprecated]

an example of RCT_DEPRECATION in action. you will get a build time warning if `RCT_DEPRECATED_DECLARATIONS` is enabled.

Reviewed By: cipolleschi

Differential Revision: D51184572

fbshipit-source-id: a0bcb4c69e63620bbdf2e2a7afb25c649fcaa100
2023-11-18 22:13:40 -08:00
Phillip Pan e7500df57a RCTDeprecation cocoapods integration (#41416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41416

Changelog: [Internal]

cocoapods boilerplate to integrate the first RCTFoundation library. decided to split this up so we can reference it easily in the future when adding new libs

Reviewed By: cipolleschi

Differential Revision: D51184321

fbshipit-source-id: 28696f0a8e43e0bcd24a37956823fb544ecd84be
2023-11-18 22:13:40 -08:00
Phillip Pan c06beaeed1 RCTDeprecation BUCK integration (#41417)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41417

Changelog: [Internal]

BUCK boilerplate to integrate the first RCTFoundation library. decided to split this up so we can reference it easily in the future when adding new libs

Reviewed By: cipolleschi

Differential Revision: D51101009

fbshipit-source-id: fe828b64c7fd939f8576a496478b6a401bfae69c
2023-11-18 22:13:40 -08:00
Phillip Pan e9ecc65652 introduce RCTFoundation (#41418)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41418

Changelog: [iOS][Added]

creating a top level directory for shared lightweight utility functions

open to suggs on naming and rules we want to enforce

Reviewed By: shwanton, christophpurrer

Differential Revision: D51170983

fbshipit-source-id: 8bc0a193b486f5a0653ad58d92a034cacede2d61
2023-11-18 22:13:40 -08:00
Phillip Pan 9af8f78d3b introduce ReactApple (#41419)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41419

Changelog: [iOS][something]

Creating a new top level directory for Apple platform specific code.

Reviewed By: christophpurrer

Differential Revision: D51170984

fbshipit-source-id: 1a453c9ae9142167afef5ac4a348c644fa6f1ab3
2023-11-18 22:13:40 -08:00
Ruslan Shestopalyuk 917fd25cbb Temporarily back out ImageLoaderModule type extraction (#41547)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41547

# Changelog:
[Internal]-

Pending figuring out why it might break backwards compatibility (which it shouldn't, in practice).

Reviewed By: GijsWeterings

Differential Revision: D51447646

fbshipit-source-id: c3a4511badc6c1346655f3a1a20050ad719b095b
2023-11-18 04:51:25 -08:00
Gijs Weterings 73411f4e08 Back out "Restore InspectorProxy tests - fix Windows by Babel-ignoring node_modules consistently"
Summary: Changelog: Internal

Reviewed By: gsathya

Differential Revision: D51447333

fbshipit-source-id: 56eb839671ca62269d59d48fd3c83df4f42a5111
2023-11-18 02:04:44 -08:00
Alexander Oprisnik 3bee205c62 Use visibility events for React image component (#41538)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41538

Changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D51368688

fbshipit-source-id: 8de0d8f81c7454444c484311a37e56d9a4c35c01
2023-11-17 18:16:48 -08:00
Alex Hunt 361a944348 Remove "Open Debugger" action under JSC (#41535)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41535

## Context

**Remote JS Debugging removal**

In React Native 0.73, we have deprecated Remote JS Debugging (execution of JavaScript in a separate V8 process) and also removed the Dev Menu launcher (https://github.com/facebook/react-native/pull/36754).

## This diff

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

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

Reviewed By: blakef

Differential Revision: D50555095

fbshipit-source-id: 1aeb48ab1390dc12ce300d6f321c30de5343cf0a
2023-11-17 15:42:59 -08:00
Ruslan Shestopalyuk f4d006a785 Optional prop for RNTesterApp to provide custom test lists (#41537)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41537

# Changelog:
[Internal] -

This allows to optionally provide a custom list of component/api test clauses into `RNTesterApp`.

Reviewed By: christophpurrer

Differential Revision: D51429407

fbshipit-source-id: 3ee35f13f6156fd055f6e0cbc788b7cf01c22b36
2023-11-17 13:10:39 -08:00
Rubén Norte ba43dd2513 Revert D51394187: delete ShadowNodeFamily::instanceHandle_
Differential Revision:
D51394187

Original commit changeset: 3add711a3954

Original Phabricator Diff: D51394187

fbshipit-source-id: 881fb82c949fef05f001fec57f62911a3a5dc482
2023-11-17 10:12:42 -08:00
Ruslan Shestopalyuk d9fa64ee3e Extract return types in NativeImageLoader specs (#41529)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41529

# Changelog:
[Internal]-

The change is equivalent in terms of API, however this makes it work nicer with C++ codegen and easier to use with a pure C++ implementation of the native module.

Reviewed By: christophpurrer

Differential Revision: D51426015

fbshipit-source-id: aae4d91bb93834e1a9c14a21417724a348de0bd7
2023-11-17 08:55:17 -08:00
Rob Hogan 59a2282b29 Restore InspectorProxy tests - fix Windows by Babel-ignoring node_modules consistently (#41526)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41526

CI failures in Windows JS tests recently (https://github.com/facebook/react-native/pull/41463) were caused by the triggering of Babel registration during tests, due to an import of `packages/dev-middleware` (index), breaking subsequent transformation of other tests.

## Root cause
Example of a problematic import:
https://github.com/facebook/react-native/blob/a5d8ea4579c630af1e4e0fe1d99ad9dc0915df86/packages/dev-middleware/src/__tests__/ServerUtils.js#L15

..which triggers a Babel registration:
https://github.com/facebook/react-native/blob/a5d8ea4579c630af1e4e0fe1d99ad9dc0915df86/packages/dev-middleware/src/index.js#L16-L18

That registration behaves differently on Windows due to the `ignore: [/\/node_modules\/\]`, which doesn't match against Windows path separators - Babel matches against system separators.

In particular, this changed whether `node_modules/flow-parser` was transformed when loading the RN Babel transformer. Transforming this file causes a `console.warn` from Babel due to its size:
> [BABEL] Note: The code generator has deoptimised the styling of /Users/robhogan/workspace/react-native/node_modules/flow-parser/flow_parser.js as it exceeds the max of 500KB.

This throws due to our setup:
https://github.com/facebook/react-native/blob/a5d8ea4579c630af1e4e0fe1d99ad9dc0915df86/packages/react-native/jest/local-setup.js#L27

This all manifests as the first test following a Babel registration (within the same Jest worker) that requires the RN Babel transformer throwing during script transformation.

## This change
This is the minimally disruptive change that makes Babel registration behaviour consistent between Windows and other platforms. The more durable solution here would be *not* to rely on any Babel registration for Jest, which has its own `ScriptTransformer` mechanism for running code from source. Given the fragile way our internal+OSS Babel set up hangs together that's a higher-risk change, so I'll follow up separately.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D51424802

fbshipit-source-id: 8b733c0c159ee84690aef04abced682d126c6d27
2023-11-17 08:53:14 -08:00
Rubén Norte 5e7be7e3ab Add experimental global callback for attached images (#41525)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41525

This creates an experimental mechanism to get notifications when image instances are created anywhere in the app.

This can be useful to set up things like image performance tracking automatically without having to use a custom component and manually access refs from image components.

Changelog: [internal]

Reviewed By: oprisnik

Differential Revision: D49962063

fbshipit-source-id: b991a808aaa723bea98c27812892cfa468f025a6
2023-11-17 08:23:11 -08:00
zhongwuzw 02bb50d9ce Fix assert cxx example crash the app when tap Run all tests (#41521)
Summary:
When I tap the `Run all tests` button in CxxModuleExample, App crashed because our `assert` examples directoly.
![image](https://github.com/facebook/react-native/assets/5061845/6d3fbbc1-9d41-419a-9074-898e839ee51a)
I moved the error report examples to individual section so `Run all tests` not crash.
![image](https://github.com/facebook/react-native/assets/5061845/4b781b40-0606-4d40-a752-1cd716073e33)

## Changelog:
[INTERNAL] [FIXED] - [RN-Tester] Fix assert cxx example crash the app when tap `Run all tests`

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

Test Plan: None.

Reviewed By: christophpurrer

Differential Revision: D51423538

Pulled By: rshest

fbshipit-source-id: 1e2844aa9011de4476ec4b134d43daa3260a73d5
2023-11-17 06:10:00 -08:00
Riccardo Cipolleschi 1204696f08 Defragment Codegen in OSS between Old and New Architecture (#41500)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41500

Right now, the old architecture uses Codegen in a slightly different way w.r.t. the New Architecture.
In the Old Architecture, codegen is used to generate some basic TM and components that are part of Core.

Both architectures use the same scripts that actually generates the code, but they are invoked differently.

This is causing some maintenance costs that we would like to reduce.

## Changelog:
[Internal] - Defragment how Codegen is run between old and new architecture

Reviewed By: dmytrorykun

Differential Revision: D51349874

fbshipit-source-id: 188d3ed436a30a77bd42a26306d4a08666d3a00b
2023-11-17 04:17:58 -08:00
Samuel Susla a5d8ea4579 delete ShadowNodeFamily::instanceHandle_ (#41513)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41513

changelog: [internal]

Reviewed By: christophpurrer

Differential Revision: D51394187

fbshipit-source-id: 3add711a3954ba16bf4524d47c3ed67473e2c0eb
2023-11-17 03:27:51 -08:00
Samuel Susla f4e9827013 delete ComponentDescriptor::createEventEmitter (#41514)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41514

changelog: [internal]

`ComponentDescriptor::createEventEmitter` can be deleted.

Reviewed By: christophpurrer

Differential Revision: D51394153

fbshipit-source-id: 7541c3cb018a009e8c9555f9a9b0d41215dca1bc
2023-11-17 03:27:51 -08:00
Rubén Norte fa89dd68b0 Define debugging name for multiple components (#41516)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41516

This cleans up some dead code in animated components (some wrappers that actually don't do anything), which in this case leads to component names being properly defined for debugging in React DevTools, etc.

Changelog: [internal]

Reviewed By: sammy-SC

Differential Revision: D51401568

fbshipit-source-id: 0de43f526b77a6b83e66e03f0ffa8d42c2b77112
2023-11-16 12:23:22 -08:00
Intl Scheduler 5730f560b9 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907943488166
Sandcastle Job Instance ID: 27021598873857627
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D51397267

fbshipit-source-id: c404430e1f8d363a29ecc4c430a203279ab658c3
2023-11-16 06:50:34 -08:00
Pieter De Baets 6653b4eb46 Shared UiThreadHandler (#41507)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41507

Noticed we were creating this in various places and could consolidate it. This shouldn't have any perf impact since all of these use the same Handler.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D51348699

fbshipit-source-id: b11799f64cad3e9c1122e074954fce60e586d00d
2023-11-16 06:34:06 -08:00
Pieter De Baets 02ac7a11ab Unbreak CircleCI (#41508)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41508

```
> Task :packages:react-native:ReactAndroid:compileDebugKotlin FAILED
e: warnings found and -Werror specified
w: file:///root/react-native/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/touch/JSResponderHandler.kt:55:38 The corresponding parameter in the supertype 'OnInterceptTouchEventListener' is named 'view'. This may cause problems when calling this function with named arguments.
```
Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D51394096

fbshipit-source-id: ff322a10121b529c9a39b800e16a1a8cc5977d4a
2023-11-16 05:43:04 -08:00
Dmitry Rykun 5029cef0a9 Do not include two copies of JSI when using hermes-engine (#41499)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41499

After D48152876 we consume JSI from `ReactCommon/jsi`, and ignore JSI that is distributed with `hermes-engine`.
This diff removes `include/jsi` from `source_files` of `hermes-engine` so we don't get two sets of JSI headers - one from `ReactCommon`, and the other one from `hermes-engine`.
This diff also fixes accidental breakage of ODR violation. We will no longer compile JSI into `react-native` when linking against `hermes-engine`, which already has JSI in it.
Changelog: [iOS][Fixed] - Exclude JSI headers when using hermes-engine prebuilt.

Reviewed By: cipolleschi

Differential Revision: D51347562

fbshipit-source-id: 6e4b9940c43d74d227a05999926b8752d7685670
2023-11-16 03:05:35 -08:00
fortmarek 3b68e39634 Add changelog for 0.72.7 (#41474)
Summary:
Adds changelog for the 0.72.7 release.

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

[INTERNAL] [CHANGED] - Add changelog for the 0.72.7 release.

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

Test Plan: Read the changelog 🤞

Reviewed By: christophpurrer

Differential Revision: D51344851

Pulled By: huntie

fbshipit-source-id: a142a76ba75665fd0e6c7104ffb008f0f4ff3c95
2023-11-16 02:48:08 -08:00
Sam Zhou a1b7a20779 Deploy 0.222.0 to xplat (#41505)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41505

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D51385560

fbshipit-source-id: 66848643776e40bd92b23d8b6147b32659ec6ec5
2023-11-16 00:43:48 -08:00
David Vacca 01729919d1 Migrate JSResponderHandler to kotlin
Summary:
Migrate JSResponderHandler to kotlin

bypass-github-export-checks

changelog: [internal] intenral

Reviewed By: rshest

Differential Revision: D51262578

fbshipit-source-id: 1c9fce769d1f0f163353cc8e05fb007ceda14b69
2023-11-15 22:43:49 -08:00
David Vacca 3f6b59eece Mark NotThreadSafeViewHierarchyUpdateDebugListener as deprecated in new architecture
Summary:
NotThreadSafeViewHierarchyUpdateDebugListener is not implemented in the new architecture because it is not relevant. That's why I'm marking NotThreadSafeViewHierarchyUpdateDebugListener as deprecated in new architecture

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D51262576

fbshipit-source-id: 05022f7605ffc9f9aee3dbb0652f331849db82e0
2023-11-15 22:43:49 -08:00
David Vacca 31db0abb41 Delete com/facebook/react/surface package
Summary:
com/facebook/react/surface package only contains one file (ReactStage), this annotation is only used internally by the framework and it fit better in uimanager package.

In this diff we are:
- deleting com/facebook/react/surface package
- moving ReactStage to com/facebook/react/uimanager
- Properly using ReactStage in ReactRoot and ReactRootView

This is a backward compatible change because ReactStage is only used in the internals of React Native

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D51262575

fbshipit-source-id: 34c140fbd0868a5a95489ee51b3262263b33ca69
2023-11-15 22:43:49 -08:00
David Vacca a86a9a392d Mark UIManagerType as depreacted in new architecture
Summary:
The new architecture will only support Fabric UIManager, that's why we will just deprecate UIManagerType as part of the new architecture

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D51262582

fbshipit-source-id: ff918ff760e95bbda39f5010b141a542c9171517
2023-11-15 22:43:49 -08:00
David Vacca 2aeeb806f1 Mark uimanager annotations as deprecated in new architecture
Summary:
This diff marks uimanager annotations as deprecated in new architecture becasue we've decided the native codegen will not be addopted in new architecture

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D51262580

fbshipit-source-id: 1248117ca697c612c89062fcee56788cce40a1ae
2023-11-15 22:43:49 -08:00
Ruslan Shestopalyuk 40a99c9345 Add and use MC killswitch for enabling paint time reporting in Event Timing API (#41501)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41501

## Changelog:
[Internal] -

Wires a switch for enabling the corresponding feature in Event Timing API.

Reviewed By: rubennorte

Differential Revision: D51341239

fbshipit-source-id: a93a1fc5bdc132ce2a2d528139091be0e4a3ec11
2023-11-15 21:38:01 -08:00
Nick Gerleman 5d55c8eeb5 Revert D50998164: Allow lazy resolution of edge dimension values
Differential Revision:
D50998164

Original commit changeset: 248396f9587e

Original Phabricator Diff: D50998164

fbshipit-source-id: 4f592158324d758bb9e3731ced36b8e3587c459c
2023-11-15 18:34:47 -08:00
Ruslan Shestopalyuk 88233cf549 Implement "paint time" support in Event Timing API (#41484)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41484

## Changelog:
[Internal] -

Uses mount hooks to report "paint time" via the Event Timing API - i.e. "duration" now corresponds not the the JS dispatch end point, but to the moment when the corresponding mount ("paint") happened on the native side.

This feature is disabled by default for now, but can be enabled via `NativePerformanceObserver.setIsReportingEventPaintTime(true);`.

Reviewed By: rubennorte

Differential Revision: D51313902

fbshipit-source-id: b15fed772056bb3af619496f805e45dd9222426d
2023-11-15 11:08:05 -08:00
David Vacca 803c5bb669 Migrate ReactHitSlopView to kotlin
Summary:
Migrate ReactHitSlopView to kotlin

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D51262574

fbshipit-source-id: 7ad625bcdff1525299a0a9c9cf3409d081231b3c
2023-11-15 09:43:03 -08:00
Riccardo Cipolleschi 7f52791767 Remove dependency on libevent (#41485)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41485

Now that React-Hermes does not depends on folly::Futures anymore, we can safely delete the `libevent` dependency.
This will speedup the pod install step and potentially also the bundle size (to be tested)

## Changelog
[Android][Removed] - Remove libevent dependency

Reviewed By: javache

Differential Revision: D51319583

fbshipit-source-id: 155cc3632b005074c43565e7281c9873ab046f0d
2023-11-15 02:01:23 -08:00
Riccardo Cipolleschi 23cf10428e Remove dependency on libevent (#41486)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41486

Now that React-Hermes does not depends on folly::Futures anymore, we can safely delete the `libevent` dependency.
This will speedup the pod install step and potentially also the bundle size (to be tested)

## Changelog
[iOS][Removed] - Remove libevent dependency

Reviewed By: javache

Differential Revision: D51307333

fbshipit-source-id: 029c1d6aaad46fc261502241f7df28b4d5f59eb9
2023-11-15 02:01:23 -08:00
Moti Zilberman 560e0f0005 Migrate to @rnx-kit/chromium-edge-launcher for Windows fix (#41367)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41367

Andrew Coates graciously published the Windows Edge launcher fix from https://github.com/cezaraugusto/chromium-edge-launcher/pull/1 as a new package (https://github.com/microsoft/rnx-kit/pull/2796), so let's pull that into `dev-middleware`.

Changelog: [Internal] - Fix experimental debugger launch flow with Edge on Windows

Reviewed By: robhogan

Differential Revision: D51086297

fbshipit-source-id: 3a8db351f71eb31a9609c987cdb4dc66f24f9403
2023-11-15 00:18:10 -08:00
Neil Dhar 255fef5263 Build shared JSI by default (#41037)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41037

Build JSI as a shared library by default. This avoids running into a
problem with duplicate JSI when building against `libhermes` as a
shared library. This is already the case for React Native on Android.

For RN's iOS builds, explicitly specify that JSI should be statically
linked.

Changelog: [Internal]

Reviewed By: dannysu

Differential Revision: D50294405

fbshipit-source-id: 5e77e6d4ab77f8e338ca5ca4154e879eb3d616d7
2023-11-14 12:34:19 -08:00
Nick Gerleman 6c4cb02e27 Allow lazy resolution of edge dimension values (#41347)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41347

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

This follows the previous patterns used for `Gutters` and `Dimension`, where we hide CompactValue array implementation from `yoga::Style` callers.

This allows a single read of a style to only need access to the resolved values of a single edge, vs all edges. This is cheap now because the interface is the representation, but gets expensive if `StyleValuePool` is the actual implementation.

This prevents us from needing to resolve nine dimensions, in order to read a single value like `marginLeft`. Doing this, in the new style, also lets us remove `IdxRef` from the API.

We unroll the structure dependent parts in the props parsing code, for something more verbose, but also a bit clearer.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D50998164

fbshipit-source-id: 248396f9587e29d62cde05ae7512d8194f60c809
2023-11-14 09:12:35 -08:00
Samuel Susla e51a058212 copy instanceHandle into UIManager::createNode (#41443)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41443

changelog: [internal]

instanceHandle is retained by UIManager::createNode. Let's make that obvious in the API.

Reviewed By: NickGerleman

Differential Revision: D51233821

fbshipit-source-id: b97ad80d3ac31a7830c24c8900caa723ca0e9c20
2023-11-14 07:51:57 -08:00
Samuel Susla 3e3a3dbe28 use react::hash_combine instead of folly::hash_combine (#41477)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41477

changelog: [internal]

Reviewed By: cipolleschi

Differential Revision: D51304535

fbshipit-source-id: d7de89c50e30a936b982c5dc568f3516ab140266
2023-11-14 07:24:55 -08:00
Rubén Norte 5948ab7515 Prevent intersectionRatio from being higher than 1 in IntersectionObserverEntry (#41448)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41448

This was possible before due to precision problems with `double` (we were seeing values like 1.000000002). This is an easy way to prevent that problem.

Changelog: [internal]

Reviewed By: rshest

Differential Revision: D51230183

fbshipit-source-id: 757ef181fe369d525831faf8a6d907467efc544c
2023-11-14 06:11:13 -08:00
Rubén Norte 11aadb7287 Fix error when trying to unobserve detached targets in IntersectionObserver (#41454)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41454

Yet another problem caused by React being too aggressive cleaning up detached fibers. This fixes a problem in `IntersectionObserver` when trying to `unobserve` detached targets. In that case we didn't have access to its shadow node anymore, so we didn't have a way to unobserve in native. This keeps an additional mapping in JS to do the conversion even after detached.

Changelog: [internal]

Reviewed By: rshest

Differential Revision: D51257960

fbshipit-source-id: 25edc9afd2108e141d178dd4939fc2de8286342b
2023-11-14 06:11:13 -08:00