Commit Graph

6771 Commits

Author SHA1 Message Date
Keri Clowes 7271a9dc24 Fix Typo
Summary:
Nitpicky, I know :)
Closes https://github.com/facebook/react-native/pull/8056

Differential Revision: D3419299

fbshipit-source-id: b3bfe985a2a8dff4572e798c9d0e09662ab37ed0
2016-06-10 13:58:22 -07:00
Jing Chen 31e090c9ab Change loading dialog for JS in Android to use AlertDialog instead
Reviewed By: yungsters

Differential Revision: D3418605

fbshipit-source-id: 202b4872c6636a51c615ad82b444261acf83f396
2016-06-10 12:28:26 -07:00
Tim Yung 5e73c070e8 RN: Fix Symbolicate Logspew for `/debuggerWorker.js`
Summary:
When remote debugging is enabled, stack traces start at `/debuggerWorker.js`. Since this is not a valid bundle URL, the packager fails to decipher it to find its sourcemap.

This changes the packager to skip the `/debuggerWorker.js` stack frame if one exists.

Reviewed By: frantic

Differential Revision: D3418341

fbshipit-source-id: 7434aa45dea7d120d9d77c060101dd9403989d0c
2016-06-10 12:28:26 -07:00
Konstantin Raev 0d572e40f0 Revert "Reverted commit D3417194"
Summary:
This reverts commit 7df2af58c7.

cc janicduplessis
Closes https://github.com/facebook/react-native/pull/8049

Differential Revision: D3417557

fbshipit-source-id: 3853b06e91a2aae441835807f73fb78e6ef79344
2016-06-10 11:43:30 -07:00
Tucker Connelly 4f4b6d467a Reverted commit D3417257
Summary:
First PR!!

This fixes https://github.com/facebook/react-native/issues/2991 :)
Closes https://github.com/facebook/react-native/pull/7603

Differential Revision: D3417257

Pulled By: bestander

fbshipit-source-id: fca990a973edaf7bae5481d03f5da5de0c085c16
2016-06-10 09:13:26 -07:00
Janic Duplessis 7df2af58c7 Reverted commit D3417194
Summary:
Fix a bug that happens when views are added and removed in the same manageChildren block with a delete animation. What happens is that the inserted view is not inserted at the proper index if the deleted view index is smaller than the inserted one. This is because the view is not immediately removed from the subviews array so we need to offset the insert index for each view that is going to be deleted with an animation and is before the inserted view.

To do this I separated `_removeChildren` into 2 different functions, one for animated delete and one for normal delete. The animated one returns an array of `RCTComponent` that are going to be animated. We can then use this array to offset the insert index.

**Test plan (required)**
Tested that this fixed the bug in an app where I noticed it, also tested the UIExplorer example to make sure LayoutAnimations still worked properly.
Closes https://github.com/facebook/react-native/pull/7942

Differential Revision: D3417194

Pulled By: bestander

fbshipit-source-id: 9145a783e520c6718dd023a1e006646acb09cb7c
2016-06-10 06:58:28 -07:00
Kyle Corbitt 57d45235ec Correctly passes localNotification to app on wakeup
Summary:
Currently if an RN app is started in response to a remote notification, that notification's data is available on startup via `PushNotificationIOS.popInitialNotification()`. However, if the app is started in response to a "local" notification, that information is never passed in. This PR modifies the `popInitialNotification` behavior so it will return the notification used to launch the app, no matter if it was local or remote.

I've tested this change in my app and ensured that when the app is woken up with a `localNotification` it's passed in to `PushNotificationIOS.popInitialNotification`. I've also tested that the `localNotification` event continues working as before.
Closes https://github.com/facebook/react-native/pull/7765

Differential Revision: D3417267

Pulled By: nicklockwood

