Summary:
Fix a bug in NavigationScenesReducer that prevents scenes from re-rendering.
This happens when jumping the index between routes.
The fix is to add an new property `isActive` to `NavigationScene` to indicate the current active scene.
Reviewed By: ericvicenti
Differential Revision: D3479736
fbshipit-source-id: a71419887acd94ad2fead71596ca46419a88efef
Summary:
Switch web player cdn to npmcdn per discussion with lacker. This will make the url agnostic to who owns the git repo.
Closes https://github.com/facebook/react-native/pull/8426
Differential Revision: D3488755
Pulled By: lacker
fbshipit-source-id: b54dd4428a48c8a5a15b0b38ee0564d119916f9b
Summary:
And more delineated from other parts of the method
information.
Hopefully this makes it easier to parse through.
Closes https://github.com/facebook/react-native/pull/8421
Differential Revision: D3488251
Pulled By: JoelMarcey
fbshipit-source-id: 44f2ed00b16849396cac94fd46567eaab48c50f3
Summary:
Hi there,
Here is a fix for #7538 (and #5085).
I had originally discovered this issue when using `resizeMode` through the style props. Although this might arguably be an incorrect usage (see https://github.com/facebook/react-native/issues/4759#issuecomment-164301166) the same issue would happen with the `tintColor` and `overlayColor` style props.
To test this, you can render the following:
```jsx
const imageContainerStyle = {width: 100, height: 100, backgroundColor: 'green', marginLeft: 10, marginTop: 10, };
const imageStyle = {flex: 1, width: undefined, height: undefined, resizeMode: 'contain', };
return (
<View style={styles.container}>
<View style={imageContainerStyle}>
<Image style={imageStyle} source={
{uri:'http://resizing.flixster.com/DeLpPTAwX3O2LszOpeaMHjbzuAw=/53x77/dkpu1ddg7pbsk.cloudfront.net/movie/11/16/47/11164719_ori.jpg'}
}>
</Image>
</View>
<View style={imageContainerStyle}>
<Image style={imageStyle} source={
{
Closes https://github.com/facebook/react-native/pull/8410
Differential Revision: D3488010
Pulled By: andreicoman11
fbshipit-source-id: e9d1283cce8426c8878f9c3c66a43a2141232277
Summary: Provide function that could read the language currently used in the app, so the isRTL is using the app current using language to set isRTL.
Reviewed By: fkgozali
Differential Revision: D3480654
fbshipit-source-id: dea3ef4769296f594f7f32da2961b4fec1b99a7a
Summary: When layout is measure, transtion props should be updated.
Reviewed By: ericvicenti
Differential Revision: D3479967
fbshipit-source-id: 14bcd96b9691b7ee68689393b4fef51dbd04b69f
Summary: This makes it easy to build Pager.
Reviewed By: ericvicenti
Differential Revision: D3479979
fbshipit-source-id: 71c0536eb190e8ad64feea99e4bda5e2d28801d2
Summary:
Currently, DevTools only work under ios (although this is undocumented!), because the JavaScriptEngine initialization process skips setupDevTools() on android.
DevTools work fine with Android, as tested on 0.26, 0.27, and 0.28 using Nuclide's inspector.
For reference, [the relevant issue on react-devtools](https://github.com/facebook/react-devtools/issues/229).
Closes https://github.com/facebook/react-native/pull/8095
Reviewed By: javache
Differential Revision: D3443980
Pulled By: bestander
fbshipit-source-id: ce0f7dd62ae0f7dfe6654380821660f8660318a6
Summary:
- Make the examples runnable (both copy/paste and with the web player)
- Add a bit more information in props where needed.
Closes https://github.com/facebook/react-native/pull/8392
Differential Revision: D3482747
Pulled By: caabernathy
fbshipit-source-id: 8f2d812efc1efb3f14db45b5c054ce0d5c14f5f5
Summary:
Several external sites link back to docs/navigator-comparison.html when talking about React Native's navigation. The Navigation guide added in #8390 is meant to replace this content, but it was added at docs/navigation.html.
This pull request removes the comparison guide and replaces it with the Navigation guide's content. There is no content update in this PR. For review purposes, note that the next link from the previous document (JS Environment) has been updated to point to navigator-comparison, and the content of the Navigation guide remain unchanged from #8390.
Closes https://github.com/facebook/react-native/pull/8417
Differential Revision: D3482273
Pulled By: caabernathy
fbshipit-source-id: 9e04e11a5829d48541f8612fb65c01fe319e768b
Summary:
After pulling in AsyncStorage doc changes, getting typehint errors when running docs. This fixes that issue.
**Test plan (required)**
Opened http://localhost:8079/react-native/index.html
Clicked around. No errors. Also successfully ran:
```
node server/generate.js
```
Closes https://github.com/facebook/react-native/pull/8412
Differential Revision: D3482007
Pulled By: JoelMarcey
fbshipit-source-id: 7b0da2b2b38fd1f1bdec1b7c810ee70c536dd2bb
Summary:
Relates to #8203 for AsyncStorage API update.
- Added a small example to the intro section.
- Added jsdoc format tags to show up class description, parameter descriptions.
- Word-smithed many of the method descriptions.
I also made a bug fix to the autogen. It wasn't handling the scenario where a method may have no parameters.
**Test plan (required)**
Wrote a small sample app to test the snippet added to the intro section.
Ran website locally: http://localhost:8079/react-native/docs/asyncstorage.html
![api_asyncstorage](https://cloud.githubusercontent.com/assets/691109/16329457/84f9d69c-3997-11e6-9e68-3a475df90377.png)
Ran changed files through the linter.
Closes https://github.com/facebook/react-native/pull/8396
Differential Revision: D3481783
Pulled By: JoelMarcey
fbshipit-source-id: ebc4b9695482ada8a3455e621534d2a7fb11edf4
Summary:
Currently, DevTools only work under ios (although this is undocumented!), because the JavaScriptEngine initialization process skips setupDevTools() on android.
DevTools work fine with Android, as tested on 0.26, 0.27, and 0.28 using Nuclide's inspector.
For reference, [the relevant issue on react-devtools](https://github.com/facebook/react-devtools/issues/229).
Closes https://github.com/facebook/react-native/pull/8095
Reviewed By: javache
Differential Revision: D3443980
Pulled By: andreicoman11
fbshipit-source-id: 3d7b2e83cf4158a1228d2e21510509ab63411a5d
Summary:
Initial stab at writing a high level guide on navigation. Its main focus is on Navigator due to it being cross-platform and fairly simple to use.
This guide should be expanded to cover tabbed applications in a future pull request.
The Navigation (Experimental) section will be similarly expanded upon as the API stabilizes.
![navigation](https://cloud.githubusercontent.com/assets/165856/16324560/52b508dc-396a-11e6-94b7-b2d1175f69e0.png)
Closes https://github.com/facebook/react-native/pull/8390
Differential Revision: D3480304
Pulled By: caabernathy
fbshipit-source-id: 280da9185fca295bc107a2df20106c783b461be7
Summary:
GIF Image will disappear after press the home button and return back.
Set `removedOnCompletion` to be`false` will fix all `CAAnimation` disappear like stopping after going into the background.
Closes https://github.com/facebook/react-native/pull/7612
Differential Revision: D3481403
fbshipit-source-id: 101bded300f5e34bb53ec6c54a40eb5aece22fba
Summary: Create isDeviceLanguageRTL function to connect the OS language with isRTL. Now even if a new app could support RTL language, without setting forceRTL at JS side it won't directly change into RTL layout.
Reviewed By: fkgozali
Differential Revision: D3473109
fbshipit-source-id: ac1410c910e980d44750bb88cad7615febb9e076
Summary:
This is just improving a bit of lameness on the homepage - Devin pointed out the <>'s don't work within a Text tag, so I removed them, and someone else pointed out that nonexistent fake urls are suboptimal, so I improved that too.
Closes https://github.com/facebook/react-native/pull/8387
Differential Revision: D3479087
Pulled By: JoelMarcey
fbshipit-source-id: 45a2d21a9073b58b869e8b344550c28f849e0185
Summary:
Right now the embedded simulator is always at the top right corner.
This can be confusing as to what code is associated with the simulation.
So, move the simulator next to its actual code.
This has the added benefit of allowing us to use the React Native
Web Player for the simpler examples in the components.
Closes https://github.com/facebook/react-native/pull/8384
Differential Revision: D3479056
Pulled By: bestander
fbshipit-source-id: f400d8387ec771b94d5e798c1e955b25f9a0f1bf
Summary:
In the web player in the docs, allows `AppRegistry.registerComponent('name', App)` to use *anything* for `'name'`. It is ignored by the web player - last registration wins.
Closes https://github.com/facebook/react-native/pull/8383
Differential Revision: D3478922
Pulled By: JoelMarcey
fbshipit-source-id: 3d1d96e0ad41216d29134ba384896e86d0cd2b32
Summary:
It works without out the `extends`, but I do not really understand why,
unless there is some magic implicit `extends` if you don't put it and
you call `registerComponent`. But, I figure we should be explicit unless
there is a good reason not to be.
Closes https://github.com/facebook/react-native/pull/8377
Differential Revision: D3478950
Pulled By: JoelMarcey
fbshipit-source-id: 05ea4367c3c8c34aea6c092639ee51d8761bca3f
Summary:
Cleans up `InitializeJavaScriptAppEngine` in a few ways:
- Fix bug where `global.navigation.geolocation` was being assigned to `global`.
- Rename `polyfillGlobal` to `defineProperty`.
- Rename `polyfillLazyGlobal` to `defineLazyProperty`.
- Inline `polyfillIfNeeded` (only used once).
- Rename `setUpMapAndSet` to `setUpCollections`.
- Add `flow`.
I've changed `defineProperty` and `defineLazyProperty` to always accept an `object` property since it is not only used for defining properties on `global`.
Reviewed By: davidaurelio
Differential Revision: D3472147
fbshipit-source-id: 492da62a303cf040211c386fa6260789e50b43c1
Summary:
The example uses StyleSheet.create and also arrays-of-styles. I think this covers everything the old one did, but in simple-enough-for-the-basics form, so I removed the old one. I also reordered so that "Style -> Dimensions -> Layout" is the flow for learning "Styley" things.
Closes https://github.com/facebook/react-native/pull/8379
Differential Revision: D3478384
Pulled By: caabernathy
fbshipit-source-id: 158f0f0367c8eb8b2b24feda0d8d7a533fd7af4d
Summary:
Two of the known issues have been moved to the issue tracker:
* #8315
* #8316
Others have been moved into more appropriate locations, such as the `TextInput` issue to the API doc itself, and the React debugging issue to the Debugging doc.
The Android-specific compatibility concerns have been dropped entirely as it does not seem like people would find these in the docs.
Closes https://github.com/facebook/react-native/pull/8321
Differential Revision: D3477999
Pulled By: JoelMarcey
fbshipit-source-id: dfffc9910ebf5514eb14c6aa8a9a3e70761db874