Commit Graph

8853 Commits

Author SHA1 Message Date
Pieter De Baets 88da9e658c Remove duplicate Yoga copy
Reviewed By: foghina

Differential Revision: D4346088

fbshipit-source-id: 3decfe16fe13d70a1862fc8bb8dfca30689023f8
2016-12-19 03:43:29 -08:00
Alan Norbauer 4aabf4b6b3 Replace jest.resetModuleRegistry() with jest.resetModules()
Reviewed By: cpojer

Differential Revision: D4344961

fbshipit-source-id: 45453ec7ee3211743946ab9156f51430322b5832
2016-12-18 17:13:38 -08:00
Aaron Chiu 1052d29fac create ART*ViewManager classes
Reviewed By: achen1

Differential Revision: D4050949

fbshipit-source-id: 214838c1c1cf6c66170b606ac7055e1e8790b6c9
2016-12-17 17:43:35 -08:00
Ashok Menon 6ca6b4988a Propagate Load Errors through JSExecutor API
Reviewed By: mhorowitz

Differential Revision: D4315204

fbshipit-source-id: ae282e0a0398a602dd790de3a2b1adb5fdc1f50c
2016-12-17 04:58:31 -08:00
Kevin Lacker 9f3ef48f65 Added info about a cancelable option for Alerts on Android.
Summary:
In the 8e2906ae89 commit there was implemented a cancelable option for Alerts. It wasn't clear from the docs about this option and the additional Alert method's parameter.
Closes https://github.com/facebook/react-native/pull/11292

Differential Revision: D4342707

Pulled By: lacker

fbshipit-source-id: dc243b868106e705040e77bc90d4d9b8c2dc26eb
2016-12-16 16:28:31 -08:00
Aaron Chiu c27cc9c1ac add viewManager param to @ReactModuleList
Reviewed By: achen1

Differential Revision: D4338871

fbshipit-source-id: 4ac175e0a9049d5fb08c9d01f630a3e17124e08e
2016-12-16 15:28:28 -08:00
Leland Richardson 71f32fb5a3 Fix documentation for scrollResponderScrollNativeHandleToKeyboard
Summary:
I'm pretty sure this is supposed to be "bottom" as opposed to "top", as it's the offset from the keyboard, which is at the bottom of the screen.
Closes https://github.com/facebook/react-native/pull/11446

Differential Revision: D4339957

Pulled By: lacker

fbshipit-source-id: 62dca544a0167704d76cd972c44570f277ea63aa
2016-12-16 15:13:36 -08:00
Adam Comella 1c32385344 Android: Fix native animation crash
Summary:
An exception is thrown when the native animation code attempts to play an animation on a view that hasn't been created yet. This can happen because views are created in batches. If this particular view didn't make it into a batch yet, the view won't exist and an exception will be thrown when attempting to start an animation on it.

This change eats the exception rather than crashing. The impact is that the app may drop one or more frames of the animation.

**Notes**

I'm not familiar enough with the Android native animation code to know whether or not this is a good fix. My team is using this change in our app because dropping animation frames is better than crashing the app. [This is the code](c612c61544/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIViewOperationQueue.java (L874-L892)) that is creating the views in batches. Hopefully my PR at least provides some insight into the cause of the bug.

This may fix #9887
Closes https://github.com/facebook/react-native/pull/10907

Differential Revision: D4340129

Pulled By: lacker

fbshipit-source-id: 69160d9e71281a96a7445d764b4715a3e54c0357
2016-12-16 14:28:34 -08:00
tychota 25cd2c5d7b Deprecate RecyclerViewBackedScrollView
Summary:
cc brentvatne

potential reviewers mkonicek and kmagiera

**Motivation for making this change.**

The previous PR was closed : #11095 but the followup actions was never done

I reopened a really similar one so it get merged
RecyclerView is no more used at Facebook (according to previous PR)

According to brentvatne, their were two motivations for RecyclerView:
* ListView with ScrollView component used to bounce back on row insert, but this is now fixed
* This made possible to implement certain performance improvements, but the maintenance cost was not worth the risk

