Summary:
> Explain the **motivation** for making this change. What existing problem does the pull request solve?
I was reading the documentation and noticed this broken link.
Closes https://github.com/facebook/react-native/pull/12535
Differential Revision: D4608413
Pulled By: hramos
fbshipit-source-id: 5d3edfaf4e5c16f42a50e203b979b90afe101954
Summary:
We migrated everyone on Product Pains over to our new service, Canny. We also moved every product's feedback to a product-specific subdomain (eg. https://react-native.canny.io/feature-requests).
This PR updates every Product Pains URL over to its new Canny version.
Changes only affect docs, blog posts, and bot responses - not the React Native library itself.
**Test plan**
I visited https://react-native.canny.io/feature-requests. Since there are no code changes this seems sufficient but let me know if I need to run the blog website or something.
Closes https://github.com/facebook/react-native/pull/12429
Differential Revision: D4581492
Pulled By: hramos
fbshipit-source-id: 7d124ab7ed9228d47f1bc4417d8992f15ff17f01
Summary:
After taking a look at the existing animation docs, I found that most of the documentation on using `Animated` was spread out throughout the Animations guide and the `Animated` API reference, without any particular structure in place.
This PR aims to clean up the API reference, focusing on documenting all the provided methods exhaustively, and deferring to the Animations guide for long form examples and supporting content.
The `Easing` module is referred to at various points in the API reference, so I decided to clean up this doc as well. easings.net provides some handy visualizations that should make it easier for the reader to understand what sort of easing curve each method provides.
The site was built locally, and I verified all three documents render correctly.
![screencapture-localhost-8079-react-native-docs-animations-html-1487212173651](https://cloud.githubusercontent.com/assets/165856/23004694/d3db1670-f3ac-11e6-9d4e-0dd6079b7c5c.png)
Closes https://github.com/facebook/react-native/pull/12410
Differential Revision: D4581314
Pulled By: hramos
fbshipit-source-id: 27c0bce2afac8f084311b9d6113a2641133b42e5
Summary:
I was reading the documentation and noticed a few typos and grammar mistakes.
- rely -> relies
- Adding 'a' and 'its' and 'the' where appropriate
- Minor simplifications
Closes https://github.com/facebook/react-native/pull/12385
Differential Revision: D4570713
Pulled By: hramos
fbshipit-source-id: dbf0506306fd16b3454a2ec96792bda2c7bcaa70
Summary:
Our docs suggest using this babel plugin to remove console.log statements in production. Unfortunately, it does not actually work when you run it on a new React Native project, and the root cause is that the plugin does not handle all cases correctly. See discussion in https://github.com/facebook/react-native/issues/10412 . For now, we should just stop recommending that people use this plugin, because it doesn't work.
Closes https://github.com/facebook/react-native/pull/12315
Differential Revision: D4538567
Pulled By: hramos
fbshipit-source-id: f3ae1b9143130a05601907ee902a02fc0b2818b0
Summary:
ADB reverse link was broken, and the "release build" instructions did not work (--configuration doesn't exist.)
Closes https://github.com/facebook/react-native/pull/12312
Differential Revision: D4538302
Pulled By: hramos
fbshipit-source-id: 6d2e7ee07f9fad6080ed79bc8e0e4db11e6bbed3
Summary:
> Explain the **motivation** for making this change. What existing problem does the pull request solve?
Comments with correct grammar are easier to read.
Closes https://github.com/facebook/react-native/pull/12313
Differential Revision: D4538229
Pulled By: hramos
fbshipit-source-id: 69978df3659f2d3e4f5b2ccb4ff6c33dc6b7e56b
Summary:
I think this update is Critical as I wanted to add a different module name to be the same as the Android module name. I simply lost 6 hours until I found out that the Macro does not accept String syntax. Almost drove me crazy. Please, at least do something about it. Thanks.
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
Closes https://github.com/facebook/react-native/pull/11634
Differential Revision: D4533312
Pulled By: lacker
fbshipit-source-id: 2c547f791ed76ba62e0c7e5cabc2830dbae34075
Summary:
Support for non-image assets like audio and video was added a while back
Closes https://github.com/facebook/react-native/pull/12053
Differential Revision: D4489209
Pulled By: mkonicek
fbshipit-source-id: 4e2bdf7ef07bcc8c563c055ed0a4fe5cc51bd0bc
Summary:
Explain the **motivation** for making this change. What existing problem does the pull request solve?
I had tried fixing a broken link in a previous commit (#11453). My commit was merged, but it did not resolve the underlying problem. I have looked into how links should be formed for the docs and have fixed the original problem as well as updated all other links to be consistent.
Previous link formats:
- /docs/sample.html <-- broken link
- sample.html <-- broken link
- https://facebook.github.io/react-native/docs/sample.html <-- works
- /react-native/docs/sample.html <-- works
- docs/sample.html <-- works (permalink format)
This PR updates all links to the permalink format.
**Test plan (required)**
I ran the website locally and manually tested half of the links in each category. They all worked.
```
$ cd website
$ npm install && npm start
```
Closes https://github.com/facebook/react-native/pull/12064
Differential Revision: D4489153
Pulled By: mkonicek
fbshipit-source-id: bf0231d941ba147317595c3b3466dc579a887169
Summary:
There is only `timestamp `property in touch native event, `event.nativeEvent.timeStamp` is undefined.
Closes https://github.com/facebook/react-native/pull/11988
Differential Revision: D4489408
Pulled By: mkonicek
fbshipit-source-id: 0148a4107124438f345b8cb584e1832ba51b3a4b
Summary:
A simple correction of what looks like a copy-paste error in the writeup of NavigationExperimental.
Closes https://github.com/facebook/react-native/pull/12081
Differential Revision: D4482725
Pulled By: mkonicek
fbshipit-source-id: 8c7c6ad19ed96e3287b4d0ef809685b5201b4fc0
Summary:
Never a good idea to pipe a bash file from `http` into `sudo`. Using `https` mitigates some of this risk.
Closes https://github.com/facebook/react-native/pull/12090
Differential Revision: D4474065
fbshipit-source-id: 99d29ae112ae0edef5bd662d439b5da673c5c79f
Summary:
Add 'Android SDK Platform 23' to the check list when install the proper Android SDK.
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.c
Closes https://github.com/facebook/react-native/pull/11744
Differential Revision: D4464520
Pulled By: hramos
fbshipit-source-id: 2cfabdadc8a94f35cbbd37d9dce46375e8b954c3
Summary:
Hi, here are some typo fixes in the documentation related to Android native modules:
* Add missing package and imports for the second part of the basic tutorial (register module)
* Add missing `public` keyword
* Remove incongruous word
Closes https://github.com/facebook/react-native/pull/11938
Differential Revision: D4439220
Pulled By: hramos
fbshipit-source-id: e7086fe384ed6238306abf0ee72c944fac53ad7b
Summary: Switch to using IS_TESTING on the Platform module. While IS_TESTING has to be explicitly set in the test harness, this makes it more usable and stops people from relying on brittle variables in the (larger) environment.
Reviewed By: fkgozali
Differential Revision: D4423661
fbshipit-source-id: 27a80867778b9374bcba67b69f9c93d32c0a74b0
Summary:
In the context of an app an image exists in three resolutions on the server: `thumb` (30px) `feed` (300px) `full` (900px). When looking at an individual item a user can come either from the feed, via a permalink or from other parts of the app. This allows a situation where the `feed` image might or might not already be loaded somewhere in the app. In the detail view I want to render `thumb` with a blur (to quickly display something), then the `feed` image if it exists to have something decent to display until `full` loads. However it is quite a waste to load the `feed` image if it isn't already in cache, and will slow down the time until `full` is loaded. It is possible to track the navigation from feed->detail and that the `feed` image has actually completed loading by the feed component however as component hierarchies grow this turns into quite a lot of prop passing and bad separation of concerns.
NSURLRequests accepts a [Cache Policy](https://developer.apple.com/reference/fo
Closes https://github.com/facebook/react-native/pull/10844
Differential Revision: D4425959
Pulled By: lacker
fbshipit-source-id: 679835439c761a2fc894f56eb6d744c036cf0b49
Summary:
Explain the **motivation** for making this change. What existing problem does the pull request solve?
Descriptions about class names are incorrect.
Closes https://github.com/facebook/react-native/pull/11898
Differential Revision: D4418957
fbshipit-source-id: fc7d0b61149ed9f850a436a35ad98f179b5e3e19
Summary:
This adds a hook to let you disable yellow box warnings. It's useful for native engineers who don't want to mess with JS but also for CI/testing, where the app operates mostly as a blackbox.
Depends on D4395091
Reviewed By: achen1
Differential Revision: D4395552
fbshipit-source-id: 4c3a9676caa975c537d1a4711d60aab2f404db15
Summary:
Sending global events with `eventDispatcher` has been [deprecated](d9737571c4) since 0.28, with a recommendation to subclass `RCTEventEmitter` instead, but there were no docs for this.
This updates the iOS native module to use the recommended way, and also documents the use of `stopObserving` and `startObserving`.
Tested and working in a real app.
cc nicklockwood
Closes https://github.com/facebook/react-native/pull/11792
Differential Revision: D4394626
fbshipit-source-id: 68b26d35944a521bf683a50ec1ab21f03b5e99d8
Summary:
Update docs to prevent build process from failing when collaborators do not have MYAPP_RELEASE_STORE_FILE in their env.
Build process often fails when following the existing documentation on setting the signingConfigs in build.gradle, as not all collaborators have the required ENV set in their gradle.properties
Closes https://github.com/facebook/react-native/pull/11716
Differential Revision: D4389150
Pulled By: hramos
fbshipit-source-id: 37941382950fac41f19d19317f49769588b135b4
Summary:
The command at line 90 does not work anymore, updated to reflect current revision.
Closes https://github.com/facebook/react-native/pull/11635
Differential Revision: D4389138
Pulled By: hramos
fbshipit-source-id: 4ac071ba2d47aa6bfbe7fb2ccaaf9800aa9e7e68
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?
There was a small error in the documentation that referenced the unlink command as an example, when the code in the example was actually from the link command.
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 t
Closes https://github.com/facebook/react-native/pull/11746
Differential Revision: D4387025
fbshipit-source-id: 152adc4b5cc4b467d3cf2399d2273c31b10c4b64
Summary:
Added permission code to handle the user permission accepted or denied cases which causes potential app crashing if not handled. Only a small piece of code added to the guide to resolve an issue I was facing with permission.
The app that I was testing following the guide available, it was crashing showing permission denied error on the android monitor, and there was no step for how to resolve the issue. So I tried out a solution so thought would share it on the official Guide to help people who are stuck with the same issue.
Closes https://github.com/facebook/react-native/pull/11687
Differential Revision: D4377882
Pulled By: ericvicenti
fbshipit-source-id: a7db104c7c1b7e1fb2590c83118715840c17927b
Summary:
Doing this from web so won't be able to screenshot the results. (also inadvertently deleted a line, oh well...)
Closes https://github.com/facebook/react-native/pull/11625
Differential Revision: D4366928
Pulled By: mkonicek
fbshipit-source-id: 966a3d8b90dde49b1de06e0249df110245943825
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
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
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
Summary:
Small pull request
**motivation**
The doc 'Building React Native from source' is not up to date now.
While i try to build from the source my self, the gradle-download-task(2.0.0) will always fail to download boost zip with a failure of 403.
After i upgrade the gradle-download-task to 3.1.2, the download works well.
**Test plan (required)**
I tested to build the source myself, it works.
This is non-code update, it is document update, hope to help other people who get the same download failure.
**Code formatting**
Non-code update PR.
Closes https://github.com/facebook/react-native/pull/11298
Differential Revision: D4288387
fbshipit-source-id: 5e6feef1ea80f7e3feddcc7e4abf2b5cea82f08f
Summary:
The line
`Please make sure you export the correct path for 'ANDROID_HOME' if you did not install the Android SDK using Android Studio.`
was visible twice (one on top of another) in the docs when viewing linux instructions. I removed the block that set it visible on both linux and windows and incorporated it into the existing windows block.
Closes https://github.com/facebook/react-native/pull/11276
Differential Revision: D4269783
Pulled By: hramos
fbshipit-source-id: 423fca3219567cf96d91aefc43d1ddabb2403728
Summary:
*First PR to React Native.*
After performing a clean install of macOS Sierra on my machine I tried to get RN set up again and noticed that the link provided for installing Java (required by Android Studio) pointed to the [wrong location](https://www.java.com/en/download/mac_download.jsp). After some time researching I found the right package required by Android Studio [here](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html).
I tried looking for a more general link (as this points to the JDK version 8 and has a weird path: _jdk8-downloads-2133151.html_ - Sadly this was the best I could find.
I also looked through listed issues to try and find a previous attempt to fix this error but couldn't find any references, sorry if I missed anything.
**TL;DR:** JDK download link is incorrect, PR updates it to the correct one.
Closes https://github.com/facebook/react-native/pull/11201
Differential Revision: D4253304
Pulled By: hramos
fbshipit-source-id: be8ffe059bf60f5d7aa1876e5581b270187864c2
Summary:
I was running RN 0.31 on ArchLinux (kernel 4.7), and "react-native start"
was refusing to run on the default (and sometimes required, as I have
noticed) port. I tried executing the suggested lsof command, but that did not
work. Somewhere I found the lsof command I include in this commit, and that
worked (it was a node.js process). So I'm including it, since I found it
helpful.
Closes https://github.com/facebook/react-native/pull/9402
Reviewed By: lacker
Differential Revision: D4144400
Pulled By: hramos
fbshipit-source-id: 6203549455555efc59b7bab0a3ec23957d80b956
Summary:
The upgrading process based on Yeoman is a pain. For each file, Yeoman (or the brand new copyAndReplace solution a477aec) compares the newly generated content with the existing one and prompts the user if it differs, with very basic options: overwrite or skip.
I have digged into this problem and came with [rn-diff](https://github.com/ncuillery/rn-diff) (you may have read [this article](https://medium.com/ncuillery/easier-react-native-upgrades-with-rn-diff-5020b5c3de2d#.llvy2dym5)). This repository helps people to upgrade RN on their projects. An alternative upgrading process using `git apply` instead of Yeoman is described [here](https://github.com/ncuillery/rn-diff/blob/master/USAGE.md).
This PR is the integration of this process into the core. I got rid of the drawbacks mentioned in the link below in order to make it a clean, elegant, one-step operation.
This process is based on some Shell operations that:
- Generate the blank sources of both old and new versions
Closes https://github.com/facebook/react-native/pull/11110
Differential Revision: D4237107
Pulled By: mkonicek
fbshipit-source-id: 15e82e030b762415c925ccb2a62ddb354a6e18b9
Summary:
Adding documentation for the CLI for 2 reasons:
1. It's not immediately clear to most how the CLI is part of `react-native` and not the node module they installed. This begins clarifying.
2. I plan on adding some additional documentation to this section pending an upcoming PR I've discussed with Mike.
screen shot provided:
![image](https://cloud.githubusercontent.com/assets/997157/20574213/0640d026-b179-11e6-9bc1-4f507b2a195a.png)
Closes https://github.com/facebook/react-native/pull/11097
Differential Revision: D4237028
Pulled By: mkonicek
fbshipit-source-id: c1dc50fe1be7f6947a33ee6472b5862306888055
Summary:
The windows and linux block didn't have the command to install react-native-cli.
The command is the exact same as it is on macOS. It makes the guide a little confusing because it leaves out this critical step and it's difficult to understand whether or not this needed component was already indirectly installed in one of the other steps.
Closes https://github.com/facebook/react-native/pull/11135
Differential Revision: D4236984
Pulled By: mkonicek
fbshipit-source-id: dca237132df7d80b5a02eaf09faec53e13e005cb
Summary:
As said in #10944, there's not yet some good infos on how to profile the javascript.
I'm adding a mention to two ways of doing it (`react-addons-perf` and chrome profiler), feel free to correct me on this.
I almost added an example for `react-addons-perf` but I'm not sure what's the correct way to use. Here's the way I use it:
```javascript
import Perf from 'react-addons-perf';
....
componentDidMount() {
console.log('start perf tracking');
Perf.start();
setTimeout(() => {
console.log('stop perf tracking');
Perf.stop();
Perf.printExclusive();
}, 10000);
}
...
```
Closes https://github.com/facebook/react-native/pull/10974
Differential Revision: D4221630
Pulled By: mkonicek
fbshipit-source-id: 918f837b9c7169c3dd835e653c78159b801fb946
Summary:
Line 367 said **throughly** when it should say **thoroughly**
Closes https://github.com/facebook/react-native/pull/11054
Differential Revision: D4218630
fbshipit-source-id: b2bb58106879a01bdf9694fd8b1b2fda57295755
Summary:
DOCS
Android studio should be android section only
Closes https://github.com/facebook/react-native/pull/10984
Differential Revision: D4197586
Pulled By: JoelMarcey
fbshipit-source-id: 2fe3d737083f3ad301dbc39cdb4f8ff315370d76
Summary:
This is the next incremental step to rewrite node-haste. I apologize for the size of this diff but there is really no smaller way to do this. The current architecture passes a single file watcher instance into many classes that each subscribe to file changes. It's really hard to keep track of this. The new implementation reduces the listeners to two (will eventually be just one!) - one in DependencyGraph and one in it's parent's parent's parent (ugh! This doesn't make any sense). This should make it much more straightforward to understand what happens when a file changes.
I was able to remove a bunch of tests because jest's watcher takes care of things like ignore patterns. Some of the tests were specifically testing for whether the change events were invoked and they are now much more straightforward as well by manually invoking the `processFileChange` methods.
(Relanding a fixed version of D4161662)
Reviewed By: kentaromiura
Differential Revision: D4194378
fbshipit-source-id: 8c008247a911573f6b5f6b0b374d50d38f62a4f5
Summary:
Add note to let users know of the **screen overlay permissions** for the application for a first time run.
Let users know of the **failure to connect** issue also for a first time deployment with a red screen which can be fixed by trying again.
Closes https://github.com/facebook/react-native/pull/10707
Differential Revision: D4184582
fbshipit-source-id: d9a19678b72359547c34109eb118d4aed5c74928
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/10924
Differential Revision: D4181397
Pulled By: ericvicenti
fbshipit-source-id: e5c762937efba3bd65fbe00cc94678e8c1461659
Summary:
The command `react-native run-ios --simulator "iPhone 4s"` wasn't working, and I think it's because there needs to be an equals sign in the command. ie. `react-native run-ios --simulator="iPhone 4s"`
I ran that command again, and it worked for me.
Closes https://github.com/facebook/react-native/pull/10754
Differential Revision: D4175849
Pulled By: hramos
fbshipit-source-id: b11aee955f1f83da2d72e0cb06464ea984cf2002
Summary:
Apple's App Store review guidelines are changing in January 2017. Disabling Apple Transport Security (ATS) will now require reasonable justification to the Apple App Store review board.
The documentation currently suggests disabling ATS completely under certain circumstances. This could cause applications developed with React Native to fail review next year.
The documentation has been updated to give readers a warning about the upcoming changes, allowing them to prepare their servers for HTTPS if necessary.
Screenshot of the change:
![website screenshot](https://cloud.githubusercontent.com/assets/1478253/20237892/d0d5fcb8-a8d6-11e6-917f-e913822f0e59.png)
Closes https://github.com/facebook/react-native/pull/10893
Differential Revision: D4175830
Pulled By: hramos
fbshipit-source-id: 1d9fe50d567151879c7adf7324401f177118d909
Summary:
Currently, to generate a `Release` build in `Android` it is required to get into the `android` directory and run the `react native bundle`with a lot of options and after that run the `gradle` to assemble or install the application with the build type `Release`.
This PR improves the process adding that feature to the `React Native CLI`.
To generate a release build is only required to use the parameter `--configuration` with the value `Release`.
**Examples**
To generate a release build:
```sh
react-native run-android --configuration release
```
To generate a release build for the product flavors staging:
```sh
react-native run-android --configuration release --flavor staging
```
To generate a debug build:
```sh
react-native run-android
```
To generate a debug build for the product flavors staging:
```sh
react-native run-android --flavor staging
```
This PR also removes the option `--install-debug` from the `react-native run-android` because that is always the default value,
Closes https://github.com/facebook/react-native/pull/10867
Differential Revision: D4167203
Pulled By: cpojer
fbshipit-source-id: c5ac07f81feeeea00ee0e8b059b46ef0d258a1a6
Summary:
Method onCreate must be called with parameter - Bundle savedInstanceState. 'savedInstanceState' needed for call super class's implementation of this method. Also, you need to import android.os.Bundle package
Closes https://github.com/facebook/react-native/pull/10045
Differential Revision: D4167919
Pulled By: hramos
fbshipit-source-id: d34d081d08c6615c1ca97ec67a619cf273839c3e
Summary:
If your current android application is targeting the android `api level 23` or greater, displaying the error view will cause a crash in the application. The crash only shows that the system cannot display the view.
Closes https://github.com/facebook/react-native/pull/10479
Differential Revision: D4167801
Pulled By: hramos
fbshipit-source-id: 5f7315038a8a4c36d1513173139d5c4cf50ea868
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 the ["Pull Reques
Closes https://github.com/facebook/react-native/pull/10436
Differential Revision: D4141792
Pulled By: hramos
fbshipit-source-id: b3b460fa2e22a6133865005326b09dddd1c05e29
Summary:
With the current `run-ios` script it is not possible to create/run iOS release builds or any other kind of scheme configuration from the terminal (we need to use `Xcode`). The reason for this is that the `run-ios` script does not expose the scheme configuration option for the `xcodebuild` command. This PR exposes that property and allows the developers to directly create/run release builds from the terminal.
This PR also closes [this](https://productpains.com/post/react-native/create-ios-release-builds-from-terminal) request at `productpains`.
And answers to [this](http://stackoverflow.com/questions/40303229/run-a-react-native-ios-release-build-from-terminal) question at the `stackoverflow`.
**Test plan (required)**
To generate a release build just run:
``` sh
react-native run-ios --configuration Release
```
The output
``` sh
Found Xcode project App.xcodeproj
Launching iPhone 6 (iOS 9.3)...
Building using "xcodebuild -project App.xcodeproj -scheme App -destination id=B0738993-CE4A-4D
Closes https://github.com/facebook/react-native/pull/10637
Differential Revision: D4151793
Pulled By: cpojer
fbshipit-source-id: 5a0fcdd59589977f3e251ec9bb3ba85e8919cffc
Summary:
The RunningOnDeviceAndroid doc had some Linux-specific instructions that are not relevant to macOS/Windows users.
Closes https://github.com/facebook/react-native/pull/10726
Differential Revision: D4139089
Pulled By: JoelMarcey
fbshipit-source-id: cc57c1d7e3c9dec94e123c3597ac78b3efb15dd0
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/10763
Differential Revision: D4139069
Pulled By: JoelMarcey
fbshipit-source-id: ecc36f4e0ff4a44c95d63a256e0cdf67a4d386b3
Summary:
`react-native run-android` will need `adb` in `$PATH` as I explained in issue #10702.
Closes https://github.com/facebook/react-native/pull/10703
Differential Revision: D4118918
fbshipit-source-id: 873e46d044b8cc7acf026aba330ad1dc4ff6f2d3
Summary:
Currently there is a typo in Accessibility.md which will result in an invalid prop type warning if directly adhered to. The instance of `no-hide-descendant` should instead be updated to `no-hide-descendants` (plural) in the documentation.
Closes https://github.com/facebook/react-native/pull/10566
Differential Revision: D4082750
Pulled By: lacker
fbshipit-source-id: 18e2d9db6004767903e9308a2c0a900d2d9055fc
Summary:
Small contribution for MacOS users:
For those users who using zsh with their Mac OS filename to place variables should be different
Closes https://github.com/facebook/react-native/pull/10432
Differential Revision: D4078102
Pulled By: lacker
fbshipit-source-id: 6cbfb81a472f37bfda85964e929c99b438348fd8
Summary:
You may want to double-check that this works perfectly (I am trying to move away from RN-from-source, since my changes were upstreamed), but it seems to build without errors for me. And this has the advantage of working seamlessly with "rnpm", which isn't smart enough to add these excludes when linking modules.
Closes https://github.com/facebook/react-native/pull/9954
Differential Revision: D4074059
fbshipit-source-id: e152945ea66605698c18c1d0d078fbf312f1658e
Summary:
Changes made in React-Native Docs
1. Removed unnecessary imports `Text, View` from `SimpleNavigationApp`
2. Took MyScene propTypes out of the class as `static propTypes = {` throws parsing error via eslint
Closes https://github.com/facebook/react-native/pull/10513
Differential Revision: D4066367
Pulled By: hramos
fbshipit-source-id: f7d0ccd5f20637a043e96e115a4c40ce6121a737
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/10484
Differential Revision: D4057708
Pulled By: javache
fbshipit-source-id: e38216092195e5a38bd3afb43c4521cc4edb66ba
Summary:
Some tools, like `react-native-cli` only works correctly if the `android` and `iOS` projects respect the react native folders structure. Usually, when you are integrating react native with other existing projects, that is not the case. This note will help the developers to identify and avoid potential issues.
Closes https://github.com/facebook/react-native/pull/10480
Differential Revision: D4056046
Pulled By: JoelMarcey
fbshipit-source-id: ef8d75b338616b2319f7e0418a7bfcfa1a0604dc
Summary:
To access to the `DevSettingsActivity` it is required to declare the `Activity` in the `AndroidManifest.xml` or the application will crash every time the developer tries to access it.
Closes https://github.com/facebook/react-native/pull/10478
Differential Revision: D4050931
Pulled By: JoelMarcey
fbshipit-source-id: 4b587ab84375a6f08bc69e18d2cd00ae9dfa726d
Summary:
Specify where to find `keytool` on Windows as current command does not normally work.
Closes https://github.com/facebook/react-native/pull/10215
Differential Revision: D4049285
Pulled By: lacker
fbshipit-source-id: f7033e9a596c472181ca75c927cd1efb4b6cf35d
Summary:
Use a Error Code as first parameter instead since `Promise.reject(String message)` is depriciated
Closes https://github.com/facebook/react-native/pull/10459
Differential Revision: D4048222
Pulled By: lacker
fbshipit-source-id: 5676a459a1f1d21d0edcfb4385524eaad6b05954
Summary:
See #10448.
Confirmed link is rendered correctly. cc foghina
Closes https://github.com/facebook/react-native/pull/10468
Differential Revision: D4047432
Pulled By: lacker
fbshipit-source-id: dfa1427d6dcd7b2e5e66ce276cae1ed10778c4ff
Summary:
Updates the documentation for the the android life cycle methods, recent changes has deprecated
`onHostPause()` for `onHostPause(Activity activity)`
`onHostDestroy()` for `onHostDestroy(Activity activity)`
[deprecation commit](0b5c61250b)
Closes https://github.com/facebook/react-native/pull/10460
Differential Revision: D4044420
Pulled By: JoelMarcey
fbshipit-source-id: 54c5fc8fcd332235b6c0237a180e0c5bb2310a20
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
Fix typo on line 47 "make" to "makes"
> **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/CONTRIBUTI
Closes https://github.com/facebook/react-native/pull/10449
Differential Revision: D4039572
Pulled By: hramos
fbshipit-source-id: 21ba41365f24f4f615b73051de63dfd5be6b4893
Summary:
The pod `RCTNetwork` is missing from the `Podfile` documentation. Without it the view controller does not run.
This probably also closes#8449.
Closes https://github.com/facebook/react-native/pull/10389
Differential Revision: D4021432
Pulled By: JoelMarcey
fbshipit-source-id: 689ed540c6750bf4ccaee1e7943d9175ac50d6c5
Summary:
This PR removes the `.setUseOldBridge(true)` from the documentation. The method was removed from the `ReactInstanceManager` class at [this](1a690d5674 (diff-dc0f3a09c238b372cb1c27aa5f7dcbce)) commit and currently it is not available.
Closes https://github.com/facebook/react-native/pull/10368
Differential Revision: D4016564
Pulled By: JoelMarcey
fbshipit-source-id: 0d9f83c1708dc85043d80a82ecd4fad6b9d42cf5
Summary:
As of Swift 3, [Swift converts Objective-C API names based on parameters](https://github.com/apple/swift-evolution/blob/master/proposals/0005-objective-c-name-translation.md), so the docs should explicitly declare what the Objective-C API is (because it's also used in the JavaScript side too).
An alternative to this would be to update the Objective-C and JavaScript calls to be `addEventWithName:location:date:` / `addEventWithName()` based on the default Swift API, but I think the approach in the PR is most correct here.
Closes https://github.com/facebook/react-native/pull/10176
Differential Revision: D4001604
Pulled By: hramos
fbshipit-source-id: cd4143d19d2d375288a086b9d7995e75fe1e9170
Summary:
It seems everything pushes for "com.facebook.react:react-native:+" these days, so just updating the docs to match.
Closes https://github.com/facebook/react-native/pull/9955
Differential Revision: D3997456
Pulled By: hramos
fbshipit-source-id: 45b1b3437c6bcd9992ee000cb1353ae3c19c4d47
Summary:
Add flex:1 to View's style prop, so the ListView can be scrolled.
Closes https://github.com/facebook/react-native/pull/10304
Differential Revision: D3993754
Pulled By: JoelMarcey
fbshipit-source-id: 23d73b23310a5b39dea4cf3c6f3af0bf2901480f
Summary:
Documentation change: add link to install lsusb on macs since it is not available by default.
Closes https://github.com/facebook/react-native/pull/10263
Differential Revision: D3982006
Pulled By: JoelMarcey
fbshipit-source-id: 66b191446e1b7a969ad2682efb573865e31ed91f
Summary:
Explicitly show import statements in example implementation file. Xcode build fails unless RCTLog is imported. Adding this clarifies this, as it is not stated anywhere else.
Closes https://github.com/facebook/react-native/pull/10117
Differential Revision: D3952631
Pulled By: javache
fbshipit-source-id: f268ff53ee2cf69aabd83c3305c5c25add338d83
Summary:
Only a few adjustments to the import of _react-native_.
Closes https://github.com/facebook/react-native/pull/10153
Differential Revision: D3940472
fbshipit-source-id: 3a93799ac89002e129d4c357db29a076afdf1074
Summary:
No need for the references now that rnpm is baked into core.
Closes https://github.com/facebook/react-native/pull/10069
Differential Revision: D3914945
fbshipit-source-id: bdf9aac03a6544bec1f18b9a80f26638ee508e16
Summary:
P.S, now we have four docs about navigator(s). But from my POV, the content are more or less repeated, and the logic is a little messy. I suggest someone to reforge these docs, in a more vivid and evolutionary way. Thank you!
Closes https://github.com/facebook/react-native/pull/9975
Differential Revision: D3907167
Pulled By: JoelMarcey
fbshipit-source-id: 9db05f8a3d70f28c6104e7cc6a2813e7eaa9f6fa
Summary:
Duplicate of #9552 which failed to land internally.
Closes https://github.com/facebook/react-native/pull/9796
Differential Revision: D3896927
Pulled By: hramos
fbshipit-source-id: 98d60827b72a272331d4d4287be4726cca0c4422
Summary:
Improve troubleshooting section to include details on how to find and stop process using port on Windows.
Closes https://github.com/facebook/react-native/pull/9997
Differential Revision: D3893954
Pulled By: hramos
fbshipit-source-id: 2670b94c02b42516f8f610977b282032f3202a8b
Summary:
This PR restores some [additional detail](http://facebook.github.io/react-native/releases/0.28/docs/getting-started.html) that was removed from the Android Getting Started this summer.
I'm not fully restoring the original list of steps as the React Native website should not be the source of truth for setting up an Android development environment.
Closes https://github.com/facebook/react-native/pull/9867
Differential Revision: D3887834
Pulled By: fredemmott
fbshipit-source-id: 8e3599f8945ba68f31dc9b0f79c2db7e525e7f45
Summary:
Both of the links were pointing to the same (`react`) repo, but shouldn't have.
Obvious enough :)
Closes https://github.com/facebook/react-native/pull/9923
Differential Revision: D3870481
Pulled By: JoelMarcey
fbshipit-source-id: b35c963c65fd0b253d076d83a4a1276c134b81d2
Summary:
Added details about how IOS Native Modules can be initialized & registered manually with custom initializers so that dependencies can be injected to said modules.
Please let me know if there is a more appropriate place to detail this in the documentation or this is in fact detailed elsewhere; I also believe we do not have documentation on how to do the equivalent on Android, however it is a bit more obvious as the automatic MACRO registration mechanism does not exist on Android and modules need to be initialized manually anyway. As I currently understand there isn't currently any documentation detailing this apart from comments in the source.
Please let me know if you would require any style changes (variable names etc), to be more en-keeping with the rest of the documentation.
Closes https://github.com/facebook/react-native/pull/8406
Differential Revision: D3843018
Pulled By: javache
fbshipit-source-id: 5f4001df32d1ddc00a9dacc4fc99b63b408f1536
Summary:
It took me a few timeslots of my life to figure out how to make this work. First, I tried to break into 2 files. The app export made no sense to me. But after doing that, I discover a invalid token, the return() was not supposed to be there. So I fixed the sample.
Closes https://github.com/facebook/react-native/pull/9802
Differential Revision: D3841320
Pulled By: mkonicek
fbshipit-source-id: 999227ee1c234b92d34844c2370ef654116b6a1d
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/9539
Differential Revision: D3840413
Pulled By: hramos
fbshipit-source-id: 9161020f63c6099343fda54de7cb94025d0e461e
Summary:
Should help people with less xcode experience.
Closes https://github.com/facebook/react-native/pull/9748
Differential Revision: D3819960
Pulled By: mkonicek
fbshipit-source-id: 2d73611a5ed7261c95eded2f3e20eeb660527cdc
Summary:
I was following the Native Modules guide for iOS, when I noticed this error in the example code:
> Argument 2 (NSNumber) of CalendarManager.addEvent has unspecified nullability but React requires that all NSNumber arguments are explicitly marked as `nonnull` to ensure compatibility with Android.
Marking the parameter NSNumber type as `nonnull` fixes the error in the example.
Closes https://github.com/facebook/react-native/pull/9705
Differential Revision: D3804661
Pulled By: JoelMarcey
fbshipit-source-id: 92ec8a08ff2a179e4a8935de4cecd7b8d993469b
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/9556
Differential Revision: D3764387
fbshipit-source-id: 71cc80eff351298c1b3ac5a134191a7b64ea649c
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/9442
Differential Revision: D3740902
Pulled By: JoelMarcey
fbshipit-source-id: 6b3532faa7104813a515db6f7a24f6b05a2a5ffc
Summary:
It seems like it's not written in es6, hence no arrow functions, therefor we must have the function tag for it to work?
Closes https://github.com/facebook/react-native/pull/9463
Differential Revision: D3736797
fbshipit-source-id: c41bbd5f6867aa0f7668f8562e69dc2812eba80a
Summary:
The end of the Wikipedia link has a parenthesis, which was incorrectly used as end of markdown format for link.
Closes https://github.com/facebook/react-native/pull/9429
Differential Revision: D3722972
Pulled By: javache
fbshipit-source-id: af00f0291f00c6f2bf9bfeb7555fecd957cc6925
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/9388
Differential Revision: D3715004
fbshipit-source-id: c12abcdd54ae1176aaf666eed520b85e2f8db6bd
Summary: This removes asset data that is not used at runtime from the bundle.
Reviewed By: javache
Differential Revision: D3628486
fbshipit-source-id: 33cd579c904e0b0e29502df39a4ff92cad43367c
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/9289
Differential Revision: D3684467
Pulled By: hramos
fbshipit-source-id: 625b01f1e21c526048832d2c4af0d37f02fed44e
Summary:
via commit 8c29a52c54 , the way has changed building offline bundle. So this commit update the docs about that.
Closes https://github.com/facebook/react-native/pull/9186
Differential Revision: D3682643
Pulled By: JoelMarcey
fbshipit-source-id: 3e4127ca0c00f254dc3464e73c1c2496c0710b85
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
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
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
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
Summary:
When trying sample code from the _Working with Scenes_ area of this page I see a warning and the example did not appear to work as expected. To fix this I updated the code to static so others following along will not see a warning about using a static property to define defaultProps. Also included is a screen capture of the warning message.
![react-native-warning-defaultprops](https://cloud.githubusercontent.com/assets/1053650/17271580/9d0e85fc-564d-11e6-9c58-f73ef708aade.png)
Closes https://github.com/facebook/react-native/pull/9108
Differential Revision: D3647366
fbshipit-source-id: 93b152756e6351614caf4ae1d5f45bac893fdf7b
Summary:
Beause I found `Switch` can't work beause the app theme set `showText` to true. It works when the theme is sett to `Theme.AppCompat.Light.NoActionBar`.
Maybe it is necessary to let users knows this and set the default theme to `Theme.AppCompat.Light.NoActionBar`.
Closes https://github.com/facebook/react-native/pull/9086
Differential Revision: D3643082
Pulled By: JoelMarcey
fbshipit-source-id: bcf6e5315753dcde6ce171018999334bcfe2c1ba
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/8869
Differential Revision: D3580218
Pulled By: JoelMarcey
fbshipit-source-id: 9f71825ed0a63739497ec7fa77081df0a72b6747
Summary:
The link to source of NativeMethodsMixin.js and ReactNativeBaseComponent.js in direct manipulation page is broken, fix it.
Closes https://github.com/facebook/react-native/pull/8774
Differential Revision: D3564954
Pulled By: JoelMarcey
fbshipit-source-id: 315fdbc5186b3f13e71ec84c9e683a7caaef1cfd
Summary:
I might be a little pedantic here but it is what it is ;-)
Closes https://github.com/facebook/react-native/pull/8783
Differential Revision: D3561962
Pulled By: hramos
fbshipit-source-id: b44af2c1a2586bb6f8b2460631b8fe208b925c4d
Summary:
Link was missing /js in the url
Closes https://github.com/facebook/react-native/pull/8759
Differential Revision: D3558907
Pulled By: hramos
fbshipit-source-id: 87eca5f5af5e2c2918f562511092511ef20b6e79
Summary:
We had rendering support for prev links, but we never had any previous links in our metadata. Only next links. This adds that support to both Guides and APIs.
**For guides**: `previous` is manually inserted into the metadata of the actual markdown file.
**For APIs/Components**: `previous` is established via code within `extractDocs.js`
> This isn't totally perfect. For example, the transition from the last guide to the first API/component has a next link from the guide, but not a previous link from the API since the way you get the previous links are different from guides and APIs. But this gets us really close.
Closes https://github.com/facebook/react-native/pull/8754
Differential Revision: D3557972
Pulled By: hramos
fbshipit-source-id: e270bb51e7a4f59f61dad28ae0928d27d0af3d4a
Summary:
Fixes#8611.
Once this lands, we may want to cherry-pick it into 0.29 to fix the broken links.
Closes https://github.com/facebook/react-native/pull/8698
Differential Revision: D3544388
Pulled By: JoelMarcey
fbshipit-source-id: d5132b112e3079d1fd9ab6d84ff1a4328bee871f
Summary:
The documentation was not updated after this change : Implemented automatic IP detection for iOS (8c29a52)
Fixes#8651.
Closes https://github.com/facebook/react-native/pull/8660
Differential Revision: D3539749
fbshipit-source-id: fe3b37c446a8c37941adbb08c4301284950a176a
Summary:
'iOS' was written but it should be 'Android'.
Closes https://github.com/facebook/react-native/pull/8637
Differential Revision: D3530611
Pulled By: JoelMarcey
fbshipit-source-id: 04dbb2e2188f3de73f9bc185f18950bc5de5607b
Summary:
Right now systrace generates an html file that is using the Object.observe function which is now deprecated in most up to date browsers.
Since we don't want to depend on the systrace being up to date, we should advise opening the trace through the Tracing tool, since that is the only way to get it working until systrace removes its dependency on Object.observe.
Closes https://github.com/facebook/react-native/pull/7880
Differential Revision: D3516305
Pulled By: astreet
fbshipit-source-id: ab9ae46ba74b7a34b6cfb8c37ca1ec2e6b41e353
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82
Summary:
Not a big deal, I was just going through the tutorial trying to figure out which doc was the most boring, and improve it a bit. IMO now the example is slightly funnier, and it mentions onSubmitEditing which in practice is probably a more useful callback.
Closes https://github.com/facebook/react-native/pull/8447
Differential Revision: D3491938
Pulled By: JoelMarcey
fbshipit-source-id: 3bd0f5762dc4db4a85c9d5badb6c005f4b8c52f4
Summary:
Add note associating error message to "adb reverse" command. When I first ran a React Native app on my Android phone, I received a cryptic "bridge configuration isn't available" error. After some research, I discovered that the "adb reverse" command mentioned further down on the page resolved the problem.
Closes https://github.com/facebook/react-native/pull/7725
Differential Revision: D3491577
Pulled By: JoelMarcey
fbshipit-source-id: 34c580acd6bf3e7788b674bd0b41bc5a1023b010
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:
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:
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:
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
Summary:
Added some documentation to the `RunningOnDeviceAndroid.md` with screenshots to set custom port
Closes https://github.com/facebook/react-native/pull/8355
Differential Revision: D3475846
Pulled By: mkonicek
fbshipit-source-id: 73675b19e2bb93c859bda239f228da0883f0e305
Summary:
1. Animation guide page is the only place where Flowtype is used, it would be better to remove it to prevent some confusion.
2. ES2015 classes in guidelines docs pages and fixed some typos
**Test plan (required)**
Should i write any tests for this?
Closes https://github.com/facebook/react-native/pull/8339
Differential Revision: D3474192
Pulled By: bestander
fbshipit-source-id: 5531d1e399eaed0952732ac2e0bd1effc72d00a8
Summary:
The motivation is that the getting started page was not working in some cases in Firefox.
This line of code appears to be at best a no-op, at worst fails in Firefox, since "event" is undefined.
Closes https://github.com/facebook/react-native/pull/8335
Differential Revision: D3473333
Pulled By: JoelMarcey
fbshipit-source-id: 40581e83126675aa072c6ee25609cfb787015ce7
Summary:
> ListView is not supported by React Native Web as of yet, so it will not have it.
Closes https://github.com/facebook/react-native/pull/8331
Differential Revision: D3472019
Pulled By: lacker
fbshipit-source-id: e5fb430b6c8f4d437943c159beb00b9d9252c92d
Summary:
TLDR even more docs changes
So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes https://github.com/facebook/react-native/pull/8329
Differential Revision: D3471669
Pulled By: JoelMarcey
fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
Summary:
This is an improvement to basic components docs.
* I updated the basic components example code to better render components on iOS (added paddingTop).
* I also modified the code to allow reader to easily copy, paste, and then run the code in their project if they followed the 'Getting Started' quick start guide.
* I also added additional copy to clarify suggested usage/guidelines.
Closes https://github.com/facebook/react-native/pull/8292
Differential Revision: D3469943
Pulled By: JoelMarcey
fbshipit-source-id: 21ff6ee13b59741c43d80aab68a38aace0fbfca6
Summary:
Some of these will be in basics, guides and apis instead. One less layer
of confusion.
> Note: APIs are not totally alphabetical any longer -- but neither were
Polyfills. We can fix that in `extractDocs.js` maybe. But not worth doing
in this pull request, imho.
Closes https://github.com/facebook/react-native/pull/8293
Differential Revision: D3469684
Pulled By: JoelMarcey
fbshipit-source-id: 4f7830ca10b8e4406df9cec8bf13ff150e355250
Summary:
The new Handling Touches guide provides an overall view of how touches can be handled. It is meant to be a higher level discussion of basic touch handling, e.g. "how do I implement a button?". The existing Gesture Responder System guide has been moved to the end of the docs and is still available for reference when building custom gesture handlers.
Reference: #8160
![handlingtouchesguide](https://cloud.githubusercontent.com/assets/165856/16256634/50a20c92-3808-11e6-8a5b-b49f2cda9fca.png)
Closes https://github.com/facebook/react-native/pull/8299
Differential Revision: D3469681
Pulled By: JoelMarcey
fbshipit-source-id: 3bc18e759b26c2d5c141b626acb433c5e973cef0
Summary:
I spent so much time trying to optimize my JS without noticing this.
Closes https://github.com/facebook/react-native/pull/8285
Differential Revision: D3468707
fbshipit-source-id: bd5ff38ca2501891318b4be3c75bdaa10a4c64da
Summary:
Simplify the sidebar. We have Twitter feed in support. These have
a community feel as well.
Closes https://github.com/facebook/react-native/pull/8287
Differential Revision: D3467042
Pulled By: lacker
fbshipit-source-id: 60749d0cb31f284dae7c5402bfcde7b4d01aa32f
Summary:
Add basic information about the generic `ScrollView` -- talk a bit about how it renders elements and a quick compare against something like a `ListView`. Provide a simple example.
Fixes#8261
Closes https://github.com/facebook/react-native/pull/8266
Differential Revision: D3465105
Pulled By: JoelMarcey
fbshipit-source-id: 3a2e1eac6e877669763fc6b8bb0fc78ebe870ab1
Summary:
Add a message to let people know they can use the `--simulator` flag to run their apps on different simulators instead of the default "iPhone 6"
Closes https://github.com/facebook/react-native/pull/8078
Differential Revision: D3464912
Pulled By: JoelMarcey
fbshipit-source-id: b59d5061d2b3501618602932fcc285bac99b7573
Summary:
This is a followup to #8010. Troubleshooting has been updated to list only those issues that may affect a user that is setting up their environment. Any issues related to day to day use have been moved or merged into a more relevant doc.
Closes https://github.com/facebook/react-native/pull/8254
Reviewed By: caabernathy
Differential Revision: D3459018
Pulled By: JoelMarcey
fbshipit-source-id: dd76097af34bd33dda376fab39fb0f71061ef3e4
Summary:
Will create new issue to add more information to the `Components` section of the Tutorial
since that was gutted by this change.
Fixes#8156
Closes https://github.com/facebook/react-native/pull/8256
Differential Revision: D3459601
Pulled By: JoelMarcey
fbshipit-source-id: 4038afc463bffcf8efda36d29bc7c443bbc8f4bd
Summary:
Moving files that have generated PCHs causes an error that you cannot clear easily. Here are the instructions on how.
I was prompted to place this info here via #6797
Closes https://github.com/facebook/react-native/pull/7185
Differential Revision: D3453289
Pulled By: mkonicek
fbshipit-source-id: 8e16ea8f1bc3495209d1510a1caad2c6208c2e1e
Summary:
We currently have iOS and Android existing app integration guides. I have revamped these into a single tutorial, with three sections: Objective-C, Swift and Android.
For Objective-C and and Swift, the tutorial is now based on a more real world app - integrating a React Native-based high score screen into a 2048 app.
For expediency to get the iOS stuff out, for Android, *for now*, I have kept the existing documentation (with minor updates), but am planning to try to follow the same 2048 model for it as well.
This uses the same toggler as Getting Started
> I do note the copypasta of the toggler code. I am planning another separate pull request to make that more modular and reusable across all areas of the documentation on which it seems reasonable.
<img width="1277" alt="screenshot 2016-05-25 15 34 27" src="https://cloud.githubusercontent.com/assets/3757713/15558448/13c0aa1a-228f-11e6-9f38-5117d5824b84.png">
<img width="1260" alt="screenshot 2016-05-25 15 40 50" src="https://cloud.githubusercont
Closes https://github.com/facebook/react-native/pull/7764
Differential Revision: D3444455
Pulled By: JoelMarcey
fbshipit-source-id: 73dcdadd912177bb83b29099ff857046bf495939
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
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
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
Summary:
The Getting Started guide is one of the first documents a new user will encounter. This pull request aims to minimize the amount of time it takes to get a React Native app up and running.
* The original section title, "Required prerequisites", is redundant. "Installing React Native" is a better description of what this section is about.
* Detailed installation instructions for each of the required tools are delegated to the first party instructions where available.
* If the installation instructions already take care of installing the latest version, there's no need to warn the user about the minimum required version.
* Assume the user is familiar with Homebrew or Chocolatey, and defer installation instructions to the package manager's website. The installation and explanation of what a package manager is is out of scope within this document.
* Link to Node.js package manager instructions and let savvy Linux users use the pack
Closes https://github.com/facebook/react-native/pull/8010
Differential Revision: D3407029
Pulled By: JoelMarcey
fbshipit-source-id: c8b25d5b176c40eb58e5d7d3c6f13d43cde65166
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
(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/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).
For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas
Closes https://github.com/facebook/react-native/pull/7962
Differential Revision: D3397289
fbshipit-source-id: 21adf955af4a623f1ce71e7a5e412020ceaad12a
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
(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/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).
For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas
Closes https://github.com/facebook/react-native/pull/7951
Differential Revision: D3394509
Pulled By: JoelMarcey
fbshipit-source-id: 0ae23950c69ae06a4b85d2e4b577a71e9aa2b7f4
Summary:
Just updating the docs as .18 is quite old :)
Closes https://github.com/facebook/react-native/pull/7824
Differential Revision: D3371417
Pulled By: javache
fbshipit-source-id: 91b8249f814eeef68cbeff4b481624644dc7be73
Summary:
Previously, only Text and Image could be nested within Text. Now, any
view can be nested within Text. One restriction of this feature is
that developers must give inline views a width and a height via
the style prop.
Previously, inline Images were supported by using iOS's built-in support
for rendering images with an NSAttributedString via NSTextAttachment.
However, NSAttributedString doesn't support rendering arbitrary views.
This change adds support for nesting views within Text by creating one
NSTextAttachment per inline view. The NSTextAttachments act as placeholders.
They are set to be the size of the corresponding view. After the text is
laid out, we query the text system to find out where it has positioned each
NSTextAttachment. We then position the views to be at those locations.
This commit also contains a change in `RCTShadowText.m`
`_setParagraphStyleOnAttributedString:heightOfTallestSubview:`. It now only sets
`lineHeight`, `textAlign`, and `writingDirection` when they've actua
Closes https://github.com/facebook/react-native/pull/7304
Reviewed By: javache
Differential Revision: D3365373
Pulled By: nicklockwood
fbshipit-source-id: 66d149eb80c5c6725311e1e46d7323eec086ce64
Summary:
The API for `ActivityIndiatorIOS` and `ProgressBarAndroid` is very similar and can be merged in a cross platform component that displays a circular indeterminate loading indicator.
This deprecates `ActivityIndiatorIOS` and non-horizontal `ProgressBarAndroid` in favor of this new component.
**Test plan (required)**
Tested with the ActivityIndicator example in UIExplorer on android and ios. Also made sure that `ActivityIndicatorIOS` still works and displays a deprecation warning. Also tested that `ProgressBarAndroid` with `indeterminate == true` and `styleAttr != 'Horizontal'` displays a deprecation warning.
Closes https://github.com/facebook/react-native/pull/6897
Differential Revision: D3351607
Pulled By: dmmiller
fbshipit-source-id: b107ce99d966359003e8b3118cd97b90fa1d3d7d
Summary:
Based on https://github.com/facebook/react-native/pull/7470, fixing the case when an existing Android app uses React Native as well as 3rd-party React Native modules.
With this PR Gradle should always pick up React Native binaries from node_modules rather than fetching old binaries from JCenter.
Closes https://github.com/facebook/react-native/pull/7759
Differential Revision: D3348640
fbshipit-source-id: 7509eb54bba6e59cf7f4a116bf444fc4983d2d33
Summary:
Currently XHR also supports Android platform, so document should include this information.
Closes https://github.com/facebook/react-native/pull/7729
Differential Revision: D3345168
fbshipit-source-id: 8dee7d573a47aede5dc5be97640fc711747df65c
Summary:
Fixing JSX tag in DirectManipulation section of the docs
Closes https://github.com/facebook/react-native/pull/7622
Differential Revision: D3321130
fbshipit-source-id: e315529dc94c88597e4855a63ba6931301d4dba7
Summary:
Right now, if you do a search and select a document in Getting Started, it will
always default to iOS/Mac. This adds a bit of JavaScript to do a best effort
selection based on the hashtags of the headers.
If a header is associated with multiple environments (e.g., Android Studio), we
just choose the first one. So it is not 100% perfect, but it is decent.
ref: https://github.com/facebook/react-native/issues/7574
** Test Plan **
Test locally by adding hash tags to the end of a doc URL and ensured that the toggler had the right
selection.
e.g., `http://localhost:8079/react-native/docs/getting-started.html#chocolatey` had `Android` and `Windows` chosen.
Closes https://github.com/facebook/react-native/pull/7608
Differential Revision: D3316802
Pulled By: JoelMarcey
fbshipit-source-id: 6e94d76725fb97b19b3708ddee8fba5df9350cdd
Summary:
Create the initial Core Components tutorial. The core components are `Text`, `Image`, `View`, `TextInput`, `ListView`.
1. Provide a summary for each core component, including a runnable sample.
2. Allow the tutorials for each component to be extended with more details and detailed examples, particularly after we add other tutorials (i.e., around state and props).
3. The samples should be runnable in a React Native simulator, if we can get that going in the docs.
4. Reorganize the docs sidebar to make the current Tutorial actually a Sample App, etc.
Closes https://github.com/facebook/react-native/pull/7593
Differential Revision: D3313563
Pulled By: JoelMarcey
fbshipit-source-id: cfe1d397d60822b8c531405d66b4e73694c7dbf9
Summary:
Previously, only Text and Image could be nested within Text. Now, any
view can be nested within Text. One restriction of this feature is
that developers must give inline views a width and a height via
the style prop.
Previously, inline Images were supported by using iOS's built-in support
for rendering images with an NSAttributedString via NSTextAttachment.
However, NSAttributedString doesn't support rendering arbitrary views.
This change adds support for nesting views within Text by creating one
NSTextAttachment per inline view. The NSTextAttachments act as placeholders.
They are set to be the size of the corresponding view. After the text is
laid out, we query the text system to find out where it has positioned each
NSTextAttachment. We then position the views to be at those locations.
This commit also contains a change in `RCTShadowText.m`
`_setParagraphStyleOnAttributedString:heightOfTallestSubview:`. It now only sets
`lineHeight`, `textAlign`, and `writingDirection` when they've actua
Closes https://github.com/facebook/react-native/pull/7304
Differential Revision: D3269333
Pulled By: nicklockwood
fbshipit-source-id: 2b59f1c5445a4012f9c29df9f10f5010060ea517
Summary:
Motivation: Fix the documentation so that others don't stumble.
**Test plan**: Integrating RN into an existing Android app doesn't cause the `ConnectivityManagerCompat` exception anymore.
---
The instructions where still pointing at maven central. This updates the dependency and provides instructions on how to reference the local maven folder in `node_modules`.
Closes https://github.com/facebook/react-native/pull/7586
Differential Revision: D3309932
fbshipit-source-id: 8e4fc4c0ae5641af886c9d9a0feb1c8172e94fcf
Summary:
1. Remove note about upgrading Homebrew packages. That was kind of noisy.
2. Use local images instead of those stored on Akamai.
3. Add wording for modifying test project about actually opening a file.
4. Add note about keeping initial defaults for Android Studio install in tact.
Tested site locally. Images and new wording appeared as expected.
Closes https://github.com/facebook/react-native/pull/7477
Reviewed By: vjeux
Differential Revision: D3281639
Pulled By: JoelMarcey
fbshipit-source-id: ca956d97293ac3793431cb54f3560ee3e52c0dce
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
(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/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).
For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas
Closes https://github.com/facebook/react-native/pull/7485
Differential Revision: D3281418
Pulled By: vjeux
fbshipit-source-id: 287b66f1ed9690bf488cf646f8eaf02e2956caa5
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
(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/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).
For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas
Closes https://github.com/facebook/react-native/pull/7471
Differential Revision: D3276360
Pulled By: JoelMarcey
fb-gh-sync-id: 30edd7086a3c4b88695dc91af76ef56d43306ce9
fbshipit-source-id: 30edd7086a3c4b88695dc91af76ef56d43306ce9
Summary:
Hi,
The [commit](156d3ed7a2?_pjax=%23js-repo-pjax-container) by JoelMarcey is much appreciated. However, when you click on the nav buttons in Firefox (v46.0.1, I'm on El-Capitan), it will switch the content but also navigate you to the React-Native homepage. This doesn't happen in Chrome, so that's how it probably slipped through.
I propose these changes to fix that.
**Test plan**
Tested locally on FF and Chrome on El-Capitan
Closes https://github.com/facebook/react-native/pull/7435
Differential Revision: D3276285
Pulled By: vjeux
fb-gh-sync-id: c9a14059e609297fe273d02fe6c0a5f98ec7060c
fbshipit-source-id: c9a14059e609297fe273d02fe6c0a5f98ec7060c
Summary:
This simplifies the Quick Start section of the React Native documentation into
two pages. A Getting Started and a Tutorial.
The Getting Started page uses some CSS and Javascript magic (thanks vjeux for
the initial infra for this!!) to allow selection between platforms and have
instructions for Getting Started with React Native be shown according to the
selection -- all within the same page, realtime. A much cleaner interface.
I have made a pretty large presentation and information overhaul for each
platform as well. For example, requiring Android Studio for Android
development to make the Android SDK and build tools installation easier.
I added more screenshots to the Android sections since they are more complicated
than the more straightforward iOS. Screenshots for Android for Windows, Linux and
iOS are available now.
Some of the other pages such as `GettingStartedOnLinux` are now obsolete and deleted.
** Test Plan **
Tested locally and navigation works.
Closes https://github.com/facebook/react-native/pull/7418
Differential Revision: D3268621
Pulled By: vjeux
fb-gh-sync-id: 65f9181c9f959fadeffd254efddc5b64816eb1f4
fbshipit-source-id: 65f9181c9f959fadeffd254efddc5b64816eb1f4