Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/facebook/react-native.git. Pull mirroring updated .
  1. Oct 05, 2018
  2. Oct 04, 2018
  3. Oct 02, 2018
    • Rafael Oleza's avatar
      Cleanup the transformer flow types · 920cf54c
      Rafael Oleza authored
      Summary:
      Since the options that are passed to the `babelTransformer` are not exactly the same ones as the `transformer` receives, we need to have a specific object for them.
      
      This allows us to make the transformer options object strict (since unfortunately the `babeltransformer` options object comes from many places and needs a bit of work to be able to be strict...
      
      Reviewed By: mjesun
      
      Differential Revision: D9309173
      
      fbshipit-source-id: 0a92381968f17e5eb6c4740c1ca89580fa7ee4d3
      920cf54c
    • Rafael Oleza's avatar
      Make config object read-only · 279c0905
      Rafael Oleza authored
      Summary: This makes the Metro config type readonly, only a couple of things inside Metro needed to be tweaked :)
      
      Reviewed By: mjesun
      
      Differential Revision: D10028083
      
      fbshipit-source-id: 15f5d957a8ee7384d6156c973639d86240fd251f
      279c0905
    • Mike Grabowski's avatar
      [0.57.2] Bump version numbers · 4aec7c95
      Mike Grabowski authored
      4aec7c95
    • Mike Grabowski's avatar
      Revert "[0.57.2] Bump version numbers" · 63cf8881
      Mike Grabowski authored
      This reverts commit aae1e296.
      63cf8881
    • Oleg Lokhvitsky's avatar
      Android ScrollView fix for pagingEnabled · 0869e546
      Oleg Lokhvitsky authored
      Summary:
      The snapToOffsets changes improved the flinging algorithm for snapToInterval/snapToOffsets but actually broke it for pagingEnabled because it's meant to only scroll one page at a time.
      
      First, I just brough back the old algorithm, but noticed that it has a bunch of issues (e.g. #20155). So, I tried to improve the algorithm to make sure it uses the proper target offset prediction using the same physics model that Android uses for it's normal scrolling but still be limited to one page scrolls.
      
      This resolves #21116.
      
      Reviewed By: shergin
      
      Differential Revision: D9945017
      
      fbshipit-source-id: be7d4dfd1140f4c4d32bad93a03812dc80286069
      0869e546
    • Mike Grabowski's avatar
      [0.57.2] Bump version numbers · aae1e296
      Mike Grabowski authored
      aae1e296
    • Edward Karuna's avatar
      Add workaround for Android Gradle Plugin 3.2 change to asset dir (#21409) · a4fed6e2
      Edward Karuna authored
      Summary:
      Android Gradle Plugin 3.2 uses a new intermediates/merged_assets directory instead of intermediates/assets. This workaround copies the javascript bundle to both directories for compatibility purposes.
      
      Fixes #21132
      Fixes #18357
      Pull Request resolved: https://github.com/facebook/react-native/pull/21409
      
      Differential Revision: D10141860
      
      Pulled By: hramos
      
      fbshipit-source-id: 0fb20fcec67ec2bfd7a8d9052599bbc70464b466
      a4fed6e2
    • Timothy Kukulski's avatar
      allow zero offset when shadow radius is nonzero · b7ba2255
      Timothy Kukulski authored
      Summary:
      update creation logic for text shadow: allow shadows with zero offset when the radius is nonzero
      
      (?should we also add a check to drop the node as a no-op when color.alpha == 0 ?)
      
      Reviewed By: yungsters
      
      Differential Revision: D10017778
      
      fbshipit-source-id: 0168ac6db5ad22a5d7eb32dcd184aede361d6651
      b7ba2255
    • Krzysztof Magiera's avatar
      Expose a getter for overflow setting in ReactViewGroup (#21398) · bc973d20
      Krzysztof Magiera authored
      Summary:
      This change adds getter for overflow attribute in ReactViewGroup class. Overflow setting can affect how view children are drawn but also how hit testing behaves when receiving touch. Exposing this setting makes it possible for gesture-handler library to implement proper hit testing that takes into account overflow property of a view.
      Pull Request resolved: https://github.com/facebook/react-native/pull/21398
      
      Differential Revision: D10105398
      
      Pulled By: shergin
      
      fbshipit-source-id: 15ae2b31be3bf80e7e1d28b87ce4474af0f486f5
      bc973d20
    • Artur Chrusciel's avatar
      Check if child view != null before dropping (#20465) · 8744e00e
      Artur Chrusciel authored
      Summary:
      Fixes our top crash when framework try drop a view from parent, but it's a null (already removed etc.).
      
      Fixes #20288
      Pull Request resolved: https://github.com/facebook/react-native/pull/20465
      
      Differential Revision: D10113976
      
      Pulled By: hramos
      
      fbshipit-source-id: 34f5654f3bdbc63eb7f7d0b5c94885576fc3cdcd
      8744e00e
    • chenwenyu's avatar
      Android: fix cookies lost on Android 5.0 and above (#19770) · b01ac3bf
      chenwenyu authored
      Summary:
      This fixes cookie missing bug on Android 5.0 and above.
      On Android 5.0 and above, after the app successfully obtains the cookie, you kills the App within 30 seconds and restarts the App. It accesses the interface that needs to carry the cookie and finds that the cookie does not exist.
      
      Updated tests for the addCookies function to include test cases specifying Android version, and tested on the command line in my app to make sure it has the expected behavior.
      
      Updated tests for the addCookies function to include test cases specifying Android version, and tested on the command line in my app to make sure it has the expected behavior.
      
      [ANDROID] [BUGFIX] [Cookie] - Fix cookies lost on Android 5.0 and above
      Pull Request resolved: https://github.com/facebook/react-native/pull/19770
      
      Differential Revision: D10114102
      
      Pulled By: hramos
      
      fbshipit-source-id: 5b4766f02f70541fd46ac5db36f1179fe386ac7a
      b01ac3bf
    • Sergei Dryganets's avatar
      Rounded corner rendering fixed on Android N. (#21340) · b460f0d2
      Sergei Dryganets authored
      Summary:
      On Android N (API 24) rounded corners rendering has issues in case scale factor is set for the view.
      Pull Request resolved: https://github.com/facebook/react-native/pull/21340
      
      Differential Revision: D10084318
      
      Pulled By: hramos
      
      fbshipit-source-id: 53ae5a32b96cc7ee7eba084330682239d8beb85d
      b460f0d2
    • Riley Dulin's avatar
      Change new Date() to Date.now() to save on date allocations · ddce06ff
      Riley Dulin authored
      Summary:
      `new Date().getTime()` is equal to `Date.now()`.
      `Date.now()` avoids an allocation, which can save some GC time.
      
      This micro-optimization isn't worth it in most places, but since MessageQueue is one of the hottest pieces of JS in RN, it's worth it.
      
      Reviewed By: javache
      
      Differential Revision: D9972334
      
      fbshipit-source-id: 05d78fd65304f0f27115d76b8b52db11a52c86a0
      ddce06ff
    • Tim Yung's avatar
      React: Upgrade to react-devtools@^3.4.0 · a1cf6579
      Tim Yung authored
      Summary:
      Upgrades to `react-devtools@^3.4.0`.
      
      Notably, this brings the improved coloring to the React Profiler.
      
      Reviewed By: bvaughn
      
      Differential Revision: D9985352
      
      fbshipit-source-id: 64a76d194275e551f04dd52d775bf26bb16df6b8
      a1cf6579
    • Janic Duplessis's avatar
      Use babel runtime instead of relying on global babelHelpers and regenerator (#198) · 60b05cae
      Janic Duplessis authored
      Summary:
      **Summary**
      
      The RN transformer currently relies on the enviroment providing babelHelpers and regeneratorRuntime as globals by using 'babel-external-helpers'. This wasn't really a problem before since helpers were stable and we could maintain our copy easily but it seems like there are more now with babel 7 and it makes sense to include only those used by the app.
      
      This is exactly what babel/transform-runtime does. It will alias all helpers and calls to regeneratorRuntime to files in the babel/runtime package.
      
      This will solve issues like this https://github.com/facebook/react-native/issues/20150 caused by missing babelHelpers. This solution also avoids bloating babelHelpers to fix OSS issues like the one linked before.
      
      **Test plan**
      
      - Updated tests so they all pass.
      - Tested that it actually works by applying the changes locally in an RN app.
      - Added a test for async functions, to make sure regenerator is aliased properly and doesn't depend on the global.
      - Made sure require-test.js still fails if the require implementation contains babel helpers (by adding an empty class in the file).
      Pull Request resolved: https://github.com/facebook/metro/pull/198
      
      Reviewed By: mjesun
      
      Differential Revision: D8833903
      
      Pulled By: rafeca
      
      fbshipit-source-id: 7081f769f288ab358ba89ae8ee72a513bb12e225
      60b05cae
    • Krzysztof Ciombor's avatar
      Fix event handlers for DPad arrows on Android TV (#21143) · 9ac28774
      Krzysztof Ciombor authored
      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.
      
      If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
      -->
      
      Fixes #20924
      DPad arrow events were missing from `KEY_EVENTS_ACTIONS` which meant that they were not broadcasted by `TVEventHandler`.
      Pull Request resolved: https://github.com/facebook/react-native/pull/21143
      
      Differential Revision: D10007851
      
      Pulled By: mdvacca
      
      fbshipit-source-id: 9a03cad249a4a1917975d1de10b6112e69d32a72
      9ac28774
    • Kevin Leung's avatar
      Android subpixel text (#19043) · c17787e9
      Kevin Leung authored
      Summary:
      <!--
        Required: Write your motivation here.
        If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
      -->
      
      Fixes inconsistency in custom font rendering in android. See explanation below.
      
      <!--
        Required: Write your test plan here. If you changed any code, please provide us with
        clear instructions on how you verified your changes work. Bonus points for screenshots and videos!
      -->
      
      I tested the following on my physical device (Sony Z5C) and on Android emulator on Mac.
      The test app contains various fonts in the AvenirNext family, which are added to the app as `.ttf` format.
      
      Note that the character "thickness" is inconsistent. Some characters looks thicker than other. See the screenshots below as an example:
      - Looks thicker: right half of the `g` and `&` as in "Region & Language" (list-view screen)
      - Looks thicker: `w` as in `Change Password` (list-view screen)
      - Looks vertically compressed: `a` and `e` as in "Message" in the bottom bar (list-view screen)
      - Looks thicker: `A`, `N`, `V`, `v` (paragraph screen)
      - Looks thinner: `i` (paragraph screen), it leaves extra space on its right hand side
      
      ![screenshot_20180427-151129](https://user-images.githubusercontent.com/1103788/39350754-ae9fafe2-4a31-11e8-8835-97280783bb95.png)
      ![screenshot_20180427-151419](https://user-images.githubusercontent.com/1103788/39350755-aecc9bba-4a31-11e8-8128-2d230f003dfa.png)
      
      Every characters has consistent "weight" and looks nice:
      
      ![screenshot_20180427-150835](https://user-images.githubusercontent.com/1103788/39350753-ae698728-4a31-11e8-8a55-4e161c559b95.png)
      ![screenshot_20180427-151639](https://user-images.githubusercontent.com/1103788/39350756-aef95d44-4a31-11e8-820b-1a7dee77fabe.png)
      
      <!--
        Does this PR require a documentation change?
        Create a PR at https://github.com/facebook/react-native-website and add a link to it here.
      -->
      
      None
      
      <!--
        Required.
        Help reviewers and the release process by writing your own release notes. See below for an example.
      -->
      
      [ANDROID] [ENHANCEMENT] [CustomStyleSpan] - Enable subpixel text rendering
      
      <!--
        **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 ] [ {Filename}  ]
        [ IOS      ] [ FEATURE     ] [ {Directory} ]   |-----------|
        [ ANDROID  ] [ MINOR       ] [ {Framework} ] - | {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
      -->
      Pull Request resolved: https://github.com/facebook/react-native/pull/19043
      
      Differential Revision: D10008155
      
      Pulled By: hramos
      
      fbshipit-source-id: 7fe9bb0f9be80380947ff80eac522e3cfd6b22cf
      c17787e9
    • Rafael Oleza's avatar
      Remove absolute path parameter from transformers · e2b9b716
      Rafael Oleza authored
      Summary:
      Up until now, transformers in Metro received the absolute path of a file, the relative path of a file and the projectRoot.
      
      This diff gets rid of the absolute path sent to the worker, since by having the projectRoot and the relative path, the absolute path can be easily calculated.
      
      This has been done to avoid having absolute paths as transform options, since we need to have custom logic to filter them out from the cache key generation, which is dangerous.
      
      Reviewed By: mjesun
      
      Differential Revision: D9195147
      
      fbshipit-source-id: e95c5c29272eec7f1a48af7cede4c6d6b4a8ffb7
      e2b9b716
    • Rafael Oleza's avatar
      Bump metro@0.47.0 · 4faa0e6c
      Rafael Oleza authored
      Summary: New version on the horizon :)
      
      Reviewed By: mjesun
      
      Differential Revision: D10051460
      
      fbshipit-source-id: 982604bd7a38d1d3ec642f6cd6fea1a40ab0d34f
      4faa0e6c
    • anthony's avatar
      Fix HEAD request failing with `Invalid response for blob` (#19567) · 9e377c39
      anthony authored
      Summary:
      Fixes #18223
      
      This is a fairly simple solution to what seems to be a recurring issue where certain requests that result in an empty body where JSON is expected throw an error rather than being handled gracefully. Client side error handling is not being hit as this is being thrown at a lower level.
      Make a http request that results in an empty blob: ""
      
      [INTERNAL] [BUGFIX] [XMLHttpRequest.js] - Line 262
      Pull Request resolved: https://github.com/facebook/react-native/pull/19567
      
      Differential Revision: D8314416
      
      Pulled By: hramos
      
      fbshipit-source-id: a17c49f3620f0abbb936f3a1c2b01aa1b64820fd
      9e377c39
    • Matias Colotto's avatar
      ReactScrollView should account for `overflow: scroll` · e6677b0e
      Matias Colotto authored
      Summary:
      Support for `overflow: visible` was recently added to Android ScrollView.
      However, it didn't account for `overflow: scroll` and changed the behavior, causing content to render
      when before it would be clipped.
      
      Reviewed By: achen1
      
      Differential Revision: D10036807
      
      fbshipit-source-id: e44a79b18eecbc7d64621f7cf5d800a00a121b13
      e6677b0e
    • Oleg Lokhvitsky's avatar
      Android ScrollView support for `overflow: visible` · 5906c264
      Oleg Lokhvitsky authored
      Summary:
      ScrollView always clipping children on Android even when `overflow: visible` was specified.
      This change just omits the clipping during draw if `overflow: visible` is passed in.
      The default is not changed (from hidden to visible) in case there is a performance impact.
      Android now matches iOS in behavior. This helps with issue #21116 and resolves #14416.
      
      Reviewed By: shergin
      
      Differential Revision: D9952096
      
      fbshipit-source-id: 367afe33ee7ff0fdc5aa1074d239883aa289888a
      5906c264
    • Andrew Chen (Eng)'s avatar
      Remove overflow hidden killswitch · f1fabe57
      Andrew Chen (Eng) authored
      Summary: There hasn't been any reports of overflow issues since the last issue was fixed in v183 (July 30th). Let's remove this flag
      
      Reviewed By: yungsters
      
      Differential Revision: D10020006
      
      fbshipit-source-id: 593c7d2c2bef5f0bd60d5de1941cd58f7fd6ccc7
      f1fabe57
    • Janic Duplessis's avatar
      Remove global babelHelpers and regenerator (#21283) · 5627616e
      Janic Duplessis authored
      Summary:
      Follow up to https://github.com/facebook/metro/commit/8932a9caa8f9ffe82160f2da25342a0bde3bbb26
      
      Babel helpers and regenerator runtime will be imported automatically from `babel/runtime`. We still need to add the global regeneratorRuntime for jest tests since we disable babel-runtime currently.
      Pull Request resolved: https://github.com/facebook/react-native/pull/21283
      
      Reviewed By: mjesun
      
      Differential Revision: D10010963
      
      Pulled By: rafeca
      
      fbshipit-source-id: da5e23dd901f8f8940d46816b4fc9290d0e28c76
      5627616e
  4. Sep 22, 2018
  5. Sep 21, 2018