Summary: Also remove the unnecessary await of the resolver, because `_bundler.bundle()` already does that.
Reviewed By: davidaurelio
Differential Revision: D4689448
fbshipit-source-id: 3b4fd73b1368f8b00c6eb7483e751387d9856ce9
Summary: Helps mitigate part of https://github.com/facebook/react-native/pull/12245 while we wait for a more comprehensive solution.
Reviewed By: emilsjolander
Differential Revision: D4571776
fbshipit-source-id: 185cd1b0d3af37724136a37471df412c2000dfe4
Summary: The function giving the worker count was duplicated, let's just pass it down from a central place, the Bundler. Also, I simplified the function to use a simple formula rather than arbitrary ranges (it's still arbitrary, just a tad bit less :D ).
Reviewed By: davidaurelio
Differential Revision: D4689366
fbshipit-source-id: fe5b349396f1a07858f4f80ccaa63c375122fac8
Summary:
Display.getCurrentSizeRange() doesn't include the size of the status
bar, so Modal windows on Android have a gap in the bottom that is the
same size as the status bar. This checks the current theme and adds the
size of status bar to the modal window height if necessary.
**Test plan (required)**
Run a React Native app on Android with a theme that doesn't show status bar and launch a modal dialog. See issue #11872 for an example.
Closes https://github.com/facebook/react-native/pull/11928
Differential Revision: D4695847
fbshipit-source-id: 9fafc2b5040e2f58d562c9cc4cd4d6d87b0df2a3
Summary:
**Motivation**: Fix Apple TV build breakage
**Test plan**: This fixes Travis test that builds tvOS targets.
Closes https://github.com/facebook/react-native/pull/12869
Differential Revision: D4692883
fbshipit-source-id: 3babfe4ab6d80143e15410bff7cae41ada3bf09f
Summary:
Minor code formatting.
Each time I run `react-native init` I must reindent this file.
Closes https://github.com/facebook/react-native/pull/12850
Differential Revision: D4691374
fbshipit-source-id: dc02b021e2f320f1046e4e6d024ba675a4213de8
Summary:
Sticky headers work on android now, but are only enabled by default on ios, so reflect that in the docs.
cc janicduplessis
Closes https://github.com/facebook/react-native/pull/12860
Differential Revision: D4691071
fbshipit-source-id: 0e28f948dc587561b6f20c3615cdf65dfebd9b73
Summary: Not having default everywhere (keeping them at the top level instead) makes for a code that is easier to understand, and more robust as different pieces of code cannot default to different values. This changeset also unifies the option types (ex. `platform`).
Reviewed By: cpojer
Differential Revision: D4688882
fbshipit-source-id: b5f407601386336f937a0ac1f68c666acc89dfd8
Summary: `onHostDestroy` is when the app is backgrounded and all Activities are destroyed. At this point it's safe to clear Fresco's memory cache.
Reviewed By: AaaChiuuu
Differential Revision: D4674950
fbshipit-source-id: f6db658ad56e3ad843cd2acfa31e2df1c40d3279
Summary:
We have some resolve functions with ```YG**Resolve``` and others named ```YGResolve**```. This changes both to be named like the later one, as I think this is the grammatically better readable one.
Closes https://github.com/facebook/yoga/pull/471
Differential Revision: D4688997
Pulled By: emilsjolander
fbshipit-source-id: 38b5f84d4d39ed3effedf08188085b9efd96b4ce
Summary:
We use this version internally.
Closes https://github.com/facebook/react-native/pull/12838
Differential Revision: D4688982
Pulled By: mkonicek
fbshipit-source-id: d8a6f8168b9e71ff4f53a8c18d55dc5a759a9183
Summary:
We use this version internally.
Closes https://github.com/facebook/react-native/pull/12837
Differential Revision: D4688986
Pulled By: mkonicek
fbshipit-source-id: 93d9dedb51a56d6104aae443e939455c44397e88
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