Commit Graph

6708 Commits

Author SHA1 Message Date
Fanghao Chen 668857a168 Add Discord's blog post.
Summary: Closes https://github.com/facebook/react-native/pull/8012

Differential Revision: D3430539

Pulled By: javache

fbshipit-source-id: 7d9a912566bb8a5105447b01d69d785db5d1a52b
2016-06-14 07:13:56 -07:00
q-- 599d76a64b Fix tutorial link in README.md
Summary:
The tutorial has moved to a different URL, so the link currently ends up at the getting started page.

I also changed the remaining non-HTTPS urls in README.md to use HTTPS after checking they supported it. And I changed the Addons.Mozilla.org link to a language-agnostic one.
Closes https://github.com/facebook/react-native/pull/8047

Differential Revision: D3430542

Pulled By: javache

fbshipit-source-id: 4c5ccea9a5720126870a5df1be5073a6cc2f34ae
2016-06-14 06:43:49 -07:00
Satyajit Sahoo 803cb61346 Show better error message when accessing React APIs on React Native
Summary:
**Motivation:**

Lots of examples on the web still have the old way to import React APIs from React Native. Also when someone upgrades to latest version of React Native without reading the release notes can get confused. This PR adds getters for  `createClass` and `Component` and throws an error with a better error message when they are accessed.

