Summary:
The `successCallback` passed via `static showShareActionSheetWithOptions(options, failureCallback, successCallback)` has two parameters (see [native code](e1577df1fd/Libraries/ActionSheetIOS/RCTActionSheetManager.m (L174))), and the name used for the first parameter in the JS example is confusing. This fixes that.
The first parameter is a boolean indicating whether the user completed the sharing (when TRUE) or cancelled it (when FALSE). Instead of calling it "success" in the example, I propose using `completed`, which is more in line with what you see in the native code.
Otherwise, we have a "successCallback" function whose first parameter tells us if we were "successful", and that's confusing (indeed, I think it already caused some confusion in the [react-native-share](https://github.com/EstebanFuentealba/react-native-share/) module: see [this issue](https://github.com/EstebanFuentealba/react-native-share/issues/48)).
Closes https://github.com/facebook/react-native/pull/11914
Differential Revision: D4490039
Pulled By: mkonicek
fbshipit-source-id: 5d7f01eae760e3fb271e7fa080c2f0147c53418a
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:
Currently React Native's local cli is a bit behind in its android gradle plugin version. This PR is an attempt to update the local cli, to allow for better support moving forward.
* Updates the gradle plugin version to 2.2.3
* Updates the gradle wrapper to 2.14.1
* Uses the `all` for the project wrapper to include sources for API completion
**Test plan (required)**
* Perform all required steps here: https://github.com/facebook/react-native/tree/master/react-native-cli
* Run the local npm tests and e2e tests (no longer available)
* Test the local cli by using Sinopia
Make sure tests pass on both Travis and Circle CI.
TO NOTE: In a previous issue (https://github.com/facebook/react-native/issues/11500) I was able to update to 2.2.3 comfortably, however there may be other issue I am not aware of. This PR is intended to start discussion on what it will take to update.
Closes https://github.com/facebook/react-native/pull/11930
Differential Revision: D4489926
Pulled By: mkonicek
fbshipit-source-id: 35ff5ac6b1b8893854538d6b9fe2c2e042ecca9f
Summary:
Largely typing fixes to deal with the glut of new `FlowFixMe` suppressions introduced with flow 0.38 in a4bfac907e
Tested with flow itself. CC gabelevi
Closes https://github.com/facebook/react-native/pull/11985
Differential Revision: D4452045
Pulled By: ericvicenti
fbshipit-source-id: acc46c4c406ae706a679e396be1d40ae2f4ce5a1
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:
Clearer wording, on first read it is possible to get the impression that it will return immediately for both cached and on update request.
Closes https://github.com/facebook/react-native/pull/12072
Differential Revision: D4482784
Pulled By: mkonicek
fbshipit-source-id: 9eb9acf946b97b7b2b51f07e6a6572098afe7610
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: We can simplify as there's only one option, and it seems to me we can also make it required, as otherwise the `JSTransformer` is essentially doing nothing. I don't believe we still have use cases where no transform happens at all, even in OSS?
Reviewed By: davidaurelio
Differential Revision: D4481723
fbshipit-source-id: b2e3830b206d56242d298ff3a7b5f4587ecfd29a
Summary:
We were noticing the following crash in our application, that was occurring fairly often, but still hard to reproduce:
```
12-12 10:37:35.342: E/AndroidRuntime(9064): FATAL EXCEPTION: main
12-12 10:37:35.342: E/AndroidRuntime(9064): Process: com.bloomberg.android.plus, PID: 9064
12-12 10:37:35.342: E/AndroidRuntime(9064): java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.uimanager.UIViewOperationQueue$UIOperation.execute()' on a null object reference
12-12 10:37:35.342: E/AndroidRuntime(9064): at com.facebook.react.uimanager.UIViewOperationQueue$2.run(UIViewOperationQueue.java:782)
12-12 10:37:35.342: E/AndroidRuntime(9064): at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:829)
12-12 10:37:35.342: E/AndroidRuntime(9064): at com.facebook.react.uimanager.UIViewOperationQueue.access$1500(UIViewOperationQueue.java:44)
12-12 10:37:35.342: E/AndroidRuntime(9064): at com.facebook.react.uimanager.UIViewOperationQ
Closes https://github.com/facebook/react-native/pull/11428
Differential Revision: D4487841
Pulled By: astreet
fbshipit-source-id: ae49ef77967edea7514cbf40cb533c4b63fd34ae
Summary: It's not used from any callsite as far as I can see.
Reviewed By: davidaurelio
Differential Revision: D4481708
fbshipit-source-id: 2c503fb7ef20f9370a950c315832f3ace4709739
Summary: it's not used from any callsite as far as I can see.
Reviewed By: davidaurelio
Differential Revision: D4481699
fbshipit-source-id: 4cf63ef7953d6cfc58e7ef4f22ecb99bf51e76a0
Summary: It's not used in any callsite.
Reviewed By: cpojer
Differential Revision: D4481683
fbshipit-source-id: 3fa55693f5f56b4fb6c455ad77d7780f69be81a9
Summary: The idea is to make it easier to interact with tools consuming the packager's output. For example, Nuclide. Do you think that'd work well?
Reviewed By: davidaurelio
Differential Revision: D4482041
fbshipit-source-id: 6c64d7963195a4d786ed8902640f9e9f279f5f83
Summary:
Support symlinks under `node_modules` for all local-cli commands. PR https://github.com/facebook/react-native/pull/9009 only adds symlink support to the packager.
But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked.
This change ensures all `local-cli` commands add symlinks to its project roots.
Test plan (required)
1. Create a symlink in node_modules (for instance use npm/yarn link)
2. Run `react-native bundle`.
Closes https://github.com/facebook/react-native/pull/11810
Differential Revision: D4487741
fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary:
> Explain the **motivation** for making this change. What existing problem does the pull request solve?
The documentation was slightly out of date. Following https://github.com/facebook/react-native/pull/10898, which removed the `platform ios` tag, this updates the inner documentation to remove the reference to iOS.
Closes https://github.com/facebook/react-native/pull/11993
Differential Revision: D4443723
Pulled By: hramos
fbshipit-source-id: b859c9b0fe1f5e564b919663f8c75401a52ffc9f
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:
This is a followup for https://github.com/facebook/react-native/pull/12088 and implements the scrolling to end on Android natively rather than sending a large scroll offset from JS.
This turned out to be an OK amount of code, and some reduction in the amount of JavaScript. The only part I'm not particularly happy about is:
```
// ScrollView always has one child - the scrollable area
int bottom = scrollView.getChildAt(0).getHeight() + scrollView.getPaddingBottom();
```
According to multiple sources (e.g. [this SO answer](http://stackoverflow.com/questions/3609297/android-total-height-of-scrollview)) it is the way to get the total size of the scrollable area, similar to`scrollView.contentSize` on iOS but more ugly and relying on the fact the ScrollView always has a single child (hopefully this won't change in future versions of Android).
An alternative is:
```
View lastChild = scrollLayout.getChildAt(scrollLayout.getChildCount() - 1);
int bottom = lastChild.getBottom() + scrollLayout.getPadd
Closes https://github.com/facebook/react-native/pull/12101
Differential Revision: D4481523
Pulled By: mkonicek
fbshipit-source-id: 8c7967a0b9e06890c1e1ea70ad573c6eceb03daf
Summary:
Adding Causr app to the showcase.
It is written entirely in React Native.
Closes https://github.com/facebook/react-native/pull/12105
Differential Revision: D4482167
Pulled By: mkonicek
fbshipit-source-id: 560c9c59c899a291b6e5585ea8e511a66464d7d3
Summary:
If you have a new example that you add to the UIExplorer, enter the example, but
then change the name of the example or remove it, the explorer enters a
completely broken state. It remembers the name of the last module entered and
keeps trying to enter it. Reloading, refreshing, nothing will work until you
completely reinstall the app.
This fixes this by not trying to render the current module if it doesn't exist.
It will simply skip it.
Reviewed By: yungsters
Differential Revision: D4475088
fbshipit-source-id: d4a530b235aa2712d663377e33fe65091163d262
Summary:
According to #11992 fix skew transform in native code as well
janicduplessis vjeux
Closes https://github.com/facebook/react-native/pull/12106
Differential Revision: D4479880
fbshipit-source-id: d84780842b555f6352d84d229b5b6c5c3c6a0647
Summary:
RecyclerViewBackedScrollView was deprecated, this removes usages in Examples as well as in NetworkOverlay.
**Test plan**
Tested that RecyclerViewBackedScrollView deprecation warning doesn't show up anymore.
Closes https://github.com/facebook/react-native/pull/11999
Differential Revision: D4443707
Pulled By: hramos
fbshipit-source-id: 087afc9f183b3f2087965a2fe84301f422e48e9c
Summary:
Eliminates a build warning related to the use of the deprecated `NSStringArray` typedef.
This fix was more complex than I'd anticipated because `NSStringArray` was also being used as part of a macro-generated selector name, and in two different ways for debug/release. I've added a macro which allows the selector name to be specified explicitly, thus generally allowing for converters which return arrays of templated types.
There's an argument for ditching `RCT_JSON_ARRAY_CONVERTER` in favour of `RCT_JSON_ARRAY_CONVERTER_NAMED` as they're both private, but `RCT_ARRAY_CONVERTER` is in the public API so we'd at least need to retain that. There are also arguments for ditching the use of the macro for the nested array case(s) - since afaik this is the only one at the moment. Feedback appreciated :)
Tested with the `UIExplorer` unit tests and by diffing the preprocessor output of `RCTConvert.m` in both release and debug configs, verifying that they're identical apart from that `NSStringArray` is replaced by
Closes https://github.com/facebook/react-native/pull/11799
Differential Revision: D4441197
fbshipit-source-id: 7535ebe6f8ad4566df742e805b0a64530d1b269f
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: There's scenarios where you might want to retain transparency behind the header, but have a solid background for the scene stack and its transitions.
Reviewed By: ericvicenti, dwwoelfel
Differential Revision: D4471681
fbshipit-source-id: 529e999b96b02a00e8d625169989dda49fb3ddaa
Summary:
In theory, we should be able to animate any non-layout property, including custom ones. While there is still work to be done on the native side to fully enable this, we should start by dropping the prop whitelist.
Closes https://github.com/facebook/react-native/pull/10658
Differential Revision: D4379031
Pulled By: ericvicenti
fbshipit-source-id: fe9c30ea101e93a8b260d7d09a909fafbb82fee6