Commit Graph

1841 Commits

Author SHA1 Message Date
Pieter De Baets 2b69ec2589 Provide initial size to Modal
Reviewed By: majak

Differential Revision: D3202211

fb-gh-sync-id: 83a1d3d52df0dc68483639393ab64fd6f1281cb3
fbshipit-source-id: 83a1d3d52df0dc68483639393ab64fd6f1281cb3
2016-04-21 08:57:19 -07:00
Nick Lockwood 362738a776 Fixed some issues with zero fontSizeMultiplier causing RCTSHadowText measure function to return an infinite height
Summary:The default value for fontSizeMultiplier was zero. Although this was usually overriden with the correct value (typically 1.0), it sometimes wasn't resulting in a divide-by-zero in the text height calculation.

This diff corrects that bug by setting 1.0 as the default, and guarding against zero values being set.

I also fixed some suspicious logic that seemed to assume the result of BOOL && CGFloat would be 0 or the CGFloat value, which is true in JS but not in C (it would always be 0 or 1).

Reviewed By: javache

Differential Revision: D3179196

fb-gh-sync-id: cc09b104c9087fc1a2f45d8d3f70af221c2ad823
fbshipit-source-id: cc09b104c9087fc1a2f45d8d3f70af221c2ad823
2016-04-21 03:57:18 -07:00
Spencer Ahrens 99705440a0 Fix some warnings.
Reviewed By: AaaChiuuu

Differential Revision: D3206005

fb-gh-sync-id: 88c0cec6b88479fac747a7ef6a677df30c282089
fbshipit-source-id: 88c0cec6b88479fac747a7ef6a677df30c282089
2016-04-20 20:45:22 -07:00
Mike Grabowski 9d7b537dd4 Mention native code in `Linking` docs
Summary:Fixes #5925
Closes https://github.com/facebook/react-native/pull/7101

Differential Revision: D3206134

fb-gh-sync-id: e65ae97c32685d6acc08be2019dd2da902e01bc9
fbshipit-source-id: e65ae97c32685d6acc08be2019dd2da902e01bc9
2016-04-20 19:23:19 -07:00
Philipp von Weitershausen ed930b4710 Add support for sending binary data in websockets
Summary:This is a reprise of #6327, but with iOS 7.0 compatibility and less `package.json` changes.

