Commit Graph

8486 Commits

Author SHA1 Message Date
Andres Suarez c22b00e58f Revert D4182752: redux, react-redux and redux-thunk to devDeps
Differential Revision: D4182752

fbshipit-source-id: ba6af3a754ae4a719605aa68f730c741da192a55
2016-11-16 00:58:31 -08:00
Andres Suarez 262a0fab76 redux, react-redux and redux-thunk to devDeps
Reviewed By: davidaurelio

Differential Revision: D4182752

fbshipit-source-id: e224310be4bb7ff91467d408ecf053e98e0029b5
2016-11-16 00:13:51 -08:00
Kazuki Sakamoto e864c40be8 Introduce CSSLayoutSetMemoryFuncs
Reviewed By: emilsjolander

Differential Revision: D4178386

fbshipit-source-id: a79dbdaf82a512f42cc43f99dbc49faba296903b
2016-11-15 20:28:30 -08:00
Emil Sjolander a07abe7188 Correctly translate nowrap -> NO_WRAP
Summary: The java enum was recently changed from NOWRAP -> NO_WRAP so the translation from js failed. This fixes that.

Reviewed By: limichaelc

Differential Revision: D4186869

fbshipit-source-id: fe35211a6632d80356d35a01a079279ef4bd7006
2016-11-15 18:58:37 -08:00
Konstantin Raev 7e8bef872a limited max workers in packager to 1 to stop crashes in Ci…
Summary:
This should stop Circle CI from crashing.

Let's wait for the test to pass.

cc davidaurelio matryoshcow mkonicek
Closes https://github.com/facebook/react-native/pull/10962

Differential Revision: D4186949

Pulled By: kentaromiura

fbshipit-source-id: 2542376a6e4bf0d7dc423c574bd4573ae9bdfc96
2016-11-15 18:58:37 -08:00
Martin Kralik 26e373c903 fix view clipping to operate on ui hierachy
Summary:
There was a bug in the view clipping logic.
Clipping works on uiview hierarchy, but I've been using `reactSuperview` to get clipping rect for my parent.
This is incorrect in a case where these two hierarchies don't match and there are some views between a view and its `reactSuperview`.

So we should really use normal `superview`. A minor complication is that `superview` is `nil` if we are clipped.
We could remember what our last `superview` was, but that's extra data we have to manage. Instead I use one clever trick to avoid doing so.
(Let me know if it makes sense based on my inline documentation.)

Reviewed By: mmmulani

Differential Revision: D4182647

fbshipit-source-id: 779cbcec0bd08eb270c3727c9c5cb9c080c4a2a4
2016-11-15 17:13:48 -08:00
Dan Caspi b123cc279e Another fix
Reviewed By: benhiller

Differential Revision: D4185166

fbshipit-source-id: 940dbfbd65c94455979c7e88375784a5c68647a5
2016-11-15 14:58:36 -08:00
Oyewale Ademola 1d99f0d91b Add note to let users know of the screen overlay permissions for a first time run and also the "connect" error issue
Summary:
Add note to let users know of the **screen overlay permissions** for the application for a first time run.

Let users know of the **failure to connect** issue also for a first time deployment with a red screen which can be fixed by trying again.
Closes https://github.com/facebook/react-native/pull/10707

Differential Revision: D4184582

fbshipit-source-id: d9a19678b72359547c34109eb118d4aed5c74928
2016-11-15 12:58:40 -08:00
Kevin Gozali a217c8bc9c Allow specifying no destination for the uiexplorer test run
Summary: This is a simple change to allow not specifying xcodebuild's `-destination` flag if we just need to build the project without running the test.

Reviewed By: bestander

Differential Revision: D4173546

fbshipit-source-id: 0b77bb5fc01d8cb6a8c9bc765294796631839655
2016-11-15 12:58:40 -08:00
Dan Caspi 851aed262d Fixing a missing colon
Reviewed By: javache

Differential Revision: D4183368

fbshipit-source-id: b7a8bdfa40bf13d3fd5caae8a0985492f1e8b901
2016-11-15 11:17:49 -08:00
Dan Caspi 9fc6204efc Add support for JSC's sampling profiler on iOS for RN
Reviewed By: javache

Differential Revision: D4107919

fbshipit-source-id: ecfe2cacdb78b857e461f7006b29e4d1fe1a1862
2016-11-15 09:29:06 -08:00
Andrew Jack c2a55baf80 Prevent hitslop crash on Android
Summary:
**Motivation**
Currently to use the `hitSlop` property on Android you must define the object properties `left`, `top`, `right`, and `bottom` or it will crash. iOS allows omitting object properties from the hitSlop.

