Commit Graph

12834 Commits

Author SHA1 Message Date
Mehdi Mulani cff522d283 Dirty text shadow nodes on UIManager queue after multiplier changes
Summary: Letting them fire on whatever queue we get the notification from throws an assert.

Reviewed By: shergin

Differential Revision: D7002789

fbshipit-source-id: 669474af1a07f0df6784b69b54afe0152c1ba3c4
2018-02-16 12:37:42 -08:00
Krzysztof Magiera b48f7e5605 Support for animated tracking in native driver
Summary:
This PR adds support for Animated tracking to Animated Native Driver implementation on Android and iOS.

Animated tracking allows for animation to be started with a "dynamic" end value. Instead of passing a fixed number as end value we can pass a reference to another Animated.Value. Then when that value changes, the animation will be reconfigured to drive the animation to the new destination point. What is important is that animation will keep its state in the process of updating "toValue". That is if it is a spring animation and the end value changes while the previous animation still hasn't settled the new animation will start from the current position and will inherit current velocity. This makes end value transitions very smooth.

Animated tracking is available in JS implementation of Animated library but not in the native implementation. Therefore until now, it wasn't possible to utilize native driver when using animated tracking. Offloading animation from JS thread turns out to be crucial for gesture driven animations. This PR is a step forward towards feature parity between JS and native implementations of Animated.

Here is a link to example video that shows how tracking can be used to implement chat heads effect: https://twitter.com/kzzzf/status/958362032650244101

In addition this PR fixes an issue with frames animation driver on Android that because of rounding issues was taking one extra frame to start. Because of that change I had to update a number of Android unit tests that were relying on that behavior and running that one additional animation step prior to performing checks.

As a part of this PR I'm adding three unit tests for each of the platforms that verifies most important aspects of this implementation. Please refer to the code and look at the test cases top level comments to learn what they do.

I'm also adding a section to "Native Animated Example" screen in RNTester app that provides a test case for tracking. In the example we have blue square that fallows the red line drawn on screen. Line uses Animated.Value for it's position while square is connected via tracking spring animation to that value. So it is ought to follow the line. When user taps in the area surrounding the button new position for the red line is selected at random and the value updates. Then we can watch blue screen animate to that position.

You can also refer to this video that I use to demonstrate how tracking can be linked with native gesture events using react-native-gesture-handler lib: https://twitter.com/kzzzf/status/958362032650244101

[GENERAL][FEATURE][Native Animated] - Added support for animated tracking to native driver. Now you can use `useNativeDriver` flag with animations that track other Animated.Values
Closes https://github.com/facebook/react-native/pull/17896

Differential Revision: D6974170

Pulled By: hramos

fbshipit-source-id: 50e918b36ee10f80c1deb866c955661d4cc2619b
2018-02-16 12:10:01 -08:00
Taras Tsugrii 574c70e771 Use only native robolectric_test rules.
Reviewed By: adamjernst

Differential Revision: D6997829

fbshipit-source-id: 5f8d41a6126f02c9fb9d0fb90d89df28eeea9653
2018-02-15 20:10:05 -08:00
Valentin Shergin 0dbe18375e `base-line` metric exposure for <TextInput>
Summary:
Now <TextInput> (both bersions) exposes base-line metric to Yoga.
Before:
https://cl.ly/0G1Q29450O0y
After:
https://cl.ly/2X103V3O0322

Reviewed By: yungsters

Differential Revision: D6957054

fbshipit-source-id: d76d96f56720d710a4230c53beafdb0b2521e8a9
2018-02-15 17:46:41 -08:00
Valentin Shergin 51b3529f6c `base-line` metric exposure for <Text>
Summary:
Now <Text> exposes base-line metric to Yoga.

Before:
https://cl.ly/1F0B0D430U3e

After:
https://cl.ly/0G1Q29450O0y

Reviewed By: yungsters

Differential Revision: D6957055

fbshipit-source-id: 04c1df693915e294b54e3c33e0aea21611dcc232
2018-02-15 17:46:41 -08:00
Valentin Shergin 7630a614e4 Demo illustrated `base-line` metric exposure
Summary:
A demo illustrated `base-line` metric exposure to layout system was added to RNTester.
And currently it shows that we don't support it at all.

