Commit Graph

3462 Commits

Author SHA1 Message Date
Alexandre Moureaux b45c91d3e7 Fix small typo
Summary:
Hi guys,

A small typo found in the doc :)
Closes https://github.com/facebook/react-native/pull/15888

Differential Revision: D5809251

Pulled By: TheSavior

fbshipit-source-id: 7a2ca8f2cbca81aa2059ee619a8c6087256e39a6
2017-09-11 16:45:44 -07:00
Lincoln Hochberg d726c2c8ca support null titles in AlertIOS
Reviewed By: achen1

Differential Revision: D5807055

fbshipit-source-id: f79579d4cffb9792f49f89a7fb8f7df8e082a3a9
2017-09-11 16:08:03 -07:00
Miguel Jimenez Esun bae5505902 Migrate tests away from "jsdom" environment
Reviewed By: leebyron

Differential Revision: D5748304

fbshipit-source-id: c66df45f1f35333f994c41eb8ff4cfccc1bb04d4
2017-09-11 09:49:11 -07:00
Valentin Shergin c55fae1e26 Removed support of nested content inside <Image> on iOS
Summary:
Use <ImageBackground> instead or (even better), implement it yourself using container <View> and nested <Image> with `position: absolute;` styling.

This diff was decoupled from D5189017 for more granularity.

Reviewed By: mmmulani

Differential Revision: D5779989

fbshipit-source-id: e0a724008e679426f61ed0841f9eff6d62fb943b
2017-09-10 21:48:16 -07:00
Spencer Ahrens 1afc93d18a Fix Animated spring jest test
Reviewed By: TheSavior

Differential Revision: D5786252

fbshipit-source-id: 9f97b36bd2d6faebc95f2f78889fb382a3544479
2017-09-08 16:31:50 -07:00
m30do ae60ae4074 fix ItemSeparatorComponent position in horizontal and inverted mode
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!

-->

