Commit Graph

2344 Commits

Author SHA1 Message Date
Ryan Gomba bf82a8d1a8 Move RCTNativeAnimatedModule onto the main queue
Summary:
We're mutating dictionaries on one thread for bookkeeping (anytime we receive a call over the bridge) and iterating over them on the main thread each frame (in `updateAnimations`). Seems like this can all happen on the main thread without issue. Am I missing something?

**Test plan (required)**

Run UIExplorer NativeAnimated examples before and after - compare the results. Nothing should have changed.
Closes https://github.com/facebook/react-native/pull/9049

Differential Revision: D3682871

fbshipit-source-id: c6de62063e724b15b9678a9ef0290284e928b31b
2016-08-07 12:58:20 -07:00
Janic Duplessis df05311777 Add transform support for native animated on Android
Summary:
This adds support for the `transform` animated node. This brings feature parity with the iOS implementation and allows running the NativeAnimated UIExplorer example that was created with the iOS implementation on Android. This is based on some work by kmagiera in the exponent RN fork.

This also adds support for mixing static values with animated ones in the same transform as well which is not supported on iOS at the moment. It is also implemented in a way that rebuilds the transform matrix the same way as we build it in JS so it will be easy to remove some of the current limitations like forcing the transforms order and only supporting one of each type.

**Test plan (required)**

Tested with the NativeAnimated example on Android and iOS. Also tested mixing in static values in a transform (`[{ rotate: '45deg' }, { translateX: animatedValue }]`).
Closes https://github.com/facebook/react-native/pull/8839

Differential Revision: D3682143

fbshipit-source-id: 5e6fd4b0b8be6a76053f24a36d1785771690a6f8
2016-08-07 00:58:36 -07:00
Cameron Hunter bdf5adc40b Ensure that existing properties are configurable before redefining
Summary:
`Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js` attempts to setup global variables typical in most JavaScript environments. It finds the previous property value using `Object.getOwnPropertyDescriptor` and preserves it as `original[PropertyName]` (if it existed), it then redefines the property using `Object.defineProperty`.

Properties may only be redefined if the property descriptor specifies that it is configurable ([MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor)). Attempting to redefine an non-configurable property will result in an error: `TypeError: Cannot redefine property: [PropertyName]`.

Not all properties being setup in `InitializeJavaScriptAppEngine.js` are necessarily configurable in the target environment.
Closes https://github.com/facebook/react-native/pull/9244

Differential Revision: D3679683

fbshipit-source-id: cd3398ef2cdf38e58c58862e64b159951c2b22c2
2016-08-05 21:58:29 -07:00
Pieter De Baets f571f016d9 Improve types in RCTFont API
Reviewed By: majak

Differential Revision: D3662880

fbshipit-source-id: f54e1ac164373337460047eb3708a588f578b5fc
2016-08-05 12:44:21 -07:00
Pieter De Baets c5a44b7ca3 Move font helpers to RCTFont
Reviewed By: majak

Differential Revision: D3662804

