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

2879 Коммитов

Автор SHA1 Сообщение Дата
Spencer Ahrens 7b5277bb75 mostly working on Android + OTA
Summary:
It works great on iOS, and mostly works on Android, and is now OTA'able as part of the screen config! Haven't done template view yet. One remaining issue:

Layout is borked on Android. I'm guessing the issue has to do with the timing of setting the constraints in `updateRootLayoutSpecs` and calling `mBinding.startSurface` which actually builds the shadow tree. If I try to call `updateRootLayoutSpecs` earlier, it just crashes immediately. Here's the layout it spits out, which clearly has -440 for the x of 420006, which is the RCTText component, causing it to get cut off on the left of the screen:
```
updateLayoutMountItem for reactTag: 420006 x: -440, y: -13, width: 931, height: 78
updateLayoutMountItem for reactTag: 420010 x: 26, y: 79, width: 0, height: 1651
updateLayoutMountItem for reactTag: 420012 x: 0, y: 26, width: 0, height: 158
updateLayoutMountItem for reactTag: 420016 x: 0, y: 210, width: 454, height: 454
updateLayoutMountItem for reactTag: 420018 x: 454, y: 210, width: 455, height: 454
updateLayoutMountItem for reactTag: 420022 x: 0, y: 690, width: 454, height: 454
updateLayoutMountItem for reactTag: 420024 x: 454, y: 690, width: 455, height: 454
updateLayoutMountItem for reactTag: 420028 x: 0, y: 1171, width: 454, height: 454
updateLayoutMountItem for reactTag: 420030 x: 454, y: 1171, width: 455, height: 454
updateLayoutMountItem for reactTag: 420032 x: 0, y: 1651, width: 0, height: 0
```

Reviewed By: mdvacca

Differential Revision: D12813192

