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

24267 Коммитов

Автор SHA1 Сообщение Дата
Xavier Deguillard ece1dd4ed9 BUCK: define GLOG_NO_ABBREVIATED_SEVERITIES everywhere
Summary:
This is only defined on Windows, and thus code that compiles on all platforms
may successfully build on Linux/macOS, but not on Windows, making it
potentially harder to detect and debug. Let's unify all platforms to solve
this.

Changelog: [Internal]

Reviewed By: chadaustin

Differential Revision: D34648154

fbshipit-source-id: b2549bb3eb120e6207cab8baaafced8b1b18e6a7
2022-03-08 12:35:48 -08:00
John Porto c8067f1ffd Misc MsgGen fixes
Summary:
Fix a few issues with msggen:
1. run_msggen: fully-qualified path to clang-format
1. Updated the license for autogenerated files

Changelog: [Internal]

Reviewed By: neildhar

Differential Revision: D34114718

fbshipit-source-id: 831d4b20bfdc39cfa1226e2a32dcb445c8086ff3
2022-03-08 10:22:28 -08:00
Samuel Susla e97e3499c3 Avoid string copy in event dispatching
Summary:
Changelog: [internal]

To avoid unnecessary string copy in event pipeline, use move semantics.

Event pipeline has ownership of event type. Passing it by reference ends up in a copy when `RawEvent` object is constructed. To avoid this, pass string by value through each layer and use move semantics to avoid extra copies.

Reviewed By: javache

Differential Revision: D34392608