With RN 0.37, the actual code in React Native make the app crash:
- see #10560

I spend one hour investigating this and did also require brent time at exponent slack. I think other people are struggling too.

**Test plan**

<img width="708" alt="screen shot 2016-12-13 at 23 42 22" src="https://cloud.githubusercontent.com/assets/13785185/21162483/dbeb642e-c18d-11e6-9c32-1fe73f1826c1.png">

**Code formatting**

The
Closes https://github.com/facebook/react-native/pull/11445

Differential Revision: D4340640

Pulled By: mkonicek

fbshipit-source-id: 64c5cf060f2eb035d4d6199b30f0e73afc520180
2016-12-16 12:28:36 -08:00
David Aurelio 4308b9ea2c Add `deps` param to `js_library`
Reviewed By: cpojer

Differential Revision: D4334383

fbshipit-source-id: 96f0d6ba5ed8ddab25087edd6381a6e6449ff63a
2016-12-16 11:13:35 -08:00
Steve Kellock f49093f397 Fixes launching Visual Studio Code due to args being a nested array.
Summary:
**Motivation**

Visual Studio Code appears to have been accidentally borked in RN 38 & 39.

[Here you see](a643784144 (diff-9ad1aafc931637a94d74b60c06b46871R153)) args become an array to support the new `shell-quote` support.

Problem is, `getArgumentsForLineNumber` also returns an array.

[And because we](a643784144 (diff-9ad1aafc931637a94d74b60c06b46871R161)) `push` instead of `concat`, we get hawt array-on-array action.

Surprisingly Atom works.  But Code doesn't like this at all.

**Test plan (required)**

On RN 0.38 and 0.39, what's happening when I click on the simulator stack frame, Code opens with the array as a string...

![image](https://cloud.githubusercontent.com/assets/68273/20971724/83a3d7c4-bc60-11e6-8170-a1c2a4adee60.png)

I've tested Vim, Code and Atom (all on 10.11.6) as well as all combinations of `REACT_EDITOR` both set
Closes https://github.com/facebook/react-native/pull/11345

Differential Revision: D4339963

Pulled By: lacker

fbshipit-source-id: 030cb9e3d84fd6861f28e3652bebfe2eef28dd62
2016-12-16 10:28:35 -08:00
pedramsaleh 20938ae88c Fixed typo in docs.
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).

For more info, see
Closes https://github.com/facebook/react-native/pull/11459

Differential Revision: D4339946

Pulled By: lacker

fbshipit-source-id: d95e7c62dbf7bf6fd2ab3739b3d64bfcbe83e24a
2016-12-16 10:28:34 -08:00
Mani Ghasemlou 45bccef20d Add the Bloomberg App to the showcase.
Summary:
We at Bloomberg have just launched our app, and it is entirely written in React Native! You can read about how much we love RN here: https://www.techatbloomberg.com/blog/bloomberg-used-react-native-develop-new-consumer-app/
Closes https://github.com/facebook/react-native/pull/11504

Differential Revision: D4339943

Pulled By: lacker

fbshipit-source-id: af47bd724ef3f196aa8d5c59e4661e0ac895eceb
2016-12-16 10:13:37 -08:00
Andrew 00449b2654 Little docs correction
Summary:
Comma out
Closes https://github.com/facebook/react-native/pull/11491

Differential Revision: D4339939

Pulled By: lacker

fbshipit-source-id: 4945d9804e39809a10e92f42f60434fe69552782
2016-12-16 10:13:37 -08:00
sunnylqm 4e466d4c8a Update AndroidBuildingFromSource.md
Summary:
Local Maven repository for Support Libraries -> Android Support Repository
someone so moody
Closes https://github.com/facebook/react-native/pull/11360

Differential Revision: D4339960

Pulled By: lacker

fbshipit-source-id: 04e92d07413184e86fca3034a4a16a6e689da87e
2016-12-16 09:58:35 -08:00
Martin Konicek c4abd5b82a CLI: Refactor printing of version a bit
Summary:
Small renaming after https://github.com/facebook/react-native/pull/11464

