Summary:
**Breaking Change Notes**
To adapt to the breaking change, app developers that are consuming React Native through CocoaPods must update their Podfile to refer to yoga with a lowercase "y". In other words:
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
Must be changed to (note the lowercase "y"):
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
**Symptom**
If you consume React Native as a CocoaPod and consume a third-party React Native module not as a CocoaPod, you will receive a `nonportable-include-path` warning in Xcode >= 8.3.
**Details**
Xcode 8.3 introduced -Wnonportable-include-path which triggers if you import a header using different casing than the path to the header on disk. This triggers when consuming React Native as a CocoaPod from a library that isn't a CocoaPod. React Native imports Yoga using paths like this:
#import <yoga/Yoga.h>
Which means Yoga's headers are expected to be located in a directory called "yoga" with a lowercase "y". However, when React Native is a CocoaPod the Yoga headers for non-CocoaPods end up in the directory "$(BUILT_PRODUCTS_DIR)/Yoga".
To fix this such that Yoga's headers end up in "$(BUILT_PRODUCTS_DIR)/yoga" (note the lowercase "y"), I've changed Yoga's podspec name to have a lowercase "y".
**Test Plan**
Created a test app where React Native is consumed as a CocoaPod. Added the react-native-maps library to the project and configured it to not be consumed through CocoaPods. Verified that the app compiles properly without the `nonportable-include-path` warnings.
Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/15527
Differential Revision: D5706338
Pulled By: javache
fbshipit-source-id: 090daa2c3ebb1c66bd467e78a1e91791dbb06651
Summary:
fix a typo on linux keyboark ( Use `ctrl` instead of `command` )
Closes https://github.com/facebook/react-native/pull/15565
Differential Revision: D5666988
Pulled By: TheSavior
fbshipit-source-id: 3e796f4e155c6c76ce1b7c0f2b473a8f64e1d0bd
Summary:
It's probably better to link to main NDK page than downloads section.
Closes https://github.com/facebook/react-native/pull/13764
Differential Revision: D5661133
Pulled By: hramos
fbshipit-source-id: 18a54cada38bb894f2535e26b218818a854d699f
Summary:
Hopefully, this will save an hour of WTFs for the next reader.
Closes https://github.com/facebook/react-native/pull/14876
Differential Revision: D5385881
Pulled By: hramos
fbshipit-source-id: 56961e8a5eb3b6fae4f92c7fb9fea1e1147a3521
Summary:
We sometimes get large PRs that sit for a long time without being reviewed. In some cases, the PR touches too many files or lines, and the author would benefit from splitting the PR into smaller easier-to-review PRs. In this PR, we automatically flag such PRs using the existing Danger PR automation functionality.
This PR achieves the objective by doing the following:
* Add facebook-open-source-bot to `IssueCommands.txt`, allowing it to add labels and close issues/PRs via facebook-github-bot commands.
* Adds a `large-pr` command to facebook-github-bot. This command will add a short blurb, apply a new "Large PR" label, and close the PR.
* Updates the Dangerfile to check for PRs that touch over 600 lines and/or files. In such cases it will warn and then issue the large-pr command.
Additional changes:
* Tag core contributor PRs with the "Core Team" label. This is a slight change in policy, in that the label used to be applied after the fact (after the PR was escalated for review). It's more convenient to monitor labels, so we'll start checking for PRs tagged as such and ensure they get escalated as needed. cc skevy
Thanks to TheSavior for suggesting this change.
Testing against PR #10084 which touches over 600 lines:
```
$ cd danger
$ DANGER_GITHUB_API_TOKEN="e622517d9f1136ea8900""07c6373666312cdfaa69" npm run danger pr https://github.com/facebook/react-native/pull/10084
> @ danger /Users/hramos/git/react-native/danger
> node ./node_modules/.bin/danger "pr" "https://github.com/facebook/react-native/pull/10084"
{
fails: [],
warnings: [
{
message: "📋 Test Plan - <i>This PR appears to be missing a Test Plan.</i>"
},
{
message: "❗ Big PR - <i>This PR is extremely unlikely to get reviewed because it touches 613 lines.</i>"
}
],
messages: [],
markdowns: ["facebook-github-bot label Needs more information", "facebook-github-bot large-pr"]
}
```
Result: successfully flagged as being a large PR.
Closes https://github.com/facebook/react-native/pull/15519
Differential Revision: D5647085
Pulled By: hramos
fbshipit-source-id: dfa0f6580b9373085eba856de257a8d2452efbdc
Summary:
Thanks for submitting a PR! Please read these instructions carefully:
- [x ] Explain the **motivation** for making this change.
- [x ] Provide a **test plan** demonstrating that the code is solid.
- [x ] Match the **code formatting** of the rest of the codebase.
- [x ] Target the `master` branch, NOT a "stable" branch.
The section on changing ports is missing a key step for folks wishing to run on device
What existing problem does the pull request solve?
Changing packager port to something other than 8081 also requires the react native xcode project file to be updated in order to be able to build and run on device. The section on changing ports currently does not address this. See https://github.com/facebook/react-native/issues/10715#issuecomment-258082512.
Documentation update, no tests required.
A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website. See [What is a Test Plan?][1] to learn more.
If you have added code that should be tested, add tests.
Sign the [CLA][2], if you haven't already.
Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
Make sure all **tests pass** on both [Travis][3] and [Circle CI][4]. PRs that break tests are unlikely to be merged.
For more info, see the ["Pull Requests"][5] section of our "Contributing" guidelines.
[1]: https://medium.com/martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
[2]: https://code.facebook.com/cla
[3]: https://travis-ci.org/facebook/react-native
[4]: http://circleci.com/gh/facebook/react-native
[5]: https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#pull-requests
Closes https://github.com/facebook/react-native/pull/14293
Differential Revision: D5647393
Pulled By: hramos
fbshipit-source-id: 040c3edea7d25c0efe560d5df30e86e1f26355bc
Summary:
**Motivation**
Fix flickering in TabBarIOS on Apple TV... issue #15081
After this change, on Apple TV, TabBarIOS item selections will be controlled purely from the native side after initial render with the `selected` prop. This is necessary because the `UITabBar` implementation in tvOS moves the selection before calling `shouldSelectViewController:`; this issue does not occur on iOS.
**Test plan**
Existing CI should still pass. Issue is resolved when testing the example code in #15081 .
Closes https://github.com/facebook/react-native/pull/15220
Differential Revision: D5601671
Pulled By: javache
fbshipit-source-id: c18e7d3482d6c07d534ff40a443a6f642d4267bb
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
Help us understand your motivation by explaining why you decided to make this change.
You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html
Happy contributing!
-->
I saw a word missing; I just wanted to correct the typo.
No testing needed for a typo in the documentation
Closes https://github.com/facebook/react-native/pull/15393
Differential Revision: D5601466
Pulled By: javache
fbshipit-source-id: 7cfb6ba957ac4053fd8645af419a7be2361c6c75
Summary:
I just worked with a fellow dev who was switching to flatlist and ended up pretty surprised at the performance drop. The measurement had an exponential bridge saturation, causing flatlist to lose to a scrollview!
We knew something was up, but a little note in the docs would have helped.
Closes https://github.com/facebook/react-native/pull/15400
Differential Revision: D5579483
Pulled By: sahrens
fbshipit-source-id: 2cc2488b6332db4f4d644c67f180088d3a5874a8
Summary:
Several changes here. The `Text.md` and `PixelRatio.md` files were appended to the autodocs during site generation. This seemed excessive for just two files, so I've just merged the content into the autodocs themselves. It should help us simplify the website generation process in the future.
I've also merged IssueGuidelines.md and PullRequestGuidelines.md into the Contribution/Maintainers guidelines to improve their visibility.
Finally, I renamed Help to Community in the nav bar.
Ran the website locally, and verified every page rendered as expected: the Community page, Contributing page, Maintainers page.
Closes https://github.com/facebook/react-native/pull/15374
Differential Revision: D5567400
Pulled By: hramos
fbshipit-source-id: e06056edb12c9a17319fe1af46b2ef3a2e1b5854
Summary:
What existing problem does the pull request solve?
Ensure users of the React Native platform are aware of transform properties they must have while using `useNativeDriver` with the Animated API.
Not applicable.
I've been messing around with this for a couple of days at this point and feel a bit silly. See this issue [here](https://github.com/facebook/react-native/issues/13522). This would have saved me some time and will likely save others time as well.
Thank you for taking the time to look over this PR. Cheers!
Closes https://github.com/facebook/react-native/pull/13524
Differential Revision: D5567584
Pulled By: hramos
fbshipit-source-id: 4be9f1ba0f21148106f596efb0be791d4d364a66
Summary:
properties that has been set before -> properties that have been set before
Closes https://github.com/facebook/react-native/pull/15370
Differential Revision: D5563802
Pulled By: hramos
fbshipit-source-id: 288032555308a7e89ac365ff091b01ca381d4c80
Summary:
I added troubleshooting docs for connection to the development server from device, otherwise it's maybe hard to find out why it's not working.
Due to a disparity in what GitHub's API return the original PR (https://github.com/facebook/react-native/pull/14885) couldn't get imported, so I created a new PR as hramos suggested.
Closes https://github.com/facebook/react-native/pull/15304
Differential Revision: D5537615
Pulled By: hramos
fbshipit-source-id: b94e887b1b771be9e93854124bd0a56b27fd0097
Summary:
This change (initially discussed in https://github.com/react-community/create-react-native-app/issues/26) moves the HelloWorld project template from two nearly identical entry points (`index.android.js` and `index.ios.js`) to a single, minimal `index.js` entry point. The root component is created in `App.js`. This unifies the project structure between `react-native init` and Create React Native App and allows CRNA's eject to use the entry point from the HelloWorld template without any hacks to customize it. Also examples in the docs can be just copy-pasted to `App.js` the same way in both HelloWorld and CRNA apps without having to first learn about `AppRegistry.registerComponent`.
* Created a new project from the template using `./scripts/test-manual-e2e.sh` and verified that:
* The app builds, starts and runs both on Android and iOS.
* Editing and reloading changes works.
* The new files (`index.js`, `App.js`, `__tests__/App.js`) get created in the project folder.
<img width="559" alt="screen shot 2017-08-01 at 19 10 51" src="https://user-images.githubusercontent.com/497214/28835171-300a12b6-76ed-11e7-81b2-623639c3b8f6.png">
<img width="467" alt="screen shot 2017-08-01 at 19 09 12" src="https://user-images.githubusercontent.com/497214/28835180-33d285e0-76ed-11e7-8d68-2b3bc44bf585.png">
<!--
Thank you for sending the PR!
If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!
Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.
Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15312
Differential Revision: D5556276
Pulled By: hramos
fbshipit-source-id: 068fdf7e51381c2bc50321522f2be0db47296c5e
Summary:
I documented how to export consts from a swift native module.
Closes https://github.com/facebook/react-native/pull/15340
Differential Revision: D5556264
Pulled By: hramos
fbshipit-source-id: 0374f1c291e3c15424c8e53fef7ab30c60643165
Summary:
**Motivation**
Properly support long presses on the Apple TV remote, and also enable dev menu functionality on a real Apple TV device (shaking an Apple TV doesn't work 😄 )
**Test plan**
New example added to `RNTester`.
Closes https://github.com/facebook/react-native/pull/15221
Differential Revision: D5526463
Pulled By: javache
fbshipit-source-id: a61051e86bc82a9561eefc1704bed6b1f2617e05
Summary:
setSource() method of ReactImageView class accepts a ReadableArray and not a plain String.
<!--
Thank you for sending the PR!
If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!
Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.
Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15280
Differential Revision: D5526483
Pulled By: javache
fbshipit-source-id: 5bc8ca8e7e030f5a4968cccf8fcb7431612e1836
Summary:
The name should be "MyReactNativeApp" otherwise it gives error that the HelloWorld Application is not found
<!--
Thank you for sending the PR!
If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!
Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.
Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15251
Differential Revision: D5518727
Pulled By: hramos
fbshipit-source-id: d9a2eac4698927f17f25a2316bd5674bb227821e
Summary:
Adds a new maintainers guide, and updates the contributor's guide to be consistent with regards to this new guide.
Some additional style changes made in order to support the display of bot commands. Changed the wording for the "Edit this page on GitHub" link.
Finally, the contributor's guide is now synced to `CONTRIBUTING.md` on the repo.
```
cd website && npm start
```
Verify that `CONTRIBUTING.md` is updated whenever the website is regenerated.
Verify everything rendered correctly. Expand the details below to see screenshots.
<details>
![screencapture-localhost-8079-react-native-docs-contributing-html-1501016495792](https://user-images.githubusercontent.com/165856/28593706-33d1e03c-7142-11e7-9878-04ead7561abc.png)
![screencapture-localhost-8079-react-native-docs-maintainers-html-1501016508744](https://user-images.githubusercontent.com/165856/28593719-3812d7fa-7142-11e7-9db2-f9599057d726.png)
</details>
Closes https://github.com/facebook/react-native/pull/15202
Differential Revision: D5494246
Pulled By: hramos
fbshipit-source-id: e28d5624d1e4795e212f10e8d5713d91a0eae15f
Summary:
…imated API
<!--
Thank you for sending the PR!
If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!
Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.
Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15215
Differential Revision: D5501206
Pulled By: hramos
fbshipit-source-id: 827494688f405de3e84401460bddf5df17aa497b
Summary: We're focusing the React Native core on a set of high quality essential components and will be removing any modules that do not belong in that set. If you're currently using AdSuppportIOS, it will remain available in the react-native-deprecated-modules archive. There's also alternative implementations such as https://github.com/ptomasroos/react-native-idfa/.
Reviewed By: hramos
Differential Revision: D5388632
fbshipit-source-id: ce6204512b61242a0ba8c731836f3b3b7239b4b0
Summary:
NavigatorIOS push method arg is route object.
For working this image animation,
add passProps property to NavigationIOS,
changed _onForward function navigator.push method arg is route object
<!--
Thank you for sending the PR!
If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!
Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.
Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15178
Differential Revision: D5481399
Pulled By: hramos
fbshipit-source-id: b131ef27b70fc0bbc4f519a924187c19dca73ed2
Summary:
Retry for https://github.com/facebook/react-native/pull/14830.
There was some problem with the import and hramos instructed to open a new PR with the same changes. See https://github.com/facebook/react-native/pull/14830#issuecomment-315146320 for more details.
-----
The tutorial pages tend to have a "follow to the next topic" section at the end of the text.
HandlingTextInput.md has handling-touches in the "next" in metadata, but the "follow to the next topic" section linked to ScrollView tutorial page. Thus, the "follow to the next topic" section in the text is updated also to point to handling-touches.
Closes https://github.com/facebook/react-native/pull/15176
Differential Revision: D5480608
Pulled By: hramos
fbshipit-source-id: 5161d1acad6a3f0401fd5d15d5ff29a0701a1211
Summary:
This part of the documentation was outdated since v0.46. :)
Closes https://github.com/facebook/react-native/pull/15151
Differential Revision: D5478408
Pulled By: shergin
fbshipit-source-id: a9d442560ad2768a684b9bbb11285b5f20f9d00d
Summary:
Follow up on https://github.com/facebook/react-native/issues/14436
hramos:
> MapViewIOS was removed a couple of versions ago. No one has touched this guide in a while, so unless someone volunteers to get it back up to date, we'll probably end up removing it from the docs.
I'm volunteering to get it back up to date!
- Fixed broken code examples
- Swapped out `pitchEnabled` for `zoomEnabled`, needs less explaining and it's easier to test on a simulator.
- Renamed RNTMap to RNTMapView for clarity.
- Renamed inconsistent `onChange`s to onRegionChange`.
- Swapped out 'vending' for 'exposing'.
I wasn't really sure about the last 3 points. I think it's more clear like this, but please review.
I'll add some review comments as well.
Closes https://github.com/facebook/react-native/pull/14991
Differential Revision: D5416319
Pulled By: hramos
fbshipit-source-id: bc70942a66acc5e3967b245af8271a1d2465ab60
Summary:
You need to add CxxBridge or BatchedBridge as a dependency while we have both. When we stop shipping the BatchedBridge in OSS, this requirement will disappear again.
Closes https://github.com/facebook/react-native/pull/15084
Differential Revision: D5446885
Pulled By: javache
fbshipit-source-id: aa0023cc08e97fc59e2071a3750f98026e34fd0d
Summary:
Conflict in the project name in package.json and index.xxx.js
<!--
Thank you for sending the PR!
If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!
Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.
Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/14940
Differential Revision: D5398809
Pulled By: hramos
fbshipit-source-id: 0ed12e8a39e5c477594396b4b781acd8a93f429d
Summary:
Also: move `Button` down to UI, and `StyleSheet` up to Basic Components.
Closes https://github.com/facebook/react-native/pull/14405
Differential Revision: D5209838
Pulled By: hramos
fbshipit-source-id: ffcd3a146a5c277f8d7e824c9a7595d2e7b720ae
Summary:
It is quite confusing that the 'data:' uri scheme is not documented, but working.
It is very useful when getting e.g. an icon from a REST call.
Closes https://github.com/facebook/react-native/pull/14827
Differential Revision: D5392326
Pulled By: hramos
fbshipit-source-id: 815851c27273f99ce281fb35fc6fbcf8cf781ff9
Summary:
If not you will try to start the service but nothing would happen
<!--
Thank you for sending the PR!
If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!
Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.
Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/14813
Differential Revision: D5384460
Pulled By: hramos
fbshipit-source-id: 6131d7901d3324da97672141c4774b7810051526
Summary:
This replaces all uses of `React.createClass` with `createReactClass` from the `create-react-class` package, attempting to match use of `var` and `const` according to local style.
Fixes#14620
Refs #14712
Closes https://github.com/facebook/react-native/pull/14729
Differential Revision: D5321810
Pulled By: hramos
fbshipit-source-id: ae7b40640b2773fd89c3fb727ec87f688bebf585
Summary:
Project won't build otherwise
<!--
Thank you for sending the PR!
If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!
Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.
Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/14835
Differential Revision: D5375496
Pulled By: javache
fbshipit-source-id: 415abb0fd257a4f871acbcb89be26b10b96a01c6
Summary:
How to load images from the Android assets folder was undocumented, and took us a little while to find out how to do it.
This is a documentation-only change.
To confirm the syntax works create a sample app with an image at `android/app/src/main/assets/foo.png`.
Then add JSX `<Image style={{width:100, height:100}} source={{uri: 'asset:/foo.png'}} />`.
See that the image is rendered (Android only).
Closes https://github.com/facebook/react-native/pull/14626
Differential Revision: D5316887
Pulled By: AaaChiuuu
fbshipit-source-id: f7d07b8b83d6460de86c1a2efac0955300cfcd78