Commit Graph

7386 Commits

Author SHA1 Message Date
Sreejumon a4bff46791 Update Upgrading.md
Summary:
Updating the RN version 0.31, so that doc is also upto date with latest version.
Closes https://github.com/facebook/react-native/pull/9247

Differential Revision: D3677606

fbshipit-source-id: 8ec5999dfaa243377d85a533935ccfe2d4c97fae
2016-08-05 13:43:35 -07:00
Mengjue Wang 9de0b79e87 Provide forceRTL for LTR language to test
Summary:
Provide forceRTL function for developer to test RTL layout in LTR language bundle in I18nUtil and expose it in I18nManager.
Rename allowRTL and setAllowRTL functions

Differential Revision: D3673601

fbshipit-source-id: 98f9c99e8a6948336fb918c24566dc9e5c0a3a3e
2016-08-05 13:28:40 -07:00
Pieter De Baets f571f016d9 Improve types in RCTFont API
Reviewed By: majak

Differential Revision: D3662880

fbshipit-source-id: f54e1ac164373337460047eb3708a588f578b5fc
2016-08-05 12:44:21 -07:00
Pieter De Baets 3d6240f9a6 Implement system font caching in RCTFont
Reviewed By: majak

Differential Revision: D3662848

fbshipit-source-id: 7135c0a80c6781669e43ae9a58a26a2c85f2c827
2016-08-05 12:44:21 -07:00
Pieter De Baets c5a44b7ca3 Move font helpers to RCTFont
Reviewed By: majak

Differential Revision: D3662804

fbshipit-source-id: 2c03a094a74c617c0d6172e327bd77d23d0d44c2
2016-08-05 12:44:20 -07:00
Pieter De Baets e30327cb13 Fix styling of system fonts
Summary:
When you call `-[RCTConvert UIFont:withFamily:...]` with a non-nil font object, we'll try to use the existing font object for system information. On iOS9+ which uses the San Francisco font, `[UIFont fontNamesForFamilyName:]` doesn't return anything useful, so we need to make sure that we detect this as a system font and use the appropriate methods. This issues is made worse by the fact that RCTTextView and friends recreate the font property for every attribute that is set (pretty horrible perf-wise).

This fixes https://github.com/facebook/react-native/issues/2140

Reviewed By: sahrens

Differential Revision: D3662751