This change guards and allows the `hitSlop` object properties to be optional like iOS.

**Test plan (required)**

Run the [example](f930270b00/Examples/UIExplorer/js/TouchableExample.js (L318)) and omit a hitslop property and check it does not crash.
Closes https://github.com/facebook/react-native/pull/10952

Differential Revision: D4182815

Pulled By: ericvicenti

fbshipit-source-id: 07d7aca67b5739d5d1939b257476c24dcb10cbb0
2016-11-15 09:29:06 -08:00
Alexander Blom 2cc57d05a4 Support loading source maps
Reviewed By: davidaurelio

Differential Revision: D4121492

fbshipit-source-id: e2f9c42de3e28cd231580d8b7d3230d47e300d2e
2016-11-15 08:59:02 -08:00
Alexander Blom f571d28e68 Allow launching inspector from dev menu
Reviewed By: davidaurelio

Differential Revision: D4095356

fbshipit-source-id: 46e43578cdcd663316efb82dffde27b77294c5c0
2016-11-15 08:59:02 -08:00
Alexander Blom 18184a83f1 Make Android connect to the inspector proxy
Summary: Maintains a single persistent connection to the packager for the inspector. It supports getting the available pages and connecting to them.

Reviewed By: foghina

Differential Revision: D4088690

fbshipit-source-id: 0c445225f5a3de573b199e7868c8693b78f45729
2016-11-15 08:59:02 -08:00
Alexander Blom 655fe2796a Add packager inspector proxy
Summary:
Implements a multi-device proxy for the Chrome debugging protocol. Each device connects
to the proxy over a single websocket connection that is able to multiplex messages to multiple
Javascript VMs. An inspector instance running in Chrome can connect to a specific VM via this
proxy.

Reviewed By: davidaurelio

Differential Revision: D4088492

fbshipit-source-id: 3ee934e98604b5a378da732e687ca05fe3d23ce0
2016-11-15 08:59:02 -08:00
Andy Street c94a71e5bd Sort BUCK deps in open source
Reviewed By: emilsjolander

Differential Revision: D4182733

fbshipit-source-id: 245982d8155a5c3676befc2b0f2056f43f648dbc
2016-11-15 08:59:01 -08:00
Emil Sjolander ffcdf25281 Autogenerate enum defenitions for all languages
Reviewed By: gkassabli

Differential Revision: D4174263

fbshipit-source-id: 478961a8f683e196704d3c6ea1505a05c85fcb10
2016-11-15 08:44:30 -08:00
Saleeh 27ae04cabd Fixed #7564
Summary:
Fix for some firewall with ModSecurity
 rules for MULTIPART_STRICT_ERROR, namely MULTIPART_BOUNDARY_QUOTED.
Closes https://github.com/facebook/react-native/pull/10876

Reviewed By: javache

Differential Revision: D4176229

Pulled By: ericvicenti

fbshipit-source-id: 8db819bd3e9b23fa3c1802c48091bb4c44358381
2016-11-15 08:44:30 -08:00
Andy Street c04ab92192 Use -O3 to compile CSSLayout in open source
Summary: This is how we compile internally

Reviewed By: emilsjolander

Differential Revision: D4182691

fbshipit-source-id: 314b1a1ead7d299677ce7f71549c986e1b796b3b
2016-11-15 08:28:56 -08:00
Andres Suarez 0c9eeef88e Keep flow-bin only in devDeps
Reviewed By: davidaurelio, jeffmo

Differential Revision: D4182434

fbshipit-source-id: 71f46e4af6df01dc211599294867d17899318fd1
2016-11-15 07:58:42 -08:00
Christoph Pojer 3bd949cac7 Update Jest + jest-haste-map
Reviewed By: voideanvalue

Differential Revision: D4180887

fbshipit-source-id: f6ee6901e63206824f0639c81b64167b66da2168
2016-11-15 06:58:45 -08:00
Andy Street 3b20a39f7b Move ReactCommon/CSSLayout to ReactCommon/CSSLayout/CSSLayout
Reviewed By: emilsjolander

Differential Revision: D4182345

fbshipit-source-id: 05cb4f0b0e7971d4f66e656ea89d876264a61bd4
2016-11-15 06:28:45 -08:00
Andy Street 7cf27cfea6 Add jni-hack to RN OSS
Summary: See committed README.md. This is part of the migration to the jni implementation of CSSLayout.

Reviewed By: emilsjolander

Differential Revision: D4177009