fbshipit-source-id: c11d221be345665e165d9edbc360ba5a057e3890
2022-03-08 04:28:51 -08:00
caioagiani 8200063ac6 fix: typos (#33040)
Summary:
Fix typos in:

- `Libraries/Renderer/implementations/ReactFabric-dev.js`: transfered -> **transferred**
- `Libraries/Renderer/implementations/ReactNativeRenderer-dev.js`: transfered -> **transferred**
- `ReactAndroid/src/main/java/com/facebook/react/modules/network/ProgressiveStringDecoder.java`: remainderLenght -> **remainderLength**
- `ReactAndroid/src/main/jni/first-party/yogajni/jni/ScopedGlobalRef.h`: Transfering -> **Transferring**
- `ReactCommon/react/renderer/graphics/Transform.h`:  tranformation -> **transformation**
- `packages/rn-tester/js/examples/ToastAndroid/ToastAndroidExample.android.js`: occured -> **occurred**

## 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] [Fixed] - fix typos

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

Test Plan: Considering this only changes code comments, I don’t think this pull request needs a test plan.

Reviewed By: cortinico, pasqualeanatriello

Differential Revision: D34003812

Pulled By: dmitryrykun

fbshipit-source-id: 5c8699f8efcc4354854190a9aade30dbc5c90fdb
2022-03-08 03:58:58 -08:00
Facebook Community Bot 4ee463c4f1
Re-sync with internal repository (#33392)
Co-authored-by: Facebook Community Bot <6422482+facebook-github-bot@users.noreply.github.com>
2022-03-08 08:18:17 +00:00
Scott Kyle ceeb8ec8b1 Remove need to copy JSI arguments
Summary:
Since the generated functions move JSI arguments as rvalues into these methods, using const lvaue references doesn't provide any benefit, and in fact hinders our ability to *move* arguments somewhere else and instead requires having to confusingly copy them instead (which JSI makes more difficult).

Changelog:
Internal

Reviewed By: nlutsenko

Differential Revision: D34704455

fbshipit-source-id: 520a358d8a7adeb848e7d7eb204f7154f8f4b58d
2022-03-07 19:21:51 -08:00
Scott Kyle 269fa37bb8 Indent C++ method declarations
Summary:
This moves the `indent` function into a `Utils` module so it can be also used to properly indent the abstract methods declarations in a C++ TurboModule spec.

Changelog:
Internal

Reviewed By: nlutsenko

Differential Revision: D34704456

fbshipit-source-id: 88a3a672e4860927b5dd1f5107f40da7b5a83e51
2022-03-07 19:21:51 -08:00
Richard Barnes 3b61f2108d use gmock 1.10 instead of 1.8
Summary: See D34622171 for details

Reviewed By: lehecka

Differential Revision: D34688121

fbshipit-source-id: 09a3c749e0803810dcdca362c4e58a3e6b99dd8a
2022-03-07 17:33:06 -08:00
Héctor Ramos 5a033e668b Build hermesc on Circle CI (#33393)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33393

Build `hermesc` on React Native CI for Linux, Windows, macOS platforms. Provided as a build artifact on nightly releases.

Changelog:

[Internal]

Reviewed By: cortinico

Differential Revision: D34662671

fbshipit-source-id: cd7921423fa92195e1b32bca39a41e579ca28335
2022-03-07 17:02:08 -08:00
David Vacca bfd72ecab1 Revert D31628461
Summary:
Revert of D31628461 (e494e4beb6), this diff broke Text selections in Android. Also I'm unable to reproduce original bug fixed by D31628461 (e494e4beb6)

changelog: [Android][Fixed] Fixed text selection, broken in 0.68

Reviewed By: ShikaSD

Differential Revision: D34700739

fbshipit-source-id: 85cde0032632dc77eb77f91b63c5d3c29b1bbbaf
2022-03-07 16:17:46 -08:00
Qiao Tan c1af99d57e Back out "Back out "React Native sync for revisions 4de99b3...1780659""
Summary:
Original commit changeset: ce589d6e7d22

Original Phabricator Diff: D34632014 (4eef075a58)

Changelog:
[General][Changed] - React Native sync for revisions 4de99b3...1780659

-----

As part of the effort to address T113279390, we tried to back out a change in RN (D34632014 (4eef075a58)) but later realized it wasn't actually the root cause.

So this diff is to re-land the original change again.

Reviewed By: ShikaSD

Differential Revision: D34694253

fbshipit-source-id: 76fcfb852b8d8ae6e4287d1bc2b13010e824dd0b
2022-03-07 16:06:44 -08:00
Genki Kondo 87cdb607e4 Support animating text color with native driver
Summary:
Typically, ReactTextView#setText is called via ReactTextViewManager#updateExtraData, but natively animated color changes bypass render and layout pass via direct call to SurfaceMountingManager#updateProps from UIManager#synchronouslyUpdateViewOnUIThread.

Thus, for animated color changes to get applied, we need to handle the color prop in ReactTextAnchorViewManager.

In addition, native driver updates are not synchronized with Fabric's mounting; if the native driver update happens before mount, the update is done in updateState.

Changelog:
[Android][Added] - Support animating text color with native driver

Reviewed By: mdvacca

Differential Revision: D34630294

fbshipit-source-id: c0f1e19c801c0e909e84387d623a6556ce6f2d67
2022-03-07 15:10:24 -08:00
Daniel Andersson e1dc9a756b Silence some warnings in xcode 13.3
Summary:
Silence some warnings in xcode 13.3 by explicitly defining some copy constructors in JSI and adding a compiler flag in Hermes.

Changelog:
[Internal][Fixed] - Build issues

Reviewed By: jpporto

Differential Revision: D34526541

fbshipit-source-id: 7029e3d20b9209007cf7e9f4c935338513ee1dd0
2022-03-07 11:52:51 -08:00
skychx ae3d4f7008 Android: Fix crash caused by Image.queryCache parsing null (#32101)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/32101

Reviewed By: cortinico

Differential Revision: D34687038

Pulled By: ShikaSD

fbshipit-source-id: 1b39a34a689a043425891416ff141ef622eacd24
2022-03-07 11:01:25 -08:00
Diego Pasquali 7b05b091fd Integrated iOS-only `accessibilityLanguage` prop (#33090)
Summary:
This PR fixes https://github.com/facebook/react-native/issues/30891

This PR is going to add an `accessibilityLanguage` prop to all the available components. This props is currently working only on iOS and should follow the [guidelines of the relative configuration](https://developer.apple.com/documentation/objectivec/nsobject/1615192-accessibilitylanguage).

I'm in no way an expert on native programming (especially Objective-C) so I'm open to changes / improvements 🙂

## 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] - Integrated the `accessibilityLanguage` prop to all the available components. The prop is available for any platform but it will work only on iOS.

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

Test Plan:
This has been tested using both the Simulator, checking for the `Language` attribute, and using a physical device with the Voice Over enabled.

<img width="1083" alt="Screenshot 2022-02-11 at 13 17 32" src="https://user-images.githubusercontent.com/5963683/153590415-65fcb4ff-8f31-4a0f-90e5-8eb1aae6aa3d.png">

Reviewed By: philIip

Differential Revision: D34523608

Pulled By: rh389

fbshipit-source-id: b5d77fc0b3d76ea8ed8f30c8385459ba98122ff6
2022-03-07 09:43:30 -08:00
Kevin Lin ff769521e4 Remove usage of overlay component builder
Summary: Changelog: [Internal]

Reviewed By: Andrey-Mishanin

Differential Revision: D34683221

fbshipit-source-id: 204fab7185017d1718cbcac5d2b388c8c0eaab08
2022-03-07 07:58:20 -08:00
Danilo Bürger 42b01a32a1 Use relative installation root instead of absolute to avoid embedding absolute paths in pods project (#33187)
Summary:
Use relative installation root instead of absolute to avoid embedding absolute paths in pods project
Also removes a leading space from each path.

Before:

<img width="799" alt="155846827-94c474b7-8a79-45fc-a900-8860a94fb318" src="https://user-images.githubusercontent.com/996231/155847731-de128759-bff5-4d1f-a59a-377298055d85.png">

After:

<img width="745" alt="Screenshot 2022-02-26 at 15 58 32" src="https://user-images.githubusercontent.com/996231/155847739-b783debc-a805-4ce7-a88a-33f764dc5985.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
-->

[iOS] [Fixed] - Remove absolute paths from pods project

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

Test Plan: Pod install and view in Xcode FBReactNativeSpec -> Build Phases -> [CP-User] Generate Specs

Reviewed By: ShikaSD

Differential Revision: D34549541

Pulled By: dmitryrykun

fbshipit-source-id: 2926b093fb87f50ef9988e23fce593348f00077d
2022-03-07 06:44:25 -08:00
Nicola Corti a0511a1daa Attempt to fix CircleCI by bumping CMake to 3.18.1 (#33382)
Summary:
I accidentally broke CircleCI. This PR attempts to fix it by setting the requested CMake version to `3.18.1`.

We might have to bump the Docker image to fix this instead.

## Changelog

[Internal] - Attempt to fix CircleCI by bumping CMake to 3.18.1

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

Test Plan: Will rely on Green CircleCI

Reviewed By: motiz88

Differential Revision: D34679269

Pulled By: cortinico

fbshipit-source-id: 2addb0914d900c5e712e905cf14a54d6028cf417
2022-03-07 01:26:23 -08:00
Nicola Corti 29aed0812c Revert Add support for C++17 in OSS for ReactAndroid
Summary:
changelog: internal

This broke the build of `ReactAndroid`. The error reported is the following:

https://github.com/react-native-community/docker-android/runs/5432343549?check_suite_focus=true

Created from CodeHub with https://fburl.com/edit-in-codehub

Reviewed By: ShikaSD

Differential Revision: D34667826

fbshipit-source-id: fa84f03eca4cc7873088ebf2de473547dffea224
2022-03-05 12:41:37 -08:00
Nikita Lutsenko 1f87729697 rn | cxx | Move the definitions of TurboModule virtual methods to declaration, to allow for use in context with RTTI.
Summary:
Not having this disallows including turbo module and extending in places where RTTI is enabled.
There is no additional includes or implementation changes - it merely allows for things to nicely link with other libraries.

Changelog: [General][Fixed] - Allow including TurboModule.h in mixed rtti/no-rtti environment, even if TurboModule.h/cpp is compiled without RTTI.

Reviewed By: appden

Differential Revision: D34637168

fbshipit-source-id: 2e5d9e546bdc5652f06436fec3b12f1aa9daab05
2022-03-04 19:04:36 -08:00
Xin Chen 87ad1e8570 Intercept touch event for simulated joystick scrolling to avoid nested scroll view issues
Summary:
The issue to be fixed here is an edge case when in nested scroll view, for example vertical scroll wraps horizontal scroll, when user scrolls horizontally then move the joystick downwards, the horizontal scroll would bounce back. This is shown in the demo:

https://pxl.cl/209f8

The root cause of the issue is due to two workflows fight to set the scroll position and confusing the scroll change dispatcher to calculate fling velocity direction, which caused a wrong fling behavior. Check this log and description to get more details:

{F706620839}

To fix the issue, in this diff we overridden the `onInterceptTouchEvent` method in panel app scroll views, and make it return true when the previous scroll is still running. This effectively skips the drag slop in the default scroll view behavior, as we know the touch event should've been handled by the scroll view if it's still scrolling.

This way, the vertical scroll part on the vertical scroll view will not be dispatched to the horizontal scroll at all. This allows the nested scroll view to work separately.

Changelog:
[Android][Internal] - Share the post intercept touch event logic in scroll views

Reviewed By: javache

Differential Revision: D34627329

fbshipit-source-id: d500ec3bfbe349a45ef5c1360b5c8807c168f682
2022-03-04 15:50:00 -08:00
Xin Chen 0368081858 Cancel the post touch fling when new touch is registered
Summary:
This diff aims to fix an issue I found while working on T113264056. It's to address the [comment](https://www.internalfb.com/diff/D3207608 (a3146e41a2)?dst_version_fbid=507451319451602&transaction_fbid=1615731455398227) in an old diff D3207608 (a3146e41a2). That issue begins to surface after I made the change in the next diff, which is discussed in detail in the task description (T113385381).

The fix here is to cancel the post touch processing when a new touch down is received. This should've cancel any previous post touch processing as the new touch should take full control of scrolling.

Changelog:
[Android][Fixed] - Cancel post touch process when new touch is received

Reviewed By: javache

Differential Revision: D34627330

fbshipit-source-id: 1fb8cfc1a4d94349b5290915a0a9f190186f2af3
2022-03-04 15:50:00 -08:00
Lulu Wu ab45138394 Report js exceptions via Lacrima
Summary:
Why Lacrima?
- Throw a JavascriptException in native won't get the js error reported to backend, we need to use reporter APIs
- Lacrima is a new error reporting framework to report crashes and app deaths in android applications at Facebook, and it has APIs for reporting js exceptions.
- ```FbErrorReporterImpl.java``` uses ```Acra``` API to report, and ```Lacrima``` is a rewrite of ```Acra``` https://fb.workplace.com/groups/323014308578038/
- We've been receiving js errors reported via Lacrima https://fburl.com/logview/y1vhc8u8

In this diff all js errors are treated as soft errors during reporting because they don't usually crash the app, crashes will be reported with a different category.

Changelog:
[Android][Chagned] - Change static string to public

Reviewed By: fkgozali

Differential Revision: D34095100

fbshipit-source-id: 73d89647134a197baf5d228d620732781b6bd723
2022-03-04 15:42:52 -08:00
Marshall Roch 2b0d72ae6a deploy 0.172.0
Summary: Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D34630927

fbshipit-source-id: b8ba532658c58950d4f0237ec0563004333c35ed
2022-03-04 12:01:41 -08:00
Scott Kyle 402ad82027 Don't crash from wrong types
Summary:
The `get*` methods will assert and thus crash if JS passes a value by the wrong type. Although we have type checking, we should strive to never crash the app if an incorrect value slips by. The `as*` variants will throw an error back into JS instead.

Changelog:
Internal

Reviewed By: christophpurrer

Differential Revision: D34630900

fbshipit-source-id: 5ec55ca08ca7a1f43b2d9bfbb1d4e6fa89146e12
2022-03-04 08:02:17 -08:00
Scott Kyle 603620b739 Add asBool() method
Summary:
Changelog:
[General][Added] - Add asBool() method to JSI

Reviewed By: mhorowitz

Differential Revision: D34630901

fbshipit-source-id: 3007784618fcc0f7828eee42de5cbf2bd71258c5
2022-03-04 08:02:17 -08:00
Nicola Corti 350f8c5ed0 Setup publishing for the `ReactAndroid/hermes-engine` to the top level `/android` folder.
Summary:
This sets up the publishing of the `hermes-engine` to end up in the Maven Local repository
we have set up inside the ./android folder of the NPM package of `react-native`.
Artifacts from there will be picked up similarly to what it's happening for React Android

Changelog:
[Internal] [Changed] - Setup publishing for the `ReactAndroid/hermes-engine` to the top level `/android` folder.

Reviewed By: hramos

Differential Revision: D34213638

fbshipit-source-id: adbc0d1559ee815f9d7a711c9c77489ec92b76ff
2022-03-04 07:27:13 -08:00
Nicola Corti a211089b9b Setup an android library project inside `ReactAndroid/hermes-engine`
Summary:
This commits sets up an Android library by applying the plugin
and configuring all the necessary flags.

Flags have been adapted from:
https://github.com/facebook/hermes/blob/main/android/hermes/build.gradle
Removing the unnecesary ones and adapting the build to conform
to the React Native build system.

Changelog:
[Internal] [Changed] - Setup an android library project inside `ReactAndroid/hermes-engine`

Reviewed By: hramos

Differential Revision: D34213534

fbshipit-source-id: c2e7b810bf4c4b1831a764a6f76cb73722da2125
2022-03-04 07:27:13 -08:00
Nicola Corti d96cd6d285 Create a Gradle task to setup the Hermes Ninja build
Summary:
As the title says, we need to invoke:
```
./utils/build/configure.py ./ninja_build
cmake --build ./ninja_build --target hermesc
```
In order to build the Hermes compiler, otherwise the CMake build
will fail with a missing Cmake file.

Changelog:
[Internal] [Changed] - Create a Gradle task to setup the Hermes Ninja build

Reviewed By: hramos

Differential Revision: D34213468

fbshipit-source-id: 83f70bdb068f99ce17a44207b4282fde2d7420ca
2022-03-04 07:27:13 -08:00
Nicola Corti 191fc0f7cc Setup a Gradle build inside `ReactAndroid/hermes-engine` to download Hermes sources
Summary:
This Diff sets up a small Gradle build inside `ReactAndroid/hermes-engine`
The idea is to kickoff a small project where we can download Hermes sources and start a compilation of
the Hermes sources from there.

Specifically the used paths are:

- `/sdk/hermes` for the unzipping
- `/sdk/download/hermes.tar.gz` for the tarball location
- `/sdk/hermes/.hermesversion` for the hermes version.

allow-large-files

Changelog:
[Internal] [Changed] - Setup a Gradle build inside `hermes-engine` to download Hermes sources

Reviewed By: hramos

Differential Revision: D34210236

fbshipit-source-id: 97034f5608dfb3fcd1d74e9851944f7a60e52ea1
2022-03-04 07:27:13 -08:00
Samuel Susla a159416333 Use std::optional instead of butter::optional
Summary: changelog: Use std::optional instead of butter::optional

Reviewed By: fkgozali

Differential Revision: D33352680

fbshipit-source-id: 45a53fec181a6ffb6218909bc23348f7c9f21ec4
2022-03-04 07:25:59 -08:00
Samuel Susla c2e4ae39b8 Add support for C++17 in OSS
Summary: changelog: Add support for C++17

Reviewed By: cortinico

Differential Revision: D34612257

fbshipit-source-id: 88a0307a750f2e0793a639b7a2b670a4571332fe
2022-03-04 07:25:59 -08:00
Qiao Tan 4eef075a58 Back out "React Native sync for revisions 4de99b3...1780659"
Summary:
Original commit changeset: f1c831a45f96

Original Phabricator Diff: D34552175 (6a4e905e3a)

Changelog:
[Android][Fixed] - Revert back a previous change that could cause null pointer exception on UI manager

----

Context:

We were flagged a spiking crash on BizApp v348 (T113279390). We were able to repro the issue on multiple UI components on BizApp so we suspect it's caused by some kind of RN infra issue.

Unfortunately the issue can't be always reproed so we can't do a biset.

Based on mdvacca's initial assessment, the original diff D34552175 (6a4e905e3a) was landed right before version 348.0.0.0.114 was created which aligns with the timeline of the crash (see attached task).

We've also tried to backout the diff locally and tested for multiple Pages and seems the crash disappears - so we decided to give it a shot and see if this could mitigate the crash on RC.

Reviewed By: mdvacca

Differential Revision: D34632014

fbshipit-source-id: ce589d6e7d2293befc3615ecb87a9fc09f6a33f4
2022-03-03 19:51:36 -08:00
HeyImChris 46f68aceb2 onDismiss to be an RCTDirectEventBlock (#33222)
Summary:
We're seeing a red box that `Component 'RCTModalHostView' re-registered bubbling event 'topDismiss' as a direct event moduleConstantsForComponent` in some downstream react-native-macOS builds.

Looking at other usage of this object, we treat it as a direct event block everywhere else, just this one spot it's a bubbling event block. It was added with [this PR](7bf78eae5e) which doesn't explicitly address the desire for the prop to bubble up through the view hierarchy or not, so I'm guessing it was just mislabeled and should be direct like the other usages.

## Changelog

[iOS] [Bug] - Fix modal redbox for onDismiss

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

Test Plan: We don't redbox downstream anymore

Reviewed By: p-sun, RSNara

Differential Revision: D34628759

Pulled By: philIip

fbshipit-source-id: bb3cc78fa43d20808579c614e25716880d002d88
2022-03-03 18:06:08 -08:00
David Vacca 97f3eb2d3b Ship large text measure cache in Fabric Android
Summary:
Ship large text measure cache in Fabric Android

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D34602873

fbshipit-source-id: bd0a77b8b2f85301a78d528e7810938b78c7f7b8
2022-03-03 09:41:23 -08:00
Samuel Susla 8669277b3b Use std::unordered_set::find instead of std::unordered_set::contains
Summary:
changelog: [internal]

I'm looking into JS exceptions in React 18 on Android and I've noticed we use [std::unordered_set::contains]((https://en.cppreference.com/w/cpp/container/unordered_set/contains) that is only supported in C++20. I don't think this causes the exceptions but I would like to eliminate this option.

Reviewed By: javache

Differential Revision: D34547741

fbshipit-source-id: 6cffcff3366e7579a2c0e19bc01ffcb355b9ddb6
2022-03-03 09:22:32 -08:00
Samuel Susla 664f9b11ba Add option to delay deletion of viewState
Summary:
changelog: [internal]

ViewState is sometimes deleted but not created again because of race condition in C++ pre-allocation and how it checks for revision to determine if createView mount item should be dispatched.

In this diff, we add an option to delay deletion of ViewState until the next commit.

Reviewed By: ShikaSD

Differential Revision: D34553174

fbshipit-source-id: e5213f1d39137fb56fc745321a7c1b28d417ea27
2022-03-03 06:02:02 -08:00
Gilson Takaasi Gil eb434c1c76 Revert D34351084: Migrate from googletest 1.8 to googletest 1.10
Differential Revision:
D34351084 (94891ab5f8)

Original commit changeset: 939b3985ab63

Original Phabricator Diff: D34351084 (94891ab5f8)

fbshipit-source-id: 2fd17e0ccd9d1f1d643f4a372d84cb95f5add1f8
2022-03-03 04:41:46 -08:00
Samuel Susla f7e4037c65 Clean up constructor in FabricMountingManager
Summary:
changelog: [internal]

Make all feature flags `const` and initialise them as ivars. Also makes the class final and removes virtualised destructor since it is not needed.

Reviewed By: ShikaSD

Differential Revision: D34549013

fbshipit-source-id: 2b326bc5b6c1dd6d89c2fb9c671bda6da669fa76
2022-03-03 04:35:53 -08:00
Dimitri Bouche 94891ab5f8 Migrate from googletest 1.8 to googletest 1.10 (#67)
Summary:
X-link: https://github.com/facebookincubator/hsthrift/pull/67

Updating `googletest` from `1.8.0` to `1.10.0`

Reviewed By: mzlee, igorsugak, luciang, meyering, r-barnes

Differential Revision: D34351084

fbshipit-source-id: 939b3985ab63a06b6d511ec8711c2d5863bdfea8
2022-03-03 03:46:03 -08:00
Paige Sun 260c5fab9f (Easy) Migrate DatePickerIOS for Bridgeless
Summary: Changelog: [iOS][Internal] Migrate DatePickerIOS for Bridgeless mode

Reviewed By: RSNara

Differential Revision: D34595944

fbshipit-source-id: b20050dd5b350c186e4d1062c5d796a26d6aeb3e
2022-03-02 17:42:13 -08:00
Paige Sun 2c268d7fe6 2/3 Make interop WebView component Bridgeless compatible, and make `uiManager addUIBlock` migration easier
Summary:
Changelog: [iOS] Add `_viewRegistry_DEPRECATED addUIBlock`  to replace `uiManager addUIBlock` for Fabric migration

Allow people to directly replace `uiManager addUIBlock` with `_viewRegistry_DEPRECATED addUIBlock` when they migrate the method in RCTViewManagers.

Currently we add an if check in the RCTViewManager, which makes migration a bit harder for OSS.
```
  if (self.bridge) {
    [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
      work();
    }];
  } else {
    RCTExecuteOnMainQueue(work);
  }
```

Reviewed By: sammy-SC

Differential Revision: D34532609

fbshipit-source-id: 19647fea03be8fd71d8f46dfe216275894d8165c
2022-03-02 14:09:56 -08:00
Andrei Shikov fc9dec9a35 Download kotlin compiler JARs for Buck instead of checking them in (#33209)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33209

Downloads Kotlin compiler JARs with Buck before starting docker build. This solution is slower than checking in JARs directly, but it allows to keep lighter size of the repo for people who want a complete checkout.

Changelog: [Internal] - Update CI build to download Kotlin jars for buck

Reviewed By: cortinico

Differential Revision: D34582932

fbshipit-source-id: 290398579ce2a4d57c7af318c66526689db6073c
2022-03-02 13:04:49 -08:00
Joshua Gross 6abbef1200 CustomEvent and Event polyfills for React Native
Summary:
In preparation for upcoming changes, it is useful / necessary to have a CustomEvent and Event polyfill for React Native.

In browser environments, both of those are expected to be accessible in the global scope, so we do the same here.

Changelog: [Added][JS] Event and CustomEvent W3C-compatible polyfills

Reviewed By: necolas

Differential Revision: D34462447

fbshipit-source-id: 5efdad6f24c268a6d248d4e3351fc96715ee3fdf
2022-03-02 11:39:00 -08:00
Nicola Corti 2fdbf6a10f Make sure configureNdkBuild* tasks are depending on preBuild
Summary:
Due to a bug with AGP, the configureNdkBuild* tasks are not depending on
preBuild tasks. We need to manually fix this otherwise the build will fail the
first time the NDK is invoked.

More on this here: https://issuetracker.google.com/issues/207403732

Changelog:
[Android] [Fixed] - Make sure configureNdkBuild* tasks are depending on
preBuild in the Android template.

Reviewed By: passy

Differential Revision: D34578860

fbshipit-source-id: 5d4caa7d2b7a976b1c9caa6dce8e186c1486cafa
2022-03-02 05:23:01 -08:00
Pieter De Baets f743bed657 Enable paintFilterBitmap when rendering images with rounded corners
Summary:
Per Android docs (https://developer.android.com/reference/android/graphics/Paint#FILTER_BITMAP_FLAG):

> This should generally be on when drawing bitmaps, unless performance-bound (rendering to software canvas) or preferring pixelation artifacts to blurriness when scaling significantly.

Changelog:
[Android][Fixed] - Improve rendering of images when resampled and corner radius applied

Reviewed By: genkikondo

Differential Revision: D34551184

fbshipit-source-id: 649da53af816be829e5b7f8e2a100f07a8b412b7
2022-03-02 02:55:55 -08:00
Gal Shirin cfb11ca2f6 Fix xcodebeta build failure
Summary:
Changelog:
[iOS][Changed] - Removed methodName parameter that was used only for a warning message and moved the warning parameter to be calculated inline.

Reviewed By: fkgozali

Differential Revision: D34551444

fbshipit-source-id: 6ceba425b64df37b0dca7e222072f1836f151d83
2022-03-01 23:56:55 -08:00
Andrei Shikov 131844f40e Add feature flag to disable pre-allocation on clone
Summary:
Disables preallocation for cloned nodes, switching to create during commit for those cases instead.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D34555621

fbshipit-source-id: 21fc834cea318ca299aa37a9aab28a2f2a9675b5
2022-03-01 18:10:49 -08:00
Ramanpreet Nara f47082be11 Generate Props C++ structs on all platforms
Summary:
The props generator assumes that Props are used only on iOS. (i.e: the generator doesn't generate the props code if the iOS platform is excluded). However, Props are also used on Android. So, this diff makes us generate Props for all platforms.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D34559900

fbshipit-source-id: 0c25835dd57aa55a094152c147a9f952b9bc6850
2022-03-01 16:27:52 -08:00
Ramanpreet Nara 922219a852 Fix ScrollView Static ViewConfigs
Summary:
This should fix the SVC === NVC check for ScrollView and AndroidHorizontalScrollView.

Changelog: [Internal]

Reviewed By: p-sun

Differential Revision: D34542873

fbshipit-source-id: 7e25d3a6c1417877b64501981652d767ba2eda48
2022-03-01 16:27:52 -08:00