Summary:
For unknown reasons, setting elevation: Number.MAX_VALUE causes remote debugging to hang on iOS (some sort of overflow maybe). Setting it to Number.MAX_SAFE_INTEGER fixes the iOS issue, but since elevation is an android-only style property we might as well remove it altogether for iOS.
See: https://github.com/facebook/react-native/issues/12223
Closes https://github.com/facebook/react-native/pull/12744
Differential Revision: D4684524
Pulled By: mkonicek
fbshipit-source-id: 7fb4f6da1c5c0cb437beff0e75122523e7233b72
Summary:
Re-applying the diff that was reverted in D4659669 / b87f4abf78 because of some crashes with fixes from D4659708 merged in.
---
Fixes a bug that happens when trying to use ScrollView with sticky headers and native `Animated.event` with `onScroll`. Made a few changes to the ListViewPaging UIExplorer example to repro https://gist.github.com/janicduplessis/17e2fcd99c6ea49ced2954d881011b09.
What happens is we need to be able to add multiple events to the same prop + viewTag pair. To do that I simple changed the data structure to `Map<prop+viewTag, List<AnimatedEventDriver>>` and try to optimize for the case where there is only one item in the list since it will be the case 99% of the time.
**Test plan**
Tested by reproducing the bug with the above gist and made sure it was fixed after applying this diff.
Closes https://github.com/facebook/react-native/pull/12697
Reviewed By: fkgozali
Differential Revision: D4661105
Pulled By: sahrens
fbshipit-source-id: c719dc85f45c1a142ef5b9ebfe0a82ae8ec66497
Summary:
This implements a loading banner like on iOS that shows the progress of the packager.
![](https://media.giphy.com/media/l4FGoepExkpOeXtTO/giphy.gif)
**Test plan**
- Tested that it displays similar messages as it does on iOS and also that is show the right message when waiting for the remote debugger.
- Tested that errors are still shown properly.
- Tested that it works with packagers that don't support multipart response (add && false in https://github.com/facebook/react-native/blob/master/packager/src/Server/MultipartResponse.js#L81).
- Run new unit tests.
- Tested that backgrounding / foregrounding the app hides / show the banner properly.
Closes https://github.com/facebook/react-native/pull/12674
Differential Revision: D4673638
Pulled By: mkonicek
fbshipit-source-id: b2a1163de3d0792cf481d7111231a065f80a9594
Summary:
Following ericvicenti request on https://github.com/facebook/react-native/issues/10188#issuecomment-282448021
Hope it helps
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
Closes https://github.com/facebook/react-native/pull/12578
Differential Revision: D4682076
Pulled By: mkonicek
fbshipit-source-id: 2fab5355a066eb3d8333e50f07ab3a258cbc002b
Summary:
> The logic behind react-native-git-upgrade described above is going to power the standard react-native upgrade starting with React Native version 0.40.0.
This means that if you are upgrading from version 0.40.0 or higher, you will be able to simply run react-native upgrade in your project without having to install anything globally.
I hadn't seen any logic related to this description in either practice nor [the source code](https://github.com/facebook/react-native/blob/master/local-cli/upgrade/upgrade.js) . Did I misunderstand anything or the plan has been changed since this blog post? ncuillery
Closes https://github.com/facebook/react-native/pull/12758
Differential Revision: D4681959
Pulled By: mkonicek
fbshipit-source-id: 782d243bd92e51cbfcf83995fdcbb569fcb7bbc1
Summary:
The note is currently in "Reloading JavaScript". However I was struggling with the first step ("Accessing the In-App Developer Menu") so didn't read down to that section.
I think it makes sense to make this the very first thing the reader sees when visiting the page.
Closes https://github.com/facebook/react-native/pull/12828
Differential Revision: D4681842
Pulled By: hramos
fbshipit-source-id: 1afbec7f62a2ec97febdd05987e7fc1541d3ee28
Summary:
This adds some improvements to the new ```YGConfig```, it tackles #452 and moves the scalefactor into the config.
Closes https://github.com/facebook/yoga/pull/457
Differential Revision: D4675088
Pulled By: emilsjolander
fbshipit-source-id: 99b2c734d6c5139fe1dc8bdeb014bb038f0e337d
Summary:
**Motivation**: On tvOS, Flatview and other components that use ScrollView with a RefreshControl will break without this change.
**Test plan**: Manual testing on tvOS simulator.
Closes https://github.com/facebook/react-native/pull/12751
Differential Revision: D4669503
fbshipit-source-id: 320036571788dc0102ec2611492d0fc97bceb53b
Summary:
We need to take the margin into account if we clip on max dimension. Fixes#466.
Closes https://github.com/facebook/yoga/pull/467
Differential Revision: D4681342
Pulled By: emilsjolander
fbshipit-source-id: 56311df9864a284d553c31f1c6db382f337f1fad
Summary: I accidentally introduced an exit trap, allthough a cleanup handler already existed. This moves killing of background processes into the existing trap.
Reviewed By: bestander
Differential Revision: D4681289
fbshipit-source-id: f8bcdcac7b246854e3ee024c9335b6c4eb3aacbd
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/12818
Differential Revision: D4680312
Pulled By: AaaChiuuu
fbshipit-source-id: d8410e99c3ced4e2c94145186a450923029d5b22
Summary:
Moving setting `availableSize` for `RCTRootShadowView` on earlier stage allows to prevent situations where `availableSize` is not specified yet, but Yoga layout is already happening.
Because `availableSize` equals {infinity, infinity} by default (in this case), Yoga returns a lot of nodes with infinit metrics, which confises UIKit.
Reviewed By: mmmulani
Differential Revision: D4672170
fbshipit-source-id: f9d8c84799dcbdb6b9230ddef6284d84df268833
Summary:
It's sometimes helpful to provide the Xcode version being used, as in the case of #12795.
Closes https://github.com/facebook/react-native/pull/12811
Differential Revision: D4677123
Pulled By: hramos
fbshipit-source-id: 28890d1ac65400d4e98ae2eb77e2d7a1a02b9d05
Summary:
Updates the remaining references to Exponent to Expo, similar in spirit to b698b4ad62. Left the filename of the blog post alone so that permalinks keep working.
Closes https://github.com/facebook/react-native/pull/12776
Differential Revision: D4676911
Pulled By: hramos
fbshipit-source-id: 5b8b8413f95c984df4157e4e1634dd35a78afa29
Summary:
Clearly state that the `getSize()` does not work for static image resources because it is assumed the developer knows their static image resource size (the reason I got from a comment on a github issue by a react native contributor).
This missing documentation cost me about 30 minutes to figure out why it didn't work for my static image resource and so I decided to update the documentation 💃
Closes https://github.com/facebook/react-native/pull/11645
Differential Revision: D4533463
Pulled By: lacker
fbshipit-source-id: 70e175ea30a5540c8a9f2a0c040585c711d82ac3
Summary:
I don't remember exactly where we talked about this but LayoutAnimation on Android is pretty stable now so there's no reason to keep it behind an experimental flag anymore. The only part that is not really stable is delete animations, so what I did is remove the default delete animation that we provide in presets.
**Test plan**
Tested that layout animations work properly without any config.
Closes https://github.com/facebook/react-native/pull/12141
Differential Revision: D4494386
Pulled By: mkonicek
fbshipit-source-id: 5dd025584e35f9bff25dc299cc9ca5c5bf5f17a3
Summary:
PR for option to set mixed content mode in Webview(Android) for issue #8460
Closes https://github.com/facebook/react-native/pull/12314
Differential Revision: D4663084
Pulled By: lacker
fbshipit-source-id: 0e40ea463739166311ddcb7887ff6d0289369637
Summary:
Corresponding Android PR: #12276
Respect the withCredentials XMLHttpRequest flag for sending cookies with requests. This can reduce payload sizes where large cookies are set for domains.
This should fix#5347.
This is a breaking change because it alters the default behavior of XHR. Prior to this change, XHR would send cookies by default. After this change, by default, XHR does not send cookies which is consistent with the default behavior of XHR on web for cross-site requests. Developers can restore the previous behavior by passing `true` for XHR's `withCredentials` argument.
**Test plan (required)**
Verified in a test app that XHR works properly when specifying `withCredentials` as `true`, `false`, and `undefined`. Also, my team uses this change in our app.
Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/12275
Differential Revision: D4673644
Pulled By: mkonicek
fbshipit-source-id: 2fd8f536d02fb39d872eb849584c5c4f7e7698c5
Summary:
A related Android PR is #11008.
Font scale was exposed through:
- The `getContentSizeMultiplier` method
- The `didUpdateContentSizeMultiplier` event
These are now deprecated. The reason is that there was already an API that exposed font scale. However, it was Android only. We now expose font scale through that API on iOS as well. Specifically:
- Font scale is now available as `PixelRatio.getFontScale()`.
- The `change` event on the `Dimensions` object now fires when font scale changes.
This change also adds support for `Dimensions.get('screen')` on iOS. Previously, only `Dimensions.get('window')` was available on iOS. The motivation is that, [according to this comment](https://github.com/facebook/react-native/pull/11008#issuecomment-275123609), we'd like to deprecate `window` dimensions in favor of `screen` dimensions in the future.
**Test plan (required)**
Verified that `PixelRatio.getFontScale()` and the `change` event work properly in a test app.
Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/12268
Differential Revision: D4673642
Pulled By: mkonicek
fbshipit-source-id: 2602204da6998a96216e06f5321f28f6603e4972
Summary:
04d870b added support for onabort in XHRs. The other on* events are declared on XMLHttpRequest and XMLHttpRequestEventTarget. This adds onabort there as well.
Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/12277
Differential Revision: D4673648
Pulled By: mkonicek
fbshipit-source-id: 0c5255da77537103c5ad91d9b2826d064140708d
Summary:
Fixes#11592
This bug was seen on a Galaxy S4 running Android 4.4.2. On this device, Android's `Layout.getDesiredWidth` method doesn't correctly measure text that contains unicode emoticons. It appears to think the emoticons take up 0 space.
Setting ANTI_ALIAS_FLAG in the TextPaint's constructor instead of setting it later with setFlags works around the Android bug.
**Test plan (required)**
My team uses this fix in our app.
Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/12690
Differential Revision: D4673649
Pulled By: mkonicek
fbshipit-source-id: 535f371281927bfff5d8b42966496bc8daf30045
Summary:
MapView has been deprecated in open source for a while: http://facebook.github.io/react-native/docs/mapview.html
We still want to use it internally. Moving it away from the GitHub folder.
Reviewed By: mmmulani
Differential Revision: D4646199
fbshipit-source-id: f469971e448dbca12afe141b43fa8a2518c7d467
Summary:
For some reason the parser doesn't support that syntax. It fails with:
```
Cannot parse file ../Libraries/Animated/src/AnimatedImplementation.js Error: parseSource returned falsy
at parseAPIInferred (/home/ubuntu/react-native/website/server/extractDocs.js:343:13)
```
Reviewed By: sahrens
Differential Revision: D4669961
fbshipit-source-id: 3536c94b8f385f5810c47544c4a72c8c785bf0e5
Summary: This adds an alternative logging method that can be called from native side. `logIfNoLoggingHook()` will pass the message to console only if there's Chrome debugger attached. This new method sends the message to console regardless to notify the developers better.
Reviewed By: yungsters
Differential Revision: D4669663
fbshipit-source-id: 3940816dadd08d450f066b7223f6d26a38a70921
Summary:
Some of the operations, like `oneOf` and `arrayOf`, were doing joins on arrays of potential
tags, like `<span>` or `<a>`, which would stringify them to `[object Object]`.
This introduces a new `spanJoinMapper` which suppresses the trailing separator like `join` but wraps
elements in `<span>` rather than `concat`ing into a string.
Latest master is pretty broken:
{F66059444}
Nested `color` and some other props were broken even before https://github.com/facebook/react-native/commit/a7a3922b89d821b9a34d26bdcc7676e747a2716
{F66059446}
All fixed in this diff:
{F66059445}
Reviewed By: mkonicek
Differential Revision: D4670441
fbshipit-source-id: ddc10f13b3bdc6a1e799fa06a4e206f8dbd08769
Summary:
This prevents someone from only putting `RCT_EXPORT_METHOD(...)` around some of the arguments to a method and generally causing confusion. Yes, before this diff it would still compile correctly if you did something like:
```
RCT_EXPORT_METHOD(lol:(NSNumber *)lol)
blah:(id)blah
{
NSLog(@"%@ %@", lol, blah);
}
```
Reviewed By: fkgozali
Differential Revision: D4660019
fbshipit-source-id: 1829a47e5c8d5e8ce93edca2ac7efd7e2bfdf840
Summary:
Enable back navigation on Apple TV (with the remote's menu button) in code making use of BackAndroid. The module is renamed to BackHandler. BackAndroid is still exported to ReactNative for now, until external projects switch to using the new name for the module. The navigation in https://github.com/react-community/react-navigation makes use of this module.
**Test plan**: Manual testing with an example app (https://github.com/dlowder-salesforce/react-nav-example).
Closes https://github.com/facebook/react-native/pull/12571
Differential Revision: D4665152
Pulled By: ericvicenti
fbshipit-source-id: 925400ce216379267e014457be6f5eedbe4453ec
Summary: It's ok for them to be empty, so we should check!
Reviewed By: yungsters
Differential Revision: D4664411
fbshipit-source-id: c66e98458708eee59757fa665b3a05972f1c1b70