![screenshot_20160614-125622](https://cloud.githubusercontent.com/assets/1174278/16034600/47c70222-3230-11e6-9fe4-1a3493708829.png)

**Test plan:**

Trying to use `ReactNative.createClass` or `ReactNative.Component` will throw an error with this error message.

There's currently a bug in `symbolicateStackTrace` which actually crashes the app after showing the error due to the `stack` being null when updating the stack trace. But that's a separate issue which should be fixed separately. For now, to prevent the crash, we need to add the following before the return statement here - https://github.com/facebook/react-native/blob/master/Libraries/JavaScriptAppEn
Closes https://github.com/facebook/react-native/pull/8099

Differential Revision: D3430468

Pulled By: javache

fbshipit-source-id: c098e51e1f2c276d87eca6da3bd91a457d7840c5
2016-06-14 06:28:26 -07:00
Jonathan Stanton 8ac55ee92b Instantiate local notifications different than remote notifications
Summary:
To use `PushNotificationIOS` for local notifications in the same way as we use them for remote notifications. Today remote notifications are being constructed correctly but local notifications are not. Related issue: https://github.com/facebook/react-native/issues/8014

When ObjC receives local notifications it does not serialize the `UILocalNotification` the same way as we do for remote notifications. And when we go to construct a `PushNotificationIOS` javascript instance it works for remote notifications but not for local notifications.

- Some of remote notification's data is wrapped in an `aps` dict (https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/TheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH107-SW1).
- All of local notifications are being received and passed to javascript as a flat dictionary: (https://github.com/facebook/react-native/blob/maste
Closes https://github.com/facebook/react-native/pull/8029

Differential Revision: D3417260

Pulled By: javache

fbshipit-source-id: c130aa39e89ffbbd8b1243b6dacbf95bb591b4da
2016-06-14 06:13:25 -07:00
Siqi Liu 1e88c1261c Disable the double R shortcut to reload JS in iOS
Summary: Disable double R shortcut temporarily to fix a bug.

Reviewed By: majak

Differential Revision: D3428043

fbshipit-source-id: 23795b72433230e49d5ab559c0cb828bce8196ea
2016-06-14 05:30:30 -07:00
Pieter De Baets b90b57c9a1 Cache __fbBatchedBridge reference
Summary:
We already do this on Android, and it allows uw to avoid doing this global object lookup for every call. Since there's only a couple of global functions we ever call, we should consider caching all of them in the new bridge.

I didn't ValueProtect/ValueUnprotect since these are already globals, and those methods are not exposed on the JSC wrapper.

Reviewed By: mhorowitz

Differential Revision: D3411487

fbshipit-source-id: 7feaf8803665b77d649e84edad875d31c5acee4b
2016-06-14 05:14:01 -07:00
Pieter De Baets 482b4b6bfa Delay some requires in Animated
Reviewed By: sahrens

Differential Revision: D3424476

fbshipit-source-id: 487835e310b7651e952f46991f2a64bc4967d58a
2016-06-14 05:14:01 -07:00
Konstantin Raev 6210db8ffa Fixed Circle: limit Gradle threads
Summary: Closes https://github.com/facebook/react-native/pull/8103

Differential Revision: D3430328

fbshipit-source-id: 0e683ae1cdc6b4c0cd1e2f426f838b749341dca5
2016-06-14 03:58:26 -07:00
Tony Xiao 93ff5799a5 Add $(inherited) to OTHER_LDFLAGS in xcodeproj template
Summary:
This is particularly important when using generated xcode project together with cocoapods (or anything that leverages a custom xcconfig)

If we do not set `$(inherited)`, then user will get cryptic "Symbol(s) not found for architecture ..." errors that will be really difficult to track down, especially for beginners. This happens because without setting `$(inherited)` we are essentially overriding settings provided on project level (rather than target level) as well as `.xcconfig` level.

**Test plan (required)**

```bash
react-native init MyProject
cd ios
pod init
```
Now go and add a pod to the `Podfile`, say
```ruby
pod 'HockeySDK'
```
And try to use it in `AppDelegate.m`
```objc
...
[[BITHockeyManager sharedHockeyManager] configureWithIdentifier:@"APP_IDENTIFIER"];
[[BITHockeyManager sharedHockeyManager] startManager];
```

Before this change, you'll get errors like this
![image](https://cloud.githubusercontent.com/assets/696842/15801450/feb3c036-2a4
Closes https://github.com/facebook/react-native/pull/7927

Differential Revision: D3430228

Pulled By: javache

fbshipit-source-id: ef453ad2e822726db0159d24ec93e301192e21de
2016-06-14 03:02:32 -07:00
Janic Duplessis 4c245160bd Replace deprecated ActivityIndicatorIOS and ProgressBar with ActivityIndicator
Summary:
This replaces ActivityIndicatorIOS and indeterminate ProgressBar that were deprecated recently with ActivityIndicator across the codebase and examples and a few other cleanups.

This also make a small tweak to ActivityIndicator so it uses the Android theme color instead of gray when no color is specified.

Use Slider instead of SliderIOS in CameraRoll example.

Remove the line about unifying ActivityIndicator and ProgressBar.

**Test plan**
Tested the affected components in UIExplorer on iOS and Android, tested the changes made in Movies example on iOS and Android.
Closes https://github.com/facebook/react-native/pull/8082

Differential Revision: D3429770

fbshipit-source-id: 3b2e1196a8b9fe00d47a7aa1bbc079b094796421
2016-06-13 22:28:24 -07:00
Chris Hopman d344963123 Invert native dependency of new bridge -> old bridge
Reviewed By: mhorowitz

Differential Revision: D3409230

fbshipit-source-id: 541309ec953843477197e5a2b13730b8a38f608d
2016-06-13 18:43:42 -07:00
Chris Hopman b2d4c2e255 Add c++-runloop-backed message queue
Reviewed By: mhorowitz

Differential Revision: D3250498

fbshipit-source-id: 4e32153bcf07f6362f55fa558c22551140b34451
2016-06-13 18:13:34 -07:00
Gerald Monaco 9e9536c50b Lazier loading spinner
Reviewed By: sahrens

Differential Revision: D3413675

fbshipit-source-id: b517bb8175604973bd2f08b6f7b7d3442f0120fd
2016-06-13 18:13:33 -07:00
Clement Genzmer 7c8b91442b Fix rtcRefreshControl
Reviewed By: javache

Differential Revision: D3428671

fbshipit-source-id: c3ae599d4a1a831513b4a7c88ae6aa3b3469e92a
2016-06-13 17:58:31 -07:00
Fred Liu 88f08ec99a quick actions resize when campaign card resizes
Reviewed By: zjj010104

Differential Revision: D3427226

fbshipit-source-id: da8f3a8e399be45afef7e6ba10cb16c7c025c078
2016-06-13 16:58:24 -07:00
Alex Kotliarskyi 23027cd730 Unify renderApplication across iOS and Android
Reviewed By: spicyj

Differential Revision: D3385860

fbshipit-source-id: 256a2d12691dc9fddc56eaf150697f07b830da92
2016-06-13 16:44:04 -07:00
Nathan Azaria 8c29a52c54 Implemented automatic IP detection for iOS
Summary:
Implemented automatic IP detection for iOS, based on #6345 and #6362.
As the previous pull requests did, this works by writing the IP address of the host to a file.
Closes https://github.com/facebook/react-native/pull/8091

Differential Revision: D3427657

Pulled By: javache

fbshipit-source-id: 3f534c9b32c4d6fb9615fc2e2c3c3aef421454c5
2016-06-13 15:58:36 -07:00
Janic Duplessis f9e26b327b Fix polyfillLazyGlobal to work with allowTopLevelThis = false
Summary:
`polyfillLazyGlobal` used a top level this which get stripped by babel `transform-es2015-modules-commonjs` with the default config. This is mainly an issues for people not using the react native babel preset.

This also replaces a few GLOBAL with global for consistency with the rest of the file.

**Test plan**

Tested that there was an error when using `['transform-es2015-modules-commonjs', { strict: true, allowTopLevelThis: false }]` in the babel config and that it was fixed after applying my changes.

Fixes #7700
Closes https://github.com/facebook/react-native/pull/7971

Differential Revision: D3427675

Pulled By: javache

fbshipit-source-id: 48f258b0db1bf21185193bd56df453ced9242e64
2016-06-13 15:58:36 -07:00
Jeff Morrison df46891dfe v0.27.0: fbsource
Reviewed By: gabelevi

Differential Revision: D3421744

fbshipit-source-id: d72275fa70687a188c6175dbd193ab8d79d9051e
2016-06-13 14:28:25 -07:00
Andrei Coman 617a38d984 Support multi sources for images
Summary:
This adds support for specifying multiple sources for an image component, so that native can choose the best one based on the flexbox-computed size of the image.
The API is as follows: the image component receives in the `source` prop an array of objects of the type `{uri, width, height}`. On the native side, the native component will wait for the layout pass to receive the width and height of the image, and then parse the array to find the best fitting one. For now, this does not support local resources, but it will be added soon.
To see how this works and play with it, there's an example called `MultipleSourcesExample` under `ImageExample` In UIExplorer.

Reviewed By: foghina

Differential Revision: D3364550

fbshipit-source-id: 66c5aeb2794f2ffeff8da39a9c0b95155fb2d41f
2016-06-13 14:13:25 -07:00
Nathan Azaria 9443bc5c3f Changed the host for RCTWebSocketExecutor to the one retrieved from the bridge.
Reviewed By: javache

Differential Revision: D3425043

fbshipit-source-id: 342d3dfede6a29197dedb68278ee088dcf009e16
2016-06-13 13:28:28 -07:00
Ben Hoyt a4f772f5f7 Note that MapView is not yet available on Android
Summary:
The MapView component is not labelled as iOS-only, but it is. It took me a bit of digging to figure out that the Android source code hasn't been released. Found it in this [SO answer](http://stackoverflow.com/questions/32625259/no-view-manager-defined-for-class-rctmap) in the end, and it is documented [here](http://facebook.github.io/react-native/docs/known-issues.html#views), but it'd be nice if it said that directly in the MapView docs. (The mention of the Android-specific prop `active` put me off the trail for a bit.)
Closes https://github.com/facebook/react-native/pull/7361

Differential Revision: D3426119

fbshipit-source-id: 7bd210373a223a5dd756d3f095c6d1a3d8788b03
2016-06-13 12:43:33 -07:00
Pieter De Baets 3f1bca7d26 Fix truncate tests
Reviewed By: bestander

Differential Revision: D3424960

fbshipit-source-id: 0f434d80e6e26cfc9f01800c266dd1a3710fe459
2016-06-13 10:13:36 -07:00
Pieter De Baets 2151dfbb24 Open source jest tests for open source components
Reviewed By: bestander

Differential Revision: D3424368

fbshipit-source-id: 116229b64ecc7d8846e803e29fad377a4fb800bb
2016-06-13 08:28:50 -07:00
Emil Sjolander 8afcaa36e6 Import latest css-layout
Summary:
Import latest master from css-layout.

This includes the following pull requests:
https://github.com/facebook/css-layout/pull/192
https://github.com/facebook/css-layout/pull/193
https://github.com/facebook/css-layout/pull/195
https://github.com/facebook/css-layout/pull/196

Reviewed By: javache

Differential Revision: D3411535

fbshipit-source-id: 95bee9bd0282f98f6fafa15335b910b644395ad3
2016-06-13 07:58:35 -07:00
Zakaria Ridouh 97cfacb5ba move templates to .github folder
Summary:
This moves the Template files to the .github folder. This helps clear up the extra files in the root of the directory.

This is my first PR 😄  and I plan to contribute more to this awesome project.
Closes https://github.com/facebook/react-native/pull/7854

Differential Revision: D3424679

fbshipit-source-id: 2baca0bb4182eb6d803836e10a5434d980e7d0c3
2016-06-13 07:43:28 -07:00
Benoit Lemaire 86ab55328b Fix and update Android documentation (Integrating with existing app section)
Summary:
Android documentation was not updated accordingly following a native Android API surface modification which ended up renaming a couple of methods  (introduced in 19a1c4c229)

This PR is fixing the documentation while at the same time updating the documentation in the same section adding another method which was introduced in the same commit and which needs to be called as well (please see comment in [ReactInstanceManager.java](5b871ad9d7/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java (L44)) : `It's required to pass owning activity's lifecycle events to the instance manager [...]`)
Closes https://github.com/facebook/react-native/pull/8032

Differential Revision: D3424674

fbshipit-source-id: 867f98ef210d7e9402afc278fb7b8e08890de3f0
2016-06-13 07:43:27 -07:00
Alexander Blom 933e17949b Run init on normal thread priority
Summary:
The default priority for AsyncTask is THREAD_PRIORITY_BACKGROUND which puts the thread in a limited cgroup that can utilize ~10% CPU time. Because the whole TTI depends on this task we should run it on a normal priority.

The priority will be reset for the nest task and this has been true since donut: https://github.com/android/platform_frameworks_base/blob/donut-release/core/java/android/os/AsyncTask.java

Reviewed By: astreet

Differential Revision: D3417232

fbshipit-source-id: e1e35f82b35b31ff7ebf4fc59509ca2df21e2bdd
2016-06-13 05:58:22 -07:00
Pieter De Baets c25e48abfc Allow additional information to be passed to systrace events
Summary: Expose the ability to provide extra information to Systrace events from JS. This is specifically useful for instrumenting generic recursive method that are defined completely through their params.

Reviewed By: tadeuzagallo

Differential Revision: D3423595

fbshipit-source-id: 7f2dedf02bf901401a6b391b85b1a0bb6782349c
2016-06-13 04:28:38 -07:00
Pieter De Baets d7fc58f32c Add RCT_PROFILE define
Reviewed By: tadeuzagallo

Differential Revision: D3423593

fbshipit-source-id: cc04add1bee16fbb4c2491bd229f23244fe3e7bd
2016-06-13 04:28:38 -07:00
zxcpoiu f5b1f157ad improve CONTRIBUTING.md about Pull Request
Summary:
**motivation**

Lots of people does not sure what to do after a PR.
common questions like:

* should I keep rebasing this PR to the latest master branch ?
* should I keep squashing all commits in a PR into single one?

This may clear it a bit and makes people less nervous 😱

**Test plan (required)**
Closes https://github.com/facebook/react-native/pull/8081

Differential Revision: D3424076

fbshipit-source-id: 6c5f1b0b2f0bee03c647c2f8cad00b788130a5fc
2016-06-12 23:43:26 -07:00
Mark Wang f29e195cb7 More inherited_buck_flags in fbobjc.
Reviewed By: beefon

Differential Revision: D3414903

fbshipit-source-id: 83528910b4d7f60765b7bfdb779c1c08921d8b9a
2016-06-11 20:58:23 -07:00
Guillermo Orellana 87d65847e3 Typo in ReactContext.java
Summary:
Just a tiny typo
Closes https://github.com/facebook/react-native/pull/8066

Differential Revision: D3422819

fbshipit-source-id: f992054e712d081b1cd48c4db0d38cf6517043a7
2016-06-11 16:43:24 -07:00
Dave 97c483ec29 adds textAlignment to placeholder to match textViews alignment (for m…
Summary:
Submitting PR for adding textAlignment to the placeholder of textView so that it matches the alignment of the actual value text
Closes https://github.com/facebook/react-native/pull/7429

Differential Revision: D3422007

fbshipit-source-id: e255c2d86dbaa0e197328a56ec81cbab2735c53d
2016-06-10 20:28:23 -07:00
Fred Liu 78485a36ba Slower bounce
Summary: Slower bounce during mount and right swipe, so it feels less jarring to users.

Reviewed By: hedgerwang

Differential Revision: D3420169

fbshipit-source-id: d5da87c4a64eecf478edd626c96f5541ab94b56e
2016-06-10 17:28:52 -07:00
Valeri Karpov 402e7eaac2 Don't clobber user-defined environment variables
Summary:
Re: javache 's suggestions from https://github.com/facebook/react-native/pull/7878. Didn't want to deal with the merge conflict so I'm opening a separate PR. Here's the original justification:

If I want to set NODE_ENV to "baconator", I should be allowed to. Mutating global state that most devs assume to be immutable is just abysmal dev practice, especially since this mutation only happens when you're building for prod, not running on the simulator.

To test this, run env NODE_ENV=baconator ./gradlew assembleRelease with babel-plugin-transform-inline-environment-variables in your app/.babelrc. You'll see that the final app has NODE_ENV=production.

As a side note, running with babel-plugin-transform-inline-environment-variables in the top-level .babelrc crashes horribly with a compiler error.

For anybody who runs into this bug and doesn't feel like waiting for this to get merged, I wrote a quick babel plugin to remove assignments to process.env, which is sufficient to fix this issue.
Closes https://github.com/facebook/react-native/pull/8057

Differential Revision: D3419950

Pulled By: javache

fbshipit-source-id: dc541cad0a99906433e5c14bbc93ce66b4ed325e
2016-06-10 15:28:29 -07:00
Yinan Na 14d0b5c0f1 Fix react word wrapping crash
Differential Revision: D3419011

fbshipit-source-id: ac205ea746c03cab946059fc55749f4abbab8d41
2016-06-10 14:29:17 -07:00
Keri Clowes 7271a9dc24 Fix Typo
Summary:
Nitpicky, I know :)
Closes https://github.com/facebook/react-native/pull/8056

Differential Revision: D3419299

fbshipit-source-id: b3bfe985a2a8dff4572e798c9d0e09662ab37ed0
2016-06-10 13:58:22 -07:00
Jing Chen 31e090c9ab Change loading dialog for JS in Android to use AlertDialog instead
Reviewed By: yungsters

Differential Revision: D3418605

fbshipit-source-id: 202b4872c6636a51c615ad82b444261acf83f396
2016-06-10 12:28:26 -07:00
Tim Yung 5e73c070e8 RN: Fix Symbolicate Logspew for `/debuggerWorker.js`
Summary:
When remote debugging is enabled, stack traces start at `/debuggerWorker.js`. Since this is not a valid bundle URL, the packager fails to decipher it to find its sourcemap.

This changes the packager to skip the `/debuggerWorker.js` stack frame if one exists.

Reviewed By: frantic

Differential Revision: D3418341

fbshipit-source-id: 7434aa45dea7d120d9d77c060101dd9403989d0c
2016-06-10 12:28:26 -07:00
Konstantin Raev 0d572e40f0 Revert "Reverted commit D3417194"
Summary:
This reverts commit 7df2af58c7.

cc janicduplessis
Closes https://github.com/facebook/react-native/pull/8049

Differential Revision: D3417557

fbshipit-source-id: 3853b06e91a2aae441835807f73fb78e6ef79344
2016-06-10 11:43:30 -07:00
Tucker Connelly 4f4b6d467a Reverted commit D3417257
Summary:
First PR!!

This fixes https://github.com/facebook/react-native/issues/2991 :)
Closes https://github.com/facebook/react-native/pull/7603

Differential Revision: D3417257

Pulled By: bestander

fbshipit-source-id: fca990a973edaf7bae5481d03f5da5de0c085c16
2016-06-10 09:13:26 -07:00
Janic Duplessis 7df2af58c7 Reverted commit D3417194
Summary:
Fix a bug that happens when views are added and removed in the same manageChildren block with a delete animation. What happens is that the inserted view is not inserted at the proper index if the deleted view index is smaller than the inserted one. This is because the view is not immediately removed from the subviews array so we need to offset the insert index for each view that is going to be deleted with an animation and is before the inserted view.

To do this I separated `_removeChildren` into 2 different functions, one for animated delete and one for normal delete. The animated one returns an array of `RCTComponent` that are going to be animated. We can then use this array to offset the insert index.

**Test plan (required)**
Tested that this fixed the bug in an app where I noticed it, also tested the UIExplorer example to make sure LayoutAnimations still worked properly.
Closes https://github.com/facebook/react-native/pull/7942

Differential Revision: D3417194

Pulled By: bestander

fbshipit-source-id: 9145a783e520c6718dd023a1e006646acb09cb7c
2016-06-10 06:58:28 -07:00
Kyle Corbitt 57d45235ec Correctly passes localNotification to app on wakeup
Summary:
Currently if an RN app is started in response to a remote notification, that notification's data is available on startup via `PushNotificationIOS.popInitialNotification()`. However, if the app is started in response to a "local" notification, that information is never passed in. This PR modifies the `popInitialNotification` behavior so it will return the notification used to launch the app, no matter if it was local or remote.

I've tested this change in my app and ensured that when the app is woken up with a `localNotification` it's passed in to `PushNotificationIOS.popInitialNotification`. I've also tested that the `localNotification` event continues working as before.
Closes https://github.com/facebook/react-native/pull/7765

Differential Revision: D3417267

Pulled By: nicklockwood

fbshipit-source-id: 0b5b432e9a75dda7d3c50289a3bf0f1c1ffcf061
2016-06-10 05:28:41 -07:00
Janic Duplessis 6236a593d8 Fix LayoutAnimation iOS delete bug when adding and removing views at the same time
Summary:
Fix a bug that happens when views are added and removed in the same manageChildren block with a delete animation. What happens is that the inserted view is not inserted at the proper index if the deleted view index is smaller than the inserted one. This is because the view is not immediately removed from the subviews array so we need to offset the insert index for each view that is going to be deleted with an animation and is before the inserted view.

To do this I separated `_removeChildren` into 2 different functions, one for animated delete and one for normal delete. The animated one returns an array of `RCTComponent` that are going to be animated. We can then use this array to offset the insert index.

**Test plan (required)**
Tested that this fixed the bug in an app where I noticed it, also tested the UIExplorer example to make sure LayoutAnimations still worked properly.
Closes https://github.com/facebook/react-native/pull/7942

Differential Revision: D3417194

Pulled By: nicklockwood

fbshipit-source-id: 790f4ac15a8552323b359e6466cecfa80418c63c
2016-06-10 04:28:37 -07:00
Sokovikov c03b166854 line break mode for ios
Summary:
What do you think is ```lineBreakMode``` a good name? For android it is called ```ellipsize```.

<img src="https://cloud.githubusercontent.com/assets/1488195/15628555/7372f8d0-250c-11e6-8919-722f28a38d60.png"" width="300" />
Closes https://github.com/facebook/react-native/pull/7819

Differential Revision: D3417256

fbshipit-source-id: 189441a23ff554bf7f6d67fa8510959351e9e5cc
2016-06-10 04:28:37 -07:00
Tucker Connelly 33dfc9db92 Vertically center iOS text if lineHeight is set
Summary:
First PR!!

This fixes https://github.com/facebook/react-native/issues/2991 :)
Closes https://github.com/facebook/react-native/pull/7603

Differential Revision: D3417257

fbshipit-source-id: 074d56c1dfc0a9ba713e59c804286fd915589eeb
2016-06-10 04:28:37 -07:00
Fabian Eichinger d43e0db81e Add support for reverse flex directions on Android and iOS
Summary:
This PR adds support for both 'row-reverse' and 'column-reverse' for Android and iOS and is based on the changes in #6683 that looked like it's all but abandoned.
It also adds examples for the new directions to the "Layout - Flexbox" section of UIExplorer as well as some rad new colors to the section to make the difference between "row-reverse" and "flex-end" more apparent.

**Test plan (required)**
Tested inside of UIExplorer

Android
<img width="571" alt="screen shot 2016-06-05 at 7 42 14 pm" src="https://cloud.githubusercontent.com/assets/4332237/15807140/cf8e05de-2b55-11e6-9366-a2e3194cabf8.png">

iOS
<img width="578" alt="screen shot 2016-06-05 at 7 41 35 pm" src="https://cloud.githubusercontent.com/assets/4332237/15807143/dee8e9b8-2b55-11e6-8777-c30329fa54e8.png">
Closes https://github.com/facebook/react-native/pull/7938

Differential Revision: D3417182

fbshipit-source-id: e8c9f5976ca95b2d2069a5b31a20f6d6309eb3cc
2016-06-10 03:28:45 -07:00
Paul Shen 92926f9858 Fix onLayout support in <TextInput>
Summary:
The `onLayout` prop is overridden by `<TouchableWithoutFeedback>` and thus does not work on `<TextInput>` components. fb0007d853/Libraries/Components/Touchable/TouchableWithoutFeedback.js (L176)

This makes it so the following works.

```javascript
<TextInput onLayout={...} />
```

I only tested on iOS but I assume a similar fix might be needed for Android. fb0007d853/Libraries/Components/TextInput/TextInput.js (L575)

**Test Plan**

https://rnplay.org/apps/euIZtg (confirm bug)
With fix, set `onLayout` on `<TextInput>` and see it is fired correctly.

```javascript
<TextInput onLayout={function(e) { console.log(e.nativeEvent); }} />
```
Closes https://github.com/facebook/react-native/pull/8042

Differential Revision: D3417192

fbshipit-source-id: 536ec81d3479e6bda474ac766b27afb39242c01a
2016-06-10 03:28:44 -07:00
Wenjing Wang 13dfb6267a Fix broken image cropper - can not scroll
Summary: ImageCropper is broken on iOS. Can not scroll up and down

Differential Revision: D3413397

fbshipit-source-id: 75096fc1d5dd14764c0ddd4fd3888a9576c1d1ce
2016-06-09 23:13:31 -07:00