Summary:Building React Native for Android from source the first time is quite slow. A large part of the time is spent downloading the Boost C++ library. If the code is already present on the system, there's no need to download it.
**Test plan**
CircleCI tests on this pull request. The env variable is not defined on CircleCI so this pull request should have no effect.
Closes https://github.com/facebook/react-native/pull/7116
Differential Revision: D3207397
Pulled By: mkonicek
fb-gh-sync-id: 3454947f6c90fda0d8d2cbb17a1af518e45b47fd
fbshipit-source-id: 3454947f6c90fda0d8d2cbb17a1af518e45b47fd
Summary:This is needed in cases when the Android Support Repository is on a non-standard path.
**Test plan (required)**
CircleCI tests on this pull request.
Closes https://github.com/facebook/react-native/pull/7096
Differential Revision: D3207267
Pulled By: mkonicek
fb-gh-sync-id: 7539407f485341352faadc3b07d2c1459e0527f5
fbshipit-source-id: 7539407f485341352faadc3b07d2c1459e0527f5
Summary:**Motivation:** I don't like storing credentials in config files and a safer solution is to store them in the Keychain Access app.
Therefore I added a link that describes how one may go about to store the passwords in the Keychain Access app in OSX instead.
Found a [stackoverflow post](http://stackoverflow.com/a/24480579/1836121) but it wasn't very detailed so I decided to write it up myself. I understand if you have some policy against external links to blogs and I guess we could link to the stackoverflow explanation then instead.
Closes https://github.com/facebook/react-native/pull/7089
Differential Revision: D3207215
fb-gh-sync-id: 8011b55efe41ec6d54ad665e0e6a79cb9d806779
fbshipit-source-id: 8011b55efe41ec6d54ad665e0e6a79cb9d806779
Summary:The default value for fontSizeMultiplier was zero. Although this was usually overriden with the correct value (typically 1.0), it sometimes wasn't resulting in a divide-by-zero in the text height calculation.
This diff corrects that bug by setting 1.0 as the default, and guarding against zero values being set.
I also fixed some suspicious logic that seemed to assume the result of BOOL && CGFloat would be 0 or the CGFloat value, which is true in JS but not in C (it would always be 0 or 1).
Reviewed By: javache
Differential Revision: D3179196
fb-gh-sync-id: cc09b104c9087fc1a2f45d8d3f70af221c2ad823
fbshipit-source-id: cc09b104c9087fc1a2f45d8d3f70af221c2ad823
Summary:To include a missing part of the fix to HMR on Windows that was done in 0.25rc. See c61100d0ce. Will need to also publish to npm.
cc ide grabbou
Closes https://github.com/facebook/react-native/pull/7076
Differential Revision: D3199977
fb-gh-sync-id: b97da3c91d3723eaa40f63550e053d224689d517
fbshipit-source-id: b97da3c91d3723eaa40f63550e053d224689d517
Summary:Fix a stroke bug.
Stroke path will be coverd by fill layer.
Fix it by stroke path after fill is done
Closes https://github.com/facebook/react-native/pull/7092
Differential Revision: D3203188
Pulled By: spicyj
fb-gh-sync-id: 9b950372822da4dc520552c0c31aa3435750a0a3
fbshipit-source-id: 9b950372822da4dc520552c0c31aa3435750a0a3
Summary:We had an issue where a rendered modal would not end up using the full screen size, but a size computed based on its initial content.
Which is a small spinner in case of RelayContainer. So rarely we would end up with cut off view like this:
{F60650629}
This diff fixes this behavior by wrapping the content in another view. That makes the modal's wrapping VC's view resize just once when it's initially created. (Resize for the wrapping VC's view happened previously when the modal's content resized, which got us in the bad state.)
Reviewed By: javache
Differential Revision: D3202299
fb-gh-sync-id: 7c4dc1dbb27654292d07aef5916aa31df5cd4302
fbshipit-source-id: 7c4dc1dbb27654292d07aef5916aa31df5cd4302
Summary:When JSC throws an error on startup (e.g. a SyntaxError) or when invoking a method that is not caught by RCTExceptionsManager, we previously just reported is a native error, with a (useless) native stack trace in the redbox. This changes that behaviour to report a JS stacktrace.
The same issue was previously reported here: https://github.com/facebook/react-native/pull/5677
Reviewed By: majak
Differential Revision: D3037387
fb-gh-sync-id: 06f8333e0eb50dcef0b26284754262301b8a5f08
fbshipit-source-id: 06f8333e0eb50dcef0b26284754262301b8a5f08
Summary:This is a reprise of #6327, but with iOS 7.0 compatibility and less `package.json` changes.
**Test Plan:** Load WebSocketExample in UIExplorer app and start websocket test server script (both provided in #6889) and test sending binary data on both iOS and Android
Closes https://github.com/facebook/react-native/pull/6961
Differential Revision: D3202022
Pulled By: mkonicek
fb-gh-sync-id: 38843d0a9c0172971c5c70a5139ded04042b280a
fbshipit-source-id: 38843d0a9c0172971c5c70a5139ded04042b280a
Summary:This is just the JS part of a bug reporting module that can be used with a pure JS flow or a native reporting
flow. It's handy for grabbing data from a bunch of random components, like the ids of the rows that are visible in a
list view at the time the bug is reported, or a description of the current navigation stack.
It's initialized in `AppRegistry` so it's always ready to go and bug reports will always include the universal
`runApplication` info, but won't actually do anything by default unless `collectExtraData` is called.
Note: some apps may call `runApplication` multiple times if they have multiple react native root views. This will just
overwrite the source so it will just report the most recently mounted one.
Reviewed By: foghina
Differential Revision: D3200203
fb-gh-sync-id: 8ed45fc9b289e8d9c50d3c85926213bd245d3ecc
fbshipit-source-id: 8ed45fc9b289e8d9c50d3c85926213bd245d3ecc
Summary:The initial layout used to render scenes does not contain the actual
width and height measured and causes the issue as described at
https://github.com/ericvicenti/navigation-rfc/issues/61
The fix is to update the layout and re-render scenes once layout
is modified. Also scenes renderer should also consider the case that
when the layout is not measured yet.
Reviewed By: ericvicenti
Differential Revision: D3162143
fb-gh-sync-id: 197574329d3849cad2a21e07e1bd5e800f74c3ea
fbshipit-source-id: 197574329d3849cad2a21e07e1bd5e800f74c3ea
Summary:This change adds native animated support for Animated.multiply nodes.
Animated.multiply allows for defining nodes that would output a product of values of the input nodes.
**Test Plan**
Run JS tests: `npm test Libraries/Animated/src/__tests__/AnimatedNative-test.js`
Run java tests: `buck test ReactAndroid/src/test/java/com/facebook/react/animated`
Closes https://github.com/facebook/react-native/pull/7071
Differential Revision: D3197663
fb-gh-sync-id: 35f64244a2482c487a81e5e7cd08f3c0e56d9b78
fbshipit-source-id: 35f64244a2482c487a81e5e7cd08f3c0e56d9b78
Summary:The require functions will keep the generate bytecode + lexical environment in
memory unnecessarily, since we can be sure that it will be executed at most once
Reviewed By: davidaurelio
Differential Revision: D3168257
fb-gh-sync-id: 038e1bc08abea94ee52d0390b6aced5fb652f493
fbshipit-source-id: 038e1bc08abea94ee52d0390b6aced5fb652f493
Summary:added app to website/showcase.js that is built with React Native.
Closes https://github.com/facebook/react-native/pull/7018
Differential Revision: D3196127
Pulled By: mkonicek
fb-gh-sync-id: e4f29f00eaf2f8cd1eab53fe83822c6480baa511
fbshipit-source-id: e4f29f00eaf2f8cd1eab53fe83822c6480baa511
Summary:Appetize asked for this so they can better support us, since they will usually have more simulators available for the latest versions.
Closes https://github.com/facebook/react-native/pull/7061
Differential Revision: D3196110
Pulled By: mkonicek
fb-gh-sync-id: 2406ab6e1ee352f0148957e851d7f483a2182f90
fbshipit-source-id: 2406ab6e1ee352f0148957e851d7f483a2182f90
Summary:Quite a few updates, some of them were mainly styling ones (please tell me to either revert them or update if they do not match the style guide!).
Clarified test steps and improved release scripts so that they are easier to read.
I have also removed a note about tags and CircleCi pushing a release since that's already done for us by a `update-oss-version`.
Another update is that we now mention steps to check that are printed by `test-manual-e2e.sh` as I have noticed they were recently updated, so better to just clarify they are printed out.
Closes https://github.com/facebook/react-native/pull/7041
Differential Revision: D3196122
Pulled By: mkonicek
fb-gh-sync-id: d3f87e6340ef3cddd4719902a05231072f05a287
fbshipit-source-id: d3f87e6340ef3cddd4719902a05231072f05a287
Summary:Fixes warnings when React API is used by requiring 'react-native'.
Closes https://github.com/facebook/react-native/pull/7060
Differential Revision: D3196109
Pulled By: mkonicek
fb-gh-sync-id: b47afc138cd7909ad53c0d67a65e3a124b87134b
fbshipit-source-id: b47afc138cd7909ad53c0d67a65e3a124b87134b
Summary: Under some circumstances, the calloutIndex might be > number of callout views, (possibly due to a race condition?). This prevents that from crashing.
Reviewed By: tadeuzagallo
Differential Revision: D3196010
fb-gh-sync-id: 6485e64c682937431cb8598d7f3f42e8d37eeff1
fbshipit-source-id: 6485e64c682937431cb8598d7f3f42e8d37eeff1
Summary:The WebView component in iOS currently does not support displaying PDFs without providing a remote URI or manually including the assets in the xcodeproj itself. This is because the packager has not whitelisted the 'pdf' extension.
I've gone ahead and whitelisted the 'pdf extension according to the recommendation by nicklockwood
GH comment: https://github.com/facebook/react-native/issues/1846#issuecomment-199302488
Closes https://github.com/facebook/react-native/pull/7004
Differential Revision: D3196019
Pulled By: nicklockwood
fb-gh-sync-id: 10a86a9232095f98f277506141de0b8af5b21ab4
fbshipit-source-id: 10a86a9232095f98f277506141de0b8af5b21ab4
Summary:This change adds suport native animated support for Animated.add.
Animated.add lets you declare node that outputs a sum of it input nodes.
**Test Plan**
Play with the following playground app: https://gist.github.com/39de37faf07480fcd7d1
Run JS tests: `npm test Libraries/Animated/src/__tests__/AnimatedNative-test.js`
Run java tests: `buck test ReactAndroid/src/test/java/com/facebook/react/animated`
Closes https://github.com/facebook/react-native/pull/6641
Differential Revision: D3195963
fb-gh-sync-id: bb1e1a36821a0e071ad0e7d0fa99ce0d6b088b0a
fbshipit-source-id: bb1e1a36821a0e071ad0e7d0fa99ce0d6b088b0a
Summary: This error message is remarkably aggressive relative to the severity of the issue, particularly since the pattern in question is used / necessary throughout the codebase. Animated ReactART components with set opacities trigger this error, and opacity coming from the style prop is not respected.
Reviewed By: sahrens
Differential Revision: D3177554
fb-gh-sync-id: 96061d5ff526177814996b28e4394e6649839582
fbshipit-source-id: 96061d5ff526177814996b28e4394e6649839582
Summary:- Get rid of no longer necessary WebSocket.js v WebSocketBase.js split
- Use `EventTarget(list, of, events)` as base class to auto-generate `oneventname` getters/setters that get invoked along with other event handlers
- Type annotation `any` considered harmful, especially when we can easily spell out the actual type
- Throw in some `const` goodness for free
**Test Plan:** Launch UIExplorer example app, supplied `websocket_test_server` script, and try different combinations of sending and receiving text and binary data on both iOS and Android.
Closes https://github.com/facebook/react-native/pull/6889
Differential Revision: D3184835
Pulled By: mkonicek
fb-gh-sync-id: f21707f4e97aa5a79847f5157e0a9f132a1a01cd
fbshipit-source-id: f21707f4e97aa5a79847f5157e0a9f132a1a01cd
Summary:Show my app : Helium
Helium is an app where people can discover the best of what others are up to in their free time .
Closes https://github.com/facebook/react-native/pull/7035
Differential Revision: D3191805
Pulled By: mkonicek
fb-gh-sync-id: 03117821a6bce1924415b68df9ad8a2770acb930
fbshipit-source-id: 03117821a6bce1924415b68df9ad8a2770acb930
Summary:This is WIP as I am going through release steps. Submitting few ideas.
List:
- NDK is actually needed in the first step for the e2e scripts to run.
Closes https://github.com/facebook/react-native/pull/7038
Differential Revision: D3191761
Pulled By: mkonicek
fb-gh-sync-id: e6bd51b3c339ed430086f4e21a3b3e6c3864f06f
fbshipit-source-id: e6bd51b3c339ed430086f4e21a3b3e6c3864f06f
Summary:Quite a few of these steps are now tested automatically on Android thanks to bestander.
**Test plan**
Just visual inspection of the code :)
Closes https://github.com/facebook/react-native/pull/7037
Differential Revision: D3191678
fb-gh-sync-id: 54702a772c5c149bdd3f05d6f4ca257bc6f27090
fbshipit-source-id: 54702a772c5c149bdd3f05d6f4ca257bc6f27090
Summary:This brings the same functionality that's already present on iOS, introduced in #4483, to Android: convert binary payloads to base64 strings and send them to JS land that way, where they'll be turned into an ArrayBuffer.
**Test Plan:** Used test server from #6889 (in `--binary` mode) to send some binary data to the Android UIExplorer example (also from #6889). Verified it's received correctly as `ArrayBuffer`.
Closes https://github.com/facebook/react-native/pull/6868
Differential Revision: D3184797
Pulled By: mkonicek
fb-gh-sync-id: e78c640c43b3e41a75ddba79acc04e5eaab5667d
fbshipit-source-id: e78c640c43b3e41a75ddba79acc04e5eaab5667d
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).
fix typo in comment
Closes https://github.com/facebook/react-native/pull/7027
Differential Revision: D3190693
Pulled By: dmmiller
fb-gh-sync-id: fe1eddaeb13deac6f93da7ec600c267df2599586
fbshipit-source-id: fe1eddaeb13deac6f93da7ec600c267df2599586
Summary:Hi there,
This PR reorganises the flow for updating native props so that if you have a switch that's replaced with a spinner to handle a network action, you don't get a crash trying to update native props when an item may be moved out from underneath you. This was previously accepted but I had to rebase it so I just recreated it given it was a two line fix
Closes https://github.com/facebook/react-native/pull/6989
Differential Revision: D3190326
fb-gh-sync-id: 357ffb36bb31bd23970e4ab396fc29a49ec18e1c
fbshipit-source-id: 357ffb36bb31bd23970e4ab396fc29a49ec18e1c
Summary:Earlier on in the tutorial it was recommended to pull in mock data from Github instead of making Rotten Tomato API calls, this change will update the final code to match the rest of the tutorial.
Closes https://github.com/facebook/react-native/pull/7025
Differential Revision: D3190334
fb-gh-sync-id: e699f756d81d0436bac6a4938d54fcaada5d878c
fbshipit-source-id: e699f756d81d0436bac6a4938d54fcaada5d878c