fbshipit-source-id: 2c03a094a74c617c0d6172e327bd77d23d0d44c2
2016-08-05 12:44:20 -07:00
Krzysztof Magiera 8f75d7346f Support for spring animations
Summary:
This change adds support for spring animations to be run off the JS thread on android. The implementation is based on the android spring implementation from Rebound (http://facebook.github.io/rebound/) but since only a small subset of the library is used the relevant parts are copied instead of making RN to import the whole library.

**Test Plan**
Run java tests: `buck test ReactAndroid/src/test/java/com/facebook/react/animated`
Add `useNativeDriver: true` to spring animation in animated example app, run it on android
Closes https://github.com/facebook/react-native/pull/8860

Differential Revision: D3676436

fbshipit-source-id: 3a4b1b006725a938562712989b93dd4090577c48
2016-08-05 12:14:06 -07:00
Pieter De Baets 0222107170 Customize main thread initialization of native modules (2nd try)
Reviewed By: majak

Differential Revision: D3671197

fbshipit-source-id: e8df7669be79303d335f2c881e97310b5fed47f9
2016-08-05 11:28:32 -07:00
Krzysztof Magiera 68b9a36858 Accept transforms list instead of matrix for transform view parameter.
Summary:
In #7916 I moved transform matrix decomposition logic from JS to java. The next step is to accept list of transforms instead oftransform matrix as a transform ReactProp. This way there is no extra processing required on JS side for the transform param (at least for android now) and this on the other hand allow us to execute transform updates (through offloaded animation) solely on the UI thread.

After this change there is a whole bunch of stuff from `Libraries/Utilities/MatrixMath.js` that can be deleted (methods like: determinant, inverse, transpose). Although astreet mentioned under one of my previous commits that the code is still being referenced internally at fb, so I decided not to delete it here.

**Test plan (required)**
Run UIExplorer Transform example before and after - compare the results
Run android unit test: com.facebook.react.uimanager.MatrixMathHelperTest
Closes https://github.com/facebook/react-native/pull/8892

Differential Revision: D3676017

Pulled By: astreet

fbshipit-source-id: 5275e30805a85c12c89bea44e8b3a2b2ec7b33fa
2016-08-05 10:58:42 -07:00
Gant eba6c379c3 - Update remote image example
Summary:
I've seen quite a few newbs trip on this, so I'm fixing it.

First - you have to set the width/height on a remote image, otherwise nothing shows.  This is [even on stack overflow](http://stackoverflow.com/questions/30091398/unable-to-display-image-with-react-native-with-uri).

Second - with the addition of ATS in iOS most people who copy/paste this example will not be able to load an insecure image, so I changed it to the `https`.

**RESULT** this doc becomes copy/paste friendly again for beginners.
Closes https://github.com/facebook/react-native/pull/9235

Differential Revision: D3675478

Pulled By: JoelMarcey

fbshipit-source-id: 5b414caa40cda72dec4eace686278c26c251c4bb
2016-08-05 08:58:32 -07:00
James Ide f8f7a1540d Prefix isUndefined with "CSS"
Summary:
Consistently namespace all of css-layout's public C API with "CSS". The only function that needed to be renamed was isUndefined, which I renamed to CSSValueIsUndefined.

Fixes #210.
Closes https://github.com/facebook/css-layout/pull/211

Reviewed By: lucasr

Differential Revision: D3674922

Pulled By: emilsjolander

fbshipit-source-id: 1752f477bde45586db112fe2654d0404cc52e1d1
2016-08-05 06:28:38 -07:00
leeight 53c1da0047 InterpolationAnimatedNode fromDoubleArray should support the string type
Summary:
The `NativeAnimationsExample` in Android can not work due to inputRange and outputRange were limited to double array type, which is different from iOS.

So we need let android version to support string array type.
Closes https://github.com/facebook/react-native/pull/8900

Differential Revision: D3674754

fbshipit-source-id: e7844f00940bf0fdd6f7f5003dd4eeefa0c317a0
2016-08-05 02:58:30 -07:00
Hedger Wang 38979f9c68 NavigationExperimental: Stop using absolute position for NavigationHeader.
Summary:
Not a API change, but this may break the layout of exisitng apps that
uses NavigationHeader.

For now, NavigationHeader uses absolute position, which makes it hard for
NavigationCardStack to determine the height of the scenes.

Theoretically, the height of the scenes would be the height of the cards
stack minus the height of the header.

That said, if we want to support the headers with different height (e.g.
MyIOSHeader or MyAndroidHeader), we're forced to expose the height of the
headers and manually compute the height of the scenes.

Alternatively, if the header does not use absolute position, the height
of the scenes can adjust automatically with flex box, and that's what this
commit is about to do.

Reviewed By: ericvicenti

Differential Revision: D3671119

fbshipit-source-id: 26e48f801da3661c5d7dce4752ba927621172f4a
2016-08-04 15:28:30 -07:00
Janic Duplessis 158d435f36 Implement native Animated value listeners on Android
Summary:
Adds support for `Animated.Value#addListener` for native driven nodes on Android. This is based on work by skevy in the exponent RN fork. Also adds a UIExplorer example.

** Test plan **
Run unit tests

Tested that by adding a listener to a native driven animated node and checked that the listener callback is called properly.

Also tested that it doesn't crash on iOS that doesn't support this yet.
Closes https://github.com/facebook/react-native/pull/8844

Differential Revision: D3670906

fbshipit-source-id: 15700ed7b93db140d907ce80af4dae6be3102135
2016-08-04 13:13:33 -07:00
Mengjue Wang f0fb228ec7 Provide forceRTL for LTR language to test
Summary:
1. Provide forceRTL function for developer to test RTL layout in LTR language bundle in I18nUtil and expose it in I18nManager.
2. Rename `allowRTL` and `setAllowRTL` functions

Reviewed By: fkgozali

Differential Revision: D3663693

fbshipit-source-id: 3db13a44c069ae73d1728c211306422db5dd8122
2016-08-04 12:28:30 -07:00
Kyle Corbitt 341b29da71 Render NavigationHeader correctly with hidden status bar
Summary:
Currently, the NavigationExperimental `Header` only renders correctly on iOS when the system status bar is visible. There are legitimate reasons to hide the status bar, especially when displaying in landscape.

This PR adds a `statusBarHeight` prop to the header, which defaults to 20 on iOS and 0 (no status bar) on Android. Changing this value causes the extra space at the top of the header reserved for the status bar to change.

I've tested this change in my own app on iOS with `statusBarHeight` set to 0, 20, and `undefined`, and ensured that it works correctly.
Closes https://github.com/facebook/react-native/pull/8983

Differential Revision: D3668637

fbshipit-source-id: 777a0c53e8fd1caa35ce4980ca3118adcf83b62d
2016-08-04 11:43:55 -07:00
Hedger Wang ca8531105e NavigationExperimental: Rename `renderOverlay` to `renderHeader`
Summary:
NavigationCardStack is a custom component, and its API should be explicit, not
too generic..

In NavigationCardStack, the prop `renderOverlay` is actually used to render
the NavigationHeader, and we uses absolute position to build the layout for
the header and the body.

One of the problem with using absolute postion and fixed height to build the
layout that contains the header is that the header can't have variant height
easily.

Ideally, if the layout for the header used flex-box, we'd ve able to be more
adaptive to deal with the header that has variant height.

That said, let's rename `renderOverlay` to `renderHeader`, then build the
proper layout that explicitly works better with the header.

If we to need to support overlay in navigation, we may consider add
`renderOverlay` later, if it's really necessary.

Reviewed By: ericvicenti

Differential Revision: D3670224

fbshipit-source-id: ff04acfe9dc995cb57117b3fd9b07d5f97b9c6ee
2016-08-04 11:28:31 -07:00
Dotan Nahum 77e48f1782 Make MessageQueue to emit "SPY" events in a way that can be extensible
Summary:
This PR adds a capability for MessageQueue to emit "SPY" events in a way that can be extensible, to later allow for a tooling ecosystem to grow, one example is the existing [Snoopy](https://github.com/jondot/rn-snoopy) tool that is, for now, forced to work with monkeypatches, and after this PR will be able to use a "formal" way to trace queue events.

After this change, we can wire a "spy" into a queue that will expose the events in different and interesting ways, see below (done with Snoopy):
  <img src="https://github.com/jondot/rn-snoopy/blob/master/media/snoopy.gif?raw=true" alt="Aggregating and Charting Events with Bar" width="400px"/>
  <img src="https://github.com/jondot/rn-snoopy/blob/master/media/snoopy-filter.gif?raw=true" alt="Aggregating and Charting Events with Bar" width="400px"/>

This removes the hardcoded `SPY_MODE` flag and instead uses a function that can be injected from outside world.

```javascript
MessageQueue.spy((info)=>console.log("event!", info)
```

It also creates
Closes https://github.com/facebook/react-native/pull/9160

Differential Revision: D3669053

Pulled By: javache

fbshipit-source-id: 3e4462aa77fc8514d2ea4f15430f7bec57b583a4
2016-08-04 08:43:31 -07:00
ios122 5707c3d913 mediaPlaybackRequiresUserAction default value is true,not `false`
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.**

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

Differential Revision: D3664512

Pulled By: javache

fbshipit-source-id: 030fe4752e53efcde21baadfc2502413b7fc9c8c
2016-08-03 17:43:49 -07:00
ExplodingCabbage baf207e724 Fix misleading docstring on getInitialNotification
Summary:
The docs heavily implied that this method returned a notification object or null directly, like popInitialNotification used to do. In fact, it returns a promise. This change clarifies this.

Note that:
- This is purely a comment change, so no testing required.
- I've adhered to the 80 character line limit, and can't think of any other style rules you might have that could apply here.
Closes https://github.com/facebook/react-native/pull/9052

Differential Revision: D3662807

Pulled By: javache

fbshipit-source-id: 7a2573e03d7704b2d62a3499d350506ae73e8d77
2016-08-03 12:28:41 -07:00
Slavik Manukyan 54d8f221c2 Way to pass styles to nested view
Summary:
Ability to pass styles to nested view for _position_ behavior.

Use case:

``` jsx
<KeyboardAvoidingView
          behavior={'position'}
          style={{ flex: 1 }}
          contentContainerStyle={{ flex: 1 }}
          keyboardVerticalOffset={ - VERTICAL_OFFSET }
>
          <SomeContainer   />
</KeyboardAvoidingView>
```
Closes https://github.com/facebook/react-native/pull/9065

Differential Revision: D3662876

Pulled By: javache

fbshipit-source-id: 9b08a04449431c4e563ef4464b5a7dba1fc02e4b
2016-08-03 11:28:58 -07:00
Konstantin Raev 8419faa365 Fixed test CRMNowThumbnailCache-test.js
Reviewed By: matryoshcow

Differential Revision: D3662150

fbshipit-source-id: 29cb7ee52ba8dc67ecf2214ff92b2f97711debf0
2016-08-03 06:13:29 -07:00
Gabe Levi e34dd4f938 Deploy v0.30.0
Reviewed By: avikchaudhuri

Differential Revision: D3654213

fbshipit-source-id: b03879345ad9beae73a055c1b2e7211d074a08f0
2016-08-02 20:58:28 -07:00
Daniel Schmidt c2cf510ff8 Improve the BackAndroid example to be more clear
Summary:
The example of `BackAndroid` caused a bit of confusion for beginners (see #8822), so I thought we should clarify the functionality a bit. I added a comment indicating that a user would have to implement `this.onMainScreen` and `this.goBack` on their own, this was the original problem.
Closes https://github.com/facebook/react-native/pull/8829

Differential Revision: D3660332

fbshipit-source-id: d84a29586c6a1a439f386e6b88220d7b0a275129
2016-08-02 18:30:38 -07:00
Ryan Gomba eb96b7fabc Maintain transform order
Summary:
This diff addresses the issues raised by kmagiera in https://github.com/facebook/react-native/pull/7884. Transforms should be applied in the order they are defined, just like in `processTransform.js`. A scale applied before a translation, for instance, should give a different result than a translation applied before a scale.

We leverage CATransform3D to do the heavy lifting. A concatenated transform is passed all the way to `RCTViewPropertyMapper`. It is compared with the transform currently applied to the view, and if different, applied. The same approach is used for opacity.

I think it makes the most sense to do this diffing in `RCTViewPropertyMapper`, as opposed to creating and cleaning up an `_updatedPropsDictionary` each frame in `RCTTransformAnimatedNode` and `RCTStyleAnimatedNode`. The node should keep its full value; applying a minimal set of altered props is an optimization.  The higher up this optimization is implemented, the more assumptions it makes. e.g. that there will only ever be a sing
Closes https://github.com/facebook/react-native/pull/9050

Differential Revision: D3658139

fbshipit-source-id: ad6286762ef734084cbdf83c9bd9241190302d34
2016-08-02 14:28:29 -07:00
Pieter De Baets b83ccb5749 Reverted commit D3580025
Reviewed By: mhorowitz

Differential Revision: D3580025

fbshipit-source-id: 4422b6b97ef844158e369e022d62d6f0ae641222
2016-08-02 14:13:27 -07:00
Lukas Piatkowski ec0ccf599a #15 Add a button in devtools to start/stop the Sampling Profiler
Differential Revision: D3555704

fbshipit-source-id: 4add16c923fcfd306892efec4630c24ae438d6dd
2016-08-02 11:14:06 -07:00
Pieter De Baets e762d961cd Use new enqueueJSCall method everywhere
Reviewed By: majak

Differential Revision: D3605263

fbshipit-source-id: 215f896d675b937593c8b796ed6ec5261ac74dbf
2016-08-02 11:14:06 -07:00
Pieter De Baets 47d6d289d4 Customize main thread initialization of native modules
Reviewed By: mhorowitz

Differential Revision: D3580025

fbshipit-source-id: 18abc15b894c745f584d91da47035c6db036aafa
2016-08-02 10:27:25 -07:00
Siqi Liu 43f73f675f Enable websocket interception in RN network inspector tool
Summary:
This diff enables network inspection for WebSocket APIs, so by now XMLHttpRequest, Fetch and WebSocket are all supported. Android and iOS are both supported.

This diff monkey-patches the RCTWebSocketModule which WebSocket API builds on, and now it is able to intercept all WebSocket requests when app is running. The intercepted information of a WebSocket includes url, protocols, status, messages (sent and received), close reason, server close event and server error information, etc.

Reviewed By: davidaurelio

Differential Revision: D3641770

fbshipit-source-id: 393df0da74ed95b1fd60e38b0d67ed61b3dd5ff3
2016-08-02 08:28:39 -07:00
Siqi Liu 1e8b83d2e6 Add unique ids to the intercepted XHR objects to make the tracking correctly across inspector restarts.
Summary: In previous `XHRInterceptor`, it sometimes crashes when restarting the network inspector because the id of the XHR objects are not unique all time. Fix this in diff by adding a global id "generator" for all intercepted xhr objects in order to make it safe across inspector restarts.

Reviewed By: davidaurelio

Differential Revision: D3641624

fbshipit-source-id: f9a1589f278023243aa182d3da93ce69c985587c
2016-08-02 08:28:39 -07:00
Charles Dick aba87550cc upload JSC heap capture to bundle server
Reviewed By: bestander

Differential Revision: D3642116

fbshipit-source-id: 9626078bb0f087f55d8270c8e0b082c74bd2df9d
2016-08-02 08:13:57 -07:00
danieldunderfelt 591217ea7d Make onUnhandled safe for undefined errors
Summary:
This pull request fixes cases where the `error` argument of the `onUnhandled` method in `Libraries/Promise.js` is undefined. Previously this would result in a redbox with the helpful message: `Cannot read property message of undefined`. With this pull request, unhandled promise rejections result in the desired yellowbox saying that a promise rejection went unhandled.

I still do not know what would cause the error argument to be undefined, but this change makes the module behave as expected in an app I am building.

cc bestander

Relevant issue: #8452
Closes https://github.com/facebook/react-native/pull/9119

Differential Revision: D3655589

Pulled By: bestander

fbshipit-source-id: a975a0ab58701240ba06574c04521cd542700ff7
2016-08-02 07:58:28 -07:00
Maria Mateescu 2a823bbc5c Add custom cache setter
Reviewed By: donyu

Differential Revision: D3622912

fbshipit-source-id: 675b3135212c73808cb18702c2cbf5684816df87
2016-08-01 22:13:27 -07:00
Will Moritz b44d617999 NavigatorIOS docs: need to import PropTypes
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.**

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

Differential Revision: D3650195

Pulled By: hramos

fbshipit-source-id: 2a4bb06f92109b36bec761259e13a5782cc9929b
2016-08-01 11:58:36 -07:00
Jimmy Mayoukou f634a0fc23 Add missing resizeMode prop on Image Android
Summary:
It seems like the `resizeMode` propType was missing from `Image.android.js`, this PR adds it.
I caught by trying to use `Image.propTypes.resizeMode` on Android, and getting a warning because it was `undefined`.

It's not supposed to break anything, maybe pop a few warnings but not much more.

**Test Plan:**
- Launched UIExplorer
Closes https://github.com/facebook/react-native/pull/7355

Differential Revision: D3648559

fbshipit-source-id: a4397938d14c11ded909d6bf4652a4b0fcebed3b
2016-08-01 00:58:27 -07:00
yueshuaijie 15bf2c57b8 Add TextInput.dataDetectorTypes prop.
Summary:
On iOS, if `TextInput` is used with prop `multiline={true}`, the backend view is `UITextView`. Sometimes we need `UITextView.dataDetectorTypes` to detect clickable url in the text view. The PR add this prop to `TextInput`, so we can use it like this:

`<TextInput`
`    defaultValue="Detect phone number: 88888888."`
`    editable={false}`
`    multiline={true}`
`    dataDetectorTypes="all"`
`    />`

Similar as #8743 .
Closes https://github.com/facebook/react-native/pull/8863

Differential Revision: D3648027

fbshipit-source-id: 987bd4f46fb5be74099b62988135a32115d9269c
2016-07-31 14:28:28 -07:00
yueshuaijie bbe95c2acf Add method popN() to Navigator.
Summary:
Compareing API of
`Navigator`(http://facebook.github.io/react-native/releases/next/docs/navigator.html)
and
`NavigatorIOS`(http://facebook.github.io/react-native/releases/next/docs/navigatorios.html),

we found `Navigator` object lacks of the method `popN()` which is sometimes useful. This PR add it.
Closes https://github.com/facebook/react-native/pull/8806

Differential Revision: D3648001

Pulled By: ericvicenti

fbshipit-source-id: 661efba39e68049fd4a094304ec080092a14296d
2016-07-31 13:43:36 -07:00
Nicolas Charpentier 55bc825092 Add GIF and WebP support specification with Fresco 0.11
Summary:
Motivation #8455
Fixes #8501

With a bonus fix typo !

![screen shot 2016-07-25 at 14 16 01](https://cloud.githubusercontent.com/assets/7189823/17112118/9f06fe04-5272-11e6-83e9-ddf11573aa5e.png)
Closes https://github.com/facebook/react-native/pull/8951

Differential Revision: D3647816

Pulled By: mkonicek

fbshipit-source-id: e0349275045cae2922b4bb43bcb99af4c6ef1170
2016-07-31 08:13:27 -07:00
Antoine Rousseau 2ca2f87a82 Fix onLayout support in <TextInput> for Android (same than iOS fix: #8042)
Summary:
See #8042: exactly the same bug and fix on Android

**Test plan**

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

Differential Revision: D3647808

Pulled By: mkonicek

fbshipit-source-id: 252a610e26a72a73411c3407faedea0477bee54e
2016-07-31 07:58:24 -07:00
origsun e8c8a06329 Fix bad link typo in View document
Summary:
This is trivial.

It fixes a bad link in http://facebook.github.io/react-native/docs/view.html#importantforaccessibility (the "Android importantForAccessibility docs" link).
Closes https://github.com/facebook/react-native/pull/9099

Differential Revision: D3647803

Pulled By: mkonicek

fbshipit-source-id: 8c75da03d926f60db0c75237b9ad48983bf9738f
2016-07-31 07:28:23 -07:00
Florent Le Gall 48f0dde630 Fix flow error in Flow error in NavigationError/NavigationHeaderTitle
Summary:
Fixes the "Unused suppression" error in NavigationHeaderTitle.
This closes https://github.com/facebook/react-native/issues/9058
Closes https://github.com/facebook/react-native/pull/9103

Differential Revision: D3647364

fbshipit-source-id: 1fff92b35a46ccb1c2c6206e54779b6a1ec58bda
2016-07-30 17:13:41 -07:00
David Aurelio 654a36018c Don't collect warnings if yellow box is disabled
Reviewed By: vjeux

Differential Revision: D3641566

fbshipit-source-id: 1e2279be1656a305af8b4c5eaf32789a5ba6577d
2016-07-29 09:28:28 -07:00
Maria Mateescu 3561dbb74d Unbreak compiling error - sorry
Reviewed By: bestander

Differential Revision: D3641418

fbshipit-source-id: fa131761b65a19ed0fc821dd52852480f2ed0c2d
2016-07-29 07:13:43 -07:00
Fadil Sutomo 63d15af18d Activity indicator: add size prop
Summary:
**motivation**

Previously, size can only accept either 'small' or 'large'. And to obtain a custom size, scale transformation is used. This is to let users to possibly pass number value directly to define ActivityIndicator's size.

**Test plan**

I have also modified the current example to reflect the new size prop in action.
Closes https://github.com/facebook/react-native/pull/8935

Differential Revision: D3637910

fbshipit-source-id: 6b8e1d4504964916df327b2d3eaaef1bb8cd5112
2016-07-28 15:28:43 -07:00
Siqi Liu b5abb87a6f Fix the potential bug for network inspector when receiving xhr objects without an "_index" property
Summary: It sometimes happens that there are already some existing `XMLHttpRequest` objects before we turn on the network inspector. So it is a must to check whether a `XMLHttpRequest` object has a property `_index` to determine if it should be tracked.

Reviewed By: davidaurelio

Differential Revision: D3635184

fbshipit-source-id: a5552d7244c994b0fe782ac35baae39ec7488494
2016-07-28 14:13:46 -07:00
David Goldman fd48bc3cff Implement multi-source Images on iOS
Summary: Mirrors Android's support for multiple sources for Image, allowing us to fetch new images as the size of the view changes.

Reviewed By: mmmulani

Differential Revision: D3615134

fbshipit-source-id: 3d0bf2b75f63a4379e0e49f2dab9aea351b31d5f
2016-07-28 14:13:46 -07:00
Simon Ayzman 7e2e0deeb0 Updated ScrollView's keyboardShouldPersistTaps doc
Summary:
I noticed that even when a ScrollView's `keyboardShouldPersistTaps` prop is set to true, the ScrollView's children can still respond to tap events (even if the scroll view itself will not respond to tap events and the keyboard does not dismiss automatically). This is a point of ambiguity in the React Native docs; it implies that no touch events can be handled if `keyboardShouldPersistTaps` is set to true.
Closes https://github.com/facebook/react-native/pull/9053

Differential Revision: D3636711

Pulled By: hramos

fbshipit-source-id: 2f0aea86202ab66d5a9174ce8611509dff67e15f
2016-07-28 12:43:34 -07:00
Maria Mateescu ddc70ffd85 Plug in the Cache to the ImageLoader
Reviewed By: donyu

Differential Revision: D3586563

fbshipit-source-id: 03f457df97066a522dc923b5f432314da40f7d71
2016-07-28 08:58:35 -07:00
Maria Mateescu 54244e15bf Define the Image Cache delegate to be used in the ImageLoader
Reviewed By: javache

Differential Revision: D3583472

fbshipit-source-id: d1f30f3f96aea7739b9f91093fbb6c92c8b9567e
2016-07-28 08:58:34 -07:00
Maria Mateescu f12d0a220b Create protocol for delegate for image cacheing
Reviewed By: donyu

Differential Revision: D3581390

fbshipit-source-id: 869437dd05db614f8191eab69723c4742df0637b
2016-07-28 08:58:34 -07:00