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

18343 Коммитов

Автор SHA1 Сообщение Дата
Ramanpreet Nara 60321a78ad Make RCTAlertManager TurboModule-compatible
Summary: See title.

Reviewed By: PeteTheHeat

Differential Revision: D17722913

fbshipit-source-id: cb78b9ea1bf497d27b19255e48809850e698ba0d
2019-10-09 12:34:00 -07:00
Ramanpreet Nara a7d2f0dc33 Make RCTLocalAssetImageLoader and RCTGIFImageDecoder TurboModule-compatible
Summary: Couldn't make RCTImageEditingManager and RCTImageStoreManager TurboModule-compatible because their specs live in fb-internal code. I will tackle them in a subsequent diff. See T54946472.

Reviewed By: PeteTheHeat

Differential Revision: D17720574

fbshipit-source-id: 5d634da475522565f874020301de8e74ff73aa8d
2019-10-09 12:33:59 -07:00
Ramanpreet Nara 3aa8a40659 Move RCTImage NativeModules back to RCTImage
Summary: In D16805827, I moved `RCTImageLoader`, `RCTImageStoreManager`, and `RCTImageEditingManager` to `CoreModules`. This was necessary to turn `RCTImageLoader` into a TurboModule. However, after D17671288 landed, it's no longer necessary to have OSS NativeModules in `CoreModules`. Therefore, I'm moving these NativeModules back to `RCTImage`.

Reviewed By: PeteTheHeat

Differential Revision: D17720575

fbshipit-source-id: 44b07cfa07cbb2b87254132810f86974edc7edab
2019-10-09 12:33:59 -07:00
Mehdi Mulani 2a3fa968b4 Revert D17793693: [RN] Add debug message to RCTShadowView when we insert a subview incorrectly
Differential Revision:
D17793693

Original commit changeset: 848ae658200e

fbshipit-source-id: e59299f596f95e2bea978b07cd7e8f1de345708a
2019-10-09 12:15:13 -07:00
Moti Zilberman 6611c4b8f4 Move error-subclass-name lint rule to GitHub
Summary: Ports an internal ESLint rule used at Facebook, `error-subclass-name`, to cover the React Native codebase. This rule enforces that error classes ( = those with PascalCase names ending with `Error`) only extend other error classes, and that regular functions don't have names that could be mistaken for those of error classes.

Reviewed By: rubennorte

Differential Revision: D17829298

fbshipit-source-id: 834e457343034a0897ab394b6a2d941789953d2e
2019-10-09 11:48:07 -07:00
Oleksandr Melnykov 1dc03f4858 Back out "[react-native][PR] Set rounded rectangle mask on TouchableNativeFeedback's ripples"
Summary: This PR caused a regression with shadows, see https://github.com/facebook/react-native/issues/26544.

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D17809320

fbshipit-source-id: 0c83cd211425622ada0fd8c492f43df0536a4b8a
2019-10-09 10:39:04 -07:00
Rick Hanlon 90a9d59679 Partial React Sync
Summary:
This diff is a partial sync of React into React Native.