**Test plan**

Ran 'react-native init' and 'react-native -v' inside and outside a RN project.

Reviewed By: mkonicek

Differential Revision:
D4339481
Ninja: OSS only

fbshipit-source-id: b23daaee55907761ed0820a707f36ad70d1f1d09
2016-12-16 06:43:33 -08:00
Konstantin Raev 0579efea8c Switched to npm hosted boost lib
Summary:
Boost is officially hosted on SourceForge which has ab SSL problem that Gradle complains about and also it is sometimes unavailable.
I switched to using npm hosted (yarnpkg mirrored for performance) boost lib exactly the same as from Source Forge.

Other alternatives considered:
- CDN e.g. mirror.nienbo.com started responding with 4XX code when requested by Gradle
- File sharing like DropBox are not for mass anonymous downloads
- Github is not good for binary files and is throttled for anonymous raw file downloads
- S3 or similar. Requires amazon account for maintenance and does not expose semver API and other nice features that npm has

In the future I'd like to try Yarn as dependency management tool for bridge builds, this could be the first step.

**Test plan (required)**

- Circle (testing with caches cleaned)
- `./gradlew ReactAndroid:packageReactNdkLibsForBuck` (check twice to make sure caches work)
- `REACT_NATIVE_BOOST_PATH=./bridge-dependencies/node_modules/boost-react-native-bundle ./
Closes https://github.com/facebook/react-native/pull/11469

Differential Revision: D4339446

Pulled By: mkonicek

fbshipit-source-id: ccc9196e9b675c16a235a318c4861aaa4e263d6e
2016-12-16 06:43:33 -08:00
Ashok Menon fa082796a5 Make file backed strings dup the provided file descriptor.
Reviewed By: mhorowitz

Differential Revision: D4326645

fbshipit-source-id: 2741f1fead4f42ae76787f8a70c1e787445b827d
2016-12-16 06:13:40 -08:00
Laguana 349bbb54f7 Fix react-native -v
Summary:
The `checkForVersionArgument` function tries to call `REACT_NATIVE_PACKAGE_JSON_PATH` which isn't defined yet prior to this change. This means that `react-native -v` never reports the version of react-native used in the current project, and in fact never detects the current project.

Fixes #11463
Closes https://github.com/facebook/react-native/pull/11464

Differential Revision: D4339279

Pulled By: mkonicek

fbshipit-source-id: 324d96c97bb06b6156e5582f889bc30b28ca68b2
2016-12-16 04:44:18 -08:00
Emil Sjolander 45fdcdc93a YGNodeChildCount -> YGNodeGetChildCount for consistency
Reviewed By: gkassabli

Differential Revision: D4333480

fbshipit-source-id: 17058f18fa9e26b3e02f7a1651f7295cae59acad
2016-12-16 04:44:18 -08:00
Adam Comella c0ea23cfb0 Android: Expose textBreakStrategy on Text and TextInput
Summary:
Android has a text API called breakStrategy for controlling how paragraphs are broken up into lines. For example, some modes support automatically hyphenating words so a word can be split across lines while others do not.

One source of complexity is that Android provides different defaults for `breakStrategy` for `TextView` vs `EditText`. `TextView`'s default is `BREAK_STRATEGY_HIGH_QUALITY` while `EditText`'s default is `BREAK_STRATEGY_SIMPLE`.

In addition to exposing `textBreakStrategy`, this change also fixes a couple of rendering glitches with `Text` and `TextInput`. `TextView` and `EditText` have different default values for `breakStrategy` and `hyphenationFrequency` than `StaticLayout`. Consequently, we were using different parameters for measuring and rendering. Whenever measuring and rendering parameters are inconsistent, it can result in visual glitches such as the text taking up too much space or being clipped.

This change fixes these inconsistencies by setting `breakStrategy` and `hyphenat
Closes https://github.com/facebook/react-native/pull/11007

Differential Revision: D4227495

Pulled By: lacker