https://cl.ly/1F0B0D430U3e

Reviewed By: sahrens

Differential Revision: D6957056

fbshipit-source-id: 28776300fc8e11950ac5ba1a5416f68d31d4e9fb
2018-02-15 17:46:41 -08:00
David Vacca ad4f54ff6c Extend installFabric method to access UIFabricModule from C++
Reviewed By: sebmarkbage

Differential Revision: D7001974

fbshipit-source-id: a49c6e634ac710805fb37a50a61c2cf2e248b8a7
2018-02-15 13:41:01 -08:00
David Vacca c82b9f72de Create JNI wrapper for Fabric
Reviewed By: fkgozali

Differential Revision: D6989838

fbshipit-source-id: f092901cacc0c3eb89b08c6ac0384c4d5f6e6cfe
2018-02-15 12:17:54 -08:00
Andres Suarez 59401f89c1 Fold .eslintrc's into the root eslintrc
Reviewed By: TheSavior

Differential Revision: D6997050

fbshipit-source-id: 81e45d24343cca8336adb0de43bd766899ff03b6
2018-02-15 07:53:52 -08:00
Yuichi ONO f751c3460e Fix main size calculation from the aspect ratio
Summary:
When the following conditions are met, the main size become smaller by the margins in the main axis.
* The aspect ratio is defined
* The main size is not defined
* The cross size is defined
* The main margin is defined

This is because the main margin size is not included when calculating the main size from the aspect ratio.
Closes https://github.com/facebook/yoga/pull/715

Reviewed By: emilsjolander

Differential Revision: D6998988

Pulled By: priteshrnandgaonkar

fbshipit-source-id: f6f69c47ece17bd7c5e41517b96032bf0c149356
2018-02-15 07:26:52 -08:00
Alex Dvornikov f7f5dc6649 Extract polyfillGlobal from InitializeCore
Reviewed By: jeanlauliac

Differential Revision: D6987657

fbshipit-source-id: 8762732de671418520376a98bdd724bbb24e4e36
2018-02-15 04:23:43 -08:00
Miguel Jimenez Esun 991b7aba57 Upgrade Jest to 22.3.0
Reviewed By: BYK

Differential Revision: D6978514

fbshipit-source-id: 3c6be52d38fedbe849dee6319bb2e4d7a97297c9
2018-02-15 03:31:49 -08:00
David Vacca 51def5ef7f Make Java YogaNode cloneable
Reviewed By: priteshrnandgaonkar

Differential Revision: D6935971

fbshipit-source-id: a2008f1eb849b5074585b48699b7de56d5ac90d4
2018-02-14 18:19:03 -08:00
David Vacca db391a500c Allow installing JS binding via the RN Android bridge
Reviewed By: fkgozali

Differential Revision: D6979072

fbshipit-source-id: 8b4ac3769496a6a6fe3dd9ee2aac64b66604c413
2018-02-14 11:51:58 -08:00
David Vacca ecc08adf49 Expose methods of persistent yoga for Java
Reviewed By: priteshrnandgaonkar

Differential Revision: D6918605

fbshipit-source-id: e424c78680c04e21154ebe21405671c4e90f6529
2018-02-14 09:32:57 -08:00
Andrew Chen (Eng) c281f7a3ae Support resumes without overriding the back handler
Differential Revision: D6982515

fbshipit-source-id: 5483f6c677c6653e51f6311386f31f5be6ed0e00
2018-02-14 09:32:57 -08:00
Rafael Oleza 828cd78866 Pass cacheVersion param via the new API
Reviewed By: BYK

Differential Revision: D6980337

fbshipit-source-id: 72c01136b6720390ffec8593f0375c8756dc1d4a
2018-02-14 09:09:59 -08:00
Rafael Oleza 96ec2dcb71 Fix enableBabelRCLookup option in new CLI + global cache script
Reviewed By: BYK

Differential Revision: D6977885