**Test Plan:** Load WebSocketExample in UIExplorer app and start websocket test server script (both provided in #6889) and test sending binary data on both iOS and Android
Closes https://github.com/facebook/react-native/pull/6961

Differential Revision: D3202022

Pulled By: mkonicek

fb-gh-sync-id: 38843d0a9c0172971c5c70a5139ded04042b280a
fbshipit-source-id: 38843d0a9c0172971c5c70a5139ded04042b280a
2016-04-20 08:53:25 -07:00
Spencer Ahrens ad15b74aae cleanup and open source JS BugReporting module
Summary:This is just the JS part of a bug reporting module that can be used with a pure JS flow or a native reporting
flow. It's handy for grabbing data from a bunch of random components, like the ids of the rows that are visible in a
list view at the time the bug is reported, or a description of the current navigation stack.

It's initialized in `AppRegistry` so it's always ready to go and bug reports will always include the universal
`runApplication` info, but won't actually do anything by default unless `collectExtraData` is called.

Note: some apps may call `runApplication` multiple times if they have multiple react native root views. This will just
overwrite the source so it will just report the most recently mounted one.

Reviewed By: foghina

Differential Revision: D3200203

fb-gh-sync-id: 8ed45fc9b289e8d9c50d3c85926213bd245d3ecc
fbshipit-source-id: 8ed45fc9b289e8d9c50d3c85926213bd245d3ecc
2016-04-20 08:09:07 -07:00
Dave Miller eb21b25e2d Fix Popover.android to bubble events correctly
Reviewed By: andreicoman11, fkgozali

Differential Revision: D3197104

fb-gh-sync-id: 882f85175f87200b7aef1ca4204d6dfb6c4c4c69
fbshipit-source-id: 882f85175f87200b7aef1ca4204d6dfb6c4c4c69
2016-04-20 00:59:27 -07:00
Hedger Wang 6731de7b45 Fix NavigationView.
Reviewed By: ericvicenti

Differential Revision: D3200293

fb-gh-sync-id: 3ffc7053b11f926461c45e19651d07295ca3ae72
fbshipit-source-id: 3ffc7053b11f926461c45e19651d07295ca3ae72
2016-04-19 19:56:21 -07:00
Elliot Lynde 7e515f8d4a Wait longer for debugger proxy
Reviewed By: yuzhi

Differential Revision: D3198412

fb-gh-sync-id: fe11f74b2a019accc24b08162746ce4793a49b90
fbshipit-source-id: fe11f74b2a019accc24b08162746ce4793a49b90
2016-04-19 17:13:25 -07:00
Hedger Wang 81c62c5f41 Fix initial scenes rendering.
Summary:The initial layout used to render scenes does not contain the actual
width and height measured and causes the issue as described at
https://github.com/ericvicenti/navigation-rfc/issues/61

The fix is to update the layout and re-render scenes once layout
is modified. Also scenes renderer should also consider the case that
when the layout is not measured yet.

Reviewed By: ericvicenti

Differential Revision: D3162143

fb-gh-sync-id: 197574329d3849cad2a21e07e1bd5e800f74c3ea
fbshipit-source-id: 197574329d3849cad2a21e07e1bd5e800f74c3ea
2016-04-19 15:57:20 -07:00
Spencer Ahrens ecae44aaae Fix potential "Should never unset includeInLayout" invariant
Reviewed By: devknoll

Differential Revision: D3194174

fb-gh-sync-id: 67d065ea90f8416a5fc7e3651c68350f895f9639
fbshipit-source-id: 67d065ea90f8416a5fc7e3651c68350f895f9639
2016-04-19 13:55:26 -07:00
Krzysztof Magiera ec5dfbf8c7 Support for Animated.multiply node
Summary:This change adds native animated support for Animated.multiply nodes.

Animated.multiply allows for defining nodes that would output a product of values of the input nodes.

**Test Plan**
Run JS tests: `npm test Libraries/Animated/src/__tests__/AnimatedNative-test.js`
Run java tests: `buck test ReactAndroid/src/test/java/com/facebook/react/animated`
Closes https://github.com/facebook/react-native/pull/7071

Differential Revision: D3197663

fb-gh-sync-id: 35f64244a2482c487a81e5e7cd08f3c0e56d9b78
fbshipit-source-id: 35f64244a2482c487a81e5e7cd08f3c0e56d9b78
2016-04-19 13:20:20 -07:00
Dave Miller 551c154261 Remove RKModal and Portal
Reviewed By: andreicoman11

Differential Revision: D3192529

fb-gh-sync-id: 4ea5d9d3e3b4f435e86a5dba4ddb7812f8d00fbc
fbshipit-source-id: 4ea5d9d3e3b4f435e86a5dba4ddb7812f8d00fbc
2016-04-19 07:42:29 -07:00
Thom Dixon d586daad51 Fix red screen due to ref being undefined in PullRefreshViewAndroid
Summary:This fixes the error
`undefined is not an object (evaluating 'this.refs[NATIVE_REF].setNativeProps')`, which seems to occur when the refresh fails (in our case due to CORS).

![screen shot 2016-03-16 at 12 23 52](https://cloud.githubusercontent.com/assets/461514/13826121/1f8b0aaa-eb73-11e5-81e3-b2c60e536bf0.png)
Closes https://github.com/facebook/react-native/pull/6489

Differential Revision: D3172217

fb-gh-sync-id: 5ba3b2653685888f5358ef32b01b441757eff7c8
fbshipit-source-id: 5ba3b2653685888f5358ef32b01b441757eff7c8
2016-04-19 06:58:22 -07:00
Krzysztof Magiera b5375bdc09 Support for Animated.add
Summary:This change adds suport native animated support for Animated.add.

Animated.add lets you declare node that outputs a sum of it input nodes.

**Test Plan**
Play with the following playground app: https://gist.github.com/39de37faf07480fcd7d1
Run JS tests: `npm test Libraries/Animated/src/__tests__/AnimatedNative-test.js`
Run java tests: `buck test ReactAndroid/src/test/java/com/facebook/react/animated`
Closes https://github.com/facebook/react-native/pull/6641

Differential Revision: D3195963

fb-gh-sync-id: bb1e1a36821a0e071ad0e7d0fa99ce0d6b088b0a
fbshipit-source-id: bb1e1a36821a0e071ad0e7d0fa99ce0d6b088b0a
2016-04-19 02:58:21 -07:00
Angela Hess 64d5da7754 Replace opacity console error with warning
Summary: This error message is remarkably aggressive relative to the severity of the issue, particularly since the pattern in question is used / necessary throughout the codebase. Animated ReactART components with set opacities trigger this error, and opacity coming from the style prop is not respected.

Reviewed By: sahrens

Differential Revision: D3177554

fb-gh-sync-id: 96061d5ff526177814996b28e4394e6649839582
fbshipit-source-id: 96061d5ff526177814996b28e4394e6649839582
2016-04-18 18:53:20 -07:00
Philipp von Weitershausen ebb44d202b Clean up and simplify WebSocket implementation on the JS side
Summary:- Get rid of no longer necessary WebSocket.js v WebSocketBase.js split
- Use `EventTarget(list, of, events)` as base class to auto-generate `oneventname` getters/setters that get invoked along with other event handlers
- Type annotation `any` considered harmful, especially when we can easily spell out the actual type
- Throw in some `const` goodness for free

**Test Plan:** Launch UIExplorer example app, supplied `websocket_test_server` script, and try different combinations of sending and receiving text and binary data on both iOS and Android.
Closes https://github.com/facebook/react-native/pull/6889

Differential Revision: D3184835

Pulled By: mkonicek

fb-gh-sync-id: f21707f4e97aa5a79847f5157e0a9f132a1a01cd
fbshipit-source-id: f21707f4e97aa5a79847f5157e0a9f132a1a01cd
2016-04-18 15:43:25 -07:00
Dan Nolan c342d3d75d Update Switch.js
Summary:Hi there,

This PR reorganises the flow for updating native props so that if you have a switch that's replaced with a spinner to handle a network action, you don't get a crash trying to update native props when an item may be moved out from underneath you. This was previously accepted but I had to rebase it so I just recreated it given it was a two line fix
Closes https://github.com/facebook/react-native/pull/6989

Differential Revision: D3190326

fb-gh-sync-id: 357ffb36bb31bd23970e4ab396fc29a49ec18e1c
fbshipit-source-id: 357ffb36bb31bd23970e4ab396fc29a49ec18e1c
2016-04-17 21:01:29 -07:00
Olivier Notteghem b505fdb57d Decrease TTRR (time to relay request) by lazy rendering fake group header
Reviewed By: astreet

Differential Revision: D3155945

fb-gh-sync-id: b8ab8934555428aef98901288edc66d9ef251d96
fbshipit-source-id: b8ab8934555428aef98901288edc66d9ef251d96
2016-04-17 15:04:19 -07:00
Jia Rong Lim 7851572b40 Fix DrawerLayoutAndroid not able to set opacity
Summary:I'm just cleaning up my branch, but please refer to https://github.com/facebook/react-native/pull/6948.
Closes https://github.com/facebook/react-native/pull/7012

Differential Revision: D3189533

fb-gh-sync-id: 3953b1373ddcfd0fe29c0011c943855b55e1f181
fbshipit-source-id: 3953b1373ddcfd0fe29c0011c943855b55e1f181
2016-04-16 22:45:22 -07:00
Sokovikov 849a0f31ac Allow to set refresh control title color
Summary:Closes #6812

![simulator screen shot 14 apr 2016 12 13 36](https://cloud.githubusercontent.com/assets/1488195/14521441/0abccf5c-0232-11e6-94dc-0ebdbfac4b3f.png)
Closes https://github.com/facebook/react-native/pull/6970

Differential Revision: D3189244

fb-gh-sync-id: 7625b6ab5859aaa20bc0cb379855c5daeb584abf
fbshipit-source-id: 7625b6ab5859aaa20bc0cb379855c5daeb584abf
2016-04-16 15:15:25 -07:00
Spencer Ahrens d5c1de7708 Hook up touchable debugging to Inspector button
Reviewed By: vjeux

Differential Revision: D3188719

fb-gh-sync-id: 271e902399900242f577a77807868bd2a28add37
fbshipit-source-id: 271e902399900242f577a77807868bd2a28add37
2016-04-16 11:57:22 -07:00
Tomasz Netczuk 9a82c03e1f Navigator.SceneConfigs.PushFromRight similar to native iOS animation.
Summary:The animation looks ok now.

However, the original iOS navigator adds transparent overlay and shadow. Any idea how to implement it? I'd like to add it.
Closes https://github.com/facebook/react-native/pull/5061

Differential Revision: D3129246

Pulled By: ericvicenti

fb-gh-sync-id: ee86261a49ea4b8f6854abf69bef3ebfd6878852
fbshipit-source-id: ee86261a49ea4b8f6854abf69bef3ebfd6878852
2016-04-15 18:23:29 -07:00
Leland Richardson 4ee0f7b218 Round interpolation for RGB components
Summary:The CSS spec doesn't allow for decimal values inside of rgb colors, however the RN implementation does, so there was a disconnect here.

This tests to see if the output range is an rgb color, and if so, rounds the first 3 interpolated components (but not the 4th, since that would be opacity and allows for a decimal).

cc vjeux
Closes https://github.com/facebook/react-native/pull/6984

Differential Revision: D3186473

fb-gh-sync-id: a320bf2311764e084386700bf8c8a42ab2a347eb
fbshipit-source-id: a320bf2311764e084386700bf8c8a42ab2a347eb
2016-04-15 14:51:27 -07:00
grgmo d09cd62011 Add support for ontimeout and onerror handler when using XMLHttpRequest for Android and iOS
Summary:Currently React-Native does not have `ontimeout` and `onerror` handlers for [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest). This is an extension to [No timeout on XMLHttpRequest](https://github.com/facebook/react-native/issues/4648).

With addition to two handlers, both Android and iOS can now handle `ontimeout` if request times out and `onerror` when there is general network error.

**Test plan**

Code has been tested on both Android and iOS with [Charles](https://www.charlesproxy.com/) by setting a breakpoint on the request which fires `ontimeout` when the request waits beyond `timeout` time and `onerror` when there is network error.

**Usage**

JavaScript -

```
var request = new XMLHttpRequest();

function onLoad() {
    console.log(request.status);
};

function onTimeout() {
    console.log('Timeout');
};

function onError() {
    console.log('General network error');
};

request.onload = onLoad;
request.ontimeout = onTimeout;
request.onerr
Closes https://github.com/facebook/react-native/pull/6841

Differential Revision: D3178859

Pulled By: lexs

fb-gh-sync-id: 30674570653e92ab5f7e74bd925dd5640fc862b6
fbshipit-source-id: 30674570653e92ab5f7e74bd925dd5640fc862b6
2016-04-15 05:17:21 -07:00
Hedger Wang 7354ff33b2 Fix Portal
Summary:Portal keeps its opened modals as a state member. so if multiple consecutive `_showModal`
or `_closeModal` are called, it will only read the initial state and merge the end result,
which causes some close or open calls to be overwritten due to race condition.

This diff fixes such issue.

Reviewed By: dmmiller

Differential Revision: D3160561

fb-gh-sync-id: 6d936c795660b119e2d3fe8b3ab807307eca92c5
fbshipit-source-id: 6d936c795660b119e2d3fe8b3ab807307eca92c5
2016-04-15 02:18:21 -07:00
Matthew Arbesfeld ef8e688b20 Let inner nested stack reducers handle back actions first
Summary:Fix for #6963
Closes https://github.com/facebook/react-native/pull/6982

Differential Revision: D3180164

Pulled By: ericvicenti

fb-gh-sync-id: 234d3027097ae032ba0e24470adb3a5ebf07e351
fbshipit-source-id: 234d3027097ae032ba0e24470adb3a5ebf07e351
2016-04-14 18:24:25 -07:00
Spencer Ahrens 0e719bd5ca UNBREAK open source and prod apps
Reviewed By: bestander

Differential Revision: D3182004

fb-gh-sync-id: 7346e3fd85eeed8ba103ccc1fd60c86c8a656712
fbshipit-source-id: 7346e3fd85eeed8ba103ccc1fd60c86c8a656712
2016-04-14 15:47:17 -07:00
Spencer Ahrens 5c9b46c15e Improve touchable debugging
Summary:Set `Touchable.TOUCH_TARGET_DEBUG` to see colored borders/text to all touchables.

Different touchable types are color-coded differently.

If there is `hitSlop`, it will be rendered with an extra view with a dashed border of the same color (not visible on
Android because `overflow: 'hidden'`).

`Text` with `onPress` directly set is just colored.

Added some extra checks to `TouchableWithoutFeedback` since it could silently break if the child is not a native
component.

Also added better error output for `ensureComponentIsNative` so it's easier to track down issues. I really wish there
was a cleaner way to get the component and owner names consistently, it would help make good debug messages way easier
to write.

Reviewed By: ericvicenti

Differential Revision: D3149865

fb-gh-sync-id: 602fc3474ae7636e32af529eb7ac52ac5b858030
fbshipit-source-id: 602fc3474ae7636e32af529eb7ac52ac5b858030
2016-04-14 14:28:31 -07:00
James Ide eaba2abc0b Use function refs and support composed refs
Summary:Fixes an issue where if you implement `renderScrollComponent` and have a `ref` callback on the returned element, the ref used to be clobbered by the ref that ListView adds to the element.

This is accomplished by converting the ref from a legacy string-based ref to a callback-based ref, and then using `cloneReferencedElement`, which is a simple utility to compose callback refs.
Closes https://github.com/facebook/react-native/pull/6441

Differential Revision: D3064250

Pulled By: mkonicek

fb-gh-sync-id: 2d55d04e2144a1cc08900a57a1fc0dab07c87eea
fbshipit-source-id: 2d55d04e2144a1cc08900a57a1fc0dab07c87eea
2016-04-14 06:41:22 -07:00
Sebastian Markbage 0db5439892 Update the Spectrum downstream and add the new cloneWithProps dependency
Reviewed By: aglemann

Differential Revision: D3167482

fb-gh-sync-id: b8c9933e629b049b15f9ebaf885817086866893b
fbshipit-source-id: b8c9933e629b049b15f9ebaf885817086866893b
2016-04-13 17:11:38 -07:00
Yao Bin Then 7e2026a268 Copy comment from LocationModule.java to Geolocation.js
Summary:This is to give a hint to developers when getCurrentPosition not returning anything on Android
Closes https://github.com/facebook/react-native/pull/6770

Differential Revision: D3131152

Pulled By: mkonicek

fb-gh-sync-id: 6726ed0f232c3b2f460d025fe9567e0d0783a707
fbshipit-source-id: 6726ed0f232c3b2f460d025fe9567e0d0783a707
2016-04-13 07:53:23 -07:00
mattds 69534a3373 Added support for Image corner radii in Android
Summary:Split out from PR #4252 - kmagiera I've made the changes to how the radii arrays are allocated, is the approach I've taken correct? also it looks like ImageStylePropTypes are needed so I left them in for the moment. I suppose this pull request will only be valid if iOS supports image corner radii, but at least it's here if/when needed. Attached an image of how it handles the existing case:
![screen shot 2016-01-08 at 4 21 25 pm](https://cloud.githubusercontent.com/assets/1407729/12200126/d3caceac-b625-11e5-8281-06274732a281.png)
Closes https://github.com/facebook/react-native/pull/5197

Differential Revision: D3138725

Pulled By: mkonicek

fb-gh-sync-id: df772fd07fe85386ae4c681f9e79a19d2316d38b
fbshipit-source-id: df772fd07fe85386ae4c681f9e79a19d2316d38b
2016-04-13 07:42:20 -07:00
James Ide f7bcb3e98d Add a way to prefetch remote images to cache with Image.prefetch
Summary:Adds `Image.prefetch` to prefetch remote images before they are used in an actual `Image` component. This is based off of #4420 by sospartan and skevy's work.
Closes https://github.com/facebook/react-native/pull/6774

Differential Revision: D3153729

Pulled By: bestander

fb-gh-sync-id: ef61412e051a49b42ae885edce7905a8ca0da23f
fbshipit-source-id: ef61412e051a49b42ae885edce7905a8ca0da23f
2016-04-13 07:30:28 -07:00
Dave Sibiski 4450d789e0 Uppercases the `method` variable to sanitize the string
Summary:This prevents possible developer errors when using 'post' or 'put' instead of 'POST' and 'PUT'.

Fixes: https://github.com/facebook/react-native/issues/6855

**Test plan:**

Previously, a `method put must not have a request body` error would be thrown when the method was in lowercase and a request body was indeed included.

With this fix and the following code (note the method name in all lowercase), the request is properly completed.

```javascript
const url = 'http://myurl.com';
const request = new XMLHttpRequest();

request.open('put', url);
request.setRequestHeader("Content-type","application/json");

request.onload = function() {
    console.log('onload');
};

request.onerror = function() {
    console.log('error');
};

request.send(JSON.stringify({ something: 'here' }));
```
Closes https://github.com/facebook/react-native/pull/6956

Differential Revision: D3173467

Pulled By: davidaurelio

fb-gh-sync-id: add90e9f31cd4f548547a3f85267a782ae74a89c
fbshipit-source-id: add90e9f31cd4f548547a3f85267a782ae74a89c
2016-04-13 06:48:19 -07:00
Luke Dubert ca2fb70fa9 Fix: swiping in navigator too quickly causes the gesture to be lost
Summary:**Issue:**

In the Navigator if a user attempts to navigate backwards (or forwards) through the route stack by swiping and they perform the gesture too quickly, the gesture is lost and nothing happens.

**Cause:**

In the `_matchGestureAction` function, the variable `moveStartedInRegion` is created and evaluates the gesture to determine if it was initiated in a valid region, (a.k.a. within the `edgeHitWidth`). The issue arises because `moveStartedInRegion` uses `currentLoc` (which is created from `gestureState.moveX`/`Y`) and when the gesture is performed using a flick of the finger, the first value of the `currentLoc` is outside of the `edgeHitWidth`.

**Solution:**

The solution is to track the coordinates of the initial grant (`gestureState.x0`/`y0`), and use that value instead of the `currentLoc` when evaluating `moveStartedInRegion`. The `currentLoc` is still needed however, for when the gestureState does not have a an initial x and y value, because the pan responder has not been granted.
Closes https://github.com/facebook/react-native/pull/6249

Differential Revision: D3168726

Pulled By: ericvicenti

fb-gh-sync-id: f2ac462e59bdc38536b99cac6a4877c99fa4e869
fbshipit-source-id: f2ac462e59bdc38536b99cac6a4877c99fa4e869
2016-04-12 11:08:23 -07:00
Martin Rädlinger 8a7eceeb4f make NavigationHeader and NavigationHeaderTitle pointerEvents configurable
Summary:I basically want to build a transparent NavigationHeader, so I need to be able to set the pointerEvents of the NavigationHeader.
Closes https://github.com/facebook/react-native/pull/6881

Differential Revision: D3168620

Pulled By: ericvicenti

fb-gh-sync-id: 679f3f5858142f468be329771ea281c31e1f0d40
fbshipit-source-id: 679f3f5858142f468be329771ea281c31e1f0d40
2016-04-12 10:55:30 -07:00
Emil Sjolander 303428ea28 Import css-layout measure mode changes from pull request #163
Reviewed By: lucasr

Differential Revision: D3167760

fb-gh-sync-id: f4f13bcb09a2d8b2db2764bd31fa8cbd8edb484b
fbshipit-source-id: f4f13bcb09a2d8b2db2764bd31fa8cbd8edb484b
2016-04-12 07:02:29 -07:00
Maxi Ferreira 2039be9d32 Added support for textDecorationLine style prop on Android
Summary:As suggested by kmagiera in #3819, I've implemented `textDecorationLine` style for Android in `ReactTextShadowNode` using span operations so we can support nested Text components.

![Demo](http://c.hlp.sc/022k2l033p0n/Image%202016-01-03%20at%2011.17.15%20PM.png)
Closes https://github.com/facebook/react-native/pull/5105

Differential Revision: D3167756

Pulled By: andreicoman11

fb-gh-sync-id: 122701a53d50f47f89b49e1f343c97db5fa2323d
fbshipit-source-id: 122701a53d50f47f89b49e1f343c97db5fa2323d
2016-04-12 03:37:34 -07:00
Janic Duplessis eac617d6ee Add null check before accessing the refresh control ref
Summary:Unmounting the RefreshControl during onRefresh callback causes the native ref to become null, this simply adds a null check to prevent the crash.
Closes https://github.com/facebook/react-native/pull/6931

Differential Revision: D3167637

fb-gh-sync-id: c2420b7a3b672d62dd349a6d35bb05399a00620c
fbshipit-source-id: c2420b7a3b672d62dd349a6d35bb05399a00620c
2016-04-12 01:27:18 -07:00
Scott Foggo 24f03af0c3 Implement clipping rectangle for ReactNativeART
Reviewed By: sebmarkbage, taomin

Differential Revision: D3140869

fb-gh-sync-id: 0da27705c4cfca7a1fcae12eed11a7335a62631f
fbshipit-source-id: 0da27705c4cfca7a1fcae12eed11a7335a62631f
2016-04-11 19:19:17 -07:00
Sebastian Markbage 0b534d1c3d Add deprecation warnings to ReactNative.addons
Summary:These were moved out into individual packages in React 0.14.

Exceptions are batchedUpdates and TestModule that are already reachable
on the ReactNative exports.
Closes https://github.com/facebook/react-native/pull/6927

Differential Revision: D3166243

Pulled By: sebmarkbage

fb-gh-sync-id: f696c84eda3cda522c91ec2ca584f5dde2e01407
fbshipit-source-id: f696c84eda3cda522c91ec2ca584f5dde2e01407
2016-04-11 18:20:28 -07:00
Emil Sjolander 8ef551174b backout update of css-layout. breaks ios <9
Reviewed By: javache

Differential Revision: D3164127

fb-gh-sync-id: 3926430f365711466ba93cd2eb7c91f31ef0c7f8
fbshipit-source-id: 3926430f365711466ba93cd2eb7c91f31ef0c7f8
2016-04-11 14:56:21 -07:00
cpojer 838cc48059 Make object properties in NativeModules configurable.
Summary:In Jest, we sometimes wipe away the (partial) state of the world. I noticed that when we run the NativeModules file twice, it throws. Because Jest implicitly throws out the state, it isn't obvious what exactly is going on.

I figured I'll fix this in react-native directly as I don't see a reason why those fields shouldn't be configurable. This shouldn't have any negative impact on react-native apps themselves.

cc ide bestander tadeuzagallo davidaurelio
Closes https://github.com/facebook/react-native/pull/6914

Differential Revision: D3162561

Pulled By: cpojer

fb-gh-sync-id: d3418ec210278a44f8ad325f7e9e01872b4877d1
fbshipit-source-id: d3418ec210278a44f8ad325f7e9e01872b4877d1
2016-04-11 07:57:28 -07:00
David Aurelio fcc89e9d92 Add support for missing XHR response types
Summary:Fixes #6679

This adds support for the missing response types to XMLHttpRequest.
Don?t ship this yet. This is completely untested. yolo and stuff.
Closes https://github.com/facebook/react-native/pull/6870

Reviewed By: bestander

Differential Revision: D3153628

Pulled By: davidaurelio

fb-gh-sync-id: 76feae3377bc24b931548a9ac1af07943b1048ac
fbshipit-source-id: 76feae3377bc24b931548a9ac1af07943b1048ac
2016-04-11 05:54:28 -07:00
Janic Duplessis d66b944727 Fix DrawerLayoutAndroid method parameter
Summary:Oups, forgot to remove a test in #6890 :)
Closes https://github.com/facebook/react-native/pull/6898

Differential Revision: D3161421

Pulled By: mkonicek

fb-gh-sync-id: a7e6b4f31822e67dcf1d898306851a112160d20f
fbshipit-source-id: a7e6b4f31822e67dcf1d898306851a112160d20f
2016-04-11 04:27:27 -07:00
Kushal Dave c62cd44fdf Update AsyncStorage.js
Summary:Updating docs to discuss both iOS and Android and to make more sense standing alone on the web site.
Closes https://github.com/facebook/react-native/pull/6592

Differential Revision: D3161831

fb-gh-sync-id: 984621702fbf408445a04b771d3fc5f76a65af64
fbshipit-source-id: 984621702fbf408445a04b771d3fc5f76a65af64
2016-04-10 18:02:20 -07:00
Sebastian Markbage a7c8111605 Prefix warning module with fbjs/lib/
Summary:This works internally at FB but not here because mixed mode requires are mandatory. At FB www, only the providesModule version works. In React Core, we only use the providesModule name. I have to remember to change these back again when I do the move so that we can unify. 0f3bd02d0f

We really should pick a single convention per project. In React Core, we translate it in the package/build step to whatever output convention is needed.
Closes https://github.com/facebook/react-native/pull/6891

Differential Revision: D3160811

Pulled By: vjeux

fb-gh-sync-id: daf1f5e1cfae2a7c33cca88139fb5391d25bfe3e
fbshipit-source-id: daf1f5e1cfae2a7c33cca88139fb5391d25bfe3e
2016-04-09 13:24:28 -07:00
Janic Duplessis 49fdd99633 Display component methods on the website and tweak the documentation
Summary:The website now displays public methods on components. This was implemented mostly in react-docgen via #66. This adds a <Method> component that is used by the component and API doc pages to display documentation for a method.

It also adds some missing documentation and tweak some existing one to integrate with this feature. I also prefixed some component methods with an '_' so they don't show up in the doc.

**Test plan (required)**

Tested every component page locally to make sure the methods doc was displayed properly.
Tested an API page to make sure it still worked properly.
Closes https://github.com/facebook/react-native/pull/6890

Differential Revision: D3159911

Pulled By: vjeux

fb-gh-sync-id: 1e6a4640cda6794496d9844c1af6a1451c017dcc
fbshipit-source-id: 1e6a4640cda6794496d9844c1af6a1451c017dcc
2016-04-09 11:13:28 -07:00
Sebastian Markbage 2eafcd45db Add deprecation warnings for split of the react and react-native packages
Summary:This adds deprecation warnings that correspond to what React 0.14 did for the web.

I.e. `React.render` -> `ReactNative.render` but also `ReactNative.createClass` -> `React.createClass`.

This hopefully means that it will become easier and more idiomatic to write components that are decoupled from the react-native package.

It will be clear when you take on react-native as a dependency such as when using findNodeHandle.

This codemod is a little more invasive for React Native because the common stuff often used the `react-native` package. For web only the uncommon stuff needed to move.

Reviewed By: spicyj

Differential Revision: D3148860

fb-gh-sync-id: d87628d2089a2e012ad6ad50dd0a20ccec5e6c45
fbshipit-source-id: d87628d2089a2e012ad6ad50dd0a20ccec5e6c45
2016-04-09 04:18:25 -07:00