fbshipit-source-id: c2d96bd0ddc7bd315fda016fb4f1b5108a2e35cf
2016-12-16 01:28:45 -08:00
Jay Caines-Gooby c93643c079 REACT_NATIVE_DIR needs quoting to retain spaces
Summary:
${REACT_NATIVE_DIR} needs to be quoted as "${REACT_NATIVE_DIR}" otherwise projects paths with spaces in, will fail to build.

e.g. a project in `/home/me/some folder` will fail to build with:

```
../node_modules/react-native/packager/react-native-xcode.sh: line 37: cd: /home/me/some: No such file or directory
```
Closes https://github.com/facebook/react-native/pull/11487

Differential Revision: D4336281

Pulled By: lacker

fbshipit-source-id: c5d19fbd21978714c7af44c305ba854477118e1d
2016-12-15 23:43:41 -08:00
zongjingyao eba356fb13 result in RCTAsyncStorage.multiGet could be null.
Summary:
App will crash if result is null.
Closes https://github.com/facebook/react-native/pull/10338

Differential Revision: D4335305

Pulled By: lacker

fbshipit-source-id: 4910bfd7c56525a2ef1b252b56b8debd21fa2bae
2016-12-15 22:43:30 -08:00
John Shelley 901178d53c BREAKING: Android - ReactNativeHost getUseDeveloperSupport to public #2
Summary:
AaaChiuuu
See: https://github.com/facebook/react-native/pull/11329
Closes https://github.com/facebook/react-native/pull/11505

Differential Revision: D4338559

Pulled By: AaaChiuuu

fbshipit-source-id: 6cd1fd366a2bc30d496b7e907242e7f89a384a19
2016-12-15 21:13:38 -08:00
Neo 4cb8a852a1 fix typo
Summary: Closes https://github.com/facebook/react-native/pull/11249

Differential Revision: D4338083

Pulled By: lacker

fbshipit-source-id: bc997c9fb0c4af0667234d4920ea9a73ac86d2fb
2016-12-15 21:13:38 -08:00
David Gröger 85c8333bc8 run-android-on-specific-device
Summary:
At the moment the run-android command from the react-native cli does run all available devices at once. However it would be extreme useful to have the option to choose only one specific device/simulator.
Therefore i've created a new flag for the command 'run-android': --deviceIdFromList 'deviceIdFromList' in order
to install and launch apps on a specific device/simulator from the command line.

'deviceIdFromList'  is the id listed on the output of the command 'adb devices'.

I've tested my code with the following commands:
react-native run-android --deviceIdFromList "Not existing id"
react-native run-android --deviceIdFromList
react-native run-android --deviceIdFromList "id of a simulator"
react-native run-android --deviceIdFromList "id of a device"