fbshipit-source-id: 50245e046c7639f9fb4022a9cc5974d50831524c
2018-02-14 09:09:59 -08:00
Johan Ruokangas f8fee0a631 Pass port when running on device (fix #17973)
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Building for iOS device `react-native run-ios --device [id]` fails since port is not passed. This is a blocker for us and prevents us from updating to latest React Native stable.

I've tested this in our app and also in fresh app using RN master and verified that it works.

None.

[CLI] [BUGFIX] [local-cli/runIOS/runIOS.js] - Pass metro port when running on device
<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/17983

Differential Revision: D6988299

Pulled By: hramos

fbshipit-source-id: 5169706600f87f13b9c9c105eb7d6db7a40194f1
2018-02-14 08:17:35 -08:00
Janic Duplessis 10b642a7af Verify that the component passed to createAnimatedComponent is not functional
Summary:
Stateless functional components don't support refs and we need that for the component to work, it used to crash with this error message: `undefined is not an object (evaluating 'this._component.getScrollableNode')`. This makes it clear what the issue is.

Fixes some of the errors in #10635, not sure if it fixes all the cases described in the issue though.

**Test plan**
Tested that passing a component with createClass or extends Component works but passing a function causes an error.

[GENERAL] [ENHANCEMENT] [Animated] - Verify that the component passed to createAnimatedComponent is not functional
Closes https://github.com/facebook/react-native/pull/15019

Differential Revision: D6988096

Pulled By: sahrens

fbshipit-source-id: ec0ffa763245e786f44b4a1d56c0738876c25782
2018-02-14 08:02:48 -08:00
Valentin Shergin 7d20de412b Fixed a bug with positioning of nested views inside <Text>
Summary:
Fixing of recent regression in layout system.
Conseptually, a superview should define frames of child views.

Reviewed By: mmmulani

Differential Revision: D6980128

fbshipit-source-id: e267e966fd46af28db1d3d40939110040b74e33f
2018-02-13 23:51:54 -08:00
Kevin Gozali 5f48bd84aa iOS: allow getting an instance of a js-bound module via the bridge
Reviewed By: sebmarkbage

Differential Revision: D6982785

fbshipit-source-id: 7bbcc5416e1d1a3a577328349a7c18af5c0f8577
2018-02-13 22:38:55 -08:00
Kevin Gozali 1aeb9250bd Add JS binding for FabricUIManager - iOS
Reviewed By: sebmarkbage

Differential Revision: D6934518

fbshipit-source-id: 1f626f79a74fb199925644e8b16238aa17d40e1f
2018-02-13 22:38:55 -08:00
Kevin Gozali e165d0dcf0 allow installing extra JS binding via the bridge
Reviewed By: mdvacca

Differential Revision: D6957397

fbshipit-source-id: 172905861fbb1c9ed45149e33b406c28ad616cd7
2018-02-13 22:38:55 -08:00
Spencer Ahrens 4761d5a83e add BULLET and BULLET_SP
Reviewed By: TheSavior

Differential Revision: D6983446

fbshipit-source-id: c8ce4b1c7836654910db84c9cd4b6d0bcec8ae27
2018-02-13 22:17:21 -08:00
Janic Duplessis d06e143420 Bundle download progress on Android
Summary:
Android equivalent of #15066

Tested that download progress shows up properly when reloading the app.

[ANDROID] [FEATURE] [DevSupport] - Show bundle download progress on Android
Closes https://github.com/facebook/react-native/pull/17809

Differential Revision: D6982823

Pulled By: hramos

fbshipit-source-id: da01e42b8ebb1c603f4407f6bafd68e0b6b3ecba
2018-02-13 20:31:22 -08:00
Spencer Ahrens d220118dbd Freeze UTFSequence
Summary:
Don't want anyone accidentally mutating it.

Also make deepFreezeAndThrowOnMutationInDev easier to use with nice flow typing.

Reviewed By: yungsters

Differential Revision: D6974089

fbshipit-source-id: 0f90e7939cb726893fa353a4f2a6bbba701205bc
2018-02-13 14:36:37 -08:00
Stein Strindhaug 74e54cbcc4 Fix: incorrect line-height calculation
Summary:
There seems to be a rounding error in the android code for line height, so that for some fonts and at some combinations of line height and font size the actual height of the elements seems to be slightly too short.

I've identified one issue that I mentioned here https://github.com/facebook/react-native/issues/10712#issuecomment-359382137 that could at least explain some of the problem. That when the line-height minus the original sum of the absolute value of top  and bottom from the metrics, happens to be an odd number, the division by two causes a rounding error of 1, so that the actual line height is 1pt less than it should.

The fix uses floating point division instead of integer division, and rounds (arbitrarily) the negative values up and the positive values down so that the total is still the correct for odd numbers.

It turns out that only ascent and descent is used to give the actual line-height between lines in the same text-element. The top and bottom values are only used for padding the top and bottom of the text. So when the line-height is greater than the font size and the extra padding this PR sets the ascent and descent to the same value as the top and bottom respectively.

I've renamed the shouldIncreaseAllMetricsProportionally test to evenLineHeightShouldIncreaseAllMetricsProportionally and added an extra assertion to check that bottom-top still equals the line height.

Added another test oddLineHeightShouldAlsoWork that is similar but uses an odd number for the line height to test that it still works with odd numbers. This test only uses the sum of the values so that it's indifferent to what value the implementation chooses to round up or down.

Improvement on https://github.com/facebook/react-native/pull/16448

Fix line-height calculation on Android.

| Before        | After           |
| ------------- |-------------|
| ![without fix](https://user-images.githubusercontent.com/2144849/36150230-4404a0cc-10c3-11e8-8880-4ab84339c741.png)      | ![actual fix](https://user-images.githubusercontent.com/2144849/36156620-eb496d0e-10d7-11e8-8bd1-1cb536a38fbf.png) |

(All three columns have font size 16 and lineHeight: 32. The first one is has fixed height 9*32, the second is 9 Text elements, the last is one text element with lots of text limited to 9 lines, so they should be the same height. )
Closes https://github.com/facebook/react-native/pull/17952

Differential Revision: D6980333

Pulled By: hramos

fbshipit-source-id: 0a501358cfbf7f139fca46056d0d972b1daf6ae3
2018-02-13 13:50:22 -08:00
David Vacca 331cc791ec Extend Navigation to support "is_fabric" param from native
Reviewed By: fkgozali

Differential Revision: D6955828

fbshipit-source-id: 1a77b652a7e372acf961a0b0772ae93a999b90b1
2018-02-13 13:50:22 -08:00
Evan J Brunner 03e6d3efb4 RNTester http_server send cookie fix
Summary:
Signed-off-by: Evan J Brunner <ej3@appitto.me>

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Motivation can be found in #17899

This `RNTester/js/http_test_server.js` is part of a internal websocket test suite / devtool.

Can be tested with `curl -D - localhost:5556` observing that the `Set-Cookie: wstest=OK; Path=\` header is present, and the service throws no exceptions.. etc

[INTERNAL][MINOR][./RNTester/js/http_test_server.js] - fixed set cookie with connect framework
<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/17900

Differential Revision: D6977087

Pulled By: hramos

fbshipit-source-id: af6205343fccf69c57e0c26a85a5b04d61288a23
2018-02-13 10:46:53 -08:00
Yao Bin Then e53a8f7097 Colorize filenames with conflicts when upgrading
Summary:
Visually show files merged with conflicts when running `react-native-git-upgrade`.

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

After running `react-native-git-upgrade`, files with conflicts are not immediately recognised visually. With this patch, files with conflicts are highlighted in red.

![image](https://user-images.githubusercontent.com/771989/36086385-fc183baa-1006-11e8-8862-0867b82b7ec1.png)

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
[CLI] [ENHANCEMENT] [react-native-git-upgrade/cliEntry.js] - Print files with conflicts in red.
Closes https://github.com/facebook/react-native/pull/17947

Differential Revision: D6977042

Pulled By: hramos

fbshipit-source-id: 3c67561ea3acbee227a7a0cf42857af4fb75c75c
2018-02-13 09:19:11 -08:00
Héctor Ramos cc6d0937c3 Add disabled tests to CircleCI config
Summary:
These tests have not run for one reason or another since the migration from Travis. They are not passing, and are commented out to avoid flagging new PRs as breaking. These tests need to be fixed and re-enabled ASAP.
Closes https://github.com/facebook/react-native/pull/17959

Differential Revision: D6976781

Pulled By: hramos

fbshipit-source-id: 712a09877d0597c12cafa741779b471680b7d2db
2018-02-13 08:16:51 -08:00
Paco Estevez Garcia ad2d9e7fab Forward VM version to inspector
Reviewed By: bnham

Differential Revision: D6938018

fbshipit-source-id: c79853ddf835acab86a16ebd539874d29d3aa60a
2018-02-13 08:16:50 -08:00
Rafael Oleza b1d8af48ae Bump metro@0.26.0
Reviewed By: cpojer

Differential Revision: D6976161

fbshipit-source-id: 0cf20f4b2372997a8aac41cc07a9bdd641a93ad4
2018-02-13 07:16:48 -08:00
Eric Rozell 1673c570f9 Uses a single code path to link and unlink all platforms
Summary:
This commit removes special cases for linking iOS and Android platforms.

A previous commit opened up link and other commands for other platforms to provide their own behaviors. It left special cases in tact for iOS and Android. This PR removes the special case.

- Added jest tests related to the link command.
- Ran the `link` and `unlink` commands for iOS and Android and confirmed no changes.

https://github.com/facebook/react-native/pull/17745

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->

[CLI][FEATURE][local-cli/link/link.js] - Removes special cases for linking in iOS and Android.
Closes https://github.com/facebook/react-native/pull/17961

Differential Revision: D6975951

Pulled By: hramos

fbshipit-source-id: 8dd5da35619e2124ce4b3b18db8b694757792363
2018-02-13 05:06:42 -08:00
Peter van der Zee 6893a26bfb Fix duplicate var name declaration
Reviewed By: rafeca

Differential Revision: D6965150

fbshipit-source-id: 332c8202f350e2014fedb9790f3d895222fb4f8d
2018-02-13 01:49:56 -08:00
Spencer Ahrens 4d0ee37293 Add FDSStoryHeader
Reviewed By: TheSavior

Differential Revision: D6945233

fbshipit-source-id: 9630a72e4a7c88ca282392c374ca88326f282713
2018-02-12 18:50:21 -08:00
Spencer Ahrens 54870e0c6c Add UTFSequence module for common unicode usage
Summary:
A collection of Unicode sequences for various characters and emoji.

  - More explicit than using the sequences directly in code.
  - Source code should be limitted to ASCII.
  - Less chance of typos.

Reviewed By: TheSavior

Differential Revision: D6969065

fbshipit-source-id: c11ec96b74f5dfa7c624a3c53f3c29f6284a82b3
2018-02-12 18:50:21 -08:00
Andrew Chen (Eng) 427e464bb9 Fix localization crash in DevSettingsActivity
Differential Revision: D6970534

fbshipit-source-id: da1df549b6157e5ec684cf4eed5f411740a73ed0
2018-02-12 16:33:07 -08:00
Brian Vaughn bedaaa1419 React sync for revisions 467b103...a634e53
Reviewed By: flarnie

Differential Revision: D6965585

fbshipit-source-id: 48c20d0010f4daf83272a36b3bdaca94493ab8fa
2018-02-12 14:02:30 -08:00
Mike Grabowski f7729a5933 Broken publish step on CI
Summary:
Every `job` is run in a separate container and so, `checkout` step is required for the Git host to be added to `~/.ssh/known_hosts`. Without this step, it will timeout after 10 minutes waiting for you to add (yes) or reject (no) from known hosts (we get this prompt when we checkout from a host for the very first time).
Closes https://github.com/facebook/react-native/pull/17956

Differential Revision: D6968130

Pulled By: hramos

fbshipit-source-id: 6d62166fd375f8f408cf5f18b188f841d035d97f
2018-02-12 12:33:42 -08:00
Valentin Shergin f91f7d91a1 Reimagining of RCTShadowView layout API
Summary:
This is reimagining of interoperability layer between Yoga and ShadowViews (at least in Yoga -> RN part).
Goals:
 * Make it clear and easy.
 * Make clear separation between "what layout what", now parent always layout children, noone layout itself.
 * Make possible to interleave Yoga layout with custom imperative layout (may be used in SafeAreaView, Text, Modal, InputAccessoryView and so on).

Reviewed By: mmmulani

Differential Revision: D6863654

fbshipit-source-id: 5a6a933874f121d46f744aab99a31ae42ddd4a1b
2018-02-12 00:32:43 -08:00
Martin Arista 47b36d3ff0 Update DevLoadingView to Support iPhone X
Summary:
The current implementation of DevLoadingView for iPhone currently gives a static height of `22` and does not take into account iPhoneX screen dimensions.

Devices: All iPhone devices currently available with Xcode v9.2
SDK: 8.1, 9, 10, 11

Validate resize only occurs on iPhone X devices and others remain consistent.

Before:
![feb-10-2018 12-30-20](https://user-images.githubusercontent.com/1743953/36065313-7b41f2ea-0e5e-11e8-87f2-928e26536077.gif)

After:
![feb-10-2018 12-28-15](https://user-images.githubusercontent.com/1743953/36065317-848e4f7e-0e5e-11e8-8aab-70cb5db32f31.gif)

[GENERAL][ENHANCEMENT][{React}] - Improvements to DevLoadingView for iPhone X
Closes https://github.com/facebook/react-native/pull/17936

Differential Revision: D6962962

Pulled By: shergin

fbshipit-source-id: e11d9386544fe19a9195e22a03e12f64e934cad7
2018-02-11 22:49:21 -08:00
Andres Suarez 9d214967d2 Fix ESLint upgrade "parsing error"
Reviewed By: adamjernst

Differential Revision: D6959356

fbshipit-source-id: 77c61998f23a6acd7cdfe2c87d8760a23d957800
2018-02-10 10:51:14 -08:00
Andres Suarez bba19e846e Upgrade to ESLint v4.17.0 (plus update related deps)
Reviewed By: adamjernst

Differential Revision: D6956725

fbshipit-source-id: d223aa238dbb67190a1c244c7d482fc95005ccb0
2018-02-09 22:01:16 -08:00
Héctor Ramos 51b6749c07 bump Android cache key
Summary: Closes https://github.com/facebook/react-native/pull/17934

Differential Revision: D6956755

Pulled By: hramos

fbshipit-source-id: 518171156638effc279f17b38c379e029ed23ba0
2018-02-09 17:31:14 -08:00
Héctor Ramos 5e80d95e03 React sync for revisions 4eed18d...467b103
Reviewed By: bvaughn

Differential Revision: D6953225

fbshipit-source-id: f96e3cec57cce397d46d49115dd3734a33427992
2018-02-09 16:05:29 -08:00
Jonathan Kim e233646d09 Clean up unused macros after consolidation
Reviewed By: mzlee

Differential Revision: D6954781

fbshipit-source-id: 0ec78e6f7f2780951ac008e9b12f41cfd5441ed5
2018-02-09 16:05:29 -08:00
Wei Sun 1a790f8703 Use ConcurrentHashMap for handling concurrent Android websockets, and…
Summary:
… prevent unknown websocket IDs from crashing on Android (show warning on development builds instead)

This PR addresses #3346; an unknown websocket ID should produce a warning during development, but not cause crashes in production RN apps. This PR was created by satya164's request, and was inspired by tanthanh289's suggestion on #3346's thread.

On Android, create a websocket using a service like Pusher (`pusher-js` npm package) or manually, and then induce removal of its websocket ID. Result should be a red warning screen during development, and no crash in the app's release variant.

 [ANDROID] [BUGFIX] [WebSocket] - Prevent unknown websocket IDs from crashing on Android
Closes https://github.com/facebook/react-native/pull/17884

Differential Revision: D6954038

Pulled By: hramos

fbshipit-source-id: b346d80d7568996b8819c0de54552abb534cbfae
2018-02-09 14:47:56 -08:00
Nikolai Tillmann 01a58d182a Fixing Prepack model for latest global.nativeExtensions changes.
Differential Revision: D6943293

fbshipit-source-id: cb67b063b77e8f89712fb437fc5471b7f874c482
2018-02-09 14:00:10 -08:00