There's a positioning bug in `VirtualizedList` when `ItemSeparatorComponent` is defined for a list in horizontal or inverted mode. And also we face this bug in `FlatList`, because it is using `VirtualizedList` to render lists.
This commit will fix the [#15777](https://github.com/facebook/react-native/issues/15777).

Before fix:
```
<FlatList
  ...
  horizontal={true}
  inverted={true}
  ...
/>
```

![image](https://user-images.githubusercontent.com/15084663/30205251-95f14c70-949d-11e7-85e9-7a3304a52818.png)

```
<FlatList
  ...
  horizontal={true}
  inverted={false}
  ...
/>
```
![image](https://user-images.githubusercontent.com/15084663/30205411-f01d27b4-949d-11e7-991e-00aeae0c01e0.png)

I ran this code with all possible values of `horizontal` and `inverted` props in `FlatList` and `VirtualizedList` and the results of each run was as below:
After fix bug:

```
<FlatList
  ...
  horizontal={true}
  inverted={false}
  ...
/>
```
![image](https://user-images.githubusercontent.com/15084663/30205498-323bcf60-949e-11e7-8ba0-465614ea5cf2.png)

```
<FlatList
  ...
  horizontal={true}
  inverted={true}
  ...
/>
```
![image](https://user-images.githubusercontent.com/15084663/30205543-5274f612-949e-11e7-9660-bbdf8194cd27.png)
Closes https://github.com/facebook/react-native/pull/15865

Differential Revision: D5797266

Pulled By: hramos

fbshipit-source-id: 7d44fa797dbd9e83eb2bdd7833e9dd9707d9d822
2017-09-08 15:06:50 -07:00
Jiajie Zhu b7216f3e18 fix flow warning and typo
Differential Revision: D5796855

fbshipit-source-id: 455c2539b111e8e7aca44d762cefabf764171beb
2017-09-08 14:46:14 -07:00
Mandeep Baines b89d6c8e04 consistent use of URL for resolving asset source
Reviewed By: frantic

Differential Revision: D5759789

fbshipit-source-id: daf33b6b66c4bff7f43213ee49286eafb6775f00
2017-09-08 10:47:22 -07:00
Jonathan Lee 182874d972 Reverting changes to MessageQueue
Reviewed By: zjj010104

Differential Revision: D5785916

fbshipit-source-id: ed30e3d2763d16c5a1f550f05d2b9f0997b83fbe
2017-09-07 14:30:59 -07:00
Spencer Ahrens f37fc6705a Add snapshot tests for sticky headers
Reviewed By: TheSavior

Differential Revision: D5751337

fbshipit-source-id: d281c1a81c7ec7135686b705c376c90d44218fdc
2017-09-07 13:05:35 -07:00
Miguel Jimenez Esun 33bbfb7125 Fix test for RN asset
Reviewed By: cpojer, rafeca

Differential Revision: D5777553

fbshipit-source-id: 3bc8559076435c6254972552095967b88acb0576
2017-09-07 01:55:56 -07:00
Jiajie Zhu 34e9468b8f color filters - use TouchableBounce and make it configurable
Differential Revision: D5773726

fbshipit-source-id: fc01860bc5958d1368d3f39e2833382a212d60d2
2017-09-06 16:38:37 -07:00
Marshall Roch 91b6b4efb9 @allow-large-files Flow v0.54.0
Reviewed By: leebyron

Differential Revision: D5773490

fbshipit-source-id: 2c54bb6326f23edbe9a969f3010f79da8189923e
2017-09-06 03:33:43 -07:00
Martin Yrjölä 25639176ff Asset basenames in Jest snapshots
Summary:
This change only affects tests run with Jest. `require('/images/image1.png')` will be replaced with

```
Object {
  "testUri": "relative/path/to/images/image1.png",
}
```

in the Jest snapshot instead of always being 1 returned by RelativeImageStub. This change makes it possible to test conditional asset loading in components.

The problem with this change is that it will probably break a lot of existing snapshots, but that should be easily fixed when a project updates to a new version of React Native by running `jest -u` to update all snapshots.

A component can have conditional asset loading based on its props, this logic would be nice to test with Jest snapshots. This problem has been discussed in https://github.com/facebook/jest/issues/2838.

* **Who does this affect**: Everyone using `Image` in Jest snapshots
* **How to migrate**: Running `jest -u` will update the snapshots, the snapshots should be reviewed that they are correct.
* **Why make this breaking change**: It enables testing of conditional asset loading.
* **Severity (number of people affected x effort)**: Low.
Closes https://github.com/facebook/react-native/pull/13319

Reviewed By: rafeca

Differential Revision: D5708180

Pulled By: mjesun

fbshipit-source-id: 16ac42004d597db08545a21d4fffe95c5ee7e21f
2017-09-06 03:33:43 -07:00
Vince Oppedisano ad733ad430 Extend FlatList to support multiple viewability configs
Summary: FlatList only supports one viewability configuration and callback. This change extends FlatList and VirtualizedList to support multiple viewability configurations and corresponding callbacks.

Reviewed By: sahrens

Differential Revision: D5720860

fbshipit-source-id: 9d24946362fa9001d44d4980c85f7d2627e45a33
2017-09-05 18:51:25 -07:00
bozdoz d0489720f9 Added styles.viewPager to complete example code
Summary:
Otherwise, you're met with a bewildering blank page. :D

<!--
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!

-->

(Write your motivation here.)

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
Closes https://github.com/facebook/react-native/pull/15754

Differential Revision: D5768992

Pulled By: hramos

fbshipit-source-id: 39a9f7c208d635e089751015dcf2536144ec0176
2017-09-05 13:17:25 -07:00
Patrick ccf49655d9 Fix typo
Summary:
Fixed a typo in `ToastAndroid.js`'s comment.

No test plan. Just fix a typo.
Closes https://github.com/facebook/react-native/pull/15802

Differential Revision: D5767578

Pulled By: hramos

fbshipit-source-id: 4ccc708800f7d4259d266fba195981a85e6647a1
2017-09-05 12:48:16 -07:00
Tikhon Botchkarev 61800414cb Reference PermissionsAndroid in Geolocation doc
Summary:
Current Geolocation API docs do not mention using PermissionAndroid when working with API 23+. This updates the docs to reflect that requirement.

This a documentation change, so no testing is required.
Closes https://github.com/facebook/react-native/pull/14133

Differential Revision: D5767852

Pulled By: hramos

fbshipit-source-id: 25af70db864a50cdc5e3765eccdeecd49c084d9a
2017-09-05 11:53:14 -07:00
Mark Smith 998197f444 Clean up some URL path handling
Reviewed By: sahrens

Differential Revision: D5753338

fbshipit-source-id: 0eb1b4ae64ad7170f1b97f398ff11b713c695b12
2017-09-01 13:45:03 -07:00
Christopher Best 3834cb5f68 fix typo in description of selectedIndex prop
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 was reading up on how to control the selected value of a `SegmentedControlIOS` component and noticed that the prop was written wrong in the description.

1. This PR changes only the content of a component description comment, and not any code.
Closes https://github.com/facebook/react-native/pull/15742

Differential Revision: D5757116

Pulled By: hramos

fbshipit-source-id: faccb95fb3a4ba2852c457c3559c066da09e6bb9
2017-09-01 13:01:00 -07:00
Spencer Ahrens 57c7324ab7 Support sticky ListHeaderComponent
Summary: Fixed the little oversight.

Reviewed By: TheSavior

Differential Revision: D5743857

fbshipit-source-id: c61a6c29b5f547f3e5a2b7ff2d318f693cc9aed5
2017-09-01 12:01:35 -07:00
Shiva Pandey 91c52af083 Example of getPhotos Method
Summary:
Example for loading Media using CameraRoll getPhotos method

<!--
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!

-->

The cameraRoll API doesn't have a proper example of how to use the methods. So, I decided to provide a basic example with a use case.

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
Closes https://github.com/facebook/react-native/pull/15647

Differential Revision: D5748965

Pulled By: hramos

fbshipit-source-id: df8ad50d597dcc745a7f6abcc52839695ffe452c
2017-09-01 11:48:54 -07:00
Syed Haani Hasan 5d7934a68a Updated TextInput prop doc
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 am a web developer, who recently started coding for mobile apps using react-native. I was trying to use the `inlineImageLeft` props of TextInput, but I found that it's docs weren't sufficient. So a PR for it.

No code change. Updated the docs under website folder. Screenshot for the change below.

![screen shot 2017-08-30 at 4 39 32 pm](https://user-images.githubusercontent.com/6011865/29869747-e73d9dde-8da1-11e7-912a-16e3115b8296.png)
Closes https://github.com/facebook/react-native/pull/15708

Differential Revision: D5738795

Pulled By: hramos

fbshipit-source-id: b8b6cbac5c50abd4d8a6ef8089dc9d92bc0b7f6f
2017-08-31 10:19:19 -07:00
Wes Johnson a64674375e Alert - allow for hiding alert title on iOS
Summary:
Wanted a "message-only" alert on iOS that doesn't lead to the message being large & bolded via the title field (current state).

Before:

![screen shot 2017-08-28 at 9 22 04 pm](https://user-images.githubusercontent.com/1047502/29801514-fc3629d2-8c3d-11e7-86d5-f0a866301814.png)

After:

![screen shot 2017-08-28 at 9 26 56 pm](https://user-images.githubusercontent.com/1047502/29801521-071aa1ca-8c3e-11e7-9bd0-0a4682d81979.png)

It also aligns iOS with Android's current behaviour.

The above screenhots were generated from the `RNTester` example added herein.

Allowed for passing an empty string through to `UIAlertController.alertControllerWithTitle` so that the message could be rendered in its expected place on iOS (not as the title).

* Ran RNTester & compared example alerts before & after (below default with titles, for example)
* Ran end-to-end manual test suite (it's the only one I could get through without unrelated failures)

Before

![screen shot 2017-08-28 at 9 21 53 pm](https://user-images.githubusercontent.com/1047502/29801775-6e249ff0-8c3f-11e7-888b-2c4d5177a7d7.png)

After

![screen shot 2017-08-28 at 9 26 40 pm](https://user-images.githubusercontent.com/1047502/29801781-7270c4a8-8c3f-11e7-8b9b-59b2649646f2.png)
Closes https://github.com/facebook/react-native/pull/15685

Differential Revision: D5729420

Pulled By: hramos

fbshipit-source-id: 4866b0b24473ae35e9ebae09f2cee13a49d7717e
2017-08-30 17:16:17 -07:00
Eli White dd92dba3da Turn on Flow for EventEmitter
Reviewed By: sahrens

Differential Revision: D5732809

fbshipit-source-id: b8241120188b2b64af12249b2f00a43bea3b58a4
2017-08-30 11:52:28 -07:00
Aleksei Androsov ccc11f2f30 Fix Image.getSize() according to image orientation
Summary:
This is fix for issue https://github.com/facebook/react-native/issues/14097

I've prepared images with different exif orientation (https://yadi.sk/d/is_xcEEo3MRAxF)
0-4 should have size 200x100
5-8 should have size 100x200
Closes https://github.com/facebook/react-native/pull/15690

Differential Revision: D5731414

Pulled By: shergin

fbshipit-source-id: 7ced00ac7ac812c91216dccf0c76acd0e913dda0
2017-08-30 00:33:44 -07:00
Caleb Meredith 63f990121a Fix React Native open source
Reviewed By: hramos, TheSavior

Differential Revision: D5728356

fbshipit-source-id: fb751d67c16ba9273de93d9b6d5acd65b1555dca
2017-08-29 15:01:05 -07:00
Eli White 2d0fe109d7 Fix Prettier
Reviewed By: hramos

Differential Revision: D5720486

fbshipit-source-id: 374c0c264a714276c39c357aa3fc0737a822a8db
2017-08-29 11:00:59 -07:00
Sebastian Lund bf67345b3b Expose webSocketDidOpen in RCTReconnectingWebSocket
Summary: Expose webSocketDidOpen in RCTReconnectingWebSocket in order to get notified when the reconnecting websocket is opened to the endpoint.

Reviewed By: emilsjolander

Differential Revision: D5725547

fbshipit-source-id: e904c5a84d670ecf936993ec1739614f99fce09c
2017-08-29 08:06:03 -07:00
Pieter De Baets b11656a727 Update _flowconfig
Summary:
gabelevi mroch: Can you make sure this flow config is also updated when upgrading flow, otherwise our Travis e2e tests fail.
Closes https://github.com/facebook/react-native/pull/15447

Differential Revision: D5601593

Pulled By: javache

fbshipit-source-id: 9dbaa3c1ff732b191452c2c2e56fcf0486fc44c8
2017-08-29 04:51:09 -07:00
Pieter De Baets 7542f3d659 Call reloadImage less often when setting Image props
Summary: Came across multiple calls to reload while we we're setting properties on the image. During the initial setup they should no-op pretty quickly, but this should avoid us making multiple requests when changing an image that's already visible.

Reviewed By: mmmulani

Differential Revision: D5536014

fbshipit-source-id: 3c2abb83cbb66f9d8928f20fc7f461562f666f43
2017-08-29 04:23:04 -07:00
Adam Comella 6b7f10d43e iOS: Geolocation: Allow skipping of permission prompts
Summary:
This change enables developers to tell the Geolocation module to skip its permissions requests so the app can manage the permissions requests on its own. React Native Android's Geolocation module already requires apps to request permissions on their own.

Currently, the Geolocation module automatically makes permissions requests for you based on what you've specified in your property list file. However, the property list file doesn't always represent what permissions the app wants right now. For example, suppose an app sometimes wants location when "in use" and sometimes wants location "always" depending on what app features the user has engaged with. The Geolocation API will request the "always" location permission even if that's not what the app wants for the current scenario.

This change enables developers to tell the Geolocation module to skip permission requests so that the app can explicitly ask for the appropriate permissions. By default, Geolocation will still ask for permissions so this is not a breaking change.

This change adds a method to Geolocation that is not supported by the web spec for geolocation (`setRNConfiguration`). This method includes `RN` in the name to minimize the chances that the web spec will introduce an API with the same name.

**Test plan (required)**

Verified that Geolocation requests permissions by default and when `skipPermissionRequests` is `false`. Verified the permission requests are skipped when `skipPermissionRequests` is `true`. Also, my team is using this change in our app.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/15096

Differential Revision: D5725563

Pulled By: javache

fbshipit-source-id: fd23fedb7e57408fa0f0d0568e0f1ef2aea1cdd4
2017-08-29 04:23:04 -07:00
Alex b8d347d113 Update AnimatedImplementation.js
Summary:
Typo at line 513. "The simplest workflow for creating an animation is TO TO create an"

<!--
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!

-->

(Write your motivation here.)

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
Closes https://github.com/facebook/react-native/pull/15676

Differential Revision: D5719554

Pulled By: hramos

fbshipit-source-id: ccb220136dfbc4632c84ec58a13d95a03c864c2b
2017-08-29 00:45:30 -07:00
Alan Foster 2ceed95490 Support flash scroll indicators for android
Summary:
There is missing support for flash scroll indicators on Android. This PR adds this functionality.

Ensured that the functionality works now within iOS _and_ Android

![flashindicators-ios](https://user-images.githubusercontent.com/1271782/29491236-80ecc062-854c-11e7-9562-bdfe03d505f9.gif)

![flashindicators-android](https://user-images.githubusercontent.com/1271782/29491238-826f321c-854c-11e7-955c-cd425afd05f8.gif)
Closes https://github.com/facebook/react-native/pull/15566

Differential Revision: D5686942

Pulled By: shergin

fbshipit-source-id: 40c8bfec47d660fe8108253bb9ba9fd16ff0d19c
2017-08-27 22:29:42 -07:00
Becky Van Bussel 84b11dd518 Add Android React Native Checkbox
Reviewed By: achen1

Differential Revision: D5281736

fbshipit-source-id: 9a3c93eeace2d80be4ddbd4ffc3258c1d3637480
2017-08-25 10:30:54 -07:00
Pieter De Baets dacb1fbc11 Increase RCTTestRunner timeouts
Reviewed By: shergin

Differential Revision: D5706622

fbshipit-source-id: 2185e673913d366afca234d121eaf601ff7c5887
2017-08-25 10:00:39 -07:00
Jacob Parker b48149ed94 Expose barStyle for NavigatorIOS and TabBarIOS
Summary:
Exposes barStyle property. Code already existed in RCTConvert, so that’s why there’s no conversion code here.
Closes https://github.com/facebook/react-native/pull/10936

Differential Revision: D4224759

Pulled By: shergin

fbshipit-source-id: b6346940e69933d42a21cd38b9a2fa75d049f8e6
2017-08-25 00:14:46 -07:00
Ivan Ha e6ff0dacd5 fix and enrich Vibration docs
Summary:
The docs for [Vibration](https://facebook.github.io/react-native/docs/vibration.html) is broken and not informative now. Making people difficult to understand the usage without digging into the source code.

![screen shot 2017-08-23 at 12 44 50](https://user-images.githubusercontent.com/20895743/29599382-da4976b6-8801-11e7-96d2-b342f0bf36fb.jpg)

Tested the page locally.

![fireshot capture 4 - vibration - http___localhost_8079_react-native_docs_vibration html vibrate](https://user-images.githubusercontent.com/20895743/29599338-976816e0-8801-11e7-8f53-a228363353f3.png)
Closes https://github.com/facebook/react-native/pull/15614

Differential Revision: D5691254

Pulled By: hramos

fbshipit-source-id: b84f0d0f9c69bd0983fbc32424c521108640fdd4
2017-08-23 20:45:45 -07:00
Spencer Ahrens 68664ac106 Fix stylesheet registery
Reviewed By: fkgozali

Differential Revision: D5685564

fbshipit-source-id: 0946223108041575b16f05abff4a90867c6323f2
2017-08-23 08:54:39 -07:00
Rafael Oleza dc792690bd Add @providesModule annotation to Animated files
Reviewed By: mjesun

Differential Revision: D5687435

fbshipit-source-id: 515512167bc9f579a944b45de9e6427da39c9f0d
2017-08-23 03:55:19 -07:00
Janic Duplessis 5590b1b5ad Split up AnimatedImplementation.js
Summary:
AnimatedImplementation.js is getting pretty hard to navigate and reason about so I split it up into different modules. Also took the opportunity to run prettier on that code and do some minor const/let refactorings. This doesn't change any logic, mostly just moves code around and add proper imports / exports.

This opens the door for further cleanup and flow type improvements but want to keep this already big PR as small as possible.

Discussion points:
- Should I use haste for this? Animated is pretty much a standalone module, it still uses a few haste imports but for new modules I used commonjs imports to avoid polluting the haste global namespace too much. The new modules are all internal to Animated and should not be imported externally.
- We're using `requestAnimationFrame` from fbjs instead of the one available globally in RN and browsers is there a reason for that?
- Should we even support web in this implementation? There is a standalone repo that exist for Animated web. Is this implementation of Animated web used internally at facebook?
- Probably still related to web, we used some weird Set polyfill is that still needed?

Notes:
There is a small regression for docs where the type of some classes that are exported like AnimatedValue show up as CallExpression instead if Class.

<img width="655" alt="screen shot 2017-08-14 at 3 19 18 am" src="https://user-images.githubusercontent.com/2677334/29261820-8f243036-809f-11e7-8bf0-0fe9f93939ca.png">

**Test plan**
Tested that all Animated related examples still work in RNTester on iOS and Android.
Tested that the doc is still working
Ran unit tests
Closes https://github.com/facebook/react-native/pull/15485

Differential Revision: D5679886

Pulled By: sahrens

fbshipit-source-id: d3e9b6987ab5ff2cd20108c3b9d860c7536be8a0
2017-08-22 18:01:20 -07:00
Naman Goel 5cdf5f3910 Use proper script way to clone Emoji files from www
Differential Revision: D5615872

fbshipit-source-id: 7f2c19f1a65f42b78136be7e6a608d0415c1a49f
2017-08-21 16:29:39 -07:00
Eric Rozell 809f1e97de Avoid race condition for AppState.currentState
Summary:
When the AppState module is initialized, it subscribes to the `appStateDidChange` event and sends an async native method call to the AppState native module. There is a small race condition window where the native module can read the current app state as `uninitialized` before calling the JavaScript callback, and then be interrupted by the underlying mechanism to trigger the `appStateDidChange` event. If the `appStateDidChange` event is processed before the JavaScript callback, the resulting value of `AppState.currentState` will be invalid.

Fixes Microsoft/react-native-windows#1300

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

I simulated (over-exaggerated) the race condition by injecting "thread sleep" calls in the native method call and the native mechanism for updating the app state.

I then ran the AppStateExample in the RNTester and found that the current app state was set to `uninitialized`, as opposed to the expected value of `active`.

Once I made this JavaScript change, the over-exaggerated race condition no longer resulted in an invalid app state.
Closes https://github.com/facebook/react-native/pull/15499

Differential Revision: D5660620

Pulled By: hramos

fbshipit-source-id: 47c0dca75d37f677191c48f2148a72edd9cdd0e2
2017-08-18 13:14:59 -07:00
Caleb Meredith 90eaeb019b Upgrade fbsource/xplat/js to Flow v0.53.0
Reviewed By: avikchaudhuri

Differential Revision:
D5648819
Ninja: T20988071

fbshipit-source-id: 66e5b6747c79ae66b6eb69d40ede5e982c26174f
2017-08-17 18:45:01 -07:00
Eli White 36f2d18b10 Disallow trailing commas in react-native-github
Reviewed By: cpojer

Differential Revision: D5645043

fbshipit-source-id: 7378cc96ce39d3d18da7fba51d48db84cfdfa08f
2017-08-17 16:20:04 -07:00
DracoBlue f95153ed52 Loading-State when reloading Android WebView
Summary:
This commit enables state WebViewState before triggering reload on WebView. This will (if defined) trigger the loading screen again.

On iOS the LoadingIndicator will be called whenever you reload the WebView. On Android this feature is missing (see #11013). This PR adds this behaviour.

Important: One might think that "onLoadStart" is the right area to add this code, but on Android onLoadStart will also trigger for sub-resources -> the loading screen will also appear when loading iframes on the same page. I expect thats why this was not added in first place.

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
Closes https://github.com/facebook/react-native/pull/15538

Differential Revision: D5653257

Pulled By: hramos

fbshipit-source-id: 908b82ddaf2c34048bcb833bc07e03ab68d09467
2017-08-17 15:48:07 -07:00
Douglas Lowder 0d3039f1a0 Fix for Modal behavior when menu button pressed on Apple TV (Issue #15313)
Summary:
**Motivation**

On Apple TV, pressing the menu button destroys the native view that backs the `Modal` component, causing an app using this component to get into a broken state.  This fix implements `onRequestClose` for tvOS to have the same behavior as it does for the Android back button.

**Test plan**

Manually tested this with the `ModalExample` in the `RNTester` app.  See also the test code in issue #15313.
Closes https://github.com/facebook/react-native/pull/15341

Differential Revision: D5651035

Pulled By: shergin

fbshipit-source-id: 54bf66887bbe85940567e63e90b437ac4a8daf9a
2017-08-17 15:22:12 -07:00
Caleb Meredith 30d9c3d279 Add suppressions for Flow v0.53.0 before React changes
Reviewed By: avikchaudhuri

Differential Revision: D5648801

fbshipit-source-id: c4eb1bee198a177b69b6e9414111ce957b4d27ff
2017-08-17 05:18:33 -07:00
Tomas Reimers bb98fddbec Add documentation on .focus and .blur
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!

-->

(Write your motivation here.)

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
Closes https://github.com/facebook/react-native/pull/15515

Differential Revision: D5648285

Pulled By: hramos

fbshipit-source-id: fc1e50ffd18cc234771c5f40f92549e7e87cd28e
2017-08-17 00:16:43 -07:00
Kevin Gozali 40a2885847 android: allow whitelisting urls to bypass default webview loading
Summary:
This is a workaround for missing PDF url support in Android WebView, which is a general known issue: when tapping a PDF url within WebView, instead of doing nothing, we just let android default intent handle it (e.g. it will open Chrome to load it).

This is basically to trick `shouldOverrideUrlLoading()` to return true for the specific url. The drawback is that product code needs to provide the whitelist.

The proper fix would be to use PdfRenderer in that method, but it seems like it's only for API >= 21...

Differential Revision: D5619383

fbshipit-source-id: f86b930f970dab9a5f57999df69ce94b9508edc9
2017-08-16 19:29:13 -07:00