Commit Graph

58 Commits

Author SHA1 Message Date
generatedunixname89002005287564 4553f87489 Fix CQS signal readability-implicit-bool-conversion in xplat/js/react-native-github/packages (#53591)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53591

Reviewed By: rshest

Differential Revision: D81571883

fbshipit-source-id: 479a0764eabeac968028814ec6aafa32687b0905
2025-09-04 03:13:49 -07:00
generatedunixname89002005287564 e60ddf0adb Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [B] [B] (#53425)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53425

Reviewed By: javache

Differential Revision: D80619000

fbshipit-source-id: d012c170ed366904b39ef335fea5241b604461ec
2025-08-22 05:52:14 -07:00
Sam Zhou cf664c65e2 Standardize subtyping error code into incompatible-type in react native and metro (#53312)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53312

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D80400976

fbshipit-source-id: 196af69c0b9621b2a2675b232406639773e04933
2025-08-18 09:04:31 -07:00
Tim Yung ad652cf99c sort-imports: Update Rule Definition (#51880)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51880

Updates the `sort-imports` lint rule.

The main change is that it enforces newlines after the last import statement.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D76149902

fbshipit-source-id: 928871655c5de0613b18334d6fc0d71b3a971a18
2025-06-09 20:30:32 -07:00
Riccardo Cipolleschi e9c8fee4ef Add Example for InteropLayer on RNTester (#51260)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51260

This is a preparatory change that adds an example to RNTester for the Fabric interop layer on iOS.
This example is needed to create a Jest E2E tests that will make sure that the Fabric Interop Layer can properly add views as subviews.

We discovered the bug thanks to react-native-maps.

## Changelog:
[Internal] - Add Example for the Fabric Interop Layer to RNTester iOS

Reviewed By: cortinico

Differential Revision: D74579737

fbshipit-source-id: 0c1bbb06790b01313cd98aa4b7152d8aba0cded3
2025-05-14 10:11:03 -07:00
Dawid Małecki 7959a63a1a Migrate rn-tester codegen types imports to use root exported CodegenTypes namespace (#50976)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50976

This is the second part of the migration of `rn-tester` package to use root imports. In this diff the `CodegenTypes` namespace is used to define Codegen primitives.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D73780584

fbshipit-source-id: c13c2dfcfa4d023978a9463af1d2a3bf7b72476c
2025-04-29 06:06:16 -07:00
Dawid Małecki ddcab831b1 Migrate already root exported deep imports in rn-tester. (#50958)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50958

In rn-tester package there are many react-native deep imports which will be deprecated in the future. It is a starter for migrating rn-tester to using root imports instead. Only deep imports that are already root exported are changed. This diff avoids using `CodegenTypes` as it causes build errors and will be resolved in next stages.

Besides import changes, `PointerEvent` type is now also exported from the root.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D73656526

fbshipit-source-id: 5814a3d9c6a04b1236581dbbe291cd109e2c71c0
2025-04-28 07:24:46 -07:00
Sam Zhou 4f14499013 Fix issues in react-native ahead of making React.ComponentType an alias of component(...Props) (#50180)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50180

Prepare for the change that makes `React.ComponentType` an alias of `component(...Props)`, which comes with stricter checking and making the props automatically readonly.

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D71566900

fbshipit-source-id: cefcc10fda9a9777532f25b325412b0d50ebb9b8
2025-03-20 15:05:28 -07:00
Christian Falch 4c9431adda Update podspecs to use the ReactNativeDependencies or build from source (#49968)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49968

Updates all the core podspec to use the new `ReactNativeDependencies` podspec

## Changelog:

[INTERNAL] - Updates Modules in core to use the new dependencies.

Test Plan:
 Run Rn-Tester and  verify that it works as expected both building deps from source and using prebuilt tarballs
 Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities

Reviewed By: cortinico

Differential Revision: D71032639

Pulled By: cipolleschi

fbshipit-source-id: e53179a8c1b47ee2b945f5cb5dfaf3f6f2755af2
2025-03-13 08:40:14 -07:00
Rubén Norte e630b2ca18 Create specific module in RN to define the types for host instances and host components that ReactNativeTypes defines (#49601)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49601

Changelog: [internal]

This creates a new module in React Native to define some of the types related to `HostInstance` that are currently defined in `ReactNativeTypes` (synced from the React repo).

We want to remove the types from `ReactNativeTypes` so this is a necessary initial step.

Reviewed By: huntie

Differential Revision: D69996010

fbshipit-source-id: 21cfed4c222e22332936e56aca895fe578809792
2025-02-24 05:32:43 -08:00
Oskar Kwaśniewski e7de582798 feat(iOS): centralize JS engine dependency configuration (#49297)
Summary:
> [!NOTE]
> This PR is part of JavaScriptCore Extraction to this repository: https://github.com/react-native-community/javascriptcore

This PR centralizes the setup of js engine dependencies which need to be defined when building with dynamic frameworks. This will allow us to change linked framework if using a third party one in the future

## Changelog:

[INTERNAL] [CHANGED] - centralize JS engine dependency configuration

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

Test Plan: CI Green (Build needs to go properly)

Reviewed By: javache

Differential Revision: D69396641

Pulled By: cipolleschi

fbshipit-source-id: deedd12084f563f73f12f8617fdca0a6d680bf5a
2025-02-11 10:03:07 -08:00
Dawid Małecki f36bfe5dfa Remove redundant {||} syntax (#48686)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48686

Changelog:
[Internal] - Removed redundant `{||}` syntax

Reviewed By: javache

Differential Revision: D68205038

fbshipit-source-id: f7d3271142b6443a5859c3b668b7aebd3ce3ef3f
2025-01-15 07:07:01 -08:00
Nicola Corti 6368555ab0 RN-Tester: Reorder buttons in the New Architecture sample (#48666)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48666

The New Architecture sample is getting too big and the two views are not visible anymore.
I'm fixing this but having buttons side by side.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D68153245

fbshipit-source-id: 5557fd40f81078fe3994d8efe0e73784e043ed78
2025-01-14 09:15:36 -08:00
poonamjain96 848471b69f Add test case for set opacity in new arch examples (#47043)
Summary:
Part of this: https://github.com/facebook/react-native/issues/46757
Solves:
- ME2E0004

## 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 ] [ Added ] - Add setOpacity test in new-arch-example

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

Test Plan:
```
yarn e2e-test-ios
yarn e2e-test-android
```

Reviewed By: cortinico

Differential Revision: D64457441

Pulled By: cipolleschi

fbshipit-source-id: 310270293f5c7ec8a94c0d38fdd0897e4591ec14
2024-10-16 08:33:37 -07:00
tarunrajput 3f633473c3 Add maestro e2e test for Legacy Style Event (#46784)
Summary:
part of https://github.com/facebook/react-native/issues/46757
closes ME2E0006, ME2E0007

## 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] - add e2e test for Legacy Style Event

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

Test Plan:
```
yarn e2e-test-ios
yarn e2e-test-android
```

Reviewed By: cortinico

Differential Revision: D64172277

Pulled By: cipolleschi

fbshipit-source-id: adf3a55b354f1a293c4620dc617a6a08e3aebd2b
2024-10-15 10:57:32 -07:00
sarthak-d11 af4907025e fix: change opacity logic from random to decrement by -0.20 (#46830)
Summary:
Part of this: https://github.com/facebook/react-native/issues/46757
Solves:

ME2E0003

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[ Internal ] [ Changed ] - The opacity logic is changed from random to decrement the opacity by -0.2
For more details, see:

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

Test Plan:
yarn e2e-test-ios
yarn e2e-test-android

Reviewed By: rshest

Differential Revision: D64173519

Pulled By: cipolleschi

fbshipit-source-id: 69a09b64e7e4f098d3bfd72529401dadb49b93d7
2024-10-10 08:59:25 -07:00
Riccardo Cipolleschi 7de3111f9b Add Maestro test for New Arch Example (#46541)
Summary:
This change adds automated tests for the New Architecture Examples page in RNTester.
It also updates the NativeComponentExample to make sure that iOS and Android behaves in the same way and in a reliable way.

## Changelog:
[Internal] - Adds

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

Test Plan:
* Android:

https://github.com/user-attachments/assets/65ead328-9c4f-4e0f-8b9b-992ffb584566

* iOS:

https://github.com/user-attachments/assets/412a4f68-c9c9-4ff2-a3e9-ae7194deef77

Reviewed By: cortinico

Differential Revision: D62879289

Pulled By: cipolleschi

fbshipit-source-id: 59e15f48f5995b18fd8b3ee24aca726b93e04d9f
2024-09-18 06:15:58 -07:00
Riccardo Cipolleschi 6e2ba742ff Factor out the CXX language standard in a separate const (#45374)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45374

This change factors out the language standard in a separate constant so we can easily control it from a single place.

There are only 2 exception to this:
1. hermes-engine: the podspec is used in CI and it has no access to the rct_cxx_language_standard variable
2. Yoga: it can be used as a separate pod, outside of React Native, so it makes sense to leave it alone.

This change also fixes a problem where, in some setup, the language was set to C++14

## Changelog
[Internal] - Refactor Cxx language standard in a single constant

Reviewed By: dmytrorykun, blakef

Differential Revision: D59629061

fbshipit-source-id: 41eac64e47c14e239d8ee78bd88ea30af244d695
2024-07-11 05:25:38 -07:00
Sam Zhou 9112c5b56d Fix hidden type error in react-native ahead of next flow release (#43629)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43629

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D55264363

fbshipit-source-id: f9908e28f0416c9c8ed05e0b097d887eddfee5f3
2024-03-22 19:18:48 -07:00
Dmitry Rykun 6549216b76 Rename React-Codegen to ReactCodegen
Summary:
This diff renames React-Codegen to ReactCodegen. This way we'll no longer have to try both
```
#include <React-Codegen/MyModule.h>
```
and additionally
```
#include <React_Codegen/MyModule.h>
```
for cases with `use_frameworks`.

Changelog: [iOS][Breaking] - Rename React-Codegen to ReactCodegen

Reviewed By: cipolleschi

Differential Revision: D54068492

fbshipit-source-id: dab8ea2034d299266482929061caa14397421445
2024-02-22 09:52:48 -08:00
Dmitry Rykun 4d07aae7ef RNTester: add legacy style event to MyNativeViewNativeComponent (#42809)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42809

This diff adds a legacy style event to `MyNativeViewNativeComponent`.
This is a way of defining events where you specify additional string type parameter in the EventHandler in the spec. This additional type parameter is an overridden top level event name, that can be completely unrelated to the event handler name.
In this example it is `onLegacyStyleEvent` and `alternativeLegacyName`.
More context here D16042065.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D53310318

fbshipit-source-id: 4dec08c872acdfd09b9939f690fb7bc777149580
2024-02-13 02:47:53 -08:00
Dmitry Rykun d66d6518d8 RNTester - Legacy component example: do not convert commands to string (#42822)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42822

The conversion to string was introduced in D45043929. It was supposed to fix command execution for `MyLegacyNativeComponent` in RNTester on Android/Old Architecture.

At the same time it introduced a regression on iOS, since we have [different code path](https://www.internalfb.com/code/fbsource/[ffee789cab9514c0a15b8a63869cbfdf4e534a56]/xplat/js/react-native-github/packages/react-native/React/Modules/RCTUIManager.m?lines=1088-1092) for string commands in iOS, where we expect command name, and not command number converted to string.

I tried to remove that conversion, did local tests, and saw no issues with executing commands on Android.
Looks like the underlying issue has been fixed in some other way.

So let's just remove those conversions.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D53123956

fbshipit-source-id: 968e35277e01215bd6fc1282c78f04666453317d
2024-02-05 04:01:14 -08:00
Ramanpreet Nara fafd00ab1a UIManagerJSInterface: Make reactTags non-nullable (#42208)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42208

I went through the [android](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java?fbclid=IwAR29Xk1KiGsxg7O2Fc7F2k4uKFmqqAbcMtsEEdaBalcGjJK7xuyYDo6X1Z8) and [ios](https://github.com/facebook/react-native/blob/main/packages/react-native/React/Modules/RCTUIManager.m?fbclid=IwAR2axOTNVuvGbnGw0_1wlnRhftx4W6K-ptTm_DtQ-eSOLFtnrYwzbjPyeYA) implementations of UIManagerModule. It turns out, the reactTag is always nonnull in all methods!

This diff updates UIManagerJSInterface accordingly.

Changelog: [General][Changed] - UIManagerModule: Make reactTags required

Reviewed By: sammy-SC

Differential Revision: D52627087

fbshipit-source-id: e79650f539fa2fbc00654a1ecce4fae2da8ae11a
2024-02-03 13:12:10 -08:00
Zeya Peng 5d1eac047a add RNTester example for native command Array param (#41897)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41897

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D51875073

fbshipit-source-id: 403274b3063d7c49fe4642347d2f724d58a46c1f
2023-12-14 21:06:09 -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
Moti Zilberman d6e0bc714a Enable lint/sort-imports everywhere (#41334)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41334

TSIA.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D51025812

fbshipit-source-id: e10d437be775a6b80946483aa96460f34927f870
2023-11-06 12:59:38 -08:00
Nicola Corti 071f6100f1 Make sure onIntArrayChanged is invoked on RN Tester (#40940)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40940

Currently the `onIntArrayChanged` event is invoked
 only once inside RN Tester. I'm changing the logic to make sure it fires whenever we click "Set Opacity"

Changelog:
[Internal] [Changed] - Make sure onIntArrayChanged is invoked on RN Tester

Reviewed By: mdvacca, dmytrorykun

Differential Revision: D50264765

fbshipit-source-id: 93a60fd1b657c3d8b8182cab6bb7cd4368ac9a42
2023-10-16 08:20:55 -07:00
Fabrizio Cucci ec3a137572 Fix UIManager Flow type (#40794)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40794

I accidentally stumbled upon the `UIManager` object on JS side and realised it was being exported as `any`. So I've extracted the interface `UIManagerJSInterface` and applied where it seems to make sense, although, after chatting with javache it could be useful to further narrow down the interface given what's currently implemented by the `BridgelessUIManager`.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D50137691

fbshipit-source-id: ccc746fa1dfbb3290e0b73dfa14c65833b238e07
2023-10-11 11:21:19 -07:00
Kudo Chien b9f0bdd12d Remove xcode 15 workaround for boost (#39555)
Summary:
Remove Xcode 15 `_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION` workaround for boost. If we update boost, we don't need the workaround anymore.
This PR is based on https://github.com/facebook/react-native/issues/39552. Not sure how Meta internally deal with stacked PRs. This PR just adds a new commit based on https://github.com/facebook/react-native/issues/39552 anyway.

## Changelog:

[IOS][CHANGED] - Remove Xcode 15 `_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION` workaround for boost

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

Test Plan: RNTester + Xcode 15

Reviewed By: cortinico

Differential Revision: D49454494

Pulled By: cipolleschi

fbshipit-source-id: aacabaa130b61598cf8bd206fdbb96d3b50ba74f
2023-09-20 06:03:54 -07:00
Nick Gerleman 17154a661f C++ 20 all the things (#39454)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39454

1. Build with C++ 20 everywhere.
2. Update folly in OSS build to avoid a warning, and let us opt out of heavy bits required for supporting coroutines (we are still more than a year behind).
3. Update the folly podspec for the new version of folly
4. Update the many, many, copy/pasted header search paths for folly dependencies to be able to resolve fmt, now exposed to folly headers
4. Replaces a deprecated atomic usage with equivalent.
5. Fixes a deprecated implicit capturing `this` by value in lambda (same behavior, added a TODO because it seems sus)

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D49271685

fbshipit-source-id: 16610f7bcd1032d5796cc11f1cfa92a33d8c2593
2023-09-15 01:17:55 -07:00
Saad Najmi 1b78da8b43 min_ios_version_supported -> min_supported_versions (#39310)
Summary:
## Summary:

One of the most common diffs we have in React Native macOS is simply extending the `platforms` key Inside every pod spec to include macOS. React Native tvOS does the same to add tvOS. In the future, React Native may support visionOS, at which point we do the same thing again. Let's define a `min_supported_versions` hash that can be overridden at one place that is extensible to more platforms, instead of just specifying `min_ios_version_supported`.

Note: In doing this change, I have set it that `React-Hermes.podspec` doesn't build for macOS anymore. I think this is safe, since anyone using Hermes on macOS was probably using React Native macOS where we already have a diff to add macOS back?

## Changelog:

[IOS] [CHANGED] - Add min_supported_versions helper to cocoa pods scripts

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

Test Plan: CI should pass.

Reviewed By: NickGerleman

Differential Revision: D49014109

Pulled By: dmytrorykun

fbshipit-source-id: d44fc7b750c70cc263a2c89502c022a0db9a4771
2023-09-07 03:16:23 -07:00
Nick Gerleman a966291611 Consistent QualifierAlignment (for real this time I swear) (#39217)
Summary:
(reland of D48761722)

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

React Native uses an inconsistent mix of "west const" and "east const". E.g. `const auto &` in 74 files, but `auto const &` in 60. Sometimes they are mixed from one line to the next:  {F1079102436}

Clang format 14 adds a QualifierAlignment option, but fbsource is still on 12, so we cannot use it in our config until the [world is updated]()https://fb.workplace.com/groups/toolchain.fndn/posts/24006558685624673/?comment_id=24009214565359085&reply_comment_id=24009455088668366. This diff just runs a local version of Clang format locally first to fix QualifierAlignment, then reformats with the fbsource version, to fix any other output differences unrelated to that. This will not continually enforce a style, but will make the world more consistent, and hopefully encourage a consistent style until we can set it.

West const seems more popular in `//xplat` so I just picked left alignment somewhat arbitrarily, but we could also maybe take a poll on this.

Changelog: [Internal]

bypass-github-export-checks

Reviewed By: shwanton

Differential Revision: D48852450

fbshipit-source-id: 1789aa0db43948169f482188cb8b5e8f0f0246b8
2023-08-30 19:56:13 -07:00
Riccardo Cipolleschi b6b09a7e72 Add support for distributed registration of Fabric Components with Dynamic Libraries (#37274)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37274

With dynamic frameworks, we can't use floating C functions.

The way in which dynamic frameworks work is that they need to be self contained. They are built in isolation so that other frameworks can be linked against them to solve their dependencies.

Currently, when working with 3rd party libraries, we are Codegenerating a RCTThirdPartyComponentProvider which tries to invoke floating C functions that are defined in other modules. React-RCTFabric has no visibility on those modules, therefore it fails building.

The implemented solution exclude the generation of those symbols and leverage a the Objective-C runtime to automatically register libraries when they are loaded.

**This mechanism is applied ONLY when the flag RCT_DYNAMIC_FRAMEWORKS is turned on.** There will be no impact on internal meta apps, nor on any apps that are not using Dynamic Frameworks.

This change requires a small migration in all the Fabric components libraries that wants to support dynamic frameworks. They have to implement a
```
+ (void)load
{
  [super load];
}
```
method in their ComponentView.

Not to slow down the adoption of the new architecture, waiting for a migration in the ecosystem, the next diff introduce a secondary, declarative loading mechanism for Fabric Components, which follows the same approach used by TurboModules.

## Changelog:
[iOS][Changed] - Add support for distributed registration of  Fabric Components with Dynamic Libraries.

Notes that this change is NOT breaking as dynamic frameworks were not working before in the New Architecture. Static Libraries and Static Frameworks continue working as usual.

Reviewed By: dmytrorykun

Differential Revision: D45605441

fbshipit-source-id: e609fbf6f92fddfbaa676227fde60962d6b0faa4
2023-05-15 08:14:59 -07:00
Riccardo Cipolleschi 8c8f7a510f Add example in RNTester to use events with arrays (#37143)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37143

This change add an example on how to use events with arrays in the New Architecture in RNTester.

## Changelog:
[Internal] - Add Examples on RNTester on how to send events with arrays from Native to JS

Reviewed By: cortinico

Differential Revision: D45357873

fbshipit-source-id: 812521aad070181759c0a1c76b5e8c628166229c
2023-05-04 04:11:49 -07:00
Nicola Corti 6dcdd2e2bc Fix old-arch component not updating background in interop layer example (#36924)
Summary:
I've noticed that in the Fabric Interop Layer sample on RN-Tester, when running with Old Arch, the legacy view is not receiving the commands correctly.
This is due to us not sending the command as string, which is making the command fail to deliver.

## Changelog:

[INTERNAL] - Fix old-arch component not updating background in interop layer example

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

Test Plan:
Tested locally:

| Before | After |
|--------|--------|
| ![screen-1681728104](https://user-images.githubusercontent.com/3001957/232461662-68b23545-f38c-40fe-9a5d-44bb0cae29e9.png) | ![screen-1681728077](https://user-images.githubusercontent.com/3001957/232461651-eec93a51-b0f0-4650-af3a-c5dd991f2f96.png) |

Reviewed By: cipolleschi

Differential Revision: D45043929

Pulled By: cortinico

fbshipit-source-id: 8bb2a052a1a600046f3a16c868062c5e600385f0
2023-04-18 04:24:13 -07:00
Riccardo Cipolleschi 610b14e4f3 Move min ios version to 13.4 for OSS (#36795)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36795

This change bump the min iOS version for React Native to 13.4, to align with company guidelines.

## Changelog:
[iOS][Changed] - Moved the min iOS version to 13.4

Reviewed By: cortinico

Differential Revision: D44634663

fbshipit-source-id: 035e8fcbb395f7394f8253e3ec485ad9937531c2
2023-04-06 12:07:26 -07:00
Nicola Corti 7449fad587 Add examples of Direct Manipulation in Fabric Intrerop (#36724)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36724

Similarly to iOS, this adds some examples of direct manipulation on Android using
all the various methods.

Changelog:
[Internal] [Changed] - Add examples of Direct Manipulation in Fabric Intrerop

Reviewed By: cipolleschi

Differential Revision: D44541437

fbshipit-source-id: b6e10ac0a815f41ff3c980236b7d8c6937e92065
2023-03-30 11:46:27 -07:00
Riccardo Cipolleschi a44d8a0f8a Add Examples for Direct Manipulation in the Interop Layer (#36610)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36610

This change add to RNTester examples of a legacy Native Component, loaded in the New Architecture through the Interop Layer, that uses the APIs described in the [Direct Manipulation](https://reactnative.dev/docs/direct-manipulation) sectioon of the website.

## Changelog:
[iOS][Added] - Added examples of direct manipulation

Reviewed By: sammy-SC

Differential Revision: D43978674

fbshipit-source-id: 1cbc56f28034f84f309166e3e392ad97a8164e64
2023-03-29 15:30:26 -07:00
Riccardo Cipolleschi c7aaae61ca Make UIManager.dispatchViewManagerCommand work in Fabric through Interop Layer (#36578)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36578

This change brings to the Fabric Interop Layer the possibility to directly call native methods on the View Manager, something that was not possible before and that we can use to simplify the migration to the New Architecture.

## Changelog:
[iOS][Added] - Native Components can now call native methods in Fabric when they are loaded through the Interop Layer

Reviewed By: sammy-SC

Differential Revision: D43945278

fbshipit-source-id: fe67ac85a5d0db3747105f56700d1dbba7ada5f1
2023-03-29 15:30:26 -07:00
Nicola Corti 7562eb5550 Add Fabric Interop constants example (#36693)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36693

Similar to #36417, this changes adds an example to RNTester to verify that the Interop Layer can process constants in Fabric as it used to do in Paper for Android.

Changelog:
[Android] [Added] - Add Fabric Interop constants example

Reviewed By: cipolleschi

Differential Revision: D44466391

fbshipit-source-id: 74e654319b93e60b415297dcdddc98eb100913df
2023-03-29 04:48:21 -07:00
Ruslan Lesiutin 714b502b0c | RN Monorepo | Migrate to package (#36434)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36434

Changelog: [Internal]

This is a squashed stack of 18 commits, starting from D43202126

allow-large-files

Reviewed By: cortinico

Differential Revision: D43977381

fbshipit-source-id: 0da552ddb85f2f61a0be0ef071915b35f3f8555c
2023-03-17 05:03:25 -07:00
Riccardo Cipolleschi a5866ca3aa Add Fabric Interop constants example (#36417)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36417

This changes adds an example to RNTester to verify that the Interop Layer can process constants in Fabric as it used to do in Paper.

## Changelog:
[iOS][Added] - Add example in the Interop Layer to use constants

Reviewed By: cortinico

Differential Revision: D43911916

fbshipit-source-id: 1d4b630d45d21904c53d85b97607ebb7fb8a62fc
2023-03-10 04:52:44 -08:00
Riccardo Cipolleschi c005830958 Add Fabric Interop event example
Summary:
This changes adds an example to RNTester to verify that the Interop Layer can process bubbling events in Fabric as it used to do in Paper.

## Changelog:
[iOS][Added] - Add example in the Interop Layer to use events

Reviewed By: sammy-SC

Differential Revision: D43911390

fbshipit-source-id: ae75db25078669676e5a609e090f1e9674026391
2023-03-10 04:52:44 -08:00
Riccardo Cipolleschi 4d7753eb9a Add Legacy Component to RNTester with Interop Layer (#36360)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36360

This change is the iOS equivalent of D43731219 (https://github.com/facebook/react-native/commit/ab55e123da8749d982964f2aee6ce6b0bffdc7fc), but only for what concerns the RNTester example as the interop layer was already present in the codebase and exposed to the OSS.

## Changelog
[internal] - Add example on how to consume a Legacy component in Fabric with the interop layer

Reviewed By: cortinico

Differential Revision: D43735699

fbshipit-source-id: 6cb5a3591e7e4a606c274566226025af91849c16
2023-03-03 14:44:57 -08:00
Nicola Corti ab55e123da Expose UnstableReactLegacyComponentDescriptor inside rrc_legacyviewmanagerinterop
Summary:
This adds the `UnstableReactLegacyComponentDescriptor`, part of the Fabric Interop Layer for Android.

Summary of the changes are:
* Expose a new `rrc_legacyviewmanagerinterop` native module via prefab
* Extend default App Cmake setup so `rrc_legacyviewmanagerinterop` is exposed by default
* Add a sample legacy component inside RN Tester

Changelog:
[Internal] [Changed] - Expose UnstableReactLegacyComponentDescriptor inside react/renderer/core

Reviewed By: cipolleschi

Differential Revision: D43731219

fbshipit-source-id: ee26d7e9d7eff5ef6a3e22853f8ea363b9198567
2023-03-02 05:10:45 -08:00
Simeng Pang 851c8c671a Revert D43500868: Expose UnstableReactLegacyComponentDescriptor inside react/renderer/components/legacyviewmanagerinterop
Differential Revision:
D43500868 (https://github.com/facebook/react-native/commit/071f6d2ca697ad298f41572e3d70a238f00ae8a3)

Original commit changeset: acfcd89efc42

Original Phabricator Diff: D43500868 (https://github.com/facebook/react-native/commit/071f6d2ca697ad298f41572e3d70a238f00ae8a3)

fbshipit-source-id: bb354015b2dcc812491b0219c6dd4d9c6321dc0b
2023-03-01 23:09:13 -08:00
Nicola Corti 071f6d2ca6 Expose UnstableReactLegacyComponentDescriptor inside react/renderer/components/legacyviewmanagerinterop (#36344)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36344

This adds the `UnstableReactLegacyComponentDescriptor`, part of the Fabric Interop Layer,
inside the `react/renderer/components/legacyviewmanagerinterop` module so that it can be included by the user externally.

If we wish to place it somewhere else, I'm more than happy to move it around.

Changelog:
[Internal] [Changed] - Expose UnstableReactLegacyComponentDescriptor inside react/renderer/components/legacyviewmanagerinterop

Reviewed By: mdvacca, cipolleschi

Differential Revision: D43500868

fbshipit-source-id: acfcd89efc42ff7a4ee6cb0a1cbd71d69f79721f
2023-03-01 17:58:07 -08:00
Christoph Purrer 19d65a2baf Update .podspec license information (#35245)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35245

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D41084913

fbshipit-source-id: a4ba31a19ffe515aa4e7c5a6e273a8cc4b6bc42d
2022-11-07 09:52:52 -08:00
Christoph Purrer 089684ee56 Remove remaining TV_OS fragments (#35110)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35110

Changelog:
[General][Fixed] Remove remaining TV_OS fragments

Reviewed By: shwanton

Differential Revision: D40775881

fbshipit-source-id: 122ff8737de35689ee0951b068997ee546c7019c
2022-10-28 02:50:49 -07:00
Riccardo Cipolleschi 82e9c6ad61 Simplify the dependencies migration for new libraries (#34619)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34619

When it comes to migrate existing libraries, users needs to update their .podspec files with a bunch [of changes](https://reactnative.dev/docs/0.69/new-architecture-library-ios#add-folly-and-other-dependencies).
This diff groups those changes in a single function, so that contributors can just invoke that function to prepare their dependencies.

## Changelog

[iOS][Changed] - Add function to simplify podspecs

Reviewed By: cortinico

Differential Revision: D39312203

fbshipit-source-id: ed631839e07d472a1fdcba33310f9b1d94fe2fd7
2022-09-09 04:25:56 -07:00