Summary:
We weren't exposing a mock for the batched bridge, which resulted in the WebSocket test failure but only in the open source copy of react-native.
public
Reviewed By: voideanvalue, vjeux
Differential Revision: D2782151
fb-gh-sync-id: e896097dd6060bc26963bc4c23db87b7277b3eba
Summary:
Currently, the app server accepts `transformModulePath` which allows us to use different transformation variants. However, these options persist through the lifetime of the server. So we cannot conditionally transform a module differently for two bundles without restarting the server with different options.
`getTransformOptions` basically allows us to change the options to the transformer at runtime based on the bundle and module being transformed.
These options are also used as a cache key for the transformedSource to ensure that if a file is transformed with different options, caching doesn't cause any inconsistencies.
public
Reviewed By: martinbigio
Differential Revision: D2776399
fb-gh-sync-id: 1e0f34d8fa7f0377fcf81f23eb6f3236bd397d56
Summary:
This is a followup to PR #3850 but now separates min/max track images into different properties.
Closes#4476
Add examples for `minimumTrackTintColor`, `maximumTrackTintColor`, `minimumTrackImage`, `maximumTrackImage` to UIExplorer.
Closes https://github.com/facebook/react-native/pull/4586
Reviewed By: svcscm
Differential Revision: D2779193
Pulled By: nicklockwood
fb-gh-sync-id: 0510a0f496816baacdd0d4be0f3cd3a63a5a9865
Summary:
public
An option to create a different view based on passed in props is no longer necessary.
I'm removing it, since the idea of creating a view based on set of initial properies is a bit flawed, since we cannot change it to another view later when props are changed.
(This API really made sense mostly in case where some of the props on component were not meant to be changed later, which is a bit weird limitation on a prop.)
Reviewed By: nicklockwood
Differential Revision: D2769206
fb-gh-sync-id: 190a4f5f31ee84085b1ec945b5d99746f39e8e4b
Summary:
this is a recent regression because the error appeared in my app (from 0.16 to 0.17).
```
<Image source={{ uri: null }} />
```
will make an error:
```
[RCTConvert.m:55] Error setting property 'source' of RCTImageView with tag #317: JSON value '<null>' of type NSNull cannot be converted to NSString
```
The solution attached is to check that uri is a NSString and return nil if not (the same way nil is returned in case of invalid url).
Closes https://github.com/facebook/react-native/pull/4902
Reviewed By: svcscm
Differential Revision: D2779789
Pulled By: nicklockwood
fb-gh-sync-id: cfe429ec5e53e63b7b368c06e693424ca8aaa11e
Summary:
public
When using the custom view option for MapView annotations, the view would sometimes be top-left-aligned on the coordinate instead of centered on it. This fixes that.
Reviewed By: fredliu
Differential Revision: D2776380
fb-gh-sync-id: 793bfd1c3f5b1c923caf031e01b1f6c90e544472
Summary:
public
The minified bundle was always being generated with the `bundle.js` as the source map url.
Reviewed By: martinbigio
Differential Revision: D2773725
fb-gh-sync-id: 02cda95eb172fc373ce4e605418cbfcec22f433d
Summary:
`WebView.getUrl()` doesn't return the correct value in WebView callbacks
(e.g. `onPageFinished`).
For example, when navigating to a URL, we report that loading finished,
but still with the old URL. This diff fixes that.
public
Reviewed By: andreicoman11
Differential Revision: D2769597
fb-gh-sync-id: f14bdd405290469ac0a20d0fb89aa2a27d33e758
Summary:
public
resolveAssetSource was not being called on MapView image any more, resulting in an error when using `require(./imagename.png)` syntax.
Reviewed By: fredliu
Differential Revision: D2772560
fb-gh-sync-id: 0a50a9c3ba727406343a0f47c84941e95df9cadd
Summary:
public
While it's nice to see such a masterclass in strict typing with Flow, having it an example serves no useful purpose, and makes the example unnecessarily fragile with respect to API changes.
Reviewed By: gabelevi
Differential Revision: D2769981
fb-gh-sync-id: db5550d5674bf32ef8d331861751a4e6aa1f6536