fbshipit-source-id: f1860f5d4ffafa1375a9658227e0ac10b7df4845
2016-11-15 05:13:37 -08:00
Andres Suarez 72157cf991 Remove parse
Reviewed By: davidaurelio

Differential Revision: D4174312

fbshipit-source-id: 024ae3da56c1afd882f808c15a3b90db35627587
2016-11-15 04:59:48 -08:00
Jean Lauliac 2ed588751d packager: JSTransformer/index.js: @flow
Reviewed By: cpojer

Differential Revision: D4167006

fbshipit-source-id: db0deb2262fe2c53735cb46d9de6e6da1b375180
2016-11-15 04:28:53 -08:00
Jean Lauliac 31b4648a8a packager: DependencyGraph-test: require extractDependencies only once
Reviewed By: davidaurelio

Differential Revision: D4182071

fbshipit-source-id: 622cb3e011b67c2a7df0c6308fbcb7a9ea1ebb96
2016-11-15 03:43:42 -08:00
Jean Lauliac 15baa16ada packager: DependencyGraph-test: mock child_process
Reviewed By: cpojer

Differential Revision: D4182064

fbshipit-source-id: e645e6d952e3aeaadaf35e29d6fcaf6395e590a7
2016-11-15 03:43:42 -08:00
Martin Hernan Giachetti c9e5a64940 Update error-guard.js
Summary:
This vars should be let instead of const because they are reassigned.
Closes https://github.com/facebook/react-native/pull/10818

Differential Revision: D4179219

Pulled By: javache

fbshipit-source-id: b09959c5ff31ad1a896d454011dffd915a0a44c4
2016-11-15 00:13:42 -08:00
Adam Comella fde7c35449 Make resolveAssetSource public
Summary:
When building a native component which takes an image reference as a prop, `resolveAssetSource` needs to be called on the image reference. If this isn't done, the native component may receive the opaque type returned by `require` (e.g. `require('./foo.png')`) which is useless to the native component. `resolveAssetSource` is used by builtin components that take image references such as `Image`, `WebView` and `MapView`.

This change makes `resolveAssetSource` public so that third-party native components can correctly handle image references.

**Test plan (required)**

Verified that `Image.resolveAssetSource` works in a test app. Also, my team is using this change in our app.

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

Differential Revision: D4177803

Pulled By: ericvicenti

fbshipit-source-id: ffc511b9340325f7d1111002309cd8558ab8e6b0
2016-11-14 21:14:10 -08:00
Liam 7f6d435188 "this" not needed in mReactInstanceManager.onDestroy()
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**

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
Closes https://github.com/facebook/react-native/pull/10924

Differential Revision: D4181397

Pulled By: ericvicenti

fbshipit-source-id: e5c762937efba3bd65fbe00cc94678e8c1461659
2016-11-14 20:58:56 -08:00
Joel Arvidsson 31b7819b02 Unbreak custom animated components
Summary:
Commit c9960817ee broke `Animated.createAnimatedComponent()` for most components outside of the standard ones. This is because it will throw an exception for any component without a `viewConfig` defined, which basically no composition style component has AFAIK.

Related issues: https://github.com/facebook/react-native/issues/10825, https://github.com/oblador/react-native-vector-icons/issues/337, https://github.com/oblador/react-native-animatable/issues/70

This PR removes the check which is more treating the symptoms really – but shouldn't `setNativeProps` duck typing be enough?
Closes https://github.com/facebook/react-native/pull/10827

Differential Revision: D4178183

Pulled By: ericvicenti

fbshipit-source-id: b85cc78ed6d84dada4d476caa243332eaadb003f
2016-11-14 20:58:56 -08:00
Gabe Levi 61d1a4fb39 Deploy v0.35.0
Reviewed By: davidaurelio

Differential Revision: D4177391

fbshipit-source-id: c02cf98ed275b7032103b11eab6d0e189f8d8f24
2016-11-14 20:45:17 -08:00
Adam Comella e87e181998 Android: Expose Image's onError event to JavaScript
Summary:
iOS supports an Image onError event. Android was firing the event but it was never reaching JavaScript because Android didn't include this event in `getExportedCustomDirectEventTypeConstants`.

**Test plan (required)**

Verified that the `onError` event now fires in a test app.

My team uses this change in our app.

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

Differential Revision: D4180149

Pulled By: ericvicenti

fbshipit-source-id: 4bf0b9aa7dc221d838d7b6b3e88bb47196dcadef
2016-11-14 19:43:58 -08:00
Pete Huitsing 191db90345 Prevent null header value from raising exception
Summary:
In the wild, our app will occasionally crash with:
```
Fatal Exception: java.lang.NullPointerException
value == null
```