Output:
![not-existing-device](https://cloud.githubusercontent.com/assets/9102810/17931086/d843abc8-6a09-11e6-995d-8c737dd5ed5c.png)
![empty-flag](https://cloud.githubusercontent.com/assets/9102810/17931087/d8443930-6a09-11e6-94f3-d
Closes https://github.com/facebook/react-native/pull/9568

Differential Revision: D4335133

Pulled By: mkonicek

fbshipit-source-id: a827628316be1b5751225851323b1131f451574c
2016-12-15 19:43:32 -08:00
Steven Goff 4394419b60 Android Text component allowFontScaling
Summary:
The reason for this change is to implement `allowFontScaling` on the Android's React Native Text component.  Prior to this PR `allowFontScaling` only works for iOS.

The following link contains images of `allowFontScaling` working in Android on small, normal, large, and huge system fonts (from native Android display settings)

http://imgur.com/a/94bF1

The following link is a video of the same thing working on an Android emulator

https://youtu.be/1jTlZhPdj9Y

Here is the sample code snippet driving the video/images
```
render() {
    const size = [12, 14, 16, 18];
    return (
      <View style={{backgroundColor: 'white', flex: 1}}>
        <Text>
          Default size no allowFontScaling prop (default true)
        </Text>
        <Text allowFontScaling={true}>
          Default size allowFontScaling: true
        </Text>
        <Text style={{ marginBottom: 10, }} allowFontScaling={false}>
          Default size allowFontScaling: false
        </Text>

        { size.map(
Closes https://github.com/facebook/react-native/pull/10898

Differential Revision: D4335190

Pulled By: lacker

fbshipit-source-id: 0480809c44983644ff2abfcaf4887569b2bfede5
2016-12-15 17:43:35 -08:00
Emil Sjolander 23e2610f4f Add YGNodeGetParent api
Reviewed By: gkassabli

Differential Revision: D4333456

fbshipit-source-id: 388afd0a01c19a6db73c175bf24c566278832cb9
2016-12-15 09:29:16 -08:00
Delyan Kratunov 1f78ea326e Remove unnecessary project_config
Differential Revision: D4326949

fbshipit-source-id: d0e8d7c3a046a89e5794be602a406ea914de50d1
2016-12-15 09:29:16 -08:00
John Shelley f3c8158773 Android - ReactNativeHost getUseDeveloperSupport to public
Summary:
Currently React Native is opinionated in that the easiest approach is to extend ReactActivity. However to more easily allow integrating with existing application, we should allow some of the methods in ReactNativeHost to be public, and this is a very good first step.
* There is no harm in making this public from what I can tell.
* This allows `ReactNativeHost` to be more easily used outside of the `ReactActivity` and `ReactActivityDelegate` ecosystem. (A `ReactFragment` would be a good example)

_No issues found_

**Test plan (required)**

* Run any sample app and verify it still works.

Make sure tests pass on both Travis and Circle CI.
Closes https://github.com/facebook/react-native/pull/11329

Differential Revision: D4287429

Pulled By: AaaChiuuu

fbshipit-source-id: 8cb76f3226aae3737af5f5bd6010d3eea8df9bfe
2016-12-15 04:13:37 -08:00
Adam Miskiewicz 781480dc53 Resolve single flow error in node-haste
Summary:
Makes flow pass.
Closes https://github.com/facebook/react-native/pull/11465

Differential Revision: D4328094

Pulled By: ericvicenti

fbshipit-source-id: 5eb60831145ade00eb2d504f4958f0a683eef686
2016-12-15 00:28:31 -08:00
Eric Vicenti cbc413ba87 Revert D4321763: Use native driver even if gestures are enabled
Differential Revision: D4321763

fbshipit-source-id: b43a733ea2234dd46add817bb83cca366ef83093
2016-12-14 15:28:32 -08:00
Dayne Wright eb43f155b4 Updated Mac/Linux ANDROID_HOME path to include ${HOME}
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

Using `~` in the `.bashrc` or `.zshrc` fails inside of double quotes.  By changing this to `$HOME` the path is exported correctly in all instances.

Explain the **motivation** for making this change. What existing problem does the pull request solve?

It corrects the path to the Android home location if SDK is installed via Android Studio. Using `~` for the home path is failing.  By added `$HOME` you are guaranteed the correct path.

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Install Android Studio & SDK.
Set environment variable in `.bashrc` or `.zshrc` with `${HOME}/Library/Android/sdk` instead of `~/Library/Android/sdk`

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the p
Closes https://github.com/facebook/react-native/pull/11461

Differential Revision: D4327870

Pulled By: JoelMarcey

fbshipit-source-id: 903a84504f6288c73ac39a8f3b8800ededbdccf9
2016-12-14 15:28:31 -08:00
Martin Konicek 8832479e28 Update template app's Flow config to Flow v0.37
Reviewed By: mkonicek

Differential Revision:
D4328558
Ninja: OSS only

fbshipit-source-id: 269b09deffd49e8fab7ca15912f833bf806199c1
2016-12-14 12:28:30 -08:00
Kevin Lacker 133d410ee6 attempt to fix tests
Summary:
This PR attempts to fix the iOS tests by fixing a flag in the e2e tests, and "fix" the Android tests by commenting out the e2e test. I propose that if these fix the tests, we accept them, and then follow up attempting to fix the Android e2e tests for real afterwards.
Closes https://github.com/facebook/react-native/pull/11466

Differential Revision: D4328304

Pulled By: mkonicek

fbshipit-source-id: 3c497921ea0359bed633c7bd390495046634c123
2016-12-14 12:13:41 -08:00
Üstün Ergenoglu 3785db2fb1 Add property to force HW acceleration on Android for modal windows
Summary:
When using React Native on Android on top of a game as an overlay, dialog windows sometimes get created with hardware acceleration disabled. This causes the UI to be unresponsive and anything that uses a TextureView stops working. Added a property for the modal view to make sure hardware acceleration flag is enabled when it's set to true.

**Test plan (required)**

set `hardwareAccelerated` property for Modal to force hardware acceleration on dialog windows on Android. Does nothing on iOS.
Closes https://github.com/facebook/react-native/pull/11421

Differential Revision: D4312912

Pulled By: andreicoman11

fbshipit-source-id: 9db6b2eca361421b92b24234b3501b5de0eecea7
2016-12-14 10:28:33 -08:00
Jean Lauliac db63537eb5 packager: slightly more complete progress message.
Reviewed By: cpojer

Differential Revision: D4326391

fbshipit-source-id: 134e09f1db6e21165c4af78a9e1266d7f9d046c8
2016-12-14 10:13:29 -08:00
Jean Lauliac 1f07e89538 packager: don't keep on using global cache forever if it misses
Summary:
Keep track of the number of cache misses. If we have a series of misses but then we
start seeing hits, then we progressively reset the counter. If there are too many misses, we just give up on the global cache.

Reviewed By: cpojer

Differential Revision: D4326689

fbshipit-source-id: 5606fc860cbb9d7e9e877c0d1dc4e6a6a1cbcd98
2016-12-14 08:28:42 -08:00
unordered 8ec774396c fix ios formdata boundary include slash
Summary:
some server not work when upload a file with FromData in ios.
the reason is that there is a slash in boundary, like:
```
multipart/form-data; boundary=b/QeEbFgqK9PCZo4T/eXv7f.T74SHd5MxCZ846AsTz-yNV0xrRR_Zks4fkNMCzJck9ZE8o

// koa request.js (line 548)
  is(types) {
    if (!types) return typeis(this.req);
    if (!Array.isArray(types)) types = [].slice.call(arguments);
    return typeis(this.req, types);
  }

// type-is index.js (line 237)
function normalizeType (value) {
  // parse the type
  var type = typer.parse(value)

  // remove the parameters
  type.parameters = undefined

  // reformat it
  return typer.format(type)
}

// media-typer
var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g;
```

thanks for dougwilson 's [answer](https://github.com/jshttp/media-typer/issues/5).
> The / is an illegal character for Content-Type, which is what this module parses
Closes https://github.com/facebook/react-native/pull/11342

Differential Revision: D4326750

Pulled By: javache

fbshipit-source-id: b1c78a335c95a5c223537545d87beaffe15d673d
2016-12-14 08:28:42 -08:00
Kirwan Lyster 14dfb525a2 Use ScaleType.getTransform() instead of util method
Summary: This changes ReactImageView to pull the transform matrix for rounding from the scale type itself instead of a utility method that forwards to the same thing.

Reviewed By: lambdapioneer

Differential Revision: D4326549

fbshipit-source-id: 82e59e3c20f83beb1d454743e6dbbce8666de8a3
2016-12-14 07:43:32 -08:00
Jean Lauliac 26ed94c0fd packager: Terminal abstraction to manage TTYs
Reviewed By: cpojer

Differential Revision: D4293146

fbshipit-source-id: 66e943b026197d293b5a518b4f97a0bced8d11bb
2016-12-14 05:14:06 -08:00
Neo f8f70d2275 fix ListView to work with Native Animated.event
Summary:
suggested by janicduplessis in https://github.com/facebook/react-native/pull/9253#issuecomment-247862707
I'm using this in my own apps
Closes https://github.com/facebook/react-native/pull/11339

Differential Revision: D4325343

fbshipit-source-id: f1da26a2107093865f04e1d81245b33482776001
2016-12-13 20:43:53 -08:00
Jeff Morrison d926aecd77 fbsource
Reviewed By: samwgoldman

Differential Revision: D4314897

fbshipit-source-id: fbe11da4c63bf34d010220d74177cb3ca4cbee6d
2016-12-13 18:58:34 -08:00
Kevin Lacker affd5ac681 Improve Android testing scripts
Summary:
The goal of this pull request is to make it easier for contributors to run Android tests locally, specifically the unit tests and integration tests. I added a bunch of checks to the local testing scripts that will warn you if your environment is misconfigured, and tell you how to fix it. I also updated the testing docs, so that the regular "Testing" page should be a decent resource to point people to when you are telling them "hey this pull request needs a test." Just Android, though, I haven't gotten to the iOS parts yet.

I also disabled a couple tests that seemed quite flaky while running on a local machine, and don't seem to be providing much value. In particular, the `TestId` test just hangs on my emulator a lot and has been flaky on CI in the past, so I removed about half of its test cases to make the sample app smaller. The testMetions test appears to be dependent on screen size so I commented it out.
Closes https://github.com/facebook/react-native/pull/11442

Differential Revision: D4323569

Pulled By: bestander

fbshipit-source-id: 9c869f3915d5c7cee438615f37986b07ab251f8c
2016-12-13 17:13:35 -08:00
Christoph Pojer 3e6d762ab7 Remove `pit` and `mockImpl`
Reviewed By: dmitriiabramov

Differential Revision: D4321635

fbshipit-source-id: 460889a1f956f3733e7e49883dd97c9a8a561b86
2016-12-13 15:13:39 -08:00
Janic Duplessis 4220063f84 Use native driver even if gestures are enabled
Summary:
Gestures now work with native animations so we can enable it, it is also not needed anymore to check if the native module exists since we print a warning in the Animated module now.

**Test plan**
Tested that animations and gesture work properly in the UIExplorer example. Also been using native animations with NavigationExperimental (ex-nav) in an app for a while.
Closes https://github.com/facebook/react-native/pull/11234

Differential Revision: D4321763

Pulled By: ericvicenti

fbshipit-source-id: 255bed5bfed3b93bdc10939b5a03d4d8b00ceade
2016-12-13 13:43:45 -08:00
Alex Kotliarskyi 41f2169629 Improve TouchableOpacity
Summary:
I was comparing `<TouchableOpacity>` to `UIButton` in iOS and it just doesn't feel native. The initial delay was fixed by https://github.com/facebook/react-native/pull/10866 but still there is a lag between button release and animation.

I'm also not sure what `_hideTimeout` was used for. When logging `touchableHandle*` events looks like `touchableHandleActivePressIn` is called first, then `touchableHandleActivePressOut` and then `touchableHandlePress`. Which means the fade in animation from `touchableHandleActivePressOut` was interrupted by `touchableHandlePress`.

Reviewed By: vjeux

Differential Revision: D4309789

fbshipit-source-id: b6d4df544952e11c2ade97d860531cbb2fada36b
2016-12-13 11:28:30 -08:00
David Aurelio 194604f0a1 install `node_modules` into `buck-out`
Reviewed By: cpojer

Differential Revision: D4312220

fbshipit-source-id: 1449a194c557071bb5f0be6bc00dccef26c62b47
2016-12-13 09:13:39 -08:00
David Aurelio f3a9decebc Add `bundle` command
Summary: This adds the machinery necessary to create a bundling function, and adds different reusable parts around generating code and maps for bundles. Used for the new integration with Buck

Reviewed By: cpojer

Differential Revision: D4299272

fbshipit-source-id: 59ebe39a454ebf56c2159717c2881088d6d3308a
2016-12-13 07:28:31 -08:00
Aaron Chiu a76547f7ac force crash if a Java Module isn't lazifi-able in a Lazified app
Reviewed By: achen1

Differential Revision: D4317878

fbshipit-source-id: 61ee4b24f0de206f53d6f4b3801d81aa6f3ab36c
2016-12-13 03:58:32 -08:00