Граф коммитов

24777 Коммитов

Автор SHA1 Сообщение Дата
Pieter De Baets 071cae8251 Cleanup ReactTextInputManager inner classes and helpers
Summary:
* Make inner classes static where possible
* Make member variables final when set from constructor
* Remove Nullable on `mFabricViewStateManager` and associated checks
* Remove `createInternalEditText` which has moved to the ShadowNode (paper-only)

Changelog: [Internal]

Reviewed By: genkikondo

Differential Revision: D36545807

fbshipit-source-id: 85517511d1734f0e55de5caa012e32feb40e8492
2022-05-23 03:59:47 -07:00
Pieter De Baets f2fa2860d1 Fix nullability of StateWrapper
Summary:
ViewManager does a null-check already, and so inside the `updateState` method, we can safely assume this parameter is no longer nullable.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D36545806

fbshipit-source-id: 92eefa518f11c17b91aa3da2e14066d36fa4f4c2
2022-05-23 03:59:47 -07:00
Nicola Corti c69c14374d Attempt to fix test_android by specifying source 8 (#33890)
Summary:
`test_android` is currently broken as it tries to build with `source = "7"` (the default).
This is a best guess fix to try to fix this issue.

## Changelog

[Internal] - Attempt to fix test_android by specifying source 8

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

Test Plan: Will rely on CI

Reviewed By: cipolleschi

Differential Revision: D36589814

Pulled By: cortinico

fbshipit-source-id: 8ef50f8531b9d4367d2f2c75a312e8fdaf38fd85
2022-05-23 03:17:52 -07:00
Franco Meloni b149d2a0d6 Run Danger on all the PRs and use fail or warning where is needed (#33872)
Summary:
Run Danger on all the PRs, not just on the forks, use fail or warning where is needed and make CircleCI fail if danger fails

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] - Run Danger on all the PRs and use fail or warning where is needed.

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

Test Plan: Run the change on CirlceCI

Reviewed By: cortinico

Differential Revision: D36516847

Pulled By: f-meloni

fbshipit-source-id: 2c956295a56cc8aa47df4c64f8ca0a211796c73c
2022-05-23 01:12:25 -07:00
Blair Vanderhoof bc7b5c3011 Fix issue with RTL locales and zoomScale
Summary:
Changelog:
[iOS][Fixed] - When in an RTL locale on iOS, e.nativeEvent.zoomScale is -1. This seems to cause erratic blank spaces that don't recover as you scroll. Set the value to 1 instead when negative.

Differential Revision: D36499121

fbshipit-source-id: f82812ca00ae4162fbff617df8c716a4964b3a8f
2022-05-20 21:49:34 -07:00
Nicola Corti 6838dabae2 Make the reproducer mandatory in the issue template
Summary:
As the title says, let's make this field mandatory so we don't have to ask for
a repro over and over again.

Changelog:
[Internal] [Changed] - Make the reproducer mandatory in the issue template

Reviewed By: cipolleschi

Differential Revision: D36552021

fbshipit-source-id: ac6aa0c3b1583afe38b3fcf78c385e5bdfb5f6e2
2022-05-20 12:54:02 -07:00
Luna Wei 3369a29bda PointerEvents: RNTester make example easier to specify what events you want to listen to
Summary: Changelog: [Internal] - Make it easier to specify what events to listen to on each `EventfulView`. This is helpful for testing future optimizations to event dispatch filtering. Also removed the switches for triggering events -- the idea being that we're using these examples with Metro and we can just remove the relevant props when we want to not fire any events.

Reviewed By: kacieb

Differential Revision: D36530066

fbshipit-source-id: 3ff45c263bdcacedde8d2720e156ab8156424c53
2022-05-20 11:13:36 -07:00
Genki Kondo 73191edb72 Add optional configs to constructors for AnimatedValue/ValueXY/Color
Summary:
There are use cases of needing to setValue multiple times per second (for example, using PanResponder to update a slider component).

This requires the use of the native driver for perf reasons as using the JS driver will cause a rerender. Currently, the only way to make an animated node native is via setting useNativeDriver: true on an animation config. For example:
```
Animated.timing(animatedValue,
{
  toValue: newValue,
  duration: 0,
  useNativeDriver: true
}).start();
```

To avoid needing to call the above, add a useNativeDriver param to the constructor. When set to true, the node will be made native immediately.

```
const animatedValue = new Animated.Value(0, useNativeDriver);
...
animatedValue.setValue(newValue);
```

Note that, like with useNativeDriver in the animation config, once a node is made native, it cannot be reverted to JS-only.

 ---

As an aside, PanResponder uses JS-side events, and thus we cannot use Animated.event with native driver; we instead need to setValue on a native AnimatedValue. A much more thorough explanation is in D34564598.

 ---

Changelog:
[General][Added] - [Animated] Add useNativeDriver as a param for setValue

Reviewed By: JoshuaGross

Differential Revision: D36459457

fbshipit-source-id: 284148a6d16537429efeab8b07184019990909cd
2022-05-20 10:42:40 -07:00
fortmarek 841793a281 Fix hermes compilation in the `react-native` package (#33881)
Summary:
When releasing the latest RC, we have noticed `pod install` is broken since the downloaded `react-native` package is missing hermes scripts and `shelljs` dependency (needed by `hermes-utils.js`).

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] - Fix compiling hermes in the release version.

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

Test Plan: - Run `test-manual-e2e.sh` with template and Hermes on iOS

Reviewed By: GijsWeterings

Differential Revision: D36546116

Pulled By: cortinico

fbshipit-source-id: 70fe70de7d63193df888b8ece935c4fa97b4dfc8
2022-05-20 07:43:32 -07:00
Pieter De Baets d7dd1789ff Improve type-safety of NativeAnimated with singleOpBatching
Summary:
Improve the types of `queueOperation` so flow can assert that the parameters match.

Also in the case of `singleOpBatching == false`, nativeOps is just an alias of NativeModule so there's no overhead.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D36482617

fbshipit-source-id: e000d11b04166cd7a069af024b9c2cc226efa701
2022-05-20 07:26:15 -07:00
Rachit Mishra 9e0d8696cc fix: crash while loading webview (#33867)
Summary:
This will fix a crash on Motorola devices on Android 7, where WebView fails to load due to initialisation issues in the WebViewChromiumFactoryProvider (Caused by org.chromium.base.library_loader.ProcessInitException).

## Changelog

[Android][Fix] - Exception with `Cannot load WebView` message will initialising WebView (along with existing checks)

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

Test Plan: <img width="1368" alt="Screenshot 2022-05-19 at 02 21 57" src="https://user-images.githubusercontent.com/933314/169154293-c442a54f-96f5-4309-a6ce-c8f9c4beeb17.png">

Reviewed By: javache

Differential Revision: D36517673

Pulled By: cortinico

fbshipit-source-id: 4fa5b903529eb04d01ed8fa540cbd883224e8e62
2022-05-20 04:28:31 -07:00
Michał Pierzchała 0605880c9e Upgrade RN CLI to v8.0.0 (#33859)
Summary:
Upgrades the React Native CLI to v8 stable version. cc fortmarek kelset cortinico

To be cherry-picked in 0.69.

## Changelog

[General] [Changed] - Upgrade RN CLI to v8.0.0

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

Test Plan: CI

Reviewed By: dmitryrykun

Differential Revision: D36476124

Pulled By: cortinico

fbshipit-source-id: c2b71fcfe1850539ed8d685351c0cd88c283373b
2022-05-20 01:48:14 -07:00
Sam Zhou bd7eb45a7d Enable constrain writes
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D36506286

fbshipit-source-id: 0dfe0b61a370ea5c6767552047544078f21a2a1c
2022-05-19 21:14:33 -07:00
Kevin Gozali 4ec75b1797 Import dispatchCommand utility from the right Renderer module
Summary:
With the new architecture, this module should be using the implementation from ReactFabric instead. However, given the ReactNative module had side effects (like registering `RCTEventEmitter`), let's import from ReactFabric only in the latest "new architecture" mode.

Changelog: [Internal]

Reviewed By: TheSavior

Differential Revision: D36535626

fbshipit-source-id: 6758b671df9a47607d8caf4a021ac73410f4c6e9
2022-05-19 20:54:48 -07:00
Joshua Gross 0fc42fd35c Add detail to Fabric perf logs (median, average, max)
Summary:
I'm finding it useful to keep track of a few additional numbers when doing perf analysis in Fabric.

Also making it easier to enable just these perf logs without all of the other verbose Fabric logs.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D36500518

fbshipit-source-id: e57e1e75131c5d59da876d1decb96d4da386f025
2022-05-19 18:55:56 -07:00
Joshua Gross 4fc0630faa Animated MegaOp: fix `removeAnimatedEventFromView` call
Summary:
We were calling the wrong operation from the MegaOp which caused indices to become offset. Trivial fix.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D36482822

fbshipit-source-id: 83ebc37a8773f0277db4caff9d3e7c9c91931ddb
2022-05-19 18:55:56 -07:00
Vincent Riemer 291f26c5c0 Fill out w3c pointer event types
Summary: Changelog: [Internal] Fill out w3c PointerEvent flow types

Reviewed By: yungsters

Differential Revision: D36296044

fbshipit-source-id: f1c184fd6486fa72077e5b80d2335919af0fc145
2022-05-19 18:48:24 -07:00
Franco Meloni ca8174e15f Create script to automatically set CLANG_CXX_LANGUAGE_STANDARD on the client project (#33863)
Summary:
Currently this [section](https://reactnative.dev/docs/next/new-architecture-app-intro#ios-enable-c17-language-feature-support) of the Playbook tells us to set CLANG_CXX_LANGUAGE_STANDARD = "c++17" in the main app target for the new architecture to work.
Would be nice to be able to automate that instead

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Added] - Cocoapods function to add the `CLANG_CXX_LANGUAGE_STANDARD` to all the targets if needed

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

Test Plan:
I've created some unit tests for the newly added function.
I've executed pod install and the ruby tests locally.

Reviewed By: cipolleschi

Differential Revision: D36484366

Pulled By: f-meloni

fbshipit-source-id: 553b092e747bef11d82195619ae1058985fdc325
2022-05-19 14:57:04 -07:00
Pieter De Baets baada4e299 Remove shadowview copy in setIsJSResponder
Summary:
Noticed we were copying ShadowView, where a reference should suffice.

Changelog: [Internal]

Reviewed By: appden

Differential Revision: D36455200

fbshipit-source-id: 2cd3cf66b9e5ec05bce9ce1d739fbed66f3a6d89
2022-05-19 11:48:02 -07:00
Riccardo Cipolleschi 05aaba9514 Align Codegen between iOS and Android (#33864)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33864

This Diff aligns the way in which iOS and Android codegen the modules and components.
Android takes all the JS in the project root folder and creates components starting from there.
iOS used to required to specify a specific path for each component, within a JSON field called `libraries`. This Diff let iOS work in the same way as android does

**Backward compatibility:** This diff still support the old way for iOS, but we are deprecating it.

## Changelog
[iOS][Added] - Support codegen from a single folder

Reviewed By: cortinico

Differential Revision: D36473005

fbshipit-source-id: 1e8cf0f9764f529c02e948984c74d1982a84030b
2022-05-19 05:52:40 -07:00
Pieter De Baets 1c1fbce2d1 Fix embarrassing typo in Animated
Summary:
Which idiot wrote this? Oh yeah, I did.

This was introduced in D36109810 (bf405d7083) so hasn't been around too long luckily.

Changelog: [Internal]

Reviewed By: cortinico, GijsWeterings

Differential Revision: D36480272

fbshipit-source-id: b0fbb6b820185185359c6c75f77f2921dc892b02
2022-05-19 05:33:09 -07:00
Nicola Corti 5bb0caf858 Fix `test_windows` by passing the correct platform to the Metro Virtual FS (#33870)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33870

I'm fixing a broken CI on master for `test_windows` as `metro-memory-fs` doesn't
automatically recognize the platform but needs to have it passed in input.
It was currently failing to parse a `C:\...` path. This fixes it.

Changelog:
[Internal] [Changed] - Fix `test_windows` by passing the correct platform to the Metro Virtual FS

Reviewed By: cipolleschi

Differential Revision: D36507564

fbshipit-source-id: 39dfd7e9ce492d126fbb513a70ec5a60965c61fd
2022-05-19 03:29:56 -07:00
Nicola Corti c19bc0b6a2 Do not fail if -javadoc.jar are missing in the final NPM package (#33869)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33869

When I disabled the Javadoc pubblication as it was failing on CI,
I forgot to turn off the verification that the -javadoc artifact is included
inside the NPM package. This caused `build_npm_package-1` to fail on main.
I'm fixing it here.

Changelog:
[Internal] [Fixed] - Do not fail if -javadoc.jar are missing in the final NPM package

Reviewed By: cipolleschi

Differential Revision: D36507320

fbshipit-source-id: 3836de5212de91bb44e0e586564b46114ca346b4
2022-05-19 02:48:39 -07:00
Sam Zhou e584fd16a1 Revert D36417372: Enable constrain writes
Differential Revision:
D36417372 (f6d119b572)

Original commit changeset: 24c2219cf636

Original Phabricator Diff: D36417372 (f6d119b572)

fbshipit-source-id: 8aeb64dcac8f6c3efe30b81bb807c560c58db3fa
2022-05-18 22:48:28 -07:00
Sam Zhou f6d119b572 Enable constrain writes
Summary: Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D36417372

fbshipit-source-id: 24c2219cf636753ed6fb456331d39c0f398dd107
2022-05-18 15:06:48 -07:00
Blair Vanderhoof 82b268f884 Revert D36468390: Fix negative zoomScale in RTL
Differential Revision:
D36468390 (2f491bfa9f)

Original commit changeset: f18244f1421f

Original Phabricator Diff: D36468390 (2f491bfa9f)

fbshipit-source-id: 925a7b811aaeefb0cda20493365c1e12cab66ee0
2022-05-18 14:44:46 -07:00
Nicola Corti dadcfcae95 Disable Javadoc publishing as it's currently failing on CI
Summary:
I'm disabling the publishing of Javadoc as it's currently failing on CI.
The failure is happening due to a concurrency problem during the Kotlin
documentation generation.

As we don't have much Javadoc to export, I'm removing this for now.

Changelog:
[Internal] [Fixed] - Disable Javadoc publishing as it's currently failing on CI

Reviewed By: cipolleschi

Differential Revision: D36481215

fbshipit-source-id: 6f875932013f80779151f75e20d25ba3b71de074
2022-05-18 11:48:16 -07:00
Pieter De Baets a4690d054f Disable early return in NativeAnimatedHelper.flushQueue
Summary:
This is the same issue as https://www.internalfb.com/diff/D36298399 (55ee8ce0c4) which was reverted earlier this week.

Changelog: [Internal]

Differential Revision: D36479089

fbshipit-source-id: 2bce05882a558db0c3464ec4a2b05eee36a3048a
2022-05-18 10:36:03 -07:00
Brent Kelly 763dc52387 refactor: Updating template to support dark mode StatusBar on Android (#33561)
Summary:
This PR adds a `backgroundColor` prop to the `StatusBar` in the starter template so that Dark Mode is correctly demonstrated when running on Android.

**Before**

StatusBar in starter app on Android would remain the same color no matter what the current device color scheme was.

<img width="300" alt="Screenshot 2022-04-04 at 09 30 54" src="https://user-images.githubusercontent.com/5814579/161505272-88b57e86-3ada-4bf5-beef-a1f5a1661eaa.png"><img width="300" alt="Screenshot 2022-04-04 at 09 31 12" src="https://user-images.githubusercontent.com/5814579/161505278-c2da0421-83ab-4e03-9f04-718f5503ed36.png">

**After**

StatusBar in starter app on Android correctly reacts to the color scheme.

<img width="300" alt="Screenshot 2022-04-04 at 09 29 41" src="https://user-images.githubusercontent.com/5814579/161505014-af3b255b-650b-435f-9e37-2f604d5f0310.png"><img width="300" alt="Screenshot 2022-04-04 at 09 29 22" src="https://user-images.githubusercontent.com/5814579/161505011-55ae4ffe-bfd0-449c-a6c1-0d2b8d3aee59.png">

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Android] [Changed] - Demonstrating Dark Mode correctly in the `StatusBar` for the starter template App.

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

Test Plan: This was a very simple change that I was able to verify in a newly generated RN project by copying the `backgroundColor` prop across. See screenshots above.

Reviewed By: christophpurrer

Differential Revision: D36018771

Pulled By: kacieb

fbshipit-source-id: c037cb19478affaa9c5485ebd9babf728cced1d6
2022-05-18 09:39:12 -07:00
Pieter De Baets 5451f890a1 Cache method IDs in JavaTurboModule
Summary:
Codegen a static field for every caller of `invokeJavaMethod` to cache the jmethodID that should be used for the method, which saves us a string-based name lookup at invocation time.

Changelog: [internal]

Reviewed By: genkikondo

Differential Revision: D36376056

fbshipit-source-id: 298430746a8f25a5337aba05b56876ba789e2344
2022-05-18 09:12:10 -07:00
Pieter De Baets d1541f169f Use fbjni boxed values for Java turbomodule arg conversion
Summary:
Simplify argument and result conversion by using existing fbjni helpers (which will cache class and method ID lookups already)

Changelog: [internal]

Reviewed By: RSNara

Differential Revision: D36312751

fbshipit-source-id: 16713642b2c5fb4c2b6447c30652d91ddbd88224
2022-05-18 09:12:10 -07:00
Pieter De Baets fced96bf52 Fix non-touch event dispatching not being blocked by pointer-events
Summary: Changelog: [Android][Fixed] Scroll views would still receive scroll events when nested in a view with `pointer-events: "none"`

Differential Revision: D36423921

fbshipit-source-id: 87b8a236e15dda7b648b6fc649187e95a9a2cc42
2022-05-18 08:35:16 -07:00
Franco Meloni 7b703eb78b Cache .git to improve checkout time (#33845)
Summary:
Caching the .git to speed up the checkout.

https://circleci.com/docs/2.0/caching/#source-caching

<img width="1429" alt="Screenshot 2022-05-17 at 11 11 54" src="https://user-images.githubusercontent.com/17830956/168787771-5501b113-674e-4d43-b93f-90bf46882c14.png">

This doesn't work on the machines that use a docker executor

<img width="1426" alt="Screenshot 2022-05-17 at 12 17 14" src="https://user-images.githubusercontent.com/17830956/168789017-538a6d04-c53d-4ac7-ba12-0eccff397675.png">

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Infrastructure] - Cache .git to improve checkout time

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

Test Plan: Run the change on Circle

Reviewed By: hramos, cortinico

Differential Revision: D36443844

Pulled By: f-meloni

fbshipit-source-id: 7b07e177f4527ed5956f03ad622838f20ad64950
2022-05-18 07:43:51 -07:00
Pieter De Baets 56e9aa369f Avoid emitting mountitems for default values
Summary:
Noticed that we emit a large amount of (admittedly cheap) mountitems as part of node creation for values that are all zero (e.g. padding, overflowinset), which we can assume to be already initialised with these values on the native side.

There's a further opportunity to do this for State as well, as ReactImageComponentState exports just empty maps to Java.

Changelog: [Internal]

Reviewed By: genkikondo

Differential Revision: D36345402

fbshipit-source-id: 8d776ca124bdb9e1cd4de57a04e2785a9a0f918c
2022-05-18 05:44:11 -07:00
Riccardo Cipolleschi 8a8c33aab9 Move fabric setup to a separate file (#33818)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33818

This Diff moves the fabric setup from the `react_native_pods` script to its own `fabric` file.

It also introduces tests for the file and some test utilities.

## Changelog
[iOS][Changed] - Move fabric setup to its own file

Reviewed By: cortinico, dmitryrykun

Differential Revision: D36344911

fbshipit-source-id: 586186684be2c0080f247390f26145f2defa9e97
2022-05-18 02:57:35 -07:00
Blair Vanderhoof 2f491bfa9f Fix negative zoomScale in RTL
Summary:
Changelog:
[iOS][Fixed] - When in an RTL locale on iOS, e.nativeEvent.zoomScale is -1. This seems to cause erratic blank spaces that don't recover as you scroll. Taking Math.abs of the value fixes it. Blame: D36169686 (13a72e0ccc)

Differential Revision: D36468390

fbshipit-source-id: f18244f1421fc1ccbb0d1035df8a7c6de10ccf62
2022-05-17 21:50:25 -07:00
Joshua Gross 35e2a63b8d Batch Animated calls into one JSI call per frame
Summary:
We introduce a few optimizations:

(1) Previous diff: We defer calling any NativeAnimatedModule methods by waiting 1ms before flushing the queue, and debouncing until no flush is requested. Practically, this just means that we'll call NativeAnimatedModule methods N times at once, at the end of a render loop, instead of N times smeared throughout the render loop.
(2) Additionally, instead of calling N methods, we create multi-operation argument buffer and call a single NativeAnimatedModule API, which should essentially throttle NativeAnimatedModule API calls to once-ish per frame. On the native side, this also reduces a lot of overhead associated with scheduling work on the UI thread (we schedule 1 function to run on the UI thread and perform N operations, as opposed to scheduling N functions to run on the UI thread).

TODO:
- implement stubs for iOS
- write gating code so this can be properly tested in VR and in fb4a

Changelog: [Internal]

Reviewed By: genkikondo

Differential Revision: D36338606

fbshipit-source-id: 29ac949b53b874683128a76525586c22def3143b
2022-05-17 16:42:41 -07:00
Joshua Gross 29a91babd4 Delay Animated operations by at most 1ms (one render loop) to batch all operations and execute at once
Summary:
Because of the disconnect between the ReactJS render loop and Animated nodes, we don't know when a render loop begins or ends. Historically we haven't cared about that much,
but now for perf reasons we're attempting to batch them. Scheduling a function to execute at the end of the runloop and canceling until nothing interrupts it achieves that.

Impact seems fairly minimal and this should work everywhere (android, ios, etc) but we may want to gate the behavior as it *could* change things in surprising ways.

Changelog: [Internal]

Reviewed By: genkikondo

Differential Revision: D36338621

fbshipit-source-id: 48e52a1b2e2bcfb3ef13d3abd38d735967356de7
2022-05-17 16:42:41 -07:00
Nicola Corti afb0307036 Setup a toplevel downloadAll task (#33852)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33852

Similarly to buildAll and cleanAll, I'm creating a downloadlAll task
which is aligning the behavior of the download task we're doing on CIs.

I've also updated the Offline Cache as we're now storing a bigger set of dependencies.

Changelog:
[Internal] [Changed] - Setup a toplevel downloadAll task

allow-large-files

Reviewed By: cipolleschi

Differential Revision: D36441728

fbshipit-source-id: f847b5e665c64e0b4b93d984bbc1b64c00a3b4f7
2022-05-17 15:31:48 -07:00
Nicola Corti 7c82cc3095 Add a note about React/React-Native versioning
Summary:
I'm adding a readme inside the ./Libraries/Renderer folder
to explain how React and React Native are aligned.

Changelog:
[Internal] [Changed] - Add a note about React/React-Native versioning

Reviewed By: cipolleschi

Differential Revision: D36445819

fbshipit-source-id: cf1b071b9996bcc8222deab2e9458f014766f2a9
2022-05-17 14:49:00 -07:00
Franco Meloni b331229b06 Remove build_ios and use only test_ios (#33837)
Summary:
build_ios is a subset of test_ios.
The Hermes cache takes 20-30 minutes to be downloaded and unarchived, that is the slowest part of both the jobs and that was duplicated.
This means that if we remove build_ios we save a lot of time, and the CI is still covering the build and the testing of the code.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] - Remove build_ios and use only test_ios

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

Test Plan: Checked on CircleCI

Reviewed By: cipolleschi

Differential Revision: D36437775

Pulled By: f-meloni

fbshipit-source-id: 53adf77e3511963d2dbfadf26122fd70b0de1113
2022-05-17 04:02:19 -07:00
Hetan Thakkar 2fb107c9a6 Fixed Textinput not properly handling padding and paddingVertical in style props (#33564)
Summary:
Fixes https://github.com/facebook/react-native/issues/33562 #21720. Earlier this [`paddingTop`](d5da70e17e/Libraries/Components/TextInput/TextInput.js (L1367)) used to override the  `paddingTop` of `padding` and `paddingVertical` of the style props. Using `Stylesheet.flatten` will solve this problem.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Fixed] - Fixed paddingTop not being applied when using padding and paddingVertical in multiline textinput

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

Reviewed By: christophpurrer, cortinico

Differential Revision: D36018667

Pulled By: kacieb

fbshipit-source-id: 0af0ed8ea536ec4e813325b1cf93c7cb2481eb07
2022-05-17 03:26:34 -07:00
Nicola Corti d51534ae01 Fix broken AndroidConfigurationTest.kt on main
Summary:
The bump of AGP to 7.2 caused the tests inside `AndroidConfigurationTest.kt` to fail.

As we're now running `buildAll` both on Sandcastle and on CircleCI, this is now failing
on both CIs. The issue is that AGP 7.2 change the way to introspect resValues and
requires now to specify a type when querying for a value. I'm updating the tests here.

Changelog:
[Internal] [Fixed] - Fix broken AndroidConfigurationTest.kt on main

Reviewed By: cipolleschi

Differential Revision: D36437875

fbshipit-source-id: 58f457a78eae861e86808e58c23f5d04fb196d45
2022-05-17 02:04:05 -07:00
Tianyu Li d5a6bee35f Assign the right oncall with best guess to miscellaneous xplat test modules
Summary:
We try to remove the use test_ownership_2020 oncall, which was created to enforce oncall field in test module. This diff stack tries its best to guess who the right oncall is for these "unowned" tests.

If you don't think this belongs to you, please
1. Either re-assign to another team to your best knowledge
2. Or delete the test

Every test should have an owner!

Differential Revision: D36404812

fbshipit-source-id: daf57e860d3700928ae4518897d87247a672eae4
2022-05-16 18:46:04 -07:00
Pieter De Baets 7c5d9ccb46 Fix NativeAnimatedNodesManager registering event listener multiple times
Summary:
Noticed that (LockFree)EventDispatcherImpl had NativeAnimatedNodesManager as a listener 100+ times, as listener registration can happen multiple times from Animated node creation. Since listener management on event dispatcher is thread-safe, we can avoid the thread hop for this.

Changelog: [Internal]

Reviewed By: genkikondo

Differential Revision: D36316102

fbshipit-source-id: f2f417b69885def87f88460d8b1e0b35b66726cb
2022-05-16 14:06:58 -07:00
Genki Kondo 57d3b9e2ca Modify VirtualizeUtils.elementsThatOverlapOffsets to use binary search
Summary:
elementsThatOverlapOffsets was quite inefficient as it was doing a linear scan over all items without an early out for each input offset.

The number of items can be large, so we'd want to use binary search here.
Before: O(MN), where M is the # offsets and N is the # items
After: O(MlogN)

As a utility method, elementsThatOverlapOffsets should not be responsible for checking that the offsets are in increasing order

'binary-search' dep added via https://www.internalfb.com/intern/wiki/React_Native/Building_Product_Experiences/Third_Party_Packages_(npm)/

Changelog:
[Internal] - Modify VirtualizeUtils.elementsThatOverlapOffsets to use binary search

Reviewed By: javache

Differential Revision: D36292326

fbshipit-source-id: 5f22eb5533b69e2ebe5c1cb34e4f82605838f0a7
2022-05-16 13:14:35 -07:00
Nicola Corti 4994b8b5de Setup a top level buildAll Gradle task (#33838)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33838

The idea behind this diff is to set a top level `buildAll` task that will be responsible
of invoking all the tasks we want to verify both in the internal and in the external CI.

This should ideally remove the breakages of the External CI happening from internal changes.

Changelog:
[Internal] [Changed] - Setup a top level buildAll Gradle task

Reviewed By: cipolleschi

Differential Revision: D36376384

fbshipit-source-id: d810b59577340628bb49562bfedf28440bd0f792
2022-05-16 09:27:54 -07:00
Ken Tominaga c73e021a4b Remove iOS 11 deprecation warnings around SafeArea (#32851)
Summary:
We don't have to check or emulate the safe area for iOS 11 above. I deleted the unnecessary check for the safe area.

This is a continuation pull request of these iOS 11 availability check.
* [Remove iOS 11 version check by ken0nek · Pull Request https://github.com/facebook/react-native/issues/32151 · facebook/react-native](https://github.com/facebook/react-native/pull/32151)
* [Remove iOS 11 availability check by ken0nek · Pull Request https://github.com/facebook/react-native/issues/32488 · facebook/react-native](https://github.com/facebook/react-native/pull/32488)

-----

- Stop using layout guide (`topLayoutGuide`, `bottomLayoutGuide`)
- Refactor `RCTSafeAreaView`
- Delete `emulateUnlessSupported` property

Docs PR: https://github.com/facebook/react-native-website/pull/2919

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Removed] - Remove `emulateUnlessSupported`

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

Reviewed By: philIip, sammy-SC

Differential Revision: D33586023

Pulled By: cortinico

fbshipit-source-id: 75fc1037141f71d9340c7b875a6bf86f9cfd6a02
2022-05-16 09:27:43 -07:00
Dulmandakh c274456e5b Bump Android Gradle Plugin to 7.2.0 (#33817)
Summary:
Bump Android Gradle Plugin to 7.2.0 (May 2022), which supported by latest Android Studio (Chipmunk). See https://developer.android.com/studio/releases/gradle-plugin#7-2-0

## Changelog

[Android] [Changed] - Bump Android Gradle Plugin to 7.2.0

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

Test Plan: Everything builds and runs as expected

Reviewed By: hramos

Differential Revision: D36379964

Pulled By: cortinico

fbshipit-source-id: ea35cbea0b1a27bceafddd06ed91711d74e281e9
2022-05-16 07:25:03 -07:00
Nicola Corti bf71f10473 Add issue templates for New Architecture (#33832)
Summary:
I'm adding a new Issue Template for New Architecture issues + I've added a contact entry for the Working Group.

## Changelog

[Internal] - Add issue templates for New Architecture

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

Test Plan:
Tested this here
https://github.com/cortinico/react-native/issues/new/choose

Reviewed By: hramos

Differential Revision: D36376737

Pulled By: cortinico

fbshipit-source-id: b8561a7faf0bb99c033686a92bb2d88e443333c2
2022-05-16 04:28:50 -07:00