## Source
The source branch is from my fork [here](https://github.com/facebook/react/compare/master...rickhanlonii:react-native-partial-sync-october-9?expand=1)

This branch is created from D17456249 which partially synced Dan's branch [here](https://github.com/facebook/react/compare/master...gaearon:partsync).

To create my branch, I forked from Dan's branch and added two commits from these PRs:

- Joshua's PR to improve view config errors https://github.com/facebook/react/pull/16879
- Eli's PR to remove setNativeProps warning https://github.com/facebook/react/pull/17045

Reviewed By: gaearon

Differential Revision: D17828989

fbshipit-source-id: 75c99737f2dec4889d7d453bbdebaeb47656b5ce
2019-10-09 09:37:03 -07:00
Rick Hanlon 2fbcdad09c Revert TextInput back to old setNativeProps API
Summary: Reverts D14176217 so we can do the partial React sync in the next diff which removes this API

Reviewed By: TheSavior

Differential Revision: D17828977

fbshipit-source-id: 7dd98c19890aeee0a153746ce65fd3b148b4ca7b
2019-10-09 09:37:02 -07:00
Sidharth Guglani 12eb44641f Use TestParametrization for testing both fbjni and vanillaJNI version
Summary: Use TestParametrization to test both fbjni and vanilla jni versions

Reviewed By: amir-shalem

Differential Revision: D17788718

fbshipit-source-id: 0f3317b7403cadca7b7ccd9140f1933d746bf433
2019-10-09 09:28:37 -07:00
Sidharth Guglani 6f0694ccbe move YGSetLogger and YGConfigFree with global ref to vanilla jni
Summary: Move YGSetLogger and YGConfigFree methods to vanilla JNI

Reviewed By: amir-shalem

Differential Revision: D17754999

fbshipit-source-id: 8dfcf1a54e4d54ebf91e38c6513e6a703a40ae92
2019-10-09 09:28:36 -07:00
Moti Zilberman a483f802fd Remove framesToPop from bridge
Summary: Removes the use of `framesToPop` from method wrappers in the RN bridge.

Reviewed By: rubennorte

Differential Revision: D17764986

fbshipit-source-id: f2fac0c33a9a7c821bb920fa65b92a4672150a38
2019-10-09 05:48:15 -07:00
Alaa Ben El Ahmar 614039834b Bump SoLoader to 0.8.0 (#26759)
Summary:
This PR bumps bumps Soloader to 0.8.0. This fixes white screen/ crash issues when downloading from Google Play.

Related to:
https://github.com/facebook/react-native/issues/25927 #26400

## Changelog
[Android] [Changed] - Bump Soloader to 0.8.0
Pull Request resolved: https://github.com/facebook/react-native/pull/26759

Test Plan:
A few CI tests fail, but I don't see the link with what I changed, especially the ios tests.
It's working locally though, and for people on github who tried this solution as well.

Differential Revision: D17828891

Pulled By: mdvacca

fbshipit-source-id: 1c7809aa681b41b8ed9a4da96d041d52f3cfbb76
2019-10-09 03:45:44 -07:00
Valentin Shergin 8cf9505bd2 Fabric: MountingCoordinator::waitForTransaction(...)
Summary:
`MountingCoordinator::waitForTransaction()` allows waiting for a new coming transaction synchronously, as efficient as waiting for a mutex.
This feature can be used to implement more high-level synchronous rendering APIs.

Reviewed By: mdvacca

Differential Revision: D17629425

fbshipit-source-id: acd91b941e4d6d43bc4518f332a1604e14506be9
2019-10-08 21:49:55 -07:00
Sidharth Guglani 86af90fac5 move measure and baseline methods
Summary: Measure and baseline callbacks moved to vanilla JNI

Reviewed By: amir-shalem

Differential Revision: D17714334

fbshipit-source-id: dafbde36984aba948a6345a21d3808a6ef4013e8
2019-10-08 17:52:04 -07:00
Sidharth Guglani b0b1666402 move yg node new and ygnode new with config
Summary: YGNode creation methods to vanilla JNI

Reviewed By: amir-shalem

Differential Revision: D17714230

fbshipit-source-id: 74e14e876ab7efc67771d92091c2a78f09072b83
2019-10-08 17:52:04 -07:00
Sidharth Guglani 952076e2bf Move calculate layout method to vanilla JNI
Summary: Using vanilla JNI for calculate layout

Reviewed By: amir-shalem

Differential Revision: D17714219

fbshipit-source-id: bb05de4a0112eefc2b731997a4c1ecef5c0c7361
2019-10-08 17:52:04 -07:00
Sidharth Guglani 4a69b3e636 Add Scoped Local and Global Ref
Summary: Add ScopedLocalRef, ScopedGlobalRef and some common methods to be used later.

Reviewed By: amir-shalem

Differential Revision: D17711284

fbshipit-source-id: be43d5e246bc2406765057783be11854877c41f1
2019-10-08 17:52:04 -07:00
Sidharth Guglani 67a3ad38e3 move setStyleInputs to vanilla jni (YogaStyleProperties Part 5)
Summary: Move Yoga style properties to vanilla JNI under a flag.

Reviewed By: amir-shalem

Differential Revision: D17686117

fbshipit-source-id: e79bee1188c24e301b23416486b10f613434eebc
2019-10-08 14:26:33 -07:00
Sidharth Guglani e3919b5ebd move config jni methods to vanilla jni
Summary: Move yoga node config related jni methods to vanilla jni

Reviewed By: amir-shalem

Differential Revision: D17684821

fbshipit-source-id: 31a667b3ad67501aaef83a132971e4e0826cacd4
2019-10-08 14:26:32 -07:00
Sidharth Guglani 9ea8014cc0 move YGNode related methods to vanilla jni
Summary: This diff moves methods related to actions on YGNode like free node, reset node etc. to vanilla JNI

Reviewed By: amir-shalem

Differential Revision: D17668008

fbshipit-source-id: 03bfc51ec1fcf06569713400f984d551827e22fe
2019-10-08 14:26:32 -07:00
Sidharth Guglani 76af8ee2ec move edge style properties to vanilla jni (YogaStyleProperties Part 4)
Summary: Move Yoga style properties to vanilla JNI under a flag.

Reviewed By: amir-shalem

Differential Revision: D17667201

fbshipit-source-id: 448134d6d7d0dd0c6ff2734b3eb39e65d1cb403f
2019-10-08 14:26:32 -07:00
Sidharth Guglani abb77b34cc move percent auto style properties to vanilla jni (YogaStyleProperties Part 3)
Summary: Move Yoga style properties to vanilla JNI under a flag.

Reviewed By: amir-shalem

Differential Revision: D17666674

fbshipit-source-id: 08490bf7c214c856a93214088a27dd4e6df9e0fd
2019-10-08 14:26:31 -07:00
Sidharth Guglani 69fb812c1d move common code to YGJNI.h header class
Summary: Moving common code to YGJNI.h header class so that same can be used in fbjni and vanilla jni implementations

Reviewed By: amir-shalem

Differential Revision: D17666457

fbshipit-source-id: 1e6cd2506fb773b8a17ebef277a2c7ef9728e66b
2019-10-08 14:26:31 -07:00
Sidharth Guglani c15cefd3a8 Migrate YGNodeStyleGetFlex method to vanilla jni (YogaStyleProperties Part 2)
Summary: Move Yoga style properties to vanilla JNI under a flag.

Reviewed By: amir-shalem

Differential Revision: D17666090

fbshipit-source-id: 121b939c310799c79f2fce0ea293f88b2940c4fc
2019-10-08 14:26:31 -07:00
Sidharth Guglani 60973b52c7 Move style properties which accept one parameter to vanilla JNI (YogaStyleProperties Part 1)
Summary: Move Yoga style properties to vanilla JNI under a flag.

Reviewed By: amir-shalem

Differential Revision: D17666048

fbshipit-source-id: 6565acd35ab04ef0c3a2544447a25dc6edc3e7a5
2019-10-08 14:26:31 -07:00
Dmitri Svetlanov 5e938077f8 Back out "Fix TimingAnimation rounding error issue"
Summary: Original commit changeset: deba5d5a08ae

Differential Revision: D17813959

fbshipit-source-id: bcd2076bc8f50e835dec3dccf6bd68a41cb8a5ec
2019-10-08 12:33:43 -07:00
Samuel Susla 1bf2f72abe Add support for commands
Summary: We need commands to work with `LegacyViewManagerInterop`. We will need to rethink this once Fabric has command-execution pipeline in place.

Reviewed By: shergin

Differential Revision: D17787294

fbshipit-source-id: a6b3dbfae41f04e7e7f5bafb1f7b4ad0de0eedc3
2019-10-08 09:05:16 -07:00
Samuel Susla 5dbd62c7ff Add support for events
Summary:
LegacyViewManagerInterop layer can now handle events as well.

We expose `eventInterceptor` from `NSComponentData`, that way we can hook into event dispatching that happens within `NSComponentData`.

Coordinator has a map of `UIView -> reactTag` which it uses to figure out to which component view to forward the event.

New `LegacyViewManagerInteropViewEventEmitter` exposes APIs to send `folly::dynamic` to javascript.

Reviewed By: shergin

Differential Revision: D17765834

fbshipit-source-id: 25e75e445b32c69ec9ab0189c4ab7fba5f8c7b5d
2019-10-08 09:05:15 -07:00
Mehdi Mulani 0a98be65e3 Try to lazily load RCTRedBox
Summary: I made a mistake earlier and somehow prevented RCTRedBox showing up. Not sure why this didn't prevent them from showing up in dev mode.

Reviewed By: RSNara

Differential Revision: D17798516

fbshipit-source-id: 48bf0523124ad3fd96d626281390bbafc62f3390
2019-10-08 07:38:17 -07:00
Martin Sherburn 77b6e26538 Fix TimingAnimation rounding error issue
Summary:
This fixes a bug where the frames array can contain a duplicate entry at the end.
For example, suppose the duration is 1000.0 then it would create an array with the following:

```
[ 0,
  0.0010119824303159884,
  0.00391003997863186,
  0.00851330482578147,
  0.01466951184383165,
  0.022249135687575607,
  0.03114100006836614,
  0.041248932923769244,
  0.05248918022066495,
  0.06478838042267626,
  0.07808196049642172,
  0.09231285402599128,
  0.1074304693764467,
  0.12338985513375342,
  0.14015102395653428,
  0.15767840628626964,
  0.17594041329987542,
  0.1949090949486824,
  0.21455988464815853,
  0.23487142789035506,
  0.25582549864491233,
  0.27740701626433145,
  0.2996041891505173,
  0.3224088345090182,
  0.34581696665965683,
  0.36982983491413496,
  0.394455794287552,
  0.4197139228812336,
  0.44564199741037275,
  0.4723190090623474,
  0.5000000572130084,
  0.5276809909376533,
  0.5543580025896278,
  0.5802860771187669,
  0.6055442057124484,
  0.6301701650858652,
  0.6541830333403433,
  0.6775911654909819,
  0.7003958108494828,
  0.7225929837356684,
  0.7441745013550876,
  0.7651285721096447,
  0.785440115351841,
  0.8050909050513173,
  0.8240595867001241,
  0.84232159371373,
  0.8598489760434653,
  0.876610144866246,
  0.8925695306235529,
  0.9076871459740083,
  0.9219180395035779,
  0.9352116195773232,
  0.9475108197793346,
  0.9587510670762303,
  0.9688589999316335,
  0.9777508643124241,
  0.9853304881561681,
  0.9914866951742183,
  0.996089960021368,
  0.9989880175696839,
  1,
  1 ]
```

With this change, it now generates the following array:

```
[ 0,
  0.0010119824303159884,
  0.00391003997863186,
  0.00851330482578147,
  0.01466951184383165,
  0.022249135687575607,
  0.03114100006836614,
  0.041248932923769244,
  0.05248918022066495,
  0.06478838042267626,
  0.07808196049642172,
  0.09231285402599128,
  0.1074304693764467,
  0.12338985513375342,
  0.14015102395653428,
  0.15767840628626964,
  0.17594041329987542,
  0.1949090949486824,
  0.21455988464815853,
  0.23487142789035506,
  0.25582549864491233,
  0.27740701626433145,
  0.2996041891505173,
  0.3224088345090182,
  0.34581696665965683,
  0.36982983491413496,
  0.394455794287552,
  0.4197139228812336,
  0.44564199741037275,
  0.4723190090623474,
  0.5000000572130084,
  0.5276809909376533,
  0.5543580025896278,
  0.5802860771187669,
  0.6055442057124484,
  0.6301701650858652,
  0.6541830333403433,
  0.6775911654909819,
  0.7003958108494828,
  0.7225929837356684,
  0.7441745013550876,
  0.7651285721096447,
  0.785440115351841,
  0.8050909050513173,
  0.8240595867001241,
  0.84232159371373,
  0.8598489760434653,
  0.876610144866246,
  0.8925695306235529,
  0.9076871459740083,
  0.9219180395035779,
  0.9352116195773232,
  0.9475108197793346,
  0.9587510670762303,
  0.9688589999316335,
  0.9777508643124241,
  0.9853304881561681,
  0.9914866951742183,
  0.996089960021368,
  0.9989880175696839,
  1 ]
```

Note that the duplicate 1 at the end is now gone. This is because previously when it accumulated dt for 60 frames. dt wasn't quite exactly 1000, it was instead 999.9999999999999 and so didn't break out of the loop when it should have. This adds a tolerance so that it does break out of the loop.

Reviewed By: sahrens

Differential Revision: D17738602

fbshipit-source-id: deba5d5a08ae842e2a9e2b75f2e25e14f3700518
2019-10-08 06:22:28 -07:00
David Biedenbach df9abf7983 Fix Issue 23870: Android API - View.getGlobalVisibleRect() does not properly clip result rect for ReactClippingViewGroups (#26334)
Summary:
This PR addresses issue https://github.com/facebook/react-native/issues/23870 (`View.getGlobalVisibleRect()` is broken in some use cases)

The issue affects the following Android APIs:
- ViewGroup.getChildVisibleRect()
- View.getGlobalVisibleRect() (Which calls into ViewGroup.getChildVisibleRect)
- View.getLocalVisibleRect() (Which calls into View.getGlobalVisibleRect())

According to Android documentation, View.getGlobalVisibleRect() should provide a rect for a given view that has been clipped by the bounds of all of its parent views up the view hierarchy. It does so through the use of the recursive function ViewGroup.getChildVisibleRect().

Since React Native has a separate clipping mechanism that does not rely on Android UI's clipping implementation, ViewGroup.getChildVisibleRect() is unable to determine that a rect should be clipped if the clipping view is a ReactClippingViewGroup. This resultantly breaks some important use cases for things like testing with Detox, which relies on this functionality to tell when a component is on-screen, as explained in the above referenced issue.

The rationale of the fix is essentially to implement logic analogous to [ViewGroup.getChildVisibleRect()](https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/view/ViewGroup.java#6176), discarding irrelevant Android clipping modes, and instead testing against the 'overflow' property, restoring the originally intended functionality. This is implemented as an override to ViewGroup.getChildVisibleRect() in the following classes:

 - ReactViewGroup
 - ReactScrollView
 - ReactHorizontalScrollView

Unfortunately, since the public ViewGroup.getChildVisibleRect() API recurses into a `hide` annotated API which cannot be overridden, it was necessary to provide this override in each of the above React Native classes to ensure the superclass implementation would not be called, which would break the recursion.

## Changelog

[Android] [Fixed] - View.getGlobalVisibleRect() clips result rect properly when overflow is 'hidden'
Pull Request resolved: https://github.com/facebook/react-native/pull/26334

Test Plan:
The functionality in question is neither used internally nor exposed by React Native, and thus only affects Android native modules that use the above referenced APIs.

As such, I have primarily performed testing with a forked example project that had been submitted with issue https://github.com/facebook/react-native/issues/23870, originally by d4vidi.

The example project can be found here:
- [Configured to build against RN Master](https://github.com/davidbiedenbach/RNClipVisibilityBugDemo/tree/rn-master)
- [Configured to build against PR branch](https://github.com/davidbiedenbach/RNClipVisibilityBugDemo/tree/fix-23870)

(Original project here: https://github.com/d4vidi/RNClipVisibilityBugDemo)

### Bug in effect:

When built against RN master, it can be observed that fully clipped views are reported as visible, as in the below screenshots.

#### Views inside a ReactViewGroup do not report as clipped

![BugScreen1](https://user-images.githubusercontent.com/1563532/64999573-314b6300-d89d-11e9-985e-294bd51a0ba9.jpg)

#### Views inside a ReactScrollView do not report as clipped

![BugScreen2](https://user-images.githubusercontent.com/1563532/64999580-38727100-d89d-11e9-8186-96b25c937edc.jpg)

#### Views inside a ReactHorizontalScrollView do not report clipping properly

![BugScreen4](https://user-images.githubusercontent.com/1563532/64999588-3f00e880-d89d-11e9-9477-7b79e44c5e46.jpg)

### Bug fixed

When built against the PR branch, fully-clipped views no longer report visible.

#### Views inside a ReactViewGroup report clipping properly

![FixScreen1](https://user-images.githubusercontent.com/1563532/64999634-6b1c6980-d89d-11e9-8534-b26b638bf4d8.jpg)

#### Views inside a ReactScrollView report clipping properly

![FixScreen2](https://user-images.githubusercontent.com/1563532/64999641-7079b400-d89d-11e9-8f95-4d6e28bcf833.jpg)

#### Views inside a ReactHorizontalScrollView report clipping properly

![FixScreen4](https://user-images.githubusercontent.com/1563532/64999645-74a5d180-d89d-11e9-9754-170bb3b620a2.jpg)

Reviewed By: mdvacca

Differential Revision: D17782658

Pulled By: yungsters

fbshipit-source-id: 0cd0d385898579a7a8a3e453f6ba681679ebe496
2019-10-07 22:23:12 -07:00
David Vacca 3b51499fc2 Ensure tests are running on the correct thread
Summary: This diff re-enables commented code during the AndroidX migration

Reviewed By: PeteTheHeat

Differential Revision: D15758382

fbshipit-source-id: 95106cc2e3faccbd632d773ee58091c7bf8ea063
2019-10-07 18:56:06 -07:00
Emily Janzer b5ea49f132 Move sDidInit to the end of ReactBridge.staticInit()
Summary: Oleksandr made the point that making `sDidInit` volatile isn't quite enough because the flag is set at the beginning of the function; it's possible that it will return true while it's still in the process of initializing the bridge. Moving where we set the flag to the end of the function should address the issue.

Reviewed By: JoshuaGross

Differential Revision: D17770128

fbshipit-source-id: 695d3edc582d9dce1884d8698d400dd147ca5cae
2019-10-07 16:23:36 -07:00
Eli White d576a5bcc0 Fix bug where ScrollView contentInset top set to undefined wouldn't default to 0
Summary:
If you passed
```
contentInset: { bottom: 10 }
```

then it wouldn't go into the if case and it could try to call `setOffset` with `undefined`. `setOffset` requires a number.

Changelog:
[Fix][ScrollView] ScrollView contentInset top now defaults to 0 in expected situations

Reviewed By: JoshuaGross

Differential Revision: D17796155

fbshipit-source-id: 951dbbb0de1052f64a6835963e8bbc564990c120
2019-10-07 15:31:54 -07:00
Eli White 15be1448f7 Remove unused scrollResponderHandleTerminate from ScrollView
Summary:
This function doesn't exist on the scroll responder so this prop is being set to undefined.

As this is an event, not setting the prop just means that nothing will listen to the event.

Changelog:
[Internal]

Reviewed By: JoshuaGross

Differential Revision: D17795678

fbshipit-source-id: 73f2c125e0868e19258b43e3a053447be3f5e768
2019-10-07 15:31:54 -07:00
Ramanpreet Nara 021a63d4da Ensure internal builds don't use plugin stubs
Summary: We generate a stub for plugin system, so that TurboModules can work in OSS. Unless the `RN_DISABLE_OSS_PLUGIN_HEADER` define is seet, TurboModules will use the plugin stub. Therefore, for internal builds, we should set this define.

Reviewed By: fkgozali, mdvacca

Differential Revision: D17789993

fbshipit-source-id: a93735738513457236adb3064b80601053c95dd3
2019-10-07 14:55:39 -07:00
Mehdi Mulani 72c03900d2 Add debug message to RCTShadowView when we insert a subview incorrectly
Summary:
@public
This will provide a more useful error message and hopefully allow us to debug the issue further.

Reviewed By: JoshuaGross

Differential Revision: D17793693

fbshipit-source-id: 848ae658200ea5e3892d8a88888599c1c248c994
2019-10-07 13:37:53 -07:00
Rick Hanlon c71bbb0057 Report logs in dev to server on iOS
Summary:
This diff adds server side logging for all log levels in development (some levels sampled)

There are two new mobile analytic event pipelines (that pipe to scuba table)

- rn_dev_logs ([pigeon](https://our.intern.facebook.com/intern/marauder/event/?name=rn_dev_logs) [scuba](https://fburl.com/scuba/pqxl6mf5))
- rn_dev_logs_sampled ([pigeon](https://our.intern.facebook.com/intern/marauder/event/?name=rn_dev_logs_sampled) [scuba](https://fburl.com/scuba/oqz6b5x3))

Notes:
- All React Native logs from JS and Native on iOS go through this path to be printed to the console, so everything will be caputured even though native errors/warnings do not necessarily show a red/yellow box
- All errors and warnings are logged
- Log level info is sampled

Reviewed By: sammy-SC

Differential Revision: D17789494

fbshipit-source-id: dea6359237dbd91f267949f5185a0c79bb4083b8
2019-10-07 11:44:11 -07:00
Samuel Susla 9cefc96e43 Remove redundant props from Picker
Summary: Props are being ignored on native side, let's get rid of them.

Reviewed By: TheSavior

Differential Revision: D17765185

fbshipit-source-id: d3625dd25d2e41a49e701d54fe9a7b74cd47786c
2019-10-07 11:34:50 -07:00
Samuel Susla f580409919 Add command to set date on RCTDatePickerManager
Summary: We are moving away from setNativeProps, this adds necessary method on native to leverage commands API

Reviewed By: shergin

Differential Revision: D17787877

fbshipit-source-id: 8f06cdd85c96bce4ea9bb7a8cd5f6c1a1d68b20a
2019-10-07 10:36:37 -07:00
Samuel Susla 62cbdceedd Implement setNativeSelectedIndex command for Picker component
Summary:
This is required so we can switch to using commands instead of `setNativeProps`.
`setNativeProps` are not supported in Fabric, we are moving away from it.

Reviewed By: JoshuaGross

Differential Revision: D17764967

fbshipit-source-id: 16e54ebe1f0c58b80a6491db970a60c01fec8a15
2019-10-07 04:24:08 -07:00
Oleksandr Melnykov 3560093115 Add setNativeValue command to ReactSwitchManager
Summary: Fabric doesn't support setNativeProps, so we have to use commands instead to set the value of the native component.

Reviewed By: JoshuaGross

Differential Revision: D17736274

fbshipit-source-id: 18c47365926c3c2cfc3551f4b5b6cc72e4162367
2019-10-07 03:54:09 -07:00
Joshua Gross 6166645560 Fix ReactIdleDetection from Android X migration
Summary:
The implementation for this class was commented out in D14200097.

ServerSnapshotTests rely on this class to decide when test app setup is finished [here](diffusion/FBS/browse/master/fbandroid/instrumentation_tests/com/facebook/react/screenshots/shared/ReactNativeScreenshotTestCase.java;676aecf86a816bba8eb8571bc327e77c8f2e149b$164).

The only change I made is to use InstrumentationRegistry from Androidx instead of support.

Reviewed By: rickhanlonii, mdvacca

Differential Revision: D15068069

fbshipit-source-id: c69c7d46a1068836f9a9303de11e9a7a36b4e6d9
2019-10-05 01:55:04 -07:00
Brian Solon 375ef14c04 Fix minor typos in react-native-codegen errors (#26714)
Summary:
Fixing typos

## Changelog

[Internal] [Fixed] - Fixed minor typos in react-native-codegen errors
Pull Request resolved: https://github.com/facebook/react-native/pull/26714

Test Plan: N/A

Differential Revision: D17758833

Pulled By: cpojer

fbshipit-source-id: cf3adea2b5f89426c8b98fd49f47c1b043d9a72a
2019-10-04 23:26:18 -07:00
Daniel Sainati b786cd6d69 v0.109.0 in xplat
Summary:
flowboi

allow-large-files

Reviewed By: gabelevi

Differential Revision: D17729593

fbshipit-source-id: 20575b072540497b64fbe63a92d4827eaab78fc4
2019-10-04 16:42:08 -07:00
Emily Janzer ad9b07d390 Throw a different exception when no ViewManager is found
Summary: Adding a second exception with a different error message so we can tell how the ViewManagerRegistry was created when it fails to find a view manager.

Reviewed By: rickhanlonii, JoshuaGross

Differential Revision: D17759060

fbshipit-source-id: 4415fa7440395f7e5730d2b77088f16a1a6a819d
2019-10-04 15:03:28 -07:00
Emily Janzer c3a07b6dcc Use volatile for sDidInit in ReactBridge
Summary: In D17747958 I added a function to check the value of a static variable, but forgot to make sure it was accessed in a thread-safe manner. Adding `volatile` to the flag

Reviewed By: makovkastar

Differential Revision: D17763888

fbshipit-source-id: f227b69de1a0df6493424da3b276529555999f70
2019-10-04 11:00:08 -07:00
Rachel Nabors cf7759e6e0 Linking to the ReactJS code of conduct. (#26725)
Summary:
## Overview

Recently, React Native switched over to a new code of conduct based on the contributors' covenant [here](https://github.com/facebook/react-native/blob/master/CODE_OF_CONDUCT.md). This PR updates CONTRIBUTING.md to link to this updated CoC.
Pull Request resolved: https://github.com/facebook/react-native/pull/26725

Differential Revision: D17765083

Pulled By: rickhanlonii

fbshipit-source-id: f7d085f078e1c7d99f6358554381582536a4ae1f
2019-10-04 10:57:00 -07:00
Samuel Susla 07fd3125c8 Migrate MVP SafeAreaView to Fabric
Reviewed By: shergin

Differential Revision: D17736209

fbshipit-source-id: e70c309f2599cdcb8f234d96915546032b71d223
2019-10-04 07:07:36 -07:00
masaaki1915 ae3f7a7616 fix typo in code (#26655)
Summary:
This PR only fixes a typo in `ShadowNode.cpp`

## Changelog

[Internal] [Fixed] - Fix typo in `ShadowNode.cpp`
Pull Request resolved: https://github.com/facebook/react-native/pull/26655

Differential Revision: D17743059

Pulled By: TheSavior

fbshipit-source-id: 6bbaf54b712c0a80da8dfafea2634309279a8f21
2019-10-03 23:12:37 -07:00