fbshipit-source-id: c528e8945ed361a922c03f861d3c0b584658573b
2016-08-05 12:44:20 -07:00
Krzysztof Magiera 8f75d7346f Support for spring animations
Summary:
This change adds support for spring animations to be run off the JS thread on android. The implementation is based on the android spring implementation from Rebound (http://facebook.github.io/rebound/) but since only a small subset of the library is used the relevant parts are copied instead of making RN to import the whole library.

**Test Plan**
Run java tests: `buck test ReactAndroid/src/test/java/com/facebook/react/animated`
Add `useNativeDriver: true` to spring animation in animated example app, run it on android
Closes https://github.com/facebook/react-native/pull/8860

Differential Revision: D3676436

fbshipit-source-id: 3a4b1b006725a938562712989b93dd4090577c48
2016-08-05 12:14:06 -07:00
Pieter De Baets 0222107170 Customize main thread initialization of native modules (2nd try)
Reviewed By: majak

Differential Revision: D3671197

fbshipit-source-id: e8df7669be79303d335f2c881e97310b5fed47f9
2016-08-05 11:28:32 -07:00
Krzysztof Magiera 68b9a36858 Accept transforms list instead of matrix for transform view parameter.
Summary:
In #7916 I moved transform matrix decomposition logic from JS to java. The next step is to accept list of transforms instead oftransform matrix as a transform ReactProp. This way there is no extra processing required on JS side for the transform param (at least for android now) and this on the other hand allow us to execute transform updates (through offloaded animation) solely on the UI thread.

After this change there is a whole bunch of stuff from `Libraries/Utilities/MatrixMath.js` that can be deleted (methods like: determinant, inverse, transpose). Although astreet mentioned under one of my previous commits that the code is still being referenced internally at fb, so I decided not to delete it here.

**Test plan (required)**
Run UIExplorer Transform example before and after - compare the results
Run android unit test: com.facebook.react.uimanager.MatrixMathHelperTest
Closes https://github.com/facebook/react-native/pull/8892

Differential Revision: D3676017

Pulled By: astreet

fbshipit-source-id: 5275e30805a85c12c89bea44e8b3a2b2ec7b33fa
2016-08-05 10:58:42 -07:00
Gant eba6c379c3 - Update remote image example
Summary:
I've seen quite a few newbs trip on this, so I'm fixing it.

First - you have to set the width/height on a remote image, otherwise nothing shows.  This is [even on stack overflow](http://stackoverflow.com/questions/30091398/unable-to-display-image-with-react-native-with-uri).

Second - with the addition of ATS in iOS most people who copy/paste this example will not be able to load an insecure image, so I changed it to the `https`.

**RESULT** this doc becomes copy/paste friendly again for beginners.
Closes https://github.com/facebook/react-native/pull/9235

Differential Revision: D3675478

Pulled By: JoelMarcey

fbshipit-source-id: 5b414caa40cda72dec4eace686278c26c251c4bb
2016-08-05 08:58:32 -07:00
James Ide f8f7a1540d Prefix isUndefined with "CSS"
Summary:
Consistently namespace all of css-layout's public C API with "CSS". The only function that needed to be renamed was isUndefined, which I renamed to CSSValueIsUndefined.

Fixes #210.
Closes https://github.com/facebook/css-layout/pull/211

Reviewed By: lucasr

Differential Revision: D3674922

Pulled By: emilsjolander

fbshipit-source-id: 1752f477bde45586db112fe2654d0404cc52e1d1
2016-08-05 06:28:38 -07:00
Lukas Piatkowski 4e3b484631 Put "file:line" when we can't resolve function name
Reviewed By: michalgr

Differential Revision: D3670558

fbshipit-source-id: 2a60babf16ac6e6be77ebb6e76f5179b024a77c6
2016-08-05 06:13:41 -07:00
leeight 53c1da0047 InterpolationAnimatedNode fromDoubleArray should support the string type
Summary:
The `NativeAnimationsExample` in Android can not work due to inputRange and outputRange were limited to double array type, which is different from iOS.

So we need let android version to support string array type.
Closes https://github.com/facebook/react-native/pull/8900

Differential Revision: D3674754

fbshipit-source-id: e7844f00940bf0fdd6f7f5003dd4eeefa0c317a0
2016-08-05 02:58:30 -07:00
YuTin Liu ce82428b15 docs(android): install release for android
Summary:
maybe, it is a better command.
Closes https://github.com/facebook/react-native/pull/9057

Differential Revision: D3674229

fbshipit-source-id: 0767371646c75c5743214b2695064fb61666c7c4
2016-08-04 22:13:29 -07:00
Mengjue Wang 46bac5fbba fix inset padding handling for TextInput in LTR/RTL
Summary:
Since the core layout in RN is now assigning `left/right` to `start/end`, we need to tweak the text input handling as well:
1. We need to replace all left/right to start/end
2. For text inset padding, we need to manually flipped the padding in RTL situation.

Reviewed By: fkgozali

Differential Revision: D3670277

fbshipit-source-id: 442bead25af8548a85dd1f359aa5a799982d1185
2016-08-04 21:30:02 -07:00
ShengMin Zhang b05c7f792f make sure multiline TextInput is scrollable within a ScrollView
Reviewed By: bestander

Differential Revision: D3668840

fbshipit-source-id: 349314588035935543944ea6a8ddcb730c3ee85e
2016-08-04 17:58:45 -07:00
Michał Gregorczyk 5405aeb2a3 First step to boot rn apps with hot bytecode cache
Reviewed By: tadeuzagallo

Differential Revision: D3561565

fbshipit-source-id: dc1cf580d7b31f30939b180aec38d9b8d0dd0f58
2016-08-04 15:58:36 -07:00
Michał Gregorczyk f08f23f8cb Add API to set load flags used by UnpackingJSBundleLoader
Reviewed By: tadeuzagallo

Differential Revision: D3557667

fbshipit-source-id: 5665667185cda10415210efce83685c3e3abee92
2016-08-04 15:58:36 -07:00
Hedger Wang 38979f9c68 NavigationExperimental: Stop using absolute position for NavigationHeader.
Summary:
Not a API change, but this may break the layout of exisitng apps that
uses NavigationHeader.

For now, NavigationHeader uses absolute position, which makes it hard for
NavigationCardStack to determine the height of the scenes.

Theoretically, the height of the scenes would be the height of the cards
stack minus the height of the header.

That said, if we want to support the headers with different height (e.g.
MyIOSHeader or MyAndroidHeader), we're forced to expose the height of the
headers and manually compute the height of the scenes.

Alternatively, if the header does not use absolute position, the height
of the scenes can adjust automatically with flex box, and that's what this
commit is about to do.

Reviewed By: ericvicenti

Differential Revision: D3671119

fbshipit-source-id: 26e48f801da3661c5d7dce4752ba927621172f4a
2016-08-04 15:28:30 -07:00
Janic Duplessis 158d435f36 Implement native Animated value listeners on Android
Summary:
Adds support for `Animated.Value#addListener` for native driven nodes on Android. This is based on work by skevy in the exponent RN fork. Also adds a UIExplorer example.

** Test plan **
Run unit tests

Tested that by adding a listener to a native driven animated node and checked that the listener callback is called properly.

Also tested that it doesn't crash on iOS that doesn't support this yet.
Closes https://github.com/facebook/react-native/pull/8844

Differential Revision: D3670906

fbshipit-source-id: 15700ed7b93db140d907ce80af4dae6be3102135
2016-08-04 13:13:33 -07:00
Forrest Bice 30677e7193 ReactInstanceManager API Updates
Summary:
Updating code example with updated method names...

`onHostPause` -> `onPause`
`onHostResume` -> `onResume`
`onHostDestroy` -> `onDestroy`
Closes https://github.com/facebook/react-native/pull/9217

Differential Revision: D3671267

Pulled By: javache

fbshipit-source-id: 007a2b0909fee4495a98c141bd6ac3a564b50c17
2016-08-04 13:13:33 -07:00
Eric Vicenti e3c6d8c931 Fix UIExplorer iOS swipe back
Reviewed By: hedgerwang

Differential Revision: D3670396

fbshipit-source-id: 76aafa951d869227f32c2d4c585bb1513e5eea37
2016-08-04 12:43:50 -07:00
Emil Sjolander 2f1af09a36 Add new csslayout deps to buck file
Summary: Some new csslayout deps were added that were not properly synced to open source.

Reviewed By: bestander

Differential Revision: D3670567

fbshipit-source-id: 6890aabd2eff9dadf9b33a8b44bedc6947a8525e
2016-08-04 12:43:50 -07:00
Mengjue Wang f0fb228ec7 Provide forceRTL for LTR language to test
Summary:
1. Provide forceRTL function for developer to test RTL layout in LTR language bundle in I18nUtil and expose it in I18nManager.
2. Rename `allowRTL` and `setAllowRTL` functions

Reviewed By: fkgozali

Differential Revision: D3663693

fbshipit-source-id: 3db13a44c069ae73d1728c211306422db5dd8122
2016-08-04 12:28:30 -07:00
Spencer Ahrens 0dd93b62b4 fix console.table polyfill when entries are missing
Summary: Looks like react-addons-perf is sometimes missing entries. This prevents it from crashing.

Reviewed By: davidaurelio

Differential Revision: D3669007

fbshipit-source-id: 18a1102b5ad8dcfd9b80d39e1172ba85ad0e9dd2
2016-08-04 11:43:56 -07:00
Kyle Corbitt 341b29da71 Render NavigationHeader correctly with hidden status bar
Summary:
Currently, the NavigationExperimental `Header` only renders correctly on iOS when the system status bar is visible. There are legitimate reasons to hide the status bar, especially when displaying in landscape.

This PR adds a `statusBarHeight` prop to the header, which defaults to 20 on iOS and 0 (no status bar) on Android. Changing this value causes the extra space at the top of the header reserved for the status bar to change.

I've tested this change in my own app on iOS with `statusBarHeight` set to 0, 20, and `undefined`, and ensured that it works correctly.
Closes https://github.com/facebook/react-native/pull/8983

Differential Revision: D3668637

fbshipit-source-id: 777a0c53e8fd1caa35ce4980ca3118adcf83b62d
2016-08-04 11:43:55 -07:00
Marc Horowitz 5d0131d31b Android instrumentation tests for C++ module sync methods.
Differential Revision: D3574896

fbshipit-source-id: 8cd4c55b7a472c77cc86fd5cbfe43bc4541ba6ba
2016-08-04 11:43:54 -07:00
Hedger Wang ca8531105e NavigationExperimental: Rename `renderOverlay` to `renderHeader`
Summary:
NavigationCardStack is a custom component, and its API should be explicit, not
too generic..

In NavigationCardStack, the prop `renderOverlay` is actually used to render
the NavigationHeader, and we uses absolute position to build the layout for
the header and the body.

One of the problem with using absolute postion and fixed height to build the
layout that contains the header is that the header can't have variant height
easily.

Ideally, if the layout for the header used flex-box, we'd ve able to be more
adaptive to deal with the header that has variant height.

That said, let's rename `renderOverlay` to `renderHeader`, then build the
proper layout that explicitly works better with the header.

If we to need to support overlay in navigation, we may consider add
`renderOverlay` later, if it's really necessary.

Reviewed By: ericvicenti

Differential Revision: D3670224

fbshipit-source-id: ff04acfe9dc995cb57117b3fd9b07d5f97b9c6ee
2016-08-04 11:28:31 -07:00
sam 1d980188f8 clean UIExplorer NavigationExperimental example code
Summary:
1. Explain the **motivation** for making this change.

    Those codes cleaned are not used anywhere, remove them would make the example much more clear to users.

2. **Test plan (required)**

    ![navigationexperimental](https://cloud.githubusercontent.com/assets/1091472/17392196/4f28cba4-5a4e-11e6-9ef1-727edc784f1f.gif)
Closes https://github.com/facebook/react-native/pull/9203

Differential Revision: D3668848

fbshipit-source-id: c604a21c84dba72a5a3c857fc16bc7febfe20377
2016-08-04 10:28:31 -07:00
Dotan Nahum 77e48f1782 Make MessageQueue to emit "SPY" events in a way that can be extensible
Summary:
This PR adds a capability for MessageQueue to emit "SPY" events in a way that can be extensible, to later allow for a tooling ecosystem to grow, one example is the existing [Snoopy](https://github.com/jondot/rn-snoopy) tool that is, for now, forced to work with monkeypatches, and after this PR will be able to use a "formal" way to trace queue events.

After this change, we can wire a "spy" into a queue that will expose the events in different and interesting ways, see below (done with Snoopy):
  <img src="https://github.com/jondot/rn-snoopy/blob/master/media/snoopy.gif?raw=true" alt="Aggregating and Charting Events with Bar" width="400px"/>
  <img src="https://github.com/jondot/rn-snoopy/blob/master/media/snoopy-filter.gif?raw=true" alt="Aggregating and Charting Events with Bar" width="400px"/>

This removes the hardcoded `SPY_MODE` flag and instead uses a function that can be injected from outside world.

```javascript
MessageQueue.spy((info)=>console.log("event!", info)
```

It also creates
Closes https://github.com/facebook/react-native/pull/9160

Differential Revision: D3669053

Pulled By: javache

fbshipit-source-id: 3e4462aa77fc8514d2ea4f15430f7bec57b583a4
2016-08-04 08:43:31 -07:00
Emil Sjolander 4983a58d6c Add and run clang format script
Reviewed By: lucasr

Differential Revision: D3662225

fbshipit-source-id: ddd4064cbf9be21ca6a97001ace1b56b4314c86f
2016-08-04 08:28:53 -07:00
Emil Sjolander e0fc8c0ea0 Add the ability to attach data to a java CSSNode
Reviewed By: lucasr

Differential Revision: D3662065

fbshipit-source-id: 560a768092f17381e99b349d08bd4a8b365541be
2016-08-04 08:28:53 -07:00
Emil Sjolander 44e7a88620 Fallback to System.loadLibrary if SoLoader has not been initialized
Reviewed By: lucasr

Differential Revision: D3661990

fbshipit-source-id: f2003577aa3d2f89ec579b6f889fdfb684110b60
2016-08-04 08:28:53 -07:00
Emil Sjolander 5fd6c0903e Add jni bindings
Reviewed By: lucasr

Differential Revision: D3648793

fbshipit-source-id: d0e696e196fa7c63109c9117a65645ca3d6c9c00
2016-08-04 08:28:53 -07:00
wenzhao.yin 223bcd74ad Cancel check update task
Summary:
When call `[RCTDevMenu invalidate]`, it will cancel updateTask. But in fact, after the `[updateTask cancel]`, the updateTask's completionHandler will call `checkForUpdates` again, so it will create a new updateTask.
Closes https://github.com/facebook/react-native/pull/6165

Differential Revision: D3669576

Pulled By: javache

fbshipit-source-id: 443924b7f4be1716797fc5690e90d962cf31b923
2016-08-04 07:15:49 -07:00
Melih Mucuk 523102b8e8 Add melihmucuk to Github Issue Task Force
Summary:
Here we go !
Closes https://github.com/facebook/react-native/pull/9143

Differential Revision: D3669363

Pulled By: mkonicek

fbshipit-source-id: 7fbd16be25736055bd2d84e34ad7e66f0d885a0a
2016-08-04 05:28:28 -07:00
G. Grau 063f221e56 UIExplorer: fix navigation animation by using props passed to renderTitleComponent
Summary:
The animation shown in the UIExplorer example for NavigationExperimental's NavigationHeader is not working correctly. Due to an incomplete use of the `renderTitleComponent()` callback, interpolation is not working correctly in this example.

Even if the animation error is subtle, since the examples are followed by developers quite closely, the bug may multiply if not corrected in the sample code.

This is a really *tiny* modification that fixes that particular animation.
Closes https://github.com/facebook/react-native/pull/9067

Differential Revision: D3669140

Pulled By: javache

fbshipit-source-id: 6dab36a9132da2f704e9a074ae26e744c3420cde
2016-08-04 03:44:25 -07:00
Marc Horowitz e5ccdc4c2d add support for registering and calling sync methods in C++ modules
Differential Revision: D3574800

fbshipit-source-id: 4c238fd96c8f83e9424c8e2bf2c8ebb1d39d397a
2016-08-03 18:13:44 -07:00
Vojtech Novak a7ca90e7c7 running on device does not require apple dev program#2
Summary:
supersedes #9197
Closes https://github.com/facebook/react-native/pull/9198

Differential Revision: D3666896

Pulled By: hramos

fbshipit-source-id: 2177841dc1791545001a640992a01c83369fb9c8
2016-08-03 17:58:34 -07:00
ios122 5707c3d913 mediaPlaybackRequiresUserAction default value is true,not `false`
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.**

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

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/face
Closes https://github.com/facebook/react-native/pull/8999

Differential Revision: D3664512

Pulled By: javache

fbshipit-source-id: 030fe4752e53efcde21baadfc2502413b7fc9c8c
2016-08-03 17:43:49 -07:00
Héctor Ramos 01cb1e4ef6 Update Edit on GitHub links to point to master
Summary:
We've been getting a lot of documentation PRs opened against `0.29-stable`, `0.30-stable`, and so on, instead of `master`. This is because our doc site is also based on RN release cuts, so clicking on the "Edit on GitHub" links on a document will take you to the markdown source for that release branch instead of the latest doc on `master`.

See #9095 for an example of such a PR.

In this PR we edit the link to say View on GitHub. Though it may not prevent PRs from being opened against a release branch, removing the "Edit" CTA may help in this regard.
Closes https://github.com/facebook/react-native/pull/9149

Differential Revision: D3664368

Pulled By: vjeux

fbshipit-source-id: 395c0813f736bfbe1be4b4fb1182f9060169365d
2016-08-03 17:43:49 -07:00
Nam Se Hyun 9fa4fe2fa5 Stop Reload Android Webview On Same URL Before
Summary:
Because it is react, the url could be changed on redirection or some other ways.
The iOS version's WebView has controled that on [here](https://github.com/facebook/react-native/blob/master/React/Views/RCTWebView.m#L106).
But the Android's one is not.

Check the url is same with privous url. If it is true, cancel loading.
This logic is same with iOS's.

the ```method``` hasn't compared.

Test urls as we can.
The Google Map(https://map.google.com) was one of the site which has occur error before this commit.

related issue : #9121
Closes https://github.com/facebook/react-native/pull/9126

Differential Revision: D3663685

Pulled By: javache

fbshipit-source-id: f38c9012ee077677543dafcea83c0778a4471bfa
2016-08-03 17:43:49 -07:00
Brent Vatne 0093dcc9c5 Don't show keyboard shortcuts with redbox on device
Summary:
Unless there is some really fancy way to make pressing the keyboard shortcuts like cmd+r from your dev machine and have it reload on your device like you can in the simulator, we probably shouldn't display these when running on device.

![img_4679](https://cloud.githubusercontent.com/assets/90494/17316248/331d890a-5827-11e6-9796-0f2bf24315d7.PNG)

<img width="487" alt="screen shot 2016-08-01 at 8 29 41 pm" src="https://cloud.githubusercontent.com/assets/90494/17316250/3b174e5c-5827-11e6-8337-ac0c01843fae.png">

![img_4677](https://cloud.githubusercontent.com/assets/90494/17316257/47aebcd6-5827-11e6-8a16-b128275f73e8.JPG)
Closes https://github.com/facebook/react-native/pull/9154

Differential Revision: D3663618

Pulled By: javache

fbshipit-source-id: 22d85d65702fa8d99788b79d04136c36da0d5b66
2016-08-03 17:43:49 -07:00
Eliot Lash 66cfc76d20 Add note to networking docs about iOS ATS exceptions
Summary:
JoelMarcey requested that I make this PR based on [my comment](7ac931ee9b (commitcomment-18270206)).

I have signed the CLA.
However I was unable to verify that the site builds with this change. It looks okay in my markdown editor, but when following the contributor docs and running `npm install && npm start`, I get the following error when hitting node in my browser:

```
error in renderAPI for ../node_modules/react/lib/NativeMethodsMixin.js
Error: ENOENT: no such file or directory, open '../node_modules/react/lib/NativeMethodsMixin.js'
    at Error (native)
    at Object.fs.openSync (fs.js:634:18)
    at Object.fs.readFileSync (fs.js:502:33)
    at renderAPI (/Users/eliot/Dev/react/react-native/website/server/extractDocs.js:439:28)
    at concat.apis.map (/Users/eliot/Dev/react/react-native/website/server/extractDocs.js:601:14)
    at Array.map (native)
    at module.exports (/Users/eliot/Dev/react/react-native/websit
Closes https://github.com/facebook/react-native/pull/9107

Differential Revision: D3664102

Pulled By: JoelMarcey

fbshipit-source-id: 845917351ba9d3d2f5351a8f926757718c806025
2016-08-03 16:58:35 -07:00
Marc Horowitz da2684f0e7 Refactor CxxNativeModule out of android-specific code into common code
Differential Revision: D3574789

fbshipit-source-id: 0cb5965d20dcf7accb6a94514486b8fda1126b7b
2016-08-03 16:01:24 -07:00
ExplodingCabbage baf207e724 Fix misleading docstring on getInitialNotification
Summary:
The docs heavily implied that this method returned a notification object or null directly, like popInitialNotification used to do. In fact, it returns a promise. This change clarifies this.

Note that:
- This is purely a comment change, so no testing required.
- I've adhered to the 80 character line limit, and can't think of any other style rules you might have that could apply here.
Closes https://github.com/facebook/react-native/pull/9052

Differential Revision: D3662807

Pulled By: javache

fbshipit-source-id: 7a2573e03d7704b2d62a3499d350506ae73e8d77
2016-08-03 12:28:41 -07:00
Vojtech Novak 2fe5573492 add debugging native code
Summary:
I believe it is beneficial to explicitly state that this is possible.
Closes https://github.com/facebook/react-native/pull/8543

Differential Revision: D3663264

Pulled By: hramos

fbshipit-source-id: cb95e31d8c1d2d38929dac3e3bfda26aa6054a11
2016-08-03 11:28:59 -07:00
Seph Soliman 0fdbfb029e Return statement missing for renderScene
Summary:
Explain the **motivation** for making this change. What existing problem does the pull request solve?
Example code for "Using Navigators" under "THE BASICS" does not work. renderScene needs to return the components, not just instantiate them.

**Test plan (required)**

I copy-paste and ran the code but did not get anything rendered. I added a return statement before the component which made it work.

Arrow functions need a return statement when supplying a { block of code }.
Closes https://github.com/facebook/react-native/pull/9161

Differential Revision: D3663200

Pulled By: hramos

fbshipit-source-id: a8732dd1098de7c8ea915f459adb3403a8168f19
2016-08-03 11:28:59 -07:00
Slavik Manukyan 54d8f221c2 Way to pass styles to nested view
Summary:
Ability to pass styles to nested view for _position_ behavior.

Use case:

``` jsx
<KeyboardAvoidingView
          behavior={'position'}
          style={{ flex: 1 }}
          contentContainerStyle={{ flex: 1 }}
          keyboardVerticalOffset={ - VERTICAL_OFFSET }
>
          <SomeContainer   />
</KeyboardAvoidingView>
```
Closes https://github.com/facebook/react-native/pull/9065

Differential Revision: D3662876

Pulled By: javache

fbshipit-source-id: 9b08a04449431c4e563ef4464b5a7dba1fc02e4b
2016-08-03 11:28:58 -07:00
Mike Grabowski 504b516947 Fix corrupted `options()` call for link and other commands
Summary:
The issue here is that sometimes `this.options()` is not `[options]` but contains different stuff, esp. if your command accepts arguments.

This commit reverts its original behaviour and passes custom `examples` property that we use instead.

Tested, can be shipped right away.

Differential Revision: D3662179

fbshipit-source-id: 4b2af3487464d46e2007388230e675ce3575f797
2016-08-03 08:32:18 -07:00