fbshipit-source-id: 450d646af4883ff25184141721351da67b091b7c
2018-11-05 15:43:55 -08:00
Victor Calvello ffd7195543 Remove unused styles (#22083)
Summary:
Removes unused styles.

NOTE: Lint rule `react-native/no-unused-styles` not added because of custom lint rule internally at Facebook that does this.
Pull Request resolved: https://github.com/facebook/react-native/pull/22083

Differential Revision: D12929443

Pulled By: TheSavior

fbshipit-source-id: d42b0be3db745e445447e65df3b78b61f53e4229
2018-11-05 13:57:47 -08:00
nd-02110114 9d132339f7 Remove var in ReactAndroid/src/androidTest (#22135)
Summary:
I removed var in ReactAndroid/src/androidTest.

- [x] npm run prettier
- [x] npm run flow-check-ios
- [x] npm run flow-check-android

[GENERAL] [ReactAndroid/src/androidTest] - remove var
Pull Request resolved: https://github.com/facebook/react-native/pull/22135

Differential Revision: D12921224

Pulled By: TheSavior

fbshipit-source-id: 9a14755944df642f8b82c46c691d6ed6ee8fa623
2018-11-05 00:41:21 -08:00
nd-02110114 6f781d9c25 remove var in ReactAndroid/src/androidTest. (#22137)
Summary:
I removed var in ReactAndroid/src/androidTest.

- [x] npm run prettier
- [x] npm run flow-check-ios
- [x] npm run flow-check-android

[GENERAL] [ReactAndroid/src/androidTest] - remove var
Pull Request resolved: https://github.com/facebook/react-native/pull/22137

Differential Revision: D12921228

Pulled By: TheSavior

fbshipit-source-id: d3b7380b6047fc304265d0f47a53cb1170a6aea6
2018-11-05 00:37:26 -08:00
nd-02110114 0beb1cc55d remove var in ReactAndroid/src/androidTest (#22136)
Summary:
I removed var in ReactAndroid/src/androidTest.

- [x] npm run prettier
- [x] npm run flow-check-ios
- [x] npm run flow-check-android

[GENERAL] [ReactAndroid/src/androidTest] - remove var
Pull Request resolved: https://github.com/facebook/react-native/pull/22136

Differential Revision: D12921227

Pulled By: TheSavior

fbshipit-source-id: 45c03a52a5eafa25965aa785da094421c3df3999
2018-11-05 00:34:04 -08:00
Tim Yung 4d16a0e84e RN: Copyright Header for `ReactInstanceManagerTest.java`
Summary: Missing when D12829677 landed.

Reviewed By: mdvacca

Differential Revision: D12903182

fbshipit-source-id: 1c142acb2a098b1118170f2f8ed8cf719fc14f90
2018-11-03 14:15:55 -07:00
David Vacca 83c7303a19 Trivial cleanup in ReactRootView
Summary: Trivial clanup of imports in ReactRootView

Reviewed By: fkgozali

Differential Revision: D12899430

fbshipit-source-id: 83bb052bbeee9e02e91157305420a2dd799e60e2
2018-11-03 01:14:07 -07:00
David Vacca 38e01a20c3 Fix IllegalStateException when dismissing DialogManager
Summary: This diff fixes a IllegalStateException that can happen because of a race condition when using DialogManager

Reviewed By: fkgozali

Differential Revision: D12899432

fbshipit-source-id: 98fb7c1ee1d292a959628a33c8a2dd5a6d93e328
2018-11-03 01:14:07 -07:00
Spencer Ahrens 2486d12b81 lint autofixes
Summary: `find js/react-native-github | xargs arc lint -a`

Reviewed By: yungsters

Differential Revision: D12902940

fbshipit-source-id: fd1158f7a0ec322cf89bc4f727943bff4600b399
2018-11-02 12:44:59 -07:00
Radovan Šmitala 7f79254cfe Remove AndroidManifest.xml from UIManager (#22044)
Summary:
AndroidManifest.xml file in UIManager only defines minimum SDK version for whole namespace "com.facebook". But it is always redefined by build.gradle file because Gradle file has precedence.

https://github.com/facebook/react-native/blob/master/ReactAndroid/build.gradle#L273

Anyway Gradle is prefered way to define it. So i think it should be removed if it is not used for another purpose.
Pull Request resolved: https://github.com/facebook/react-native/pull/22044

Differential Revision: D12898251

Pulled By: hramos

fbshipit-source-id: 087b5cc45495109b5626c9cb232d0546c53fb709
2018-11-01 20:11:09 -07:00
Ignacio Olaciregui ae8ec39397 Fix linting issues (#22062)
Summary:
Fixes lots of ESLint warnings. Many of them where in PR #20877 by janicduplessis which requested to split the linting fixes from configuration and package changes.

I solved only the issues that I was most certain about but I would love to get hands on all of them with a little bit of input.
Pull Request resolved: https://github.com/facebook/react-native/pull/22062

Differential Revision: D12889447

Pulled By: TheSavior

fbshipit-source-id: 35f7a08104a5b859c860afdde4af2b32c0685c50
2018-11-01 14:29:16 -07:00
Ram N b3b67499dd Add tracing for loading .so files during startup
Summary: During RN's startup, libfbjs-slow.so file is loaded when it is injected into FBReactInstanceHolder. This initialization takes a while, and has usually been showing up as a blank under `FBReactInstanceHolder`. By adding Systrace and QPL, we can estimate how long this takes. Traces will also be useful as we start optimizing this.

Reviewed By: ejanzer

Differential Revision: D5950803

fbshipit-source-id: 711c1d6c16e0f3d5c2dc23606be4e73880152b17
2018-10-31 20:05:31 -07:00
Andrew Chen (Eng) 309f85ace2 Fix ReactRootView mount/unmount race condition
Summary:
There are multiple reports of the NativeViewHierarchyManager trying to remove a root view with id -1. This can occur because of a race condition caused by calls to startReactApplication + unmountReactApplication.

We unfortunately overload overload the id field of the ReactRootView to store its react tag. This id is typically set when the view is attached to the react instance, and reset to NO_ID right before an attach occurs or when the react context is tearing down. If the react context has already been initialized, attaching the root view is synchronous and the id is set immediately. If the context has not been initialized, we save the root view in a mAttachedRootViews list and wait until setupReactContext (where the context is created) to finish attaching the root views.

There were two issues:
1) In setupReactContext, synchronizing on mReactContextLock is not enough to ensure that the root views in mAttachedRootViews have been initialized already
2) In detachRootView, removing the root view from mAttachedRootViews immediately will cause mAttachedRootViews to be out of sync when it is accessed by the time it is accessed in setupReactContext

To address these, the mReactContextLock will synchronize both the creation of the react context AND the initialization of the root views and detachRootView will synchronize on the mReactContextLock before mutating the mAttachedRootViews list.

Reviewed By: mmmulani

Differential Revision: D12829677

fbshipit-source-id: 3f3b0669e5be2b570c9d534503d04e5d0816196b
2018-10-31 16:37:50 -07:00
Scott Rice c1470736b0 Use fb_native_wrapper for all targets
Differential Revision: D12867696

fbshipit-source-id: bd52c1ead04065addece3a3104c4a1a9359ceb95
2018-10-31 11:47:42 -07:00
Tim Yung a689711f68 RN: Missing Copyright Headers
Summary: Adds copyright headers to all files that are missing them.

Reviewed By: hramos

Differential Revision: D12837494

fbshipit-source-id: 6330a18919676dec9ff2c03b7c9329ed9127d930
2018-10-31 01:37:26 -07:00
Ram N c91a2b36d7 Remove view managers from @ReactModuleList
Summary: The annotation ReactModuleList that was processed by ReactModuleSpecProcessor.java does not use ViewManagers. Removing this method from the annotation so that there is no confusion on how view managers are added to individual packages.

Reviewed By: achen1

Differential Revision: D9115363

fbshipit-source-id: 43d12e09b0e9b8e1732533f9a4456327778a0eaf
2018-10-29 12:22:38 -07:00
Kudo Chien a316dc6ec3 Upgrade folly to v2018.10.22.00 for Android (#21977)
Summary:
Fixes #20302 (For Android)

Note:
------
1. New folly will have build break for a gcc-4.9 and gcc-4.9 seems to be deprecated for latest folly.
    As we only use partial folly implementations, I just fixed the build break part.
    To support building RN on Windows, the patches are written by gradle ReplaceTokens.

2. The change for glog copying header into exported/ is to prevent build break for folly.
    `folly/detail/Demangle.h` will try to use libstdc++'s demangle.h. Unfortunately, glog also has a demangle.h in source code. So I copy exported headers and only search headers in exported/ folder during build.
Pull Request resolved: https://github.com/facebook/react-native/pull/21977

Reviewed By: hramos

Differential Revision: D12818133

Pulled By: fkgozali

fbshipit-source-id: 2c1f6f012663204581a86141d0c9ed0eb9d8c698
2018-10-29 12:06:37 -07:00
Alexandre Kirszenberg 1eedf05651 Update the Delta/HMR format
Summary:
Makes the delta bundle data structures more consistent.

The changes are as follows:
* There are now two types of JSON bundles that can be downloaded from the delta endpoint. Base bundles (`Bundle` type), and Delta bundles (`DeltaBundle` type).
* The `reset` boolean is renamed to `base`.
* `pre` and `post` properties are now strings.
* Only `Bundle` can define `pre` and `post` properties.
* The `delta` property is renamed to `modules`.
* Deleted modules are now listed inside of the `deleted` property, which is only defined by `DeltaBundle`.

Reviewed By: mjesun

Differential Revision: D10446831

fbshipit-source-id: 40e229a2811d48950f0bad8dd341ece189089e9b
2018-10-29 08:58:30 -07:00
Dulmandakh 99632e16d9 fix android ci (#21913)
Summary:
This PR adds support-annotations to devsupport buck dependency, which fixes Android CI.
Pull Request resolved: https://github.com/facebook/react-native/pull/21913

Differential Revision: D10842175

Pulled By: hramos

fbshipit-source-id: f3f3e0e6a3a5e9ceb18db11ac67e820a7f10937a
2018-10-24 14:48:42 -07:00
Andrew Chen (Eng) dc74975c5f Remove hard crash when root view is reused
Summary: Alternative to D10499861. If an app does not have an exception handler, context.handleException will still hard crash. Since this error is just saying that we're reusing an unexpected RootView, it might be safe to continue execution. Let's remove the exception for now while we investigate further

Reviewed By: mmmulani

Differential Revision: D10560413

fbshipit-source-id: 6c08a16cd250a019d2aef5afcaf3ba61534d29f7
2018-10-24 13:08:41 -07:00
Max Sherman b141363943 Instrument native library load time
Summary: I'm interested in measuring this.

Reviewed By: alexeylang

Differential Revision: D10510275

fbshipit-source-id: e833153524413bc5ec6159ff100ade92b29e6d0c
2018-10-24 09:00:22 -07:00
Andrew Chen (Eng) f671f8868f Don't crash when ReactRootView's id is already set
Summary:
This is a bandaid fix to address a crash with a stack trace involving

```
com.facebook.react.uimanager.IllegalViewOperationException: Trying to add a root view with an explicit id already set. React Native uses the id field to track react tags and will overwrite this field. If that is fine, explicitly overwrite the id field to View.NO_ID before calling addRootView.
0+com.facebook.react.uimanager.NativeViewHierarchyManager.addRootViewGroup(NativeViewHierarchyManager.java:546) [inlined]
1+com.facebook.react.uimanager.NativeViewHierarchyManager.addRootView(NativeViewHierarchyManager.java:538) [inlined]
2+com.facebook.react.uimanager.UIViewOperationQueue.addRootView(UIViewOperationQueue.java:678) [inlined]
3+com.facebook.react.uimanager.UIImplementation.registerRootView(UIImplementation.java:216) [inlined]
4+com.facebook.react.uimanager.UIManagerModule.addRootView(UIManagerModule.java:355)
5+com.facebook.react.ReactInstanceManager.attachRootViewToInstance(ReactInstanceManager.java:1032)
6+com.facebook.react.ReactInstanceManager.attachRootView(ReactInstanceManager.java:726) [inlined]
7+com.facebook.react.ReactRootView.attachToReactInstanceManager(ReactRootView.java:524)
8+com.facebook.react.ReactRootView.startReactApplication(ReactRootView.java:377)
```

This crash seems to be happening because the root view's id is set to a non NO_ID value, but further up in the stack trace, UIManager.addRootView() is called which always sets the root view's id to NO_ID. It's not clear how this error is happening, but in this code path it's expected that addRootView should always ensure that the id is always reset. In order to avoid crashing for this, let's remove the exception and log the issue instead.

In the future, we should not be overloading the android view id field with these types of react native implementation details. The react tag should be stored as a view tag instead.

Reviewed By: mmmulani

Differential Revision: D10499861

fbshipit-source-id: 4dffedab4e7a34eee7f64bb43ec8209699521c73
2018-10-22 17:28:17 -07:00
David Vacca 6debfdf6d6 RN crash when processing Exception with null message
Summary: This diff fixes a crash that happens when a component throws an exception that contains a null message

Reviewed By: achen1

Differential Revision: D10429661

fbshipit-source-id: 9faed36906844b51f5a3dc2b3cbc80ede6b93457
2018-10-22 01:07:45 -07:00
David Vacca b002df945b Re-introduce UIImplementationProvider
Summary: UIImplementationProvider was removed as part of D8650376, this was a breaking change that caused problems in OSS. This diff introduces the concept of a deprecated UIImplementationProvider again to allow OSS community to upgrade to latest version of RN.

Reviewed By: achen1

Differential Revision: D10456317

fbshipit-source-id: 6817629524f927dfcb5ebc054dbfd983877b7606
2018-10-20 11:27:50 -07:00
Marc Horowitz 6b0e924915 lint fixes
Reviewed By: QueryConnectionException

Differential Revision: D10458992

fbshipit-source-id: f57b0ef3c51a0bcf5703e187d36960aa3b944002
2018-10-19 11:35:06 -07:00
Héctor Ramos 47fb387455 Update copyright headers
Summary: Use MIT License copyright headers in JSI source code.

Reviewed By: axe-fb

Differential Revision: D10454031

fbshipit-source-id: d584073bb885fb7d977df1a45a6666ef6f52dcd6
2018-10-19 11:08:57 -07:00
Marc Horowitz 6370b86c1f Get RNTester to compile and run
Summary:
This diff includes a few changes:
1. Move the headers inside `jsiexecutor` into `jsiexecutor/jsireact`. As far as I'm aware, the Android ndk build system isn't flexible enough to support header namespaces, so we can't just expose the headers inside the `jsiexecutor` directory under the `jsireact` namespace. Therefore, I moved the headers to `jsiexecutor/jsireact`, and added `jsiexecutor` to the header search path.  This was the easiest way to simulate `jsireact` namespace.
2. Setup the Android.mk files to get RNTester compiling and running.
3. Introduce a `jscexecutor` module to make `JSCExecutor.java` execute without throwing.

**Note:** Moving the header files inside `jsiexecutor` probably breaks the iOS builds and internal builds. I'll fix those in subsequent diffs on this stack.

Reviewed By: shergin

Differential Revision: D9995429

fbshipit-source-id: 418a4ee91f585842c5e317af2f300227a51e9ba8
2018-10-18 01:06:24 -07:00
Marc Horowitz 7ffb406517 Remove RN files which use JSC
Summary:
JSI+JSCRuntime replaces direct use of JSC
@public

Reviewed By: danzimm

Differential Revision: D9328235

fbshipit-source-id: a4d0cad8250ef2da058ffffbdedbffa19f96bb12
2018-10-18 01:06:24 -07:00
Marc Horowitz 6796e62bb3 Remove JSC references
Summary:
Removing entire files will be the next diff
@public

Reviewed By: fkgozali

Differential Revision: D9328239

fbshipit-source-id: 083847d3b841a3c7bfa751a82e8cc16bd112bace
2018-10-18 01:06:24 -07:00
Marc Horowitz 53fa8130f5 Switch RN from JSCJavaScriptExecutorFactory to JSCExecutorFactory
Summary:
This removes the dependency on JSCExecutor.  Everything goes
through JSI now.

Reviewed By: RSNara

Differential Revision: D9328240

fbshipit-source-id: c9c085fec1ebd5d0f4679cd70b89cc263ca33ac4
2018-10-18 01:06:24 -07:00
Marc Horowitz 749b18dbc9 Add JSI-based JSExecutor for the bridge
Summary:
This is similar in function to the old JSCExecutor, but uses the more abstract JSI API to interact with the JSVM.
@public

Reviewed By: axe-fb

Differential Revision: D9328241

fbshipit-source-id: 3212ff4f43d0589a70d7bebc4d463d4433590f1d
2018-10-18 01:06:24 -07:00
Mehdi Mulani 1c240ae898 Fix onTextLayout metrics on Android when using alignText
Summary:
With this, we send the correct x position when using center or right aligned text. In order to accomplish this though, we have to pass the text alignment into the Layout object that we create.

Also update RNTester to allow us to try different alignments.

Reviewed By: sahrens

Differential Revision: D10316494

fbshipit-source-id: 11c7d2a59e636528f12211168acb46f16b54a126
2018-10-17 12:55:10 -07:00
JenLindsay bbfff90ab8 remove createReactClass from ScrollViewTestModule.js (#21627)
Summary:
Related to issue #21581
Removed createReactClass from ReactAndroid/src/androidTest/js/ScrollViewTestModule.js
Pull Request resolved: https://github.com/facebook/react-native/pull/21627

Reviewed By: TheSavior

Differential Revision: D10363828

Pulled By: RSNara

fbshipit-source-id: 08c9776060cfdfde3b69f310bca0353d393b67c4
2018-10-16 16:27:56 -07:00
Ronaldo Lima 998d69d12d from ReactAndroid/src/androidTest/js/UIManagerTestModule.js (#21702)
Summary:
Related to #21581 .
Removed createReactClass from ReactAndroid/src/androidTest/js/UIManagerTestModule.js
Pull Request resolved: https://github.com/facebook/react-native/pull/21702

Reviewed By: TheSavior

Differential Revision: D10345717

Pulled By: RSNara

fbshipit-source-id: 280f499abb2e2aa9f8ea25c3f8faaed8162e67d5
2018-10-16 16:21:25 -07:00
Jonathan Lee bb407fa1ec Back out "[react-native][PR] Rounded corner rendering fixed on Android N."
Summary:
Original PR: https://github.com/facebook/react-native/pull/21340

The original PR fixed a bug with border radius on Android 7.0, but caused a new bug where no `ReactART` components would render if they were nested within a View with border radius set.

Differential Revision: D10409352

fbshipit-source-id: 0b4e36ae9d4c3bc2f4884a43909f8efdeeb41b74
2018-10-16 14:45:01 -07:00
Haitao Li b0d68c0bb9 Fix DynamicFromMap object pool synchronization (#17842)
Summary:
DynamicFromMap internally uses SimplePool object to recycle dynamic prop objects. But the pool is not multi-thread safe. Currently the most used dynamic props are size props such as left, paddingVertical, marginTop and so on. These props are only accessed from the layout thread so the pool works fine. If a dynamic prop is needed in UI thread, then the two threads can access the same pool object and cause random errors. This PR make the pool object thread local to avoid synchronization. After this change there are two pool objects created in the process.

Tested in official Airbnb app after updating accessibilityComponentType to be dynamic.

Once this is merged, I'll send another PR to support "disabled" state in `accessibilityComponentType`.

[ANDROID] [BUGFIX] [DynamicFromMap] - Fix a crash caused by dynamic props.
Pull Request resolved: https://github.com/facebook/react-native/pull/17842

Differential Revision: D10374238

Pulled By: hramos

fbshipit-source-id: 7ebf89c5abf06bd5fb43b205348ba4dc7e19517d
2018-10-13 17:42:44 -07:00
Ram N 5e7c774d64 Initialize the Choreographer in ReactChoreographer lazily
Summary:
Today, ReactInstanceManager calls `ReactChoreographer.initialize()` in its constructor. Since `ReactChoreographer` also needs to run on the UI thread, this forces the entire `ReactInstanceManager` to run on the UI thread.

By moving `ReactChoreographer` to lazily set up its Choreographer, we can make `ReactInstanceManager` run on any thread

Reviewed By: mdvacca

Differential Revision: D10097432

fbshipit-source-id: eb8c80aafcba745ea15c86296d11c487329b1df0
2018-10-12 19:37:42 -07:00
David Vacca 082a869dae Cleaning up imports in ViewGroupManager
Summary: Trivial cleanup of imports in ViewGroupManager class

Reviewed By: shergin

Differential Revision: D10343029

fbshipit-source-id: 0b049df545a4101f11dd67809c9a96723e746945
2018-10-12 18:41:51 -07:00
David Vacca ca3a6e8f13 Uninstalling native FabricUIManager when reloading RN screen
Summary: This diff makes sure the native side of the UILayer of RN is deallocated when the a RN screen is reloaded.

Reviewed By: shergin

Differential Revision: D10343030

fbshipit-source-id: 7add841b8875d28fe527f20b96f799733769b11a
2018-10-12 18:41:51 -07:00
David Vacca 9817f85def Avoid cleaning up ReactRootView content when reactContext is destroyed
Summary: This diff avoids deleting all the views of ReactRootView when the ReactContext is destroyed (ONLY FOR FABRIC). In Fabric these views are removed and deleted by the framework when the ReactShadowNode is destroyed.

Reviewed By: shergin

Differential Revision: D10319737

fbshipit-source-id: 2e2d2599006cd8205e0153c18cd75383387ce1df
2018-10-12 18:41:51 -07:00
Dulmandakh 10fc548809 bump okhttp3 to 3.11 (#21626)
Summary:
OkHTTP3 3.11 version includes many bug fixes, and few new features. Also it embed R8/ProGuard rules in the jar, which will help reduce APK size.

Changelog https://github.com/square/okhttp/blob/master/CHANGELOG.md
Pull Request resolved: https://github.com/facebook/react-native/pull/21626

Differential Revision: D10367048

Pulled By: RSNara

fbshipit-source-id: b168138178f96eeefba493002f7b6a2e921a531d
2018-10-12 15:00:17 -07:00
Emily Janzer f1b4daf51f Start core marker earlier
Summary: Moving up when we start the CORE marker to `FbReactFragment.onFragmentCreate` on FB4A. Right now the CORE marker gets started with CREATE_REACT_CONTEXT_START, since it's possible for the instance manager to be created before TTI begins. We address this in HOME_TTI by collecting the getInstanceManager time, comparing to TTI start, and using that as bridgeStartupStartTime. Ideally, though, we'd just start the CORE marker at the right time so we can use it independently to measure RN startup. This diff moves up CORE start time to `onFragmentCreate` (even before `getReactInstanceManager`)

Reviewed By: alexeylang

Differential Revision: D10094921

fbshipit-source-id: 77986535915f8e81d4d2c5b9108cbed40d1a75be
2018-10-12 10:10:09 -07:00
Oleg Lokhvitsky 6eeff75849 Android ScrollView fix for snapToInterval not snapping to end
Summary:
The end-of-scrollable-range offset was not clipped before the nearestOffset calculation causing the ScrollView to not snap to the end of the view when the width of the ScrollView was not an exact multiple of snapToInterval.

Addresses https://github.com/facebook/react-native/issues/21116#issuecomment-427944838

Reviewed By: yungsters

Differential Revision: D10248545

fbshipit-source-id: 2bdc94ea0a9d9f063769f2c5da4c33d4872b1db2
2018-10-11 10:01:30 -07:00
Emily Janzer 01a1004808 Fix for InterpolatorType crash
Summary:
We're currently getting a redbox in Turkish when we try to convert the string 'easeInEaseOut' to an InterpolatorType. This is because I use toLowerCase() to compare the string without setting a locale; in Turkish, the capital letter 'I' doesn't convert to 'i' when you lowercase it, but rather to 'ı' (http://www.i18nguy.com/unicode/turkish-i18n.html).

Passing in a locale param to `toLowerCase()` fixes it. Also updating the test.

Differential Revision: D10315474

fbshipit-source-id: 54be3ff1d3f91cb2ec765ff705ac364b976b8c6f
2018-10-10 15:31:20 -07:00
Lorenzo Sciandra 15c05988e9 Update to Detox 9 (#21570)
Summary:
Updating to Detox 9 - this should help with better Xcode 10 support, and should fix https://github.com/facebook/react-native/issues/21539.

I've updated to fixed `9.0.4` since it seems that each version is fairly different from the next, and I've followed the [migration guide](https://github.com/wix/detox/blob/master/docs/Guide.Migration.md#migrating-from-detox-8xx-to-9xx) for the android native dependencies.

Release Notes:

[INTERNAL] [ENHANCEMENT] [DETOX] - Update to version 9.0.4

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

Reviewed By: TheSavior

Differential Revision: D10242373

Pulled By: RSNara

fbshipit-source-id: bd29d554e0972f16d96b9b39b86c7143941d5b7c
2018-10-10 10:01:21 -07:00
Radovan Šmitala 4b6f02ea75 Normalize scheme for URL on Android (#21561)
Summary:
Android requires lowercase for URL scheme. This commit d00bdb9bb8 fixed it but on React Native side.
Because it is Android specific, it should be fixed on Android side.

Android has method to normalize url scheme: https://developer.android.com/reference/android/net/Uri.html#normalizeScheme()
Pull Request resolved: https://github.com/facebook/react-native/pull/21561

Differential Revision: D10287868

Pulled By: hramos

fbshipit-source-id: f5e474164fdb2cfd49bd8ee51da17de3f1341a9c
2018-10-09 23:32:24 -07:00
David Vacca 397573ffed Fix onPress for TextView containing just RawText
Summary: This diff enables the onPress event for TextViews that render RawText

Reviewed By: shergin

Differential Revision: D10222183

fbshipit-source-id: 4b6a6ad548286453f7dd3a14a5e4ee453a55b923
2018-10-09 16:47:28 -07:00
David Vacca 95afdd8bb3 Introducing "collapsable" prop as part of ViewProps
Summary: This diff introduces the collapsable props in the viewProps. This prop is used in product code to prevent specific Views to be removed from the view hierarchy

Reviewed By: shergin

Differential Revision: D10254679

fbshipit-source-id: 637665b8998a86e29e839eb6d405a0fac354c8d3
2018-10-09 16:47:27 -07:00
Emily Janzer b7526b2095 Add test for InterpolatorType
Summary: Adding a test for the newly added InterpolatorType.fromString()

Reviewed By: axe-fb

Differential Revision: D10203814

fbshipit-source-id: f3c70db1a5754c79b1bdd881d266bec110934494
2018-10-08 11:31:18 -07:00
Rick Ratmansky b3f4872659 Adding new Buck targets
Summary: This will facilitate various cleanups

Differential Revision: D10145594

fbshipit-source-id: 3a360684ba96d5e0466a3e3dc2306c59e6fb50bd
2018-10-08 09:16:30 -07:00