Commit Graph

2602 Commits

Author SHA1 Message Date
Ben Griffith a609d1c2b7 Add currentHeight constant to status bar docs
Summary:
This PR is to fix #10561 by adding `currentHeight` to a list of constants for the `StatusBar` component. It also makes it clear that this constant is Android only by also adding a further note to the example use.

Closes #10561

![screen shot 2016-11-01 at 12 37 06](https://cloud.githubusercontent.com/assets/2854338/19889978/f453d43a-a02f-11e6-859e-5a9ebeba9d44.png)
Closes https://github.com/facebook/react-native/pull/10675

Differential Revision: D4137353

fbshipit-source-id: 717494fe78f8eb55c55447d6567ec8bcd0be86d3
2016-11-05 17:13:29 -07:00
Martin Konicek 1605276801 Remove open source deprecation warning from MapView
Summary: The warning is only relevant to open source RN but shown to employees too.

Reviewed By: fkgozali

Differential Revision: D4137216

fbshipit-source-id: 21d5c3051c7964231eeb3f555681a83eacb4c972
2016-11-05 14:13:36 -07:00
Janic Duplessis ac19276534 Fix NavigationCardStackPanResponder to work with native animations
Summary:
`NavigationCardStackPanResponder` uses `__getValue` and the `stopAnimation` callback value which both doesn't work with native driven animation. The workaround here is to add a value listener so the JS value of the AnimatedValue gets updated too so `__getValue` has a relatively up to date value. This value should be good unless JS lags behind native a lot but that should not happen during a navigation gesture. Also added a comment that explains the hack.

**Test plan**
Tested in an app that uses native driven animations with a back gesture. This also needs #10643 and #10641 for everything to work properly.
Closes https://github.com/facebook/react-native/pull/10642

Differential Revision: D4135496

Pulled By: ericvicenti

fbshipit-source-id: 395aff78b16a37ad9407207a05504fdd6311f733
2016-11-04 20:43:43 -07:00
Janic Duplessis e173f14b52 Use native animations if the animated value is native in NavigationCardStackPanResponder
Summary:
Since native and non-native animations do not work together check if the animated value is native and set useNativeDriver accordingly. So untill we move to always using the native driver this is needed. This and another fix in NativeAnimations module will allow using native animations to transitions with gestures.

**Test plan**
Tested in an app that uses native driven animations with a back gesture. This also needs #10643 and #10642 for everything to work properly.
Closes https://github.com/facebook/react-native/pull/10641

Differential Revision: D4135972

Pulled By: ericvicenti

fbshipit-source-id: 8e65574ebb296da044f4d03bf1eedee4a37ebdac
2016-11-04 20:28:30 -07:00
Neo 6a83ac3af6 update Modal.js to fix #10662
Summary:
further discussion: should there be a `onClose` or `onClosed` to pair with `onShow`? which would make a workaround for #10471 much easier
Closes https://github.com/facebook/react-native/pull/10669

Differential Revision: D4133832

Pulled By: hramos

fbshipit-source-id: 644a5bb6b9da697c81fc96ae4da196ba5b4050cb
2016-11-04 18:43:42 -07:00
Fred Liu 6ed49341f3 Remove underline colour in Android text inputs
Summary: `require('something.jpg')` returns a `number` type.

Reviewed By: ejanzer

Differential Revision: D4132544

fbshipit-source-id: cf47baa377258195fe0155b3ea34208325d7c462
2016-11-04 14:58:46 -07:00
Phillip Johnsen cb67d16aee StatusBar: fix incorrect setHidden(hidden) docs description
Summary:
Hi!

Just noticed an incorrect description for the `hidden` argument for `StatusBar.setHidden()` on the website, this trivial change fixes that.

FYI I followed the start procedure for the website mentioned in [CONTRIBUTING.md](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#pull-requests), and noticed one needs to run `npm install` in the project root directory as well before starting the website. Do you want me to add that instruction as part of this PR, or as a separate PR entirely?
Closes https://github.com/facebook/react-native/pull/10735

Differential Revision: D4131223

fbshipit-source-id: b70c5ef12e72807445c51f13811537b9fa3b6b3e
2016-11-04 09:43:33 -07:00
David Aurelio 3683beb88a RN: Update React (2/2)
Reviewed By: kentaromiura

Differential Revision: D4026114

fbshipit-source-id: 67808af91454d95941fea01eef58a4d9086f46e1
2016-11-04 05:43:44 -07:00
Martin Konicek dca53feb4f Deprecate MapView in favor of airbnb/react-native-maps
Summary:
Compared to the `<MapView>` that comes with React Native, [react-native-maps](https://github.com/airbnb/react-native-maps) work on Android and is more feature complete. It is actively maintained and used extensively (9.2k installs / month, see [JS.Coach](https://js.coach/react-native/react-native-maps?search=react-native-maps)).

We think now is a good time to switch to react-native-maps in your applications and make `react-native-maps` the official `<MapView>` implementation for React Native.

We are going to release the deprecated `<MapView>` as a separate npm module so you can migrate to `react-native-maps` at your own pace.

**Test Plan**

Checked the docs render correctly on the website:

```
cd website
npm install
npm start
```

<img width="696" alt="screenshot 2016-11-01 20 17 31" src="https://cloud.githubusercontent.com/assets/346214/19905831/480074b8-a070-11e6-8779-8e12343c2883.png">

Warning is shown:

<img width="423" alt="screenshot 2016-11-01 20 39 21" src="https://cloud.githu
Closes https://github.com/facebook/react-native/pull/10500

Differential Revision: D4119602

Pulled By: mkonicek

fbshipit-source-id: 86780a98bf999e6047565ab66a5ebbd15e499a46
2016-11-03 16:58:49 -07:00
Tim Yung b5a71fe2b1 RN: Simplify Animated-test.js
Reviewed By: cpojer

Differential Revision: D4118935

fbshipit-source-id: 1f80f22235edbbf8bcb4d51b0110cbfa30a3f917
2016-11-02 14:58:52 -07:00
aybb 68c61203ac Texinput documentation improvement
Summary:
To my mind this feature should be documented as here lots of issues can happen potentially.
Closes https://github.com/facebook/react-native/pull/10706

Differential Revision: D4119506

fbshipit-source-id: 54f9738ea2308144a05678fd1897f529f260966c
2016-11-02 13:58:53 -07:00
Alexander Blom 1709043a12 Add Network agent
Summary: Adds methods in XMLHttpRequest so that the agent can hook the events needed for the implementation, these are only enabled if the agent is enabled (which means that the inspector is connected), it is also stripped out in non-dev currently.

Reviewed By: davidaurelio

Differential Revision: D4021516

fbshipit-source-id: c0c00d588404012d20b744de74e5ecbe5c002a53
2016-11-02 12:29:15 -07:00
Alexander Blom 6a1783210b Add JS agent support
Summary:
Adds the possibility to define agents in Javascript. Javascript agents are simple classes that extend `InspectorAgent` and pass down the
given `EventSender` to the super constructor. The library will then call methods on the object for each received method call over the protocol.

Reviewed By: davidaurelio

Differential Revision: D4021508

fbshipit-source-id: bbe609e92ea726cbbbec833df81705ebd3346c77
2016-11-02 12:29:15 -07:00
Kevin Gozali 3237ade34f fallback to JS Animation if native animated is not present
Summary: This should be a temporary migration path until we enable native animated everywhere, instead of crashing the app if the module is missing. This would present a yellow box with an instruction to add RCTAnimation module to the app

Reviewed By: yungsters

Differential Revision: D4112938

fbshipit-source-id: 56db7801063e9de16a3ff251bf1f0e4f6e3ea7c0
2016-11-01 23:58:49 -07:00
Kevin Gozali 8bb707b686 Use native animations in TouchableBounce and TouchableOpacity
Summary:
this brings back the previous commit that had to be reverted due to internal breakages.

original commit: 1bb323e256

Reviewed By: AaaChiuuu

Differential Revision: D4109811

fbshipit-source-id: b50de145eaf6851138429635bc0302518d656b75
2016-11-01 15:58:41 -07:00
James Ide 5105c09f56 Fix missing methods in Keyboard module
Summary:
They keyboard module is an instance of `NativeEventEmitter` which is an instance of `EventEmitter`. But the exported module only has a small subset of the APIs. This broke existing codebases which are using the methods not exported currently.

The PR just reassigns the variable before exporting so that the actual module is exported instead of the dummy object used for documentation. It also fixes a layout issue in the documentation.
Closes https://github.com/facebook/react-native/pull/10671

Differential Revision: D4110355

fbshipit-source-id: a6757f3ca8c2494970ba221b10a7e6e9a5f2d64d
2016-11-01 08:58:39 -07:00
James Ide fc11a5fde8 Add support for native animated events on iOS
Summary:
This adds native support for `Animated.event` on iOS.

**Test plan**
Tested in the native animated UIExplorer example that it works properly like on Android.
Closes https://github.com/facebook/react-native/pull/9598

Differential Revision: D4110331

fbshipit-source-id: 15748d23d0f475f2bcd1040ca3dca33e2620f058
2016-11-01 03:58:53 -07:00
James Ide 0fe1c7a9ff Fix symbolication failure caused by attempt to modify frozen frame
Summary:
This change makes so that processing stack trace before sending it to packager (see 7dbc805)
doesn't modify original frames but creates a copies instead.

This is required because after some changes that also have been landed in 0.35, frames that arrive to
'symbolicateStackTrace' are already frozen, so changing 'file' property of the original frame causes
symbolication to fail.
Closes https://github.com/facebook/react-native/pull/10655

Differential Revision: D4110273

fbshipit-source-id: 0302694b520d83a79c3cb67903038b3f494315f2
2016-11-01 02:58:41 -07:00
Janic Duplessis cdd2d791c9 Support static values in NativeAnimated transforms on iOS
Summary:
Support static values (non-animated) in transform config like Android already does.

**Test plan**
Tested in UIExplorer native animated example by adding a transform with a static value and comparing with JS.
Closes https://github.com/facebook/react-native/pull/10664

Differential Revision: D4109515

fbshipit-source-id: 2d7de17d51d6df835c569fd45d2de8fc170bf928
2016-10-31 21:13:41 -07:00
Janic Duplessis 2b49eddcfd Fix initial value of native Animated.Value
Summary:
Native Animated.Value uses the value it was created with when sending the config to native but this causes issue when the value has changed before calling `__makeNative` this happens with the `progress` value for `NavigationExperimental`. It gets initialized with value 1, then uses `setValue` to change it to 0 before starting the animation and this is when `__makeNative` is called. This simply uses the current value instead of the value passed to the constructor. Also pass offset so native implementations that support it can use it (iOS).

**Test plan**
Tested that the first transition that uses the `progress` animated value is not broken in an app that uses `NavigationExperimental` when using `useNativeDriver` for animations.
Closes https://github.com/facebook/react-native/pull/10656

Differential Revision: D4107624

fbshipit-source-id: 921cf4a3422cf91923bc315fd7a15c508becddae
2016-10-31 20:43:44 -07:00
Janic Duplessis 34c7e7610c Fix setAnimatedNodeValue in Native Animated on iOS
Summary:
`setAnimatedNodeValue` currently does not update views if there is no animation currently running. This simply updates the view immediately instead of relying on the animation loop. Extracted it out in a function to be able to use it for native `Animated.event` too.

**Test plan**
Tested this in an app using native driven animations with `NavigationCardStackPanResponder` that makes use of `setValue` to update `Animated.Values` during the back gesture.
Closes https://github.com/facebook/react-native/pull/10643

Differential Revision: D4106346

fbshipit-source-id: 7c639e03ded87058354340f1179f8b75be423e84
2016-10-31 14:28:42 -07:00
Leo Natan 3ac3749ac3 Fix for Unicode decoding issue when using incremental networking.
Summary:
This is **a critical issue**.

The issue arises when incremental networking is enabled from JS by setting `onprogress` or `onload` on an `XMLHttpRequest` object.

The results:

![example1](https://cloud.githubusercontent.com/assets/2270433/18829964/5a54ff30-83e7-11e6-9806-97857dce0430.png)

![example2](https://cloud.githubusercontent.com/assets/2270433/18829966/5bf40a66-83e7-11e6-84e6-9e4d76ba4f8b.png)

Unicode characters get corrupted seemingly in random. The issue is from the way Unicode character parsing is handled in `RCTNetworking.mm`. When incremental networking is enabled, each chunk of data is decoded and passed to JS:

```objective-c
incrementalDataBlock = ^(NSData *data, int64_t progress, int64_t total) {
NSString *responseString = [RCTNetworking decodeTextData:data fromResponse:task.response];
if (!responseString) {
  RCTLogWarn(@"Received data was not a string, or was not a recognised encoding.");
  return;
}
NSArray<id> *responseJSON = @[task.requestID, responseString, @(prog
Closes https://github.com/facebook/react-native/pull/10110

Reviewed By: yungsters

Differential Revision: D4101533

Pulled By: fkgozali

fbshipit-source-id: 2674eaf0dd4568889070c6cde5cdf12edc5be521
2016-10-31 13:13:38 -07:00
Adam Miskiewicz 426e66cfe6 Reverted commit D4099819
Summary:
Now that native animations for opacity and springs have landed in both iOS and Android, we can enable native animations both for TouchableBounce and TouchableOpacity.
Closes https://github.com/facebook/react-native/pull/10583

Differential Revision: D4099819

Pulled By: jingc

fbshipit-source-id: de70f8732b84d4caf0e4adfb2ad0e95b3de5da0f
2016-10-29 13:59:02 -07:00
Adam Miskiewicz 1bb323e256 Use native animations in TouchableBounce and TouchableOpacity
Summary:
Now that native animations for opacity and springs have landed in both iOS and Android, we can enable native animations both for TouchableBounce and TouchableOpacity.
Closes https://github.com/facebook/react-native/pull/10583

Differential Revision: D4099819

Pulled By: lacker

fbshipit-source-id: 247d7bff9a778e520af764f571caf6286b4a5749
2016-10-28 17:58:41 -07:00
Emil Sjolander 8e69a9f695 BREAKING - Make first parameter of measure and print functions CSSNodeRef instead of just context
Reviewed By: javache

Differential Revision: D4081544

fbshipit-source-id: d49679025cea027cf7b8482898de0a01fe0f9d40
2016-10-27 10:58:42 -07:00
Pieter De Baets 19ab84ffb7 Cleanup and simplify view config generation
Reviewed By: fkgozali

Differential Revision: D4083308

fbshipit-source-id: 42ca797a8faede68bd031e84cf1c33a3e3ade37f
2016-10-27 06:58:52 -07:00
Pieter De Baets 384ea330c8 Move Platform constants to RCTPlatform
Reviewed By: majak

Differential Revision: D4081849

fbshipit-source-id: bee08af2f68dcc1af424f382f960ff897ba11945
2016-10-27 04:29:00 -07:00
Konstantin Raev a743fbe73e added semicolon which broke in #8040
Summary:
Fixes internal CI break t14126367 after #8040
Closes https://github.com/facebook/react-native/pull/10589

Differential Revision: D4088099

fbshipit-source-id: a8816e39d795406f59d2a12b9c7fc0fd4ddda69b
2016-10-27 03:13:43 -07:00
Jonathan Stanton e000b71845 Remote notification completion handler
Summary:
**Motivation**
To allow handling of remote notifications using the preferred delegate [application:didReceiveRemoteNotification:fetchCompletionHandler](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/#//apple_ref/occ/intfm/UIApplicationDelegate/application:didReceiveRemoteNotification:fetchCompletionHandler:).

React native right now is setup to use [application:didReceiveRemoteNotification](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/#//apple_ref/occ/intfm/UIApplicationDelegate/application:didReceiveRemoteNotification:) which doesn't give the engineer the option to call back to the app via a completion handler and inform the app that it is done with handling the push notification.

The primary reason to use the `fetchCompletionHandler` would be to wake up the app to fetch updates so the next time the user opens the app it will be up to date.

A new method will be exposed: `PushNotificationIOS#
Closes https://github.com/facebook/react-native/pull/8040

Differential Revision: D4081766

Pulled By: bestander

fbshipit-source-id: 2819061bd3a926cb1c9c743af5aabab8c0faec3d
2016-10-26 21:43:48 -07:00
d.chernyatiev f64538943e Navigator - Fix wrong scene transformation after pop
Summary:
Fixes #9485
Closes https://github.com/facebook/react-native/pull/9516

Differential Revision: D4080618

Pulled By: lacker

fbshipit-source-id: 296c209a0438c4a06b3b3556d7084c5435d60c72
2016-10-26 00:13:35 -07:00
leeight f9e36a08a8 Make sure xhr req header's value is String type
Summary:
In the `NetworkingModule.java`, `header.getString(1)` was
called, so the value must be String type.

FIX #10198
Closes https://github.com/facebook/react-native/pull/10222

Differential Revision: D4080319

Pulled By: lacker

fbshipit-source-id: 85234a2bbf90e5b9e0e65ceadbfabb330b2d1322
2016-10-25 22:29:35 -07:00
Anthony Sherbondy f930270b00 Fix for TouchableNativeFeedback having Animated.Component direct child
Summary:
Fixes #7996.
Test included.
Not sure this is the best way to go, just a simple solution since the TouchableNativeFeedback is trying to clone the component with a Native component, then seems like it should wrap it with Animated.Component if the incoming child was.
Closes https://github.com/facebook/react-native/pull/10081

Differential Revision: D4073603

fbshipit-source-id: 7827198a3e4697c14e37762cdca93f46a5a1d716
2016-10-25 00:28:37 -07:00
Fada Chen fc6eb51996 fix FlowFixMe in SwipeableQuickActionButton
Reviewed By: fred2028

Differential Revision: D4061448

fbshipit-source-id: 255ae39a16d89d89bbd7fac3bc1dd5350a578d0c
2016-10-24 09:58:53 -07:00
Ryan Gomba d950db4ef7 Add support for springs for NativeAnimated on iOS
Summary:
This diff adds support for native spring animations on iOS. This overlaps some spring work done by kmagiera on the Android side of things.

**Test plan (required)**

Run UIExplorer NativeAnimated examples before and after - compare the results. Pay special attention to the spring examples.
Closes https://github.com/facebook/react-native/pull/9048

Differential Revision: D4056088

Pulled By: foghina

fbshipit-source-id: a593408cb61cb850572bab4a0884f7157cece656
2016-10-21 04:29:03 -07:00
Denis 20598e54c6 Update NavigatorIOS.ios.js
Summary: Closes https://github.com/facebook/react-native/pull/9823

Differential Revision: D4055617

Pulled By: hramos

fbshipit-source-id: ec8d60ce93ead692c324eedf0678e8354202cc93
2016-10-21 02:43:47 -07:00
Ryan Gomba 5794ff61bc Add support for clamping for NativeAnimated on iOS
Summary:
This diff adds support for clamping on iOS. It separates out code originally submitted in #9048.

Test plan (required)

Run UIExplorer NativeAnimated examples before and after - compare the results. Pay special attention to the new clamped spring example.
Closes https://github.com/facebook/react-native/pull/9625

Differential Revision: D4053231

fbshipit-source-id: 29048de444ff5f6d7fe7dce7897399b483ee6d2d
2016-10-20 14:13:38 -07:00
Eric Vicenti f9779e3eb7 Enable native animations when possible
Summary:
The `position` animated value is used for scale, translateX, and tranlateY
animations, which are all supported by NativeAnimatedHelper. Unfortunately,
native animations are incompatible with JS driven animations, which the
`enableGestures` flag enables.

This diff therefore conditionally enables native animations based on the native
module's precense, and the state of `enableGestures`.

Ideally the animations would be refactored so that they could fully leverage
native animations, as they are far superior for navigational components.

Reviewed By: oyvindkinsey

Differential Revision: D4020977

fbshipit-source-id: 8e1d015c4d41fee103469f6f9ffa02ff4f1f5517
2016-10-19 15:28:44 -07:00
Konstantin Raev aee52eb148 Fixed uiexplorer legocastle starting script
Reviewed By: matryoshcow

Differential Revision: D4029497

fbshipit-source-id: 801294409129453c99aad1d4d8f7908548f6c3ef
2016-10-19 08:44:27 -07:00
YUYA FUJIMOTO 2230117f36 Add HorizontalSwipeJumpFromLeft animation to Navigator
Summary:
This brings RN Navigator to add HorizontalSwipeJumpFromLeft animation.
HorizontalSwipeJumpFromRight has been implemented but FromLeft version of SwipeJumpAnimation hasn't been there.
Closes https://github.com/facebook/react-native/pull/10406

Differential Revision: D4035212

fbshipit-source-id: edcbae18148e533b02a7d056de03154fb86280d0
2016-10-18 08:43:41 -07:00
Mehdi Mulani 40e8d8904b RN TextInput: don't let user more than maxLength when TextInput already exceeds it
Summary:
We had a classic integer underflow problem here. Before we would let you type endlessly when the text already exceeded the TextInput maxLength, now we only let you erase characters.

There is still a small problem with the TextInput: how do you handle when the value (set from JS) exceeds the maxLength? This could happen pragmatically, just by passing in a very large value or when changing maxLength (e.g. when changing from 4 to 3 digits in the case of a AMEX security code -> VISA security code).

Me and achen1 discussed firing onChange in these cases and truncating the number manually (to ensure JS's data model) was aware of the change but it seemed fraught with bugs and general weirdness in what the caller would expect to happen.

Reviewed By: javache

Differential Revision: D3991210

fbshipit-source-id: dc401c4a7aefe09fa749cd1168d36343d39dc196
2016-10-18 08:13:41 -07:00
Geordie 73c5360470 NavigatorIOS: stopPropagation on navigationComplete event. Fixes #1241
Summary:
With nested NavigatorIOS components:

```
<NavigatorIOS initialRoute={{
  component: ComponentWithAnotherNavigatorIOSInSubtree
  title: 'xyz'
}}>
```

Navigating (via push etc.) in ComponentWithAnotherNavigatorIOSInSubtree's `navigator` caused an invariant error, making apps with this structure unusable. The reason was that the `navigationComplete` nativeEvent was being propagated to the outer Navigator due to React's automatic event bubbling, making the outer NavigatorIOS incorrectly think it was holding navigation stack state inconsistent with its native UINavigationController.

Concretely, if the outer navigation stack is empty except for its initial state and something is pushed onto the inner stack, the outer NavigatorIOS suddenly complains that it has 2 items on its stack rather than 1. In reality, the outer Navigator still only has 1 item on its stack but the inner Navigator's event (containing information about the inner Navigator) incorrectly bubbles up and reaches the outer Navigator too.
Closes https://github.com/facebook/react-native/pull/9828

Differential Revision: D4030167

Pulled By: ericvicenti

fbshipit-source-id: d04de3d5b70b4862a78610c92701ebdab2b047dd
2016-10-17 10:28:41 -07:00
Cristian Carlesso 6a462fb085 Moving the jest configuration from jest-react-native to react native.
Reviewed By: cpojer

Differential Revision: D3923609

fbshipit-source-id: 62804df81b064871b499ae8c091e13dd1e0f229b
2016-10-17 08:44:05 -07:00
dlowder-salesforce 64a4c6070d Travis CI reliability fixes: preload package manager and increase tim…
Summary:
- Consolidate common code in iOS and tvOS test scripts
- Start the packager before starting tests, to improve reliability
- Increase timeout value in RCTTestRunner.m
Closes https://github.com/facebook/react-native/pull/10378

Differential Revision: D4028364

Pulled By: bestander

fbshipit-source-id: 24c2124a1c62643a02f0668b60a67b971e08d1a3
2016-10-16 15:43:44 -07:00
Jonathan Chen f8b0728d9b Update file for Markdown link syntax
Summary:
Reference: https://daringfireball.net/projects/markdown/syntax#link
Closes https://github.com/facebook/react-native/pull/10416

Differential Revision: D4028353

fbshipit-source-id: 22f396fd0f3942a8429128f2b60341da1d96183c
2016-10-16 15:28:42 -07:00
leeight 9db8910e36 Clean unused import modules.
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/10413

Differential Revision: D4028108

fbshipit-source-id: 99a864dfda578d640f582b296583591415ba26cd
2016-10-16 11:13:40 -07:00
Jacob Parker abb8ea3aea Implement a postMessage function and an onMessage event for webviews …
Summary:
JS API very similar to web workers and node's child process.

Work has been done by somebody else for the Android implementation over at #7020, so we'd need to have these in sync before anything gets merged.

I've made a prop `messagingEnabled` to be more explicit about creating globals—it might be sufficient to just check for an onMessage handler though.

![screen shot 2016-09-06 at 10 28 23](https://cloud.githubusercontent.com/assets/7275322/18268669/b1a12348-741c-11e6-91a1-ad39d5a8bc03.png)
Closes https://github.com/facebook/react-native/pull/9762

Differential Revision: D4008260

fbshipit-source-id: 84b1afafbc0ab1edc3dfbf1a8fb870218e171a4c
2016-10-16 06:43:46 -07:00
Konstantin Raev 6ea26c01de Reverted commit D4027388
Reviewed By: yungsters

Differential Revision: D4027388

fbshipit-source-id: 8e3341b6f393ccf432c1a4e22a7cbf422284a06f
2016-10-16 04:13:42 -07:00
leeight dbfd046145 Change require('invariant') to require('fbjs/lib/invariant')
Summary:
FIX #10400
Closes https://github.com/facebook/react-native/pull/10409

Differential Revision: D4027850

fbshipit-source-id: c69e2ce892d119847902db3d6689ec237df35332
2016-10-16 02:13:52 -07:00
Jan Kassens e58d17e68b React.Element<any> » React.Element<*>
Reviewed By: yungsters

Differential Revision: D4027388

fbshipit-source-id: 5bc178eab1ab72283622b4b7d418f9fd43ec0792
2016-10-15 17:58:38 -07:00
Timur Gibadullin c32ab7e608 Add disabled prop
Summary:
Implemented feature requested in https://github.com/facebook/react-native/issues/10354, updated docs.
The colours were picked from native interface for iOS and from material-ui for android.
Closes https://github.com/facebook/react-native/pull/10398

Differential Revision: D4026189

Pulled By: ericvicenti

fbshipit-source-id: f3316e76f5a4126c07ffcdfb134cd902f40624d5
2016-10-14 19:43:40 -07:00