Summary: fixed a case where MapView could crash due to a race condition
Differential Revision: D3207304
fb-gh-sync-id: a63918d160258d76fce5d56994100a63f4c5fb68
fbshipit-source-id: a63918d160258d76fce5d56994100a63f4c5fb68
Summary:Fixes #7131
I believe it's easier if we just link to this file so it's less confusing what to edit actually. I was originally thinking about linking to specific line, but that will be hard to keep in sync.
Closes https://github.com/facebook/react-native/pull/7139
Differential Revision: D3212912
Pulled By: mkonicek
fb-gh-sync-id: 4f272d8bc922b273b961707d9ebf18a3efda31be
fbshipit-source-id: 4f272d8bc922b273b961707d9ebf18a3efda31be
Summary: We only measure text at the root node, we shouldn't be trying to build a text storage later on for tree lower in the shadow node tree.
Reviewed By: nicklockwood
Differential Revision: D3212614
fb-gh-sync-id: 574fa7f2c029ca9ad2d5fabe7bbb148157f85ca7
fbshipit-source-id: 574fa7f2c029ca9ad2d5fabe7bbb148157f85ca7
Summary:Simply installing `sinopia` does not create a config file (or even a
directory when it should be placed). Running `sinopia` for the first time
generates a default config file so it?s easier for the user to
configure it properly.
Closes https://github.com/facebook/react-native/pull/7146
Differential Revision: D3212613
Pulled By: mkonicek
fb-gh-sync-id: e1a2bbd8311a93b4d8a230902dd8031c85a205c3
fbshipit-source-id: e1a2bbd8311a93b4d8a230902dd8031c85a205c3
Summary:Using TouchableNativeFeedback has been a problem for me because the ripples it makes don't follow the child view's border radii so the ripples stick out of the child view's rounded corners. This PR should fix this problem with a minor caveat: this only works for TouchableNativeFeedback.Ripple and not TouchableNativeFeedback.SelectableBackground. I searched how I could apply corner radius to selectableItemBackground and it doesn't seem to be possible (the prevalent advice is to create the ripple manually which is equivalent to using TNF.Ripple in our case), though I could be wrong.
I added [an example to UIExplorer (TouchableExample)](http://i.imgur.com/CHY9xjW.png). This is my first PR to this repo so let me know if something's wrong. Cheers!
Closes https://github.com/facebook/react-native/pull/6515
Differential Revision: D3126513
Pulled By: mkonicek
fb-gh-sync-id: 1d3e92243abf9706132ae47c485d9e04a9b47d81
fbshipit-source-id: 1d3e92243abf9706132ae47c485d9e04a9b47d81
Summary:Simply removing the xterm spawn from android packager, since you can archive exactly the same results using the standard shell 😄
Closes https://github.com/facebook/react-native/pull/7077
Differential Revision: D3212548
Pulled By: mkonicek
fb-gh-sync-id: 8cc03d2708614f64e1394ca738e5de0ba631deb9
fbshipit-source-id: 8cc03d2708614f64e1394ca738e5de0ba631deb9
Summary:**Motivation:** In my app, I'm using a WebView that loads content from my mobile site. What I want to do is when a user presses a link on the loaded page, I want to stop the WebView's request, hijack the URL and open the URL in a new WebView, pushed to the top of the navigator stack. To me, this gives the overall app a more native feel, instead of implementing a rudimentary navbar on the main WebView to go back.
**Attempted Workarounds:** I've attempted to get similar functionality by capturing the onNavigationStateChange event in the WebView, and then within calling goBack + pushing the new view to the navigator stack. From a functionality standpoint, this works. However, from a UI standpoint, the user can clearly see the webview change states to a new page + go back before having the new view pushed on top of their nav stack.
Closes https://github.com/facebook/react-native/pull/6886
Differential Revision: D3212447
Pulled By: mkonicek
fb-gh-sync-id: 05911e583d9ba54ddbd54a772153c80ed227731e
fbshipit-source-id: 05911e583d9ba54ddbd54a772153c80ed227731e
Summary:Hey,
Adding a `cla` command to bot so that we can ping users that forgot about it more conveniently. I am not really sure if that's everything we have to do in order for the bot to use it - but just wanted to give it a go.
Differential Revision: D3212234
fb-gh-sync-id: 5f75f88694b21b883e7da2af41d4e389fb828839
fbshipit-source-id: 5f75f88694b21b883e7da2af41d4e389fb828839
Summary:As mentioned in #7121 by javache, this can already be disabled. Might be useful if users upgrade to 0.25 and want to hide warnings about wrong React imported (something they can't really control until community upgrades).
This should be mentioned in the release notes once it's merged.
Closes https://github.com/facebook/react-native/pull/7140
Differential Revision: D3212212
fb-gh-sync-id: 7a7afa2b7925e16d6ebfd20f4fe26d1cb9d603e5
fbshipit-source-id: 7a7afa2b7925e16d6ebfd20f4fe26d1cb9d603e5
Summary:This change extends animated native module API with `stopAnimation` method that is responsible for interrupting actively running animation as a reslut of a JS call. In order for the `stopAnimation` to understand `animationId` argument I also had to add `animationId` to `startAnimation` method. As JS thread runs in parallel to the thread which executes the animation there is a chance that JS may call `stopAnimation` after the animation has finished. Because of that we are not doing any checks on the `animationId` parameter passed to `stopAnimation` in native and if the animation does not exists in the registry we ignore that call.
**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/7058
Differential Revision: D3211906
fb-gh-sync-id: 3761509651de36a550b00d33e2a631c379d3900f
fbshipit-source-id: 3761509651de36a550b00d33e2a631c379d3900f
Summary: Similar to ScrollView, adds ability to set scrollEnabled={false}, which prevents dragging. Paging is still possible by updating initialPage.
Reviewed By: AaaChiuuu
Differential Revision: D3209743
fb-gh-sync-id: ce4140323a03f2257a9bb310c7285418b01abae7
fbshipit-source-id: ce4140323a03f2257a9bb310c7285418b01abae7
Summary:The JS and native state can get out of sync if you reload JS while inspecting, so don't even bother trying on
native.
Reviewed By: lexs
Differential Revision: D3203020
fb-gh-sync-id: a3b7294bb0c28c0508f508be53d3ef895a7195b0
fbshipit-source-id: a3b7294bb0c28c0508f508be53d3ef895a7195b0
Summary:This fixes autocomplete for CJK text input by making sure that the `<Text>` nodes that JS controls to produce attributed text matches the text view's attributed text as much as possible. This is done by giving the disconnected `<Text>` child the same style as the `<TextInput>` parent.
This works because `-[RKTextView performPendingTextUpdate]` avoids setting the attributedText property on textView if the JS attributedText and textView attributedText are equal. This is important because setting attributedText on a text view clears the autocomplete state (markedText property) on a text view, breaking autocomplete for multistage input styles like CJK with a phonetic keyboard.
Reviewed By: nicklockwood
Differential Revision: D3207513
fb-gh-sync-id: 02e582ea5f15191974f15a65ebc1820401715f8d
fbshipit-source-id: 02e582ea5f15191974f15a65ebc1820401715f8d
Summary:Adding the react native renderer dependency and various fixes to support React 15.
Don't use dispatchID for touchableHandleResponderGrant
This callback argument was removed because "IDs" no longer exist. Instead, we'll
use the tag from the event target.
The corresponding PR on React Core is: https://github.com/facebook/react/pull/6338
Reviewed By: spicyj
Differential Revision: D3159788
fb-gh-sync-id: 60e5cd2aa0af69d83fcdac3dfde0a85a748cb7b9
fbshipit-source-id: 60e5cd2aa0af69d83fcdac3dfde0a85a748cb7b9
Summary:Hey,
I have been going through some UIAlert related issues in the repo trying to fix them, and one of the steps to start reproducing them was to put `Alert.alert()` call right inside `componentDidMount`.
However, I've started noticing strange bugs as long as I didn't set 1second timeout.
Started digging in deeper, and I've noticed the `UIAlert` gets attached to the `RCTWindow()` mainViewController.
However - since RCTDevLoadingView adds a `keyWindow`, that is the window that will be returned at the time of the call and the window `UIAlert` will be attached to.
To visualise that better - you can take a look at these two frames when app is being loaded:
<img width="371" alt="screen shot 2016-04-20 at 22 02 45" src="https://cloud.githubusercontent.com/assets/2464966/14688596/ae8d292c-0743-11e6-8aeb-e45da391b5b5.png">
<img width="371" alt="screen shot 2016-04-20 at 22 02 58" src="https://cloud.githubusercontent.com/assets/2464966/14688599/b30798e8-0743-11e6-951a-463fe7324c56.png">
AFAIK we do
Closes https://github.com/facebook/react-native/pull/7098
Differential Revision: D3207395
Pulled By: javache
fb-gh-sync-id: f8dca063573ac6f2a0ec497138b2ed0a7b27788b
fbshipit-source-id: f8dca063573ac6f2a0ec497138b2ed0a7b27788b
Summary:Building React Native for Android from source the first time is quite slow. A large part of the time is spent downloading the Boost C++ library. If the code is already present on the system, there's no need to download it.
**Test plan**
CircleCI tests on this pull request. The env variable is not defined on CircleCI so this pull request should have no effect.
Closes https://github.com/facebook/react-native/pull/7116
Differential Revision: D3207397
Pulled By: mkonicek
fb-gh-sync-id: 3454947f6c90fda0d8d2cbb17a1af518e45b47fd
fbshipit-source-id: 3454947f6c90fda0d8d2cbb17a1af518e45b47fd
Summary:This is needed in cases when the Android Support Repository is on a non-standard path.
**Test plan (required)**
CircleCI tests on this pull request.
Closes https://github.com/facebook/react-native/pull/7096
Differential Revision: D3207267
Pulled By: mkonicek
fb-gh-sync-id: 7539407f485341352faadc3b07d2c1459e0527f5
fbshipit-source-id: 7539407f485341352faadc3b07d2c1459e0527f5
Summary:**Motivation:** I don't like storing credentials in config files and a safer solution is to store them in the Keychain Access app.
Therefore I added a link that describes how one may go about to store the passwords in the Keychain Access app in OSX instead.
Found a [stackoverflow post](http://stackoverflow.com/a/24480579/1836121) but it wasn't very detailed so I decided to write it up myself. I understand if you have some policy against external links to blogs and I guess we could link to the stackoverflow explanation then instead.
Closes https://github.com/facebook/react-native/pull/7089
Differential Revision: D3207215
fb-gh-sync-id: 8011b55efe41ec6d54ad665e0e6a79cb9d806779
fbshipit-source-id: 8011b55efe41ec6d54ad665e0e6a79cb9d806779
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
Summary:To include a missing part of the fix to HMR on Windows that was done in 0.25rc. See c61100d0ce. Will need to also publish to npm.
cc ide grabbou
Closes https://github.com/facebook/react-native/pull/7076
Differential Revision: D3199977
fb-gh-sync-id: b97da3c91d3723eaa40f63550e053d224689d517
fbshipit-source-id: b97da3c91d3723eaa40f63550e053d224689d517
Summary:Fix a stroke bug.
Stroke path will be coverd by fill layer.
Fix it by stroke path after fill is done
Closes https://github.com/facebook/react-native/pull/7092
Differential Revision: D3203188
Pulled By: spicyj
fb-gh-sync-id: 9b950372822da4dc520552c0c31aa3435750a0a3
fbshipit-source-id: 9b950372822da4dc520552c0c31aa3435750a0a3
Summary:We had an issue where a rendered modal would not end up using the full screen size, but a size computed based on its initial content.
Which is a small spinner in case of RelayContainer. So rarely we would end up with cut off view like this:
{F60650629}
This diff fixes this behavior by wrapping the content in another view. That makes the modal's wrapping VC's view resize just once when it's initially created. (Resize for the wrapping VC's view happened previously when the modal's content resized, which got us in the bad state.)
Reviewed By: javache
Differential Revision: D3202299
fb-gh-sync-id: 7c4dc1dbb27654292d07aef5916aa31df5cd4302
fbshipit-source-id: 7c4dc1dbb27654292d07aef5916aa31df5cd4302
Summary:When JSC throws an error on startup (e.g. a SyntaxError) or when invoking a method that is not caught by RCTExceptionsManager, we previously just reported is a native error, with a (useless) native stack trace in the redbox. This changes that behaviour to report a JS stacktrace.
The same issue was previously reported here: https://github.com/facebook/react-native/pull/5677
Reviewed By: majak
Differential Revision: D3037387
fb-gh-sync-id: 06f8333e0eb50dcef0b26284754262301b8a5f08
fbshipit-source-id: 06f8333e0eb50dcef0b26284754262301b8a5f08
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
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