fbshipit-source-id: 0b5b432e9a75dda7d3c50289a3bf0f1c1ffcf061
2016-06-10 05:28:41 -07:00
Janic Duplessis 6236a593d8 Fix LayoutAnimation iOS delete bug when adding and removing views at the same time
Summary:
Fix a bug that happens when views are added and removed in the same manageChildren block with a delete animation. What happens is that the inserted view is not inserted at the proper index if the deleted view index is smaller than the inserted one. This is because the view is not immediately removed from the subviews array so we need to offset the insert index for each view that is going to be deleted with an animation and is before the inserted view.

To do this I separated `_removeChildren` into 2 different functions, one for animated delete and one for normal delete. The animated one returns an array of `RCTComponent` that are going to be animated. We can then use this array to offset the insert index.

**Test plan (required)**
Tested that this fixed the bug in an app where I noticed it, also tested the UIExplorer example to make sure LayoutAnimations still worked properly.
Closes https://github.com/facebook/react-native/pull/7942

Differential Revision: D3417194

Pulled By: nicklockwood

fbshipit-source-id: 790f4ac15a8552323b359e6466cecfa80418c63c
2016-06-10 04:28:37 -07:00
Sokovikov c03b166854 line break mode for ios
Summary:
What do you think is ```lineBreakMode``` a good name? For android it is called ```ellipsize```.

<img src="https://cloud.githubusercontent.com/assets/1488195/15628555/7372f8d0-250c-11e6-8919-722f28a38d60.png"" width="300" />
Closes https://github.com/facebook/react-native/pull/7819

Differential Revision: D3417256

fbshipit-source-id: 189441a23ff554bf7f6d67fa8510959351e9e5cc
2016-06-10 04:28:37 -07:00
Tucker Connelly 33dfc9db92 Vertically center iOS text if lineHeight is set
Summary:
First PR!!

This fixes https://github.com/facebook/react-native/issues/2991 :)
Closes https://github.com/facebook/react-native/pull/7603

Differential Revision: D3417257

fbshipit-source-id: 074d56c1dfc0a9ba713e59c804286fd915589eeb
2016-06-10 04:28:37 -07:00
Fabian Eichinger d43e0db81e Add support for reverse flex directions on Android and iOS
Summary:
This PR adds support for both 'row-reverse' and 'column-reverse' for Android and iOS and is based on the changes in #6683 that looked like it's all but abandoned.
It also adds examples for the new directions to the "Layout - Flexbox" section of UIExplorer as well as some rad new colors to the section to make the difference between "row-reverse" and "flex-end" more apparent.

**Test plan (required)**
Tested inside of UIExplorer

Android
<img width="571" alt="screen shot 2016-06-05 at 7 42 14 pm" src="https://cloud.githubusercontent.com/assets/4332237/15807140/cf8e05de-2b55-11e6-9366-a2e3194cabf8.png">

iOS
<img width="578" alt="screen shot 2016-06-05 at 7 41 35 pm" src="https://cloud.githubusercontent.com/assets/4332237/15807143/dee8e9b8-2b55-11e6-8777-c30329fa54e8.png">
Closes https://github.com/facebook/react-native/pull/7938

Differential Revision: D3417182

fbshipit-source-id: e8c9f5976ca95b2d2069a5b31a20f6d6309eb3cc
2016-06-10 03:28:45 -07:00
Paul Shen 92926f9858 Fix onLayout support in <TextInput>
Summary:
The `onLayout` prop is overridden by `<TouchableWithoutFeedback>` and thus does not work on `<TextInput>` components. fb0007d853/Libraries/Components/Touchable/TouchableWithoutFeedback.js (L176)

This makes it so the following works.

```javascript
<TextInput onLayout={...} />
```

I only tested on iOS but I assume a similar fix might be needed for Android. fb0007d853/Libraries/Components/TextInput/TextInput.js (L575)

**Test Plan**

https://rnplay.org/apps/euIZtg (confirm bug)
With fix, set `onLayout` on `<TextInput>` and see it is fired correctly.

```javascript
<TextInput onLayout={function(e) { console.log(e.nativeEvent); }} />
```
Closes https://github.com/facebook/react-native/pull/8042