The stack trace brings it back to `okhttp3.Headers$Builder.checkNameAndValue (Headers.java:316)`:
```
if (value == null) throw new NullPointerException("value == null");
```

In the proposed fix, we simply continue the documented functionality of the `extractHeaders` method by returning "null" for invalid data.
Closes https://github.com/facebook/react-native/pull/10861

Differential Revision: D4178624

Pulled By: ericvicenti

fbshipit-source-id: 632e742196339639cb57ea47f9d0efbf04f090be
2016-11-14 19:43:58 -08:00
Linmic 39c18186e1 Fix redundant styles on RefreshControl for Android
Summary:
Fixed a bug that RefreshControl wrongly apply redundant styles on Android, this solves #10742
Closes https://github.com/facebook/react-native/pull/10899

Differential Revision: D4176670

fbshipit-source-id: 357bfd726a39fe8e79d4d70ddfdfd1d39034620e
2016-11-14 17:58:58 -08:00
Adam Comella 9a8b5d9f4f Android: Disable debug menu when monkey is running
Summary:
When testing an app on Android using the monkey, the monkey shouldn't be able to open or interact with the dev menu.

**Test plan (required)**

My team uses this change in our app.

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

Differential Revision: D4176167

Pulled By: ericvicenti

fbshipit-source-id: 8eb64715ae7496cdf957ee963777f66ab358546c
2016-11-14 16:58:55 -08:00
Martin Konicek 7991d1206b Revert import from D4133936 (13aba8)
Summary:
This broke the open source build: http://imgur.com/a/1Btd1

javache tells me reverting this line should fix it.

Reviewed By: javache, ericvicenti

Differential Revision: D4178951

fbshipit-source-id: c680de6b3b48bf137294dfe053afaff7b0613caf
2016-11-14 16:28:55 -08:00
Pieter De Baets 6fe977d5cc Fix missing reference to RCTLog
Reviewed By: bestander

Differential Revision: D4176714

fbshipit-source-id: 92c7ef86c9c51b828fb564606bc5de16bfe4f54f
2016-11-14 14:14:06 -08:00
ianlin e51cb349ce PushNotificationIOS: Use PushNotificationEventName as the key to store in the handler map
Summary:
If we are using the same handler for different events, e.g. both `notification` and `localNotification` use `_onNotification()` handler, the former listener stored in `_notifHandlers` would be overridden by the latter so it's impossible to remove the `notification` listener when we call `removeEventListener`.

This PR stores the listeners by using `pushNotificationEventName` (notification, localNotification, register or registrationError) as the key.

Use the same handler for `notification` and `localNotification`, both listeners will be removed when calling `removeEventListener`.
Closes https://github.com/facebook/react-native/pull/10776

Differential Revision: D4168722

Pulled By: hramos

fbshipit-source-id: d68581428d2acde314f7b5333feafe1ec7807159
2016-11-14 12:58:32 -08:00
Konstantin Raev 015a497cf1 Revert D4149694: [RN] Update Jest + jest-haste-map
Differential Revision: D4149694

fbshipit-source-id: 65a39bc1d0a0f9e7094ebc8dec9233e432a5e14d
2016-11-14 12:43:51 -08:00
Fred Liu 1f125e3d41 Revert D4157971: [csslayout] BREAKING - Fix sizing of container with child overflowing parent
Differential Revision: D4157971

fbshipit-source-id: be055cf018fd39b3cee9af0bc777831fcf757190
2016-11-14 12:28:40 -08:00
Chirag Jain 07c5882a38 enable variable size slideoutView with swipeableListView
Summary:
Currently, swipeableList expects maxSwipeoutDistance to be a number. This breaks when you want each row to have a variable width slideoutView.

This PR add support for passing maxSwipeoutDistance as a number(as before) or a function which gets the current rowData for conditionally returning the distance based on the row data.
Closes https://github.com/facebook/react-native/pull/10189

Differential Revision: D4168561

Pulled By: hramos

fbshipit-source-id: b78564f83279cab3bf04297034ca78edfff74be7
2016-11-14 11:58:58 -08:00
Slavik Manukyan ec6e274172 relativeKeyboardHeight works wrong in some cases
Summary:
relativeKeyboardHeight calculation is wrong when frame.y < keyboardFrame.y

Let's look at an example:

``` jsx
import React, { Component } from 'react';
import {
  KeyboardAvoidingView,
  TextInput,
  AppRegistry,
  Text,
  View
} from 'react-native';

export default class Test extends Component {
  constructor(props, context) {
    super(props, context);
  }

  render() {
    return (
      <View style={{flex: 1, marginTop: 20}}>
          <Text style={{ flex: 1, alignItems: 'center'}}>
            Hi! This is test.
          </Text>

          <KeyboardAvoidingView behavior={'position'} keyboardVerticalOffset={-20} >
            <TextInput
              style={{height: 40, borderColor: 'gray', borderWidth: 1}}
            />
          </KeyboardAvoidingView>
      </View>
    );
  }
}

AppRegistry.registerComponent('Test', () => Test);
```

![rn-relativekb](https://cloud.githubusercontent.com/assets/13254349/17298119/b2192830-5819-11e6-968c-d9e95b6e4aba.gif)

How _relativeKeyboardHeight_ calculates positio
Closes https://github.com/facebook/react-native/pull/9139

Differential Revision: D4168431

Pulled By: hramos

fbshipit-source-id: 9181276355490452071b51b51ed7dc9ab80b2444
2016-11-14 11:58:58 -08:00
Héctor Ramos ab898ddda7 Set allowsBackgroundLocationUpdates as necessary when using location …
Summary:
Set the flag 'allowsBackgroundLocationUpdates' to YES if the location background mode is enabled and the 'Always Allow Location' key is set in the App Plist.

**motivation**

We found that on iOS 9.x, the allowsBackgroundLocationUpdates flag must be set on location manager in order to receive updates when the app is in the background (seems to affect actual device only).

**Test plan (required)**
Example app using the forked branch [here](https://github.com/briancalvium/react-native-geolocation-pr-example). Run this example through XCode on a device with 9.x, observe that location update logs continue to appear when the app is in the background. Switch to react native 0.32.0, observe that location update logs stop once the app is in the background.
Closes https://github.com/facebook/react-native/pull/9717

Differential Revision: D4167685

Pulled By: hramos

fbshipit-source-id: 5a62f8433bf8b553561a276fdaa544363298442a
2016-11-14 11:58:58 -08:00
Charles Chen 72b517049a Add a debug support to load js bundle from external URL
Summary: Code refactoring on the dev support class. The idea is to make the code more modular.

Reviewed By: mhorowitz

Differential Revision: D4164676

fbshipit-source-id: 0d29bdaf927cd0e9f399fe6f8e46a16dfa65fb69
2016-11-14 11:43:49 -08:00
Alexander Paterson 92fd0c2a5b Decode URI in asset server
Summary:
Solving this issue https://github.com/facebook/react-native/issues/10364

In development when assets are requested from AssetServer, it tries to find them with URI-friendly filenames. I added a single line to decode these filenames.

Tests are passing. Couldn't find any discussion regarding whether this is a good idea. This was causing some members of my team a bit of grief earlier.
Closes https://github.com/facebook/react-native/pull/10365

Differential Revision: D4168401

Pulled By: hramos

fbshipit-source-id: 9ed3606392d8a6f170998caaf0f9254ba4879b49
2016-11-14 11:43:49 -08:00
Christian Brevik da4df3f12f Make ReactWebView & Client protected
Summary:
I'd like to make `ReactWebView` and `ReactWebViewClient` `protected` instead of `private`, inside the `ReactWebViewManager` class. The reason being that if you extend the `ReactWebViewManager` it'll be much easier to override existing logic.

In my specific case I'd like to be able to override [shouldOverrideUrlLoading](https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/views/webview/ReactWebViewManager.java#L120) inside `ReactWebViewClient` and handle custom URL schemes differently. See #10055.
Closes https://github.com/facebook/react-native/pull/10105

Differential Revision: D4168359

Pulled By: hramos

fbshipit-source-id: ff6cbcf1d56536f0db0d2eea937de2cc065a09f9
2016-11-14 11:28:47 -08:00
npomfret df6b8bd832 Ensure notification payload is passed to completion handler
Summary:
Fixes #10863
Closes https://github.com/facebook/react-native/pull/10860

Differential Revision: D4175834

Pulled By: hramos

fbshipit-source-id: 5cf317eb675528c647425c70eff939a9db9728fa
2016-11-14 11:28:47 -08:00
Ovidiu Viorel Iepure 24d2bbfbab Fix lint in local-cli
Reviewed By: cpojer

Differential Revision: D4166993

fbshipit-source-id: 9a8249175d98b42d7557817846d8c09c9769485e
2016-11-14 11:13:42 -08:00