Differential Revision: D3417192

fbshipit-source-id: 536ec81d3479e6bda474ac766b27afb39242c01a
2016-06-10 03:28:44 -07:00
Wenjing Wang 13dfb6267a Fix broken image cropper - can not scroll
Summary: ImageCropper is broken on iOS. Can not scroll up and down

Differential Revision: D3413397

fbshipit-source-id: 75096fc1d5dd14764c0ddd4fd3888a9576c1d1ce
2016-06-09 23:13:31 -07:00
Hedger Wang fb0007d853 Remove prop `onNavigate`.
Summary:
Remove prop `onNavigate` from these views.
- NavigationAnimatedView
- NavigationCardStack
- NavigationCard

Also, the `sceneProps` onject that is passed to the `renderScene` function
no longer contains `onNavigate`.

The contract that `onNavigate` expects has been vague. Different data flow
system may expect complete different params for such function

For instance,

  * onNavigate({type: 'back'});
  * onNavigate({type: 'BACK'});
  * onNavigate('back'});

We have no intention to unify such generic API since it's more likely to be
constrained by the data flow frameworks such as redux or flux.

Also, passing the prop `onNavigate` all the way down to the component that
invokes the navigation action can be really tedious. We'd expect developer
to either pass such callback (onNavigate) via context or just set up some
kind of static actions that any component can call directly.

`onNavigate` was previously added as a part of (redux-like) reducers-friendly
feature but that's no longer the case.

This new prop `onNavigateBack` is used to explicitly handle the case when the back button or back gesture
is performed.

Reviewed By: ericvicenti

Differential Revision: D3410873

fbshipit-source-id: a703cf0debd474cff33d6610e858b9c4bb3ecbf5
2016-06-09 17:58:27 -07:00
Kevin Smith 7e445e6cfa Improve PushNotificationIOS documentation
Summary:
The documentation currently list a few but not all of the steps required. This changes completes that list of required project changes.

This addresses #5612
Closes https://github.com/facebook/react-native/pull/7985

Differential Revision: D3414576

Pulled By: nicklockwood

fbshipit-source-id: 2c7ea6598ee4cd8b6945d9bb229bed5b592a68f6
2016-06-09 16:28:24 -07:00
Kasim Tan e334643592 Fix typo
Summary: Closes https://github.com/facebook/react-native/pull/8036

Differential Revision: D3414563

Pulled By: nicklockwood

fbshipit-source-id: a9dc541e5d76eb4c7fe65336af5b1692ace8da26
2016-06-09 16:28:24 -07:00
Dave Miller b457af625a Add custom error reporter in Groups
Differential Revision: D3413351

fbshipit-source-id: 580782aac2966a07a3dbce9e9268392739e4803b
2016-06-09 14:13:27 -07:00
MacKentoch b8e9b22623 add JS Air and PermisPts to showcase
Summary:
Add My 2 React Native Applications to showcase:

- JS Air
 - iOS and android
 - [javascriptair podcast](https://javascriptair.com) related
 - [open source](https://github.com/MacKentoch/jsair-mobile)
- PermisPts
  - iOS only but working on Android version
  - french driving license related
Closes https://github.com/facebook/react-native/pull/8034

Differential Revision: D3412970

fbshipit-source-id: 4f92f4ab369a297f0d48adca28c199ecb9f6c1a6
2016-06-09 13:13:27 -07:00
Ovidiu Viorel Iepure 7a635b2cd2 Open sourced CatalystTouchBubblingTestCase test for RN Android
Reviewed By: bestander

Differential Revision: D3411681

fbshipit-source-id: 7b511a0447c61d94cbd43b7983fb3f96c2fcbddf
2016-06-09 11:29:12 -07:00
Ovidiu Viorel Iepure a7e6eea919 Open sourced CatalystSubviewsClippingTestCase test for RN Android
Reviewed By: bestander

Differential Revision: D3411402

fbshipit-source-id: c4f51f0366c30815a3a409ee13b61900d882fcc9
2016-06-09 11:29:12 -07:00
Fred Liu c99fb9cb9b More bounce
Summary: Bounce more

Reviewed By: ejanzer

Differential Revision: D3411697

fbshipit-source-id: 6d21b4b0f2637ac0a290b372cb22ec1b0ca38f60
2016-06-09 10:43:51 -07:00
Brandon Withrow 19e2388a76 Add support for native animations on iOS
Summary:
Currently on iOS animations are being performed on the JS thread. This ports animations over to the native thread and performs them natively. A lot of this work has already been done on Android, but this PR enables a few animation nodes that Android doesn't yet support such as Transform, Multiplication, and Addition nodes.
Also there is a demo of the native animations added to the UIExplorer app.
Closes https://github.com/facebook/react-native/pull/7884

Reviewed By: javache

Differential Revision: D3409179

Pulled By: nicklockwood

fbshipit-source-id: ef2d8840032e0c32f49e4a16ba86d448662e1751
2016-06-09 10:43:51 -07:00
Dave Miller 9bdb63c234 Add ability to dump a Native View Hierarchy
Differential Revision: D3411095

fbshipit-source-id: cc7e26eea63b0146250177c2e1b780ecc03da02f
2016-06-09 10:14:06 -07:00
Nick Lockwood 235749ba19 Fix missing images
Summary:
Under rare and as-yet-to-be determined circumstances, images can sometimes fail to load/download and get "stuck", without producing an error.

Because the `RCTNetworkTask` for these images is stuck in the "in progress" state, they clog up the RCTImageLoader task queue, which has a limit of 4 concurrent in-progress tasks.

This was previously masked by the fact that we automatically cancelled image requests when the RCTImageView moved offscreen, but we no longer do that.

This diff adds logic to detect some types of stuck task and remove them, thereby unblocking the queue. I've also restored the functionality of cancelling downloads for offscreen images (but not unloading the image itself) so that stuck images will be cancelled when you move to another screen, instead of using up space in the queue forever.

Reviewed By: fkgozali

Differential Revision: D3398105

fbshipit-source-id: 75ee40d06a872ae8e1cb57f02f9cad57c459143c
2016-06-09 09:58:31 -07:00
Nick Lockwood a05e05fafb Converted zIndex to integers
Summary: Converted the zIndex property on iOS to NSInteger instead of double. This is consistent with the CSS spec, and helps to simplify the Android implementation.

Reviewed By: javache

Differential Revision: D3411491

fbshipit-source-id: 902ebc29aac39a65f7e8707a28607655f9f5052c
2016-06-09 09:58:31 -07:00
Andy Street eef03fd552 Fix bug where UIOperations aren't executed after hosting Activity is paused.
Summary:
When we hit the back button and unmount the ReactRootView, we tell JS to unmount the application root node, which causes JS to asynchronously come back and tell the UIManager to drop the corresponding root view.

This issue was that by the time JS gets back to us, we likely will have already paused the UIManager frame callback which means the view unmounting never actually happens: it just gets stuck in the queue.

The solution is to immediately execute batches when they are enqueued when the frame callback isn't running.

Reviewed By: lexs

Differential Revision: D3398958

fbshipit-source-id: 0de81061a97a119be4cb0b12d6f01c1cec8e8171
2016-06-09 08:43:47 -07:00
Nathan Azaria 5ef3b47ede Replaced CTLSettings with RCTBundleURLProvider internally
Reviewed By: javache

Differential Revision: D3398803

fbshipit-source-id: 1c5610a1e59f3fad4c57b0b280559f2ff2acf05a
2016-06-09 07:28:19 -07:00
Spencer Ahrens be09cccb1f Make InteractionManager tasks cancellable
Summary:
Returns a promise-like object with a new cancel function that will dig through the queue
and remove relevant tasks before they are executed. Handy when tasks are scheduled in react
components but should be cleaned up in unmount.

Reviewed By: devknoll

Differential Revision: D3406953

fbshipit-source-id: edf1157d831d5d6b63f13ee64cfd1c46843e79fa
2016-06-08 22:58:19 -07:00
Tim Yung b03a725447 RN: Clear Debug Console on Reload JS
Summary:
Clears the debug console whenever the React Native JS is reloaded.

NOTE: This respects "Preserve log" in Chrome by default.

Reviewed By: jingc

Differential Revision: D3409713

fbshipit-source-id: ce215e3125cf43ab3ea5811c707fab9dfa4bcbb3
2016-06-08 19:13:25 -07:00
Hedger Wang 67002e8ae3 Clean up NavigationStateUtils
Summary:
== API Breaking Change ==

- Add unit tests to ensure that NavigationStateUtils does the right thing.
- Remove the logics that lets NavigationStateUtils accept empty value as input
  and return a new state.
- Remove the method `NavigationStateUtils.getParent`, `NavigationStateUtils.set`. These methods are rarely used and they can be replaced by other methods.

Reviewed By: ericvicenti

Differential Revision: D3374934

fbshipit-source-id: 0fdf538d014d7c5b4aa1f15a0ee8db9dc91e33cd
2016-06-08 15:13:31 -07:00
Alex Kotliarskyi 30e9c40898 Remove unused rootTag
Summary:
`rootTag` is a lie, it's passed around but never actually used. IIRC
`findInstanceByNativeTag` needed it but seems like not anymore.

Reviewed By: spicyj

Differential Revision: D3382144

fbshipit-source-id: eb96870a3848333e66bf045e78e95c7763812cc4
2016-06-08 14:43:30 -07:00
Alex Kotliarskyi f26c908638 Extract AppContainer into its own module
Summary:
`renderApplication` is cluttered with unrelated Dev-only stuff
with duplicate code across iOS and Android. This is the first
diff in series of refactorings, with the end goal of making element
inspector work on Modals.

Reviewed By: spicyj

Differential Revision: D3381956

fbshipit-source-id: 4ac6525633e7482628d2b064eb894da2806daf8c
2016-06-08 14:43:30 -07:00
Héctor Ramos 8324e92f76 Streamline Getting Started Instructions
Summary:
The Getting Started guide is one of the first documents a new user will encounter. This pull request aims to minimize the amount of time it takes to get a React Native app up and running.

* The original section title, "Required prerequisites", is redundant. "Installing React Native" is a better description of what this section is about.
* Detailed installation instructions for each of the required tools are delegated to the first party instructions where available.
* If the installation instructions already take care of installing the latest version, there's no need to warn the user about the minimum required version.

* Assume the user is familiar with Homebrew or Chocolatey, and defer installation instructions to the package manager's website. The installation and explanation of what a package manager is is out of scope within this document.
* Link to Node.js package manager instructions and let savvy Linux users use the pack
Closes https://github.com/facebook/react-native/pull/8010

Differential Revision: D3407029

Pulled By: JoelMarcey

fbshipit-source-id: c8b25d5b176c40eb58e5d7d3c6f13d43cde65166
2016-06-08 13:28:34 -07:00
Hedger Wang 3a8b50ad55 Kill NavigationReducers
Summary:
For navigation actions at high level, reducers from NavigationReducers does not
know anything about the app-specific state thus people won't use these reducers.
Instead, people should build their own reducers.

There are a lot of good libraries available that help people to reducing things if that's
what they really need.

At the low level, for navigation state changes that don't involve app-specific state,
`NavigationStateUtils` should server that kind of need.

`NavigationReducers` serves little benefit cause it does not know the app state, it does
not know how to traverse the navigation states which can be a tree, a list or a map.

That said, we hold no interest in owning in the core navigation library.

Reviewed By: ericvicenti

Differential Revision: D3372910

fbshipit-source-id: 797382b46e7d64b7ad578b51dd37e2b941faa83d
2016-06-08 11:43:29 -07:00
Olivier Notteghem bb9ed2d24c Fix potential NPE is layout animation deletion code
Reviewed By: dmmiller

Differential Revision: D3403930

fbshipit-source-id: 20067542d06396997719bbe963ce87403fae5ac3
2016-06-08 08:13:32 -07:00
Olivier Notteghem c0ac0d5071 Fix missing check causing layout some animation code to be executed when it shouldn't
Reviewed By: dmmiller

Differential Revision: D3404149

fbshipit-source-id: 8663325fd3a4b9257d84075e22bd9cc59d6414ac
2016-06-08 08:13:32 -07:00
Yann Pringault c8101607d8 Minor typo in Error message
Summary: Closes https://github.com/facebook/react-native/pull/8001

Differential Revision: D3404663

fbshipit-source-id: 0d0af84e4f6d31e6ddf79ef4e263737542b81361
2016-06-08 06:13:25 -07:00
Valentin Agachi 66a13d548b Add flexibility to the iOS UIExplorer test script
Summary:
Add more flexibility to the iOS UIExplorer test scripts:
- support environments without `xcpretty` installed
- support custom xcode destination argument

Initial PR is based on the last git commit which passed on Travis today (2a92b52) in order to test Travis build.

I'll rebase to latest, in order to fix merge conflicts, before merging.

**Test plan (required)**

Make sure tests pass on Travis.
Closes https://github.com/facebook/react-native/pull/7982

Differential Revision: D3404574

Pulled By: avaly

fbshipit-source-id: 48aabd81fba67d482af46728a9c3975842f03060
2016-06-08 04:43:22 -07:00
Konstantin Raev 91e504b0c8 Fixed website generation for CameraRoll.js
Summary:
Fixes whate was broken in #7988

Website generation does not understand Promise<*>.
Closes https://github.com/facebook/react-native/pull/8002

Differential Revision: D3404468

Pulled By: avaly

fbshipit-source-id: 9070ce038431795b0195f9eb0366aab5f3fb4cb0
2016-06-08 04:13:49 -07:00
Konstantin Raev 525d35ba67 Reverted commit D3400379
Reviewed By: mhorowitz

Differential Revision: D3400379

fbshipit-source-id: b7e733e74bb0f4fbd597fd073826c399ece2c47f
2016-06-08 02:58:36 -07:00
Nick Lockwood b0fed416cb Fixed ART views
Summary: Fixed ART views, which were broken by the zIndex diff

Reviewed By: wwjholmes

Differential Revision: D3403679

fbshipit-source-id: cc3cdccd19c21223ce6bddeda3d914937ecb73b6
2016-06-08 00:13:30 -07:00
Brandon Withrow b29c938312 Reverted commit D3401811
Summary:
Currently on iOS animations are being performed on the JS thread. This ports animations over to the native thread and performs them natively. A lot of this work has already been done on Android, but this PR enables a few animation nodes that Android doesn't yet support such as Transform, Multiplication, and Addition nodes.
Also there is a demo of the native animations added to the UIExplorer app.
Closes https://github.com/facebook/react-native/pull/7884

Differential Revision: D3401811

Pulled By: nicklockwood

fbshipit-source-id: 709e533243130153febef03ddd60d39e9fe70e3e
2016-06-07 23:43:30 -07:00
Brandon Withrow 5ecdb252c3 Add support for native animations on iOS
Summary:
Currently on iOS animations are being performed on the JS thread. This ports animations over to the native thread and performs them natively. A lot of this work has already been done on Android, but this PR enables a few animation nodes that Android doesn't yet support such as Transform, Multiplication, and Addition nodes.
Also there is a demo of the native animations added to the UIExplorer app.
Closes https://github.com/facebook/react-native/pull/7884

Differential Revision: D3401811

Pulled By: nicklockwood

fbshipit-source-id: c8d750b75e4410923e17eaeb6dcaf079a09942e2
2016-06-07 20:43:37 -07:00
Kyle Corbitt 7357ccc370 Allow CameraRoll to export videos
Summary:
This PR adds the ability to export videos to the CameraRoll on both Android and iOS (previously only photos were possible, at least on iOS). The API has changed as follows:

```
// old
saveImageWithTag(tag: string): Promise<string>

// new
saveToCameraRoll(tag: string, type?: 'photo' | 'video'): Promise<string>
```

if no `type` parameter is passed, `video` is inferred if the tag ends with ".mov" or ".mp4", otherwise `photo` is assumed.

I've left in the `saveImageWithTag` method for now with a deprecation warning.

**Test plan (required)**

I created the following very simple app to test exporting photos and videos to the CameraRoll, and ran it on both iOS and Android. The functionality works as intended on both platforms.

```js
// index.js

/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * flow
 */

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  CameraRoll,
} from 'react-native';
import FS fro
Closes https://github.com/facebook/react-native/pull/7988

Differential Revision: D3401251

Pulled By: nicklockwood

fbshipit-source-id: af3fc24e6fa5b84ac377e9173f3709c6f9795f20
2016-06-07 16:43:42 -07:00
Janic Duplessis d4e7c8a055 Properly validate layout animation config
Summary:
The type key for a layout animation config must be supplied otherwise the app crashes (on Android). I added a isRequired check in JS as well as an explicit exception in java otherwise it crashed at a very hard to debug place. The crash happens when passing null to `Animation.setInterpolator` so this makes sure it never happens.

**Test plan (required)**

Tested that the error is caught properly in JS when passing an invalid animation config like

```
LayoutAnimation.configureNext({
  duration: 250,
   update: { type: undefined }, // or LayoutAnimation.Types.easeInEastOut in my case haha :)
});
```

Also tested the java exception.
Closes https://github.com/facebook/react-native/pull/7958

Differential Revision: D3401760

Pulled By: nicklockwood

fbshipit-source-id: 83c019d863c2b2294405b60e87297c562add0f49
2016-06-07 16:28:29 -07:00
Chris Hopman 0e50373b60 Invert native dependency of new bridge -> old bridge
Reviewed By: mhorowitz

Differential Revision: D3400379

fbshipit-source-id: d641846261977b4f77c2d215bef94e8e676e2c02
2016-06-07 16:28:29 -07:00
Jon Lebensold f8cbd9f4f4 typo in the error message (missing a space due to newline)
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).

For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas
Closes https://github.com/facebook/react-native/pull/7974

Differential Revision: D3401208

Pulled By: nicklockwood

fbshipit-source-id: 7c807339ba512e05f848036fb40840cf3fee8df6
2016-06-07 15:28:20 -07:00
Chris Hopman 5b871ad9d7 Begin inverting dependency between new+old bridge
Reviewed By: mhorowitz

Differential Revision: D3306510

fbshipit-source-id: 312a498a4461e980f1f749fe7858a13be14dfa2f
2016-06-07 13:28:21 -07:00
Nick Lockwood 26a5b033f8 Fixed unit tests
Reviewed By: bestander

Differential Revision: D3399766

fbshipit-source-id: ebc72a9d02ff812eccae13efc1492d2fec3f95c3
2016-06-07 12:43:49 -07:00
Maarten Schumacher 39eca05b91 Handle the case where redirect URL is relative
Summary:
While trying to download an image I encountered an error:

![screen shot 2016-05-31 at 13 58 54](https://cloud.githubusercontent.com/assets/10407025/15799726/a7bcbf1c-2a5d-11e6-926a-b2f84e011258.png)

As you can see the domain name is missing from the URL. I traced it back to a method which handles redirects. It would retrieve the redirect URL from the `Location` header field, but it didn’t handle the case where `Location` contains a relative URL (which [according to the RFC spec](https://tools.ietf.org/html/rfc7231#section-7.1.2), is allowed).
Closes https://github.com/facebook/react-native/pull/7926

Differential Revision: D3399531

Pulled By: nicklockwood

fbshipit-source-id: ffbd5e9fc55b1737a8ff6a9bcc06fb1f9f19d093
2016-06-07 12:13:30 -07:00