Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge from upstream through 2020-05-09 #806

Merged

Commits on Apr 9, 2020

  1. Update default Podfile to not depend on a path (facebook#28572)

    Summary:
    Recently, a default Podfile has been modified to not contain all the React Native pods, but use a helper method `use_react_native!`.
    
    While this is great, it assumes a hardcoded path of `../node_modules/react-native` to be always the correct location of the React Native.
    
    https://github.com/facebook/react-native/blob/d4d8887b5018782eeb3f26efa85125e6bbff73e4/scripts/autolink-ios.rb#L7-L9
    
    Unfortunately, due to the way Ruby works, this completely hides the path away from the users.
    
    Before, they could have seen the wrong path explicitly in a Podfile and knew to update it to resolve path-related issues.
    
    With the current version in `master`, I can see a lot of issues where developers wonder how to resolve the path issues and how to pass the path itself.
    
    https://github.com/facebook/react-native/blob/4118d798265341061105f3a53550db83c66a71cb/template/ios/Podfile#L5-L10
    
    This PR uses React Native CLI configuration (that is already used to link 3rd party dependencies) to explicitly define the correct path to the React Native.
    
    As a result, we don't have to change the paths here whether we're running monorepo or not.
    
    ## Changelog
    
    [IOS] [INTERNAL] - Always provide an explicit path to React Native
    Pull Request resolved: facebook#28572
    
    Differential Revision: D20945194
    
    Pulled By: TheSavior
    
    fbshipit-source-id: 010f9754f2ed78ef62fd52f4d201f296f5af6d27
    grabbou authored and facebook-github-bot committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    cd13c99 View commit details
    Browse the repository at this point in the history
  2. Upgrade Prettier in Xplat to version 1.19.1

    Summary:
    Upgrades Prettier in Xplat to 1.19.1
    Ignores upgrading packages on already on versions greater than 1.19.1
    
    Changelog: [Internal]
    
    allow-large-files
    bypass-lint
    
    (Note: this ignores all push blocking failures!)
    
    Reviewed By: gkz, cpojer
    
    Differential Revision: D20879147
    
    fbshipit-source-id: 0deee7ac941e91e1c3c3a1e7d3d3ed20de1d657d
    gkz authored and facebook-github-bot committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    cd347a7 View commit details
    Browse the repository at this point in the history
  3. Stop using get_fbobjc_enable_exception_lang_compiler_flags_DEPRECATED…

    … in xplat
    
    Summary:
    Old deprecated function.
    
    Changelog: [Internal]
    
    Reviewed By: nlutsenko
    
    Differential Revision: D20148856
    
    fbshipit-source-id: 79d6fb97824b059e50f67ff5a0b4c38ec7a19469
    swolchok authored and facebook-github-bot committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    ccb7dbe View commit details
    Browse the repository at this point in the history
  4. Add ProGuard rule for hermes (facebook#28571)

    Summary:
    This adds a ProGuard for `hermes` rule so it does not have to be added by users manually.
    facebook#28270
    
    ## Changelog
    
    <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
    https://github.com/facebook/react-native/wiki/Changelog
    -->
    
    [Android] [Added] - ProGuard rule for hermes
    Pull Request resolved: facebook#28571
    
    Test Plan:
    1. Create a project with/without hermes.
    2. Enable proguard.
    
    Reviewed By: cpojer
    
    Differential Revision: D20947095
    
    Pulled By: hramos
    
    fbshipit-source-id: 79b166ad2dd060f20041d9f5cfe2f794c754843d
    radko93 authored and facebook-github-bot committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    449dc37 View commit details
    Browse the repository at this point in the history
  5. Move CheckBox JS files to FB Internal

    Summary:
    Move CheckBox JS files to FB internal
    
    ## Changelog:
    [General] [Removed] This diff removes the CheckBox export from React Native. Internally, we are requiring CheckBox directly now and externally people will have to use the community maintained module.
    
    Reviewed By: cpojer
    
    Differential Revision: D20910775
    
    fbshipit-source-id: 809e135dc3f68911ac0a004e6eafa8488f0d5327
    poteto authored and facebook-github-bot committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    dff17ef View commit details
    Browse the repository at this point in the history
  6. fix: ripple should be applied even when borderless == false (facebook…

    …#28526)
    
    Summary:
    With current master, when you render `<Pressable android_ripple={{borderless: false}}>`, there is no ripple effect at all.
    
    I think the expected behavior is to have ripple with default color and radius, just not borderless.
    
    This was how it was done (by me) in https://github.com/facebook/react-native/pull/28156/files but in the import process, the implementation was changed: facebook@bd38686 so either this PR is a fix or you can just close it (but I'd be curious why).
    
    ## Changelog
    
    <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
    https://github.com/facebook/react-native/wiki/Changelog
    -->
    
    [Android] [fixed] - ripple should be applied even when borderless == false
    Pull Request resolved: facebook#28526
    
    Test Plan:
    `<Pressable android_ripple={{borderless: false}}>` on master
    
    ![SVID_20200404_123614_1](https://user-images.githubusercontent.com/1566403/78424971-6b315a80-7671-11ea-8be4-5fea428bc556.gif)
    
    `<Pressable android_ripple={{borderless: false}}>` in this PR
    
    ![SVID_20200404_122754_1](https://user-images.githubusercontent.com/1566403/78424986-8bf9b000-7671-11ea-9804-37cd58dbb61e.gif)
    
    Differential Revision: D20952026
    
    Pulled By: TheSavior
    
    fbshipit-source-id: df2b95fc6f20d7e958e91805b1a928c4f85904f1
    vonovak authored and facebook-github-bot committed Apr 9, 2020
    Configuration menu
    Copy the full SHA
    44ec762 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2020

  1. Remove ColorAndroid function as it adds no value over PlatfromColor (f…

    …acebook#28577)
    
    Summary:
    This change removes the `ColorAndroid` API.   It was added more as a validation tool than as something useful to a developer.   When making the original [PlatformColor PR](facebook#27908) we felt it was valuable and useful to have working platform specific methods for the two platforms in core to test that the pattern worked in app code (PlatformColorExample.js in RNTester) and that the Flow validation worked, etc.    Practically `PlatformColor()` is more useful to a developer on Android than `ColorAndroid()`.    Now that the construct has served its purpose, this PR removes the `ColorAndroid` function and its related tests and other collateral.
    
    ## Changelog
    
    <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
    https://github.com/facebook/react-native/wiki/Changelog
    -->
    
    [Android] [Removed] - Remove ColorAndroid function as it adds no value over PlatfromColor
    Pull Request resolved: facebook#28577
    
    Test Plan: RNTester in both iOS and Android was tested.   Jest tests, Flow checks, Lint checks all pass.
    
    Reviewed By: cpojer
    
    Differential Revision: D20952613
    
    Pulled By: TheSavior
    
    fbshipit-source-id: 7d2cbaa2a347fffe59a1f3a26a210676008fdac0
    tom-un authored and facebook-github-bot committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    411c344 View commit details
    Browse the repository at this point in the history
  2. iOS: mark some old NativeModule targets with depslint_never_remove

    Summary:
    Label some BUCK targets properly.
    
    Changelog: [Internal]
    
    Reviewed By: shergin
    
    Differential Revision: D20960917
    
    fbshipit-source-id: 42fa2266105b6c3dd5108a1b56035a19a95cd61f
    fkgozali authored and facebook-github-bot committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    d4d6dff View commit details
    Browse the repository at this point in the history
  3. Update Gradle Wrapper to 6.3 (facebook#28173)

    Summary:
    ```
    Welcome to Gradle 6.3!
    
    Here are the highlights of this release:
     - Java 14 support
     - Improved error messages for unexpected failures
    
    For more details see https://docs.gradle.org/6.3/release-notes.html
    ```
    
    ## Changelog
    
    [Android] [Changed] - Update Gradle Wrapper to 6.3
    Pull Request resolved: facebook#28173
    
    Test Plan: Build project
    
    Differential Revision: D20958894
    
    Pulled By: mdvacca
    
    fbshipit-source-id: a02ab0eb6aff97148c12b844fdd1f9f2617ae53f
    friederbluemle authored and facebook-github-bot committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    8988a07 View commit details
    Browse the repository at this point in the history
  4. Fix crash inside RCTRedBox when trying to present same UIViewControll…

    …er twice
    
    Summary:
    Calling `-[RCTRedBox showErrorMessage]` twice causes a crash
    
    We used `-[UIViewController isBeingPresented]` to tell whether view controller is already presented.
    But from the documentation:
    
    > A Boolean value indicating whether the view controller is being presented.
    
    Source: https://developer.apple.com/documentation/uikit/uiviewcontroller/2097564-beingpresented?language=objc#
    
     ---
    So this means that if you present it, wait until presentation animation is finished and then call `-[RCTRedBox showErrorMessage]` again, following exception will be thrown.
    
    ```
    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller <UIViewController: 0x7fc33e422f50>.'
    ```
    
    Changelog: Fix crash caused by presenting view controller twice from RCTRedBox
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D20946645
    
    fbshipit-source-id: 763066e37db4e56efb0118b2e7867ad0724bae81
    sammy-SC authored and facebook-github-bot committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    46c77dc View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2020

  1. Animated: Early detection of division by zero in AnimatedDivision

    Summary:
    We currently see a lot of errors happens because of division by zero in `AnimatedDivision` module. We already have a check for that in the module but it happens during the animation tick where the context of execution is already lost and it's hard to find why exactly it happens.
    Adding an additional check to the constructor should trigger an error right inside render function which should make the error actionable.
    
    Changelog: [Internal] Early crash in AnimatedDivision in case of division by zero.
    
    Reviewed By: mdvacca
    
    Differential Revision: D20969087
    
    fbshipit-source-id: 0d98774b79be2cc56d468a4f56d2d7c8abf58344
    shergin authored and facebook-github-bot committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    be78673 View commit details
    Browse the repository at this point in the history
  2. Fabric: Controlling DifferentiatorMode via ReactNativeConfig

    Summary:
    Now we can control the differentiator mode via MC.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: fkgozali
    
    Differential Revision: D20978857
    
    fbshipit-source-id: 13264948762f02f874d8d051c873d378062d6db4
    shergin authored and facebook-github-bot committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    d7d585f View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2020

  1. Upgrade Hermes dependency to 0.5.0

    Summary:
    Use the latest published release of hermes-engine. Update RN to invoke `hermesc` instead of `hermes`.
    
    Changelog: [Android] [Changed] - Upgraded to Hermes 0.5.0
    
    allow-large-files
    
    Reviewed By: mhorowitz
    
    Differential Revision: D20998564
    
    fbshipit-source-id: 4824e273bcb044029a5a7e9379f168d3da47da50
    willholen authored and facebook-github-bot committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    4305a29 View commit details
    Browse the repository at this point in the history
  2. Set width/height also to Undefined when we change the measure mode to…

    … Undefined
    
    Summary:
    Make sure width/height is always passed as Undefined when measure mode is changed to Undefined.
    
    Changelog: [Internal][Yoga] Set width and height as Undefined when we change measure mode to Undefined
    
    Reviewed By: alickbass
    
    Differential Revision: D20029838
    
    fbshipit-source-id: b9931f6ddb13ffd1565889535ade5bbffbe0c304
    SidharthGuglani-zz authored and facebook-github-bot committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    49c90e9 View commit details
    Browse the repository at this point in the history
  3. Remove redundant input from TextInput

    Summary:
    `const ReactNative` is assigned to but never used. Let's get rid of it.
    
    Changelog: [Internal]
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21016502
    
    fbshipit-source-id: afcb0cfc501adf07e0c4d4452a831160e1cda088
    sammy-SC authored and facebook-github-bot committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    9c54bf4 View commit details
    Browse the repository at this point in the history
  4. Update RNTester AppDelegate for changes made to SurfacePresenter API (f…

    …acebook#28580)
    
    Summary:
    This pull request updates RNTester's AppDelegate's Fabric mode to reflect changes made to the SurfacePresenter APIs. It now makes use of `RCTSurfacePresenterBridgeAdapter` to create its `SurfacePresenter`.
    
    ## Changelog
    
    [Internal] [Fixed] - Fixed outdated API usage in RNTester's AppDelegate
    Pull Request resolved: facebook#28580
    
    Test Plan: `RNTester/RNTester/AppDelegate.mm` now compiles without error when `RN_FABRIC_ENABLED` is enabled.
    
    Reviewed By: hramos
    
    Differential Revision: D20966067
    
    Pulled By: mdvacca
    
    fbshipit-source-id: 8d0168d468240cff61554f2f2df799aaf5d876c1
    empyrical authored and facebook-github-bot committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    e0da72a View commit details
    Browse the repository at this point in the history
  5. Retryable ViewCommand exceptions shouldn't crash

    Summary:
    Early ViewCommand Dispatch will solve this category of crashes by going through an entirely different codepath. For users not in that experiment, it might be good to have a mitigation that prevents non-critical issues from crashing (like "blur" failing).
    
    Currently, "blur" failures cause lots of screens to crash. There's no useful signal and those crashes aren't super actionable, so seems better to swallow.
    
    If/when early viewcommand dispatch ships as the default/only mode, we can remove this try/catch entirely.
    
    The only concern I have with landing this is the perf implications of putting a try/catch inside this loop.
    
    Changelog: [Internal]
    
    Reviewed By: mdvacca
    
    Differential Revision: D21023213
    
    fbshipit-source-id: 310fe2d55a44bc424692a2365ccd5882f35f9d82
    JoshuaGross authored and facebook-github-bot committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    9bc7a07 View commit details
    Browse the repository at this point in the history
  6. Remove setMostRecentEventCount from TextInput view commands

    Summary:
    Changelog: [Internal]
    
    We don't use view command `setMostRecentEventCount`, let's get rid of it.
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21016600
    
    fbshipit-source-id: 6491c063e9d6a89252300cb47c010b248e473f4b
    sammy-SC authored and facebook-github-bot committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    b861782 View commit details
    Browse the repository at this point in the history
  7. label-actions: Add canned response for upgrade issues

    Summary:
    Enhance the label-actions config and support a "Type: Upgrade Issue" label.
    - Point to the Upgrade Support repository whenever the Type: Upgrade Issue label is applied.
    - Close the issue.
    
    Changelog:
    [Internal] label-actions: Add canned response for upgrade issues
    
    Reviewed By: cpojer
    
    Differential Revision: D20974607
    
    fbshipit-source-id: 3cd7890aaeb1e57baf2acc5ca85a9b3ae5117c56
    hramos authored and facebook-github-bot committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    e6ed5b2 View commit details
    Browse the repository at this point in the history
  8. Yoga Podspec: Export YGNode and YGStyle headers (microsoft#997)

    Summary:
    This pull request adds `YGNode.h` and `YGStyle.h` to the headers exported by Yoga's podspec. They are required by the new Fabric architecture of React Native.
    
    The modulemap and its umbrella header automatically generated by Cocoapods adds all exported headers to the `modulemap`. Having YGNode and YGStyle exported through here has problems, because they are only available in environments that have C++ available, and will produce errors otherwise.
    
    This pull request fences off the contents of those headers in an `#ifdef __cplusplus` block, so they will not cause errors when imported into environments where C++ isn't available.
    
    I had considered adding a custom modulemap to the podspec as part of this pull request, but this way seems the least "invasive", and this way you are able to add and remove exported headers in the podspec without needing to worry about updating the umbrella header at the same time.
    
    Changelog:
    
    [Internal] - Yoga Podspec: Export YGNore and YGStyle headers
    
    Pull Request resolved: facebook/yoga#997
    
    Reviewed By: hramos
    
    Differential Revision: D20966075
    
    Pulled By: mdvacca
    
    fbshipit-source-id: 5f5caa6b639d11e660b968d681da9a4de6c0eb8e
    empyrical authored and facebook-github-bot committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    eaba383 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2020

  1. Add logging to catch null TurboModules

    Summary:
    We're still seeing NativeModule eager-init crashes in T46487253. So, just to be extra careful, in case this diff doesn't fix the problem, I'm adding logging into `TurboModuleManager.getModule(moduleName)` to see why TurboModules are showing up as `null`.
    
    Changelog: [Internal]
    
    Reviewed By: mdvacca
    
    Differential Revision: D21027984
    
    fbshipit-source-id: 74ee62aeac09a4fdb29547e90ef4fa7c07de17a6
    RSNara authored and facebook-github-bot committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    8901d95 View commit details
    Browse the repository at this point in the history
  2. Remove module cache from ReactPackageTurboModuleManagerDelegate

    Summary:
    This cache is unnecessary, because:
    1. TurboModuleManager caches all created TurboModules
    2. TurboModuleManager calls into the TurboModuleManagerDelegate at most once per NativeModule `moduleName`.
    
    This diff also makes ReactPackageTurboModuleManager thread-safe, which should help get rid of the crashes in T46487253.
    
    Changelog: [Internal]
    
    Reviewed By: mdvacca
    
    Differential Revision: D21027998
    
    fbshipit-source-id: c9b5ccc3da7b81787b749e70aa5e55883317eed7
    RSNara authored and facebook-github-bot committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    36688d3 View commit details
    Browse the repository at this point in the history
  3. Control concurrent calls into TMMDelegate from TMM

    Summary:
    In D20659799, I improved `TurboModuleManager.getModule(moduleName)` thread-safety by ensuring that if two threads race to require the same NativeModule, only one thread creates the NativeModule, while the other one waits until it's created.
    
    ## The problem:
    What I failed to realize was that when two threads race to require two different NativeModules, we can get concurrent calls into `TurboModuleManagerDelegate.getModule(moduleName)`, and `TurboModuleManagerDelegate.getLegacyCxxModule(moduleName)`, which don't have any thread-safe guarantees.
    
    ## The fix
    `TurboModuleManagerDelegate` is supposed to be an input to the TurboModule system. So, rather than expecting that all TurboModuleManagerDelegates are thread-safe, which might be a reasonable ask (see T65532092), this diff has `TurboModuleManager` acquire the delegate's lock before calling into it. This ensures that we don't get concurrent access into the delegate, which could be reading from, or writing to, some data structure in these method calls. (This was the case with `ReactPackageTurboModuleManagerDelegate`, which is what Fb4a and Workplace use under the hood).
    
    Changelog:
    [Android][Fixed] - Control concurrent calls into TMMDelegate from TurboModuleManager
    
    Reviewed By: mdvacca
    
    Differential Revision: D21025965
    
    fbshipit-source-id: d22c4abfe87f9e534717a06f186dde87d3cd24df
    RSNara authored and facebook-github-bot committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    bc99a32 View commit details
    Browse the repository at this point in the history
  4. Bump eslint-plugin-react-native-community version to 1.1.0

    Summary:
    This release will include the new platform-colors rule.
    
    Changelog: [Internal]
    
    (Note: this ignores all push blocking failures!)
    
    Reviewed By: cpojer
    
    Differential Revision: D21022163
    
    fbshipit-source-id: 65c831b3c820e44f75631b935118b043180ab3c7
    TheSavior authored and facebook-github-bot committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    78266b8 View commit details
    Browse the repository at this point in the history
  5. Update Babel to 7.8.x/7.9.x

    Reviewed By: motiz88
    
    Differential Revision: D20697095
    
    fbshipit-source-id: ef35d02da0916109ce528d3026f7ca0956911dda
    cpojer authored and facebook-github-bot committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    75a6178 View commit details
    Browse the repository at this point in the history
  6. fix: do not throw on missing cliPath, use the default value (facebo…

    …ok#28625)
    
    Summary:
    The `cliPath` has always been optional value and in fact, even had its default value hardcoded in the React gradle file.
    
    In this PR, I am just taking use of it and remove throwing an error, which is going to be a really annoying breaking change.
    
    ## Changelog
    
    [ANDROID] [INTERNAL] - Don't require `cliPath`
    Pull Request resolved: facebook#28625
    
    Test Plan:
    Run Android project, everything works.
    Provide custom `cliPath`, it gets respected
    
    Reviewed By: cpojer
    
    Differential Revision: D21044222
    
    Pulled By: TheSavior
    
    fbshipit-source-id: 8029f988d92abb9f64f30e05932c0d407d0c997e
    grabbou authored and facebook-github-bot committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    992e0ce View commit details
    Browse the repository at this point in the history
  7. Fix CIRCLE_PR_NUMBER may not always be set (facebook#28640)

    Summary:
    This fixes build failures where `CIRCLE_PR_NUMBER` is not set. This can happen if the PR did not come from a fork.
    
    ## Changelog
    
    [Internal] [Fixed] - Fix CIRCLE_PR_NUMBER may not always be set
    Pull Request resolved: facebook#28640
    
    Test Plan: Report bundle size step should pass on both this PR and facebook#28641.
    
    Reviewed By: cpojer
    
    Differential Revision: D21045553
    
    Pulled By: TheSavior
    
    fbshipit-source-id: fdfcb1bb88a96345b78ca69c49623df71d4cd608
    tido64 authored and facebook-github-bot committed Apr 15, 2020
    Configuration menu
    Copy the full SHA
    1908d50 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2020

  1. Add "Open Debugger" and "Open React DevTools" to iOS dev menu

    Summary:
    This diff introduces a new "Open Debugger" menu item for VMs that support on device debugging and for opening the React DevTools in Flipper. Provided so that we don't drift too far from the Android code.
    
    Changelog: [Internal]
    
    Reviewed By: RSNara
    
    Differential Revision: D20784270
    
    fbshipit-source-id: 6bb16431d25a6c093a583e2e041b8cffa6765ddd
    rickhanlonii authored and facebook-github-bot committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    a9bac17 View commit details
    Browse the repository at this point in the history
  2. Changed iOS LaunchScreen from xib to storyboard (facebook#28239)

    Summary:
    > Starting April 30, 2020, all apps submitted to the App Store must use an Xcode storyboard to provide the app’s launch screen and all iPhone apps must support all iPhone screens.
    
    Updated iOS Launch screen as per [App Store policy change](https://developer.apple.com/news/?id=03042020b).
    
    Community discussion: react-native-community/discussions-and-proposals#209
    
    ## Changelog
    
    Changed iOS Launch Screen from a `xib` to `storyboard`. The `LaunchScreen.xib` file has been replaced with `LaunchScreen.storyboard`. Xcode automatically picks up the new Launch Screen no additional change is required.
    
    [iOS] [Deleted] - Deleted LaunchScreen.xib
    [iOS] [Added] - Added LaunchScreen.storyboard
    Pull Request resolved: facebook#28239
    
    Test Plan: Build the Xcode project under `template/iOS` and verify that the new launch screen is identical to the previous one.
    
    Reviewed By: cpojer
    
    Differential Revision: D20408892
    
    Pulled By: hramos
    
    fbshipit-source-id: 9c38df58d1304088a23f3d73e0fbd87675804f1a
    jeswinsimon authored and facebook-github-bot committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    33b3a1a View commit details
    Browse the repository at this point in the history
  3. Switch over to JavaTurboModule::InitParams

    Summary:
    ## Problem
    Every time we want to add, remove, or change the data passed to JavaTurboModule's constructor, we have to modify the C++ TurboModule codegen. (The same is true of `ObjCTurboModule`).
    
    **Why was this necessary?**
    - `JavaTurboModule` is effectively an abstract class whose constructor is always invoked by code-generated C++ classes. These C++ code-generated class constructors accept an argument list, and manually foward each and every item in that list to `JavaTurboModule::JavaTurboModule`.
    
    ## The fix
    In this diff, I introduce a struct `JavaTurboModule::InitParams`, to represent a bag of arguments:
    ```
    class JSI_EXPORT JavaTurboModule : public TurboModule {
     public:
      struct InitParams {
        std::string moduleName;
        jni::alias_ref<JTurboModule> instance;
        std::shared_ptr<CallInvoker> jsInvoker;
        std::shared_ptr<CallInvoker> nativeInvoker;
      };
    ```
    
    All `JavaTurboModules` will be created with an instance of this `InitParams` struct, instead of a list of arguments.  Our code-generated C++ `jsi::HostObject` sublcasses will simply accept `InitParams` in their constructor, and forward it to `JavaTurboModule`'s constructor. This way, the codegen remains oblivious to what arguments JavaTurboModule requires.
    
    ## Okay, but why do we need this change now?
    In the future, I plan to modify the constructor for `JavaTurboModule` to accept a performance logger, and a `RuntimeExecutor`. Similar modifications are planned for ObjC. For this reason, to avoid these four codemods, and any potential other codemods that occur because we're making modifications to `JavaTurboModule` or `ObjCTurboModule`, I'm launching this codemod, and the codemods in this stack.
    
    ## Misc Fix
    - Previously, we were generating the TurboModule name from the Spec filename. This is incorrect because that name represents the spec name. Now, the name will be forwarded from TurboModuleManager in the `JavaTurboModule::InitParams` struct.
    
    ## Alternative implementations
    I initially considered using `ContextContainer`, but decided against it because:
    1. There are no type-safety guarantees.
    2. I think it's a bit overkill for this scenario. We just need an opaque bag of data, and for our purposes a simple struct does the job fine.
    
    ## Commands run
    
    Reviewed By: fkgozali
    
    Differential Revision: D21035208
    
    fbshipit-source-id: 9542cafea192081bc34d337ab3a7a783083eb06c
    RSNara authored and facebook-github-bot committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    25ed045 View commit details
    Browse the repository at this point in the history
  4. RN: Shrinkwrap Text Layout (Android)

    Summary:
    When text is in a constrained parent view using `maxWidth`, long text may wrap. When the text wraps, the final width is dependent on the word breaking strategy and text content. This means that the text width is not necessarily `maxWidth`.
    
    However, the current way that we compute text layout does not shrinkwrap the text width as much as possible. This leads to visual gaps to the end-side of wrapped text.
    
    This changes the text layout slightly so that we use the length of the longest line.
    
    This bug only exists on Android. After this change, Android behaves like iOS.
    
    Changelog:
    [Android] [Fixed] - Fixed excessive space in Text view with word-wrapping
    
    Reviewed By: JoshuaGross, mdvacca
    
    Differential Revision: D21056031
    
    fbshipit-source-id: e9b7793f2632caafcce69bc15bac61330b0ed958
    yungsters authored and facebook-github-bot committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    dda7f82 View commit details
    Browse the repository at this point in the history
  5. (eslint-config) update community eslint plugin in eslint config (face…

    …book#28642)
    
    Summary:
    Updating the community eslint-plugin used in the eslint-config to the latest version.
    
    expecting new eslint-config version to be released with this change so that it can be included in new project template for 0.63 react-native-community/releases#186
    
    ## Changelog
    
    <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
    https://github.com/facebook/react-native/wiki/Changelog
    -->
    
    [General] [Changed] - Update community eslint plugin in the eslint config
    Pull Request resolved: facebook#28642
    
    Test Plan: yarn lint passes
    
    Differential Revision: D21048976
    
    Pulled By: cpojer
    
    fbshipit-source-id: 2c3ec0ef450cf357d8c88db7873f4ca1154b2034
    Naturalclar authored and facebook-github-bot committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    b2d10bc View commit details
    Browse the repository at this point in the history
  6. chore: update CLI to the latest version (facebook#28623)

    Summary:
    Bumps CLI to the latest version, needed by facebook#28572 to work.
    
    ## Changelog
    
    [INTERNAL] - Bump CLI to latest
    Pull Request resolved: facebook#28623
    
    Reviewed By: hramos
    
    Differential Revision: D21017766
    
    Pulled By: cpojer
    
    fbshipit-source-id: 62a873923c58f8752edb0394db7e6dfceed92485
    grabbou authored and facebook-github-bot committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    ddc3300 View commit details
    Browse the repository at this point in the history
  7. Add "Open Debugger" and "Open React DevTools" to Android dev menu

    Summary:
    This diff introduces a new "Open Debugger" menu item for VMs that support on device debugging and for opening the React DevTools in Flipper.
    
    Changelog: [Internal]
    
    Reviewed By: mdvacca
    
    Differential Revision: D20784279
    
    fbshipit-source-id: caecdace00007224692d994a75c106842c8b2acb
    rickhanlonii authored and facebook-github-bot committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    7cedccd View commit details
    Browse the repository at this point in the history
  8. Remove the post install step (facebook#28651)

    Summary:
    Removes the post install step for Flipper, as the latest version of YogaKit is compatible with swift 5.
    
    cc alloy
    
    ## Changelog
    
    <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
    https://github.com/facebook/react-native/wiki/Changelog
    -->
    
    [Flipper] [Template] - Remove the post install step for Flipper
    Pull Request resolved: facebook#28651
    
    Test Plan: Tested a newly created RN app without post install step and it built successfully.
    
    Reviewed By: passy
    
    Differential Revision: D21064653
    
    Pulled By: priteshrnandgaonkar
    
    fbshipit-source-id: da56d0754d918e30a0ebe480c77590f0139d48ac
    priteshrnandgaonkar authored and facebook-github-bot committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    44beb2a View commit details
    Browse the repository at this point in the history
  9. Revert D21064653: Remove the post install step

    Differential Revision:
    D21064653
    
    Original commit changeset: da56d0754d91
    
    fbshipit-source-id: 1086cfdeca9aa3830370ea115ba7b5f05d3fb124
    TheSavior authored and facebook-github-bot committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    fb04237 View commit details
    Browse the repository at this point in the history
  10. Remove out of date TODO

    Summary:
    No longer relevant.
    
    Changelog: [Internal]
    
    Reviewed By: mhorowitz
    
    Differential Revision: D21070955
    
    fbshipit-source-id: 11b0384501b2780f5ac41899b5e8bbb4f7a4d730
    rickhanlonii authored and facebook-github-bot committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    56583c6 View commit details
    Browse the repository at this point in the history
  11. RNTester LayoutAnimation example: add more options

    Summary:
    Add more options to the LayoutAnimation example so it's easier to test more features of LayoutAnimations.
    
    1) Add an option to animate reordering of views
    2) Make animations slower, so it's easier to see what's going on and easier to trigger race conditions
    3) Add options to mutate without animation, to test interrupting existing animations
    
    Changelog: [Internal] Updated Catalyst RNTester LayoutAnimation example with additional options
    
    Reviewed By: mdvacca
    
    Differential Revision: D21050309
    
    fbshipit-source-id: 1daba4fd487693c34a2d40eb39a68c7d03c24f93
    JoshuaGross authored and facebook-github-bot committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    1ee8c0c View commit details
    Browse the repository at this point in the history
  12. Add a "reparenting" LayoutAnimation example that animates flattening/…

    …unflattening
    
    Summary:
    Simple test to see what it looks like when view flattening/unflattening is animated with LayoutAnimations.
    
    Changelog: [Internal] adding another example to LayoutAnimations example
    
    Reviewed By: mdvacca
    
    Differential Revision: D21074805
    
    fbshipit-source-id: 551ed740f0ab5c5adcb19f5c35e932b8983cd108
    JoshuaGross authored and facebook-github-bot committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    b2ccfac View commit details
    Browse the repository at this point in the history
  13. Fix jsi cmake include dirs (microsoft#207)

    Summary:
    I'm trying to use JSI for a React Native custom module. I saw these existing examples where the JSI API is used in the context of a CMakeLists.txt:
    https://github.com/terrysahaidak/host-object-test/blob/master/libs/android-jsi/test-jsi/src/main/cpp/CMakeLists.txt
    https://github.com/ericlewis/react-native-hostobject-demo/pull/4/files#diff-834320be1b4e4016bac27c05dcd17fb9
    In both cases, they manually grab the include directories and jsi.cpp from node_modules/react-native, but I also saw that node_modules/react-native/ReactCommon/jsi/jsi already has a CMakeLists.txt that appears to be intended to provide a jsi static lib, so I tried to pull this into my own CMakeLists.txt like this:
    ```
    add_subdirectory(${RN_DIR}/ReactCommon/jsi/jsi ${CMAKE_CURRENT_BINARY_DIR}/jsi)
    ...
    target_link_libraries(MyLib jsi)
    ```
    Unfortunately when doing this, the consuming project still doesn't see the correct include directories. The change I'm proposing here is to use `target_include_directories` and declare that `..` is a public (to consumers) include directory for the library named `jsi`. With this change, you can do what I showed above to consume the jsi lib by just pulling in the CMakeLists.txt file into your own CMakeLists.txt file.
    
    Changelog: [General][Fixed] Fix jsi cmake include dirs
    
    Pull Request resolved: facebook/hermes#207
    
    Reviewed By: willholen
    
    Differential Revision: D21074270
    
    Pulled By: tmikov
    
    fbshipit-source-id: 7d9ec3255f57a16c0b2be489dffa4540727738a1
    ryantrem authored and facebook-github-bot committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    f5d00e5 View commit details
    Browse the repository at this point in the history
  14. Resolve kind-of vulnerability by bumping to 6.0.3

    Summary:
    GHSA-6c8f-qphg-qjgp
    
    Changelog:
    [General][Changed] Updated transitive dependency kind-of to 6.0.3 to resolve vulnerability
    
    (Note: this ignores all push blocking failures!)
    
    Reviewed By: cpojer
    
    Differential Revision: D21077747
    
    fbshipit-source-id: d5c19b21b665130c6423f5caeddcd6378bac7dcb
    TheSavior authored and facebook-github-bot committed Apr 16, 2020
    Configuration menu
    Copy the full SHA
    abde015 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2020

  1. Move CheckBox Android files to FB internal (facebook#28658)

    Summary:
    Pull Request resolved: facebook#28658
    
    This moves the Java files to FB internal and updates all the buck files.
    
    ## Changelog:
    
    [Android] [Removed] This diff removes the CheckBox export from React Native. Internally, we are requiring CheckBox directly now and externally people will have to use the community maintained module.
    
    Reviewed By: cpojer
    
    Differential Revision: D21066998
    
    fbshipit-source-id: 76821fcae899ff7342697ea7dd4737ef3b008213
    poteto authored and facebook-github-bot committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    8c9c402 View commit details
    Browse the repository at this point in the history
  2. Part 1: Update ObjC++ codegen classes to use ObjCTurboModule::InitParams

    Summary:
    ## Summary
    Please check out D21035208.
    
    ## Changes
    - `ObjCTurboModule::ObjCTurboModule` changed to accept a bag of arguments `const ObjCTurboModule::InitParams` instead of an argument list.
    - TurboModule iOS codegen scripts updated to generated `ObjCTurboModule` subclasses that accept a `const ObjCTurboModule::InitParams` object in their constructor, and forward it to `ObjCTurboModule::ObjCTurboModule`.
    - All manually checked in code-generated ObjC++ classes (i.e: RCTNativeSampleTurboModule, RCTTestModule, FBReactNativeSpec) are updated.
    
    ## Rationale
    This way, the code-gen can remain constant while we add, remove, or modify the arguments passed to ObjCTurboModule.
    
    ## Commands run
    ```
    function update-codegen() {
      pushd ~/fbsource && js1 build oss-native-modules-specs -p ios && js1 build oss-native-modules-specs -p android && popd;
    }
    
    > update-codegen
    ```
    
    Changelog:
    [iOS][Changed] Update ObjCTurboModule to use ObjCTurboModule::InitParams
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D21036266
    
    fbshipit-source-id: 6584b0838dca082a69e8c14c7ca50c3568b95086
    RSNara authored and facebook-github-bot committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    251ff1b View commit details
    Browse the repository at this point in the history
  3. Part 2: Update ObjC++ codegen classes to use ObjCTurboModule::InitParams

    Summary:
    ## Summary
    Please check out D21035209.
    
    ## Changes
    - Codemod all ObjC NativeModule `getTurboModuleWithJsInvoker:nativeInvoker:perfLogger` methods to `getTurboModule:(const ObjCTurboModule::Args)`
    
    ## Script
    ```
    var withSpaces = (...args) => args.join('\s*')
    
    var regexString = withSpaces(
      '-',
      '\(',
      'std::shared_ptr',
      '<',
      '(?<turboModuleClass>(facebook::react::|react::|::|)TurboModule)',
      '>',
      '\)',
      'getTurboModuleWithJsInvoker',
      ':',
      '\(',
      'std::shared_ptr',
      '<',
      '(?<fbNamespace>(facebook::react::|react::|::|))CallInvoker',
      '>',
      '\)',
      '(?<jsInvokerInstance>[A-Za-z0-9]+)',
      'nativeInvoker',
      ':',
      '\(',
      'std::shared_ptr',
      '<',
      '(facebook::react::|react::|::|)CallInvoker',
      '>',
      '\)',
      '(?<nativeInvokerInstance>[A-Za-z0-9]+)',
      'perfLogger',
      ':',
      '\(',
      'id',
      '<',
      'RCTTurboModulePerformanceLogger',
      '>',
      '\)',
      '(?<perfLoggerInstance>[A-Za-z0-9]+)',
      '{',
      'return',
      'std::make_shared',
      '<',
      '(?<specName>(facebook::react::|react::|::|)Native[%A-Za-z0-9]+SpecJSI)',
      '>',
      '\(',
      'self',
      ',',
      '\k<jsInvokerInstance>',
      ',',
      '\k<nativeInvokerInstance>',
      ',',
      '\k<perfLoggerInstance>',
      '\)',
      ';',
      '}',
    )
    
    var replaceString = `- (std::shared_ptr<$<turboModuleClass>>) getTurboModule:(const $<fbNamespace>ObjCTurboModule::InitParams &)params
    {
      return std::make_shared<$<specName>>(params);
    }`
    
    const exec = require('../lib/exec');
    const abspath = require('../lib/abspath');
    const relpath = require('../lib/relpath');
    const readFile = (filename) => require('fs').readFileSync(filename, 'utf8');
    const writeFile = (filename, content) => require('fs').writeFileSync(filename, content);
    
    function main() {
      const tmFiles = exec('cd ~/fbsource && xbgs -n 10000 -l getTurboModuleWithJsInvoker:').split('\n').filter(Boolean);
    
      tmFiles
        .filter((filename) => !filename.includes('microsoft-fork-of-react-native'))
        .map(abspath)
        .forEach((filename) => {
          const source = readFile(filename);
          const newSource = source.replace(new RegExp(regexString, 'g'), replaceString);
    
          if (source == newSource) {
            console.log(relpath(filename));
          }
    
          writeFile(filename, newSource);
        });
    }
    
    if (!module.parent) {
      main();
    }
    ```
    
    ## Re-generating diff
    ```
    > hg revert -r .^ --all
    > node index.js # run script
    ```
    
    Changelog: [iOS][Changed] - Make all ObjC NativeModules create TurboModules using ObjCTurboModule::Args
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D21036265
    
    fbshipit-source-id: 404bcc548d1775ef23d793527606d02fe384a0a2
    RSNara authored and facebook-github-bot committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    03bd7d7 View commit details
    Browse the repository at this point in the history
  4. Part 3: Update RCTTurboModuleManagerDelegate to use ObjCTurboModule::…

    …InitParams
    
    Summary:
    ## Summary
    Please check out D21035208.
    
    ## Changes
    - Update `RCTTurboModuleManagerDelegate getTurboModule:instance:jsInvoker:nativeInvoker:perfLogger` to use `RCTTurboModuleManagerDelegate getTurboModule:(const ObjCTurboModule::InitParams)`
    - Update all implementations of `RCTTurboModuleManagerDelegate` in accordance with this API change
    
    Changelog:
    [iOS][Changed] - Make RCTTurboModuleManagerDelegate create TurboModules via ObjCTurboModuleManager::InitParams
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D21036272
    
    fbshipit-source-id: c16002c47db26e2ba143fc1080afe9e2fe1e7816
    RSNara authored and facebook-github-bot committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    d75401a View commit details
    Browse the repository at this point in the history
  5. chore: update ./scripts/test-manual-e2e.sh (facebook#28653)

    Summary:
    Recent changes broke the script - wrong path to open `RNTesterPods.xcworkspace` and other scripts - we change dir with `cd`.
    
    Another change is incorrect use of `RNTesterProject.xcodeproj` instead of a `xcworkspace`.
    
    This PR is a simple and short fix to make it run.
    
    ## Changelog
    
    [INTERNAL] - chore: update `./scripts/test-manual-e2e.sh`
    Pull Request resolved: facebook#28653
    
    Test Plan: Run `./scripts/test-manual-e2e.sh`. Things work.
    
    Differential Revision: D21079792
    
    Pulled By: hramos
    
    fbshipit-source-id: 6bdb8be016f044852ed216ec53f80db40c84b5fd
    grabbou authored and facebook-github-bot committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    90f60a8 View commit details
    Browse the repository at this point in the history
  6. use default value of enums YGDirection and YGMeasureMode instead of -1

    Summary:
    Changelog:
    [Internal][Yoga] YGDirection variable was initialized incorrectly by casting -1 to YGDirection. Changing it to default value of direction
    
    Same for YGMeasureMode.
    
    Reviewed By: pasqualeanatriello
    
    Differential Revision: D20869042
    
    fbshipit-source-id: 7bfe490193321baae875ef6fb49a938851950c9f
    SidharthGuglani-zz authored and facebook-github-bot committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    49e16bd View commit details
    Browse the repository at this point in the history
  7. fix typo as there is no file called YGJNI.cpp (microsoft#990)

    Summary:
    fix typo in `YogaJNIBase.java` as there is no such file called `YGJNI.cpp`
    Pull Request resolved: facebook/yoga#990
    
    Reviewed By: pasqualeanatriello
    
    Differential Revision: D20735102
    
    Pulled By: SidharthGuglani
    
    fbshipit-source-id: 3f9f4d78ba390feae3451330f997a221ab4ec70e
    acton393 authored and facebook-github-bot committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    04de69a View commit details
    Browse the repository at this point in the history
  8. Remove unused packages from xplat/js/package.json

    Summary:
    We have a large amount of small packages that are completely unused, or only have one call site. This diff cleans up a lot of them and reduces node_modules by 12 MiB (down to 187).
    
    Changelog: [Internal]
    
    Reviewed By: motiz88
    
    Differential Revision: D21088213
    
    fbshipit-source-id: 5fa7d3da5cbe744b0d9d3e3450d6135c1488ee79
    cpojer authored and facebook-github-bot committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    894f6b3 View commit details
    Browse the repository at this point in the history
  9. Make ColorValue public in StyleSheet.js

    Summary:
    This diff makes the ColorValue export "official" by exporting it from StyleSheet in order to encourage its use in product code.
    
    Changelog: Moved ColorValue export from StyleSheetTypes to StyleSheet
    
    Reviewed By: TheSavior
    
    Differential Revision: D21076969
    
    fbshipit-source-id: 972ef5a1b13bd9f6b7691a279a73168e7ce9d9ab
    Zack Argyle authored and facebook-github-bot committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    0a67133 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2020

  1. Fabric: LayoutableShadowNode:getLayoutMetrics is not a virtual meth…

    …od anymore
    
    Summary:
    We don't use it as vitrual anymore (setLayoutMetrics is a non-virtual method already), so it does not need to be marker virtual.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: mdvacca
    
    Differential Revision: D21028572
    
    fbshipit-source-id: 99f86fdd4cf2f5972034d9058d7b82bdc8680187
    shergin authored and facebook-github-bot committed Apr 18, 2020
    Configuration menu
    Copy the full SHA
    4c538fc View commit details
    Browse the repository at this point in the history
  2. Fabric: Proper traits for ImageShadowNode and ViewShadowNode

    Summary:
    * <Image> must be a leaf node; having a proper trait will fail earlier in case of misuse (mounting something inside).
    * <View> must have a `View` trait because it's for what that trait is.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: sammy-SC
    
    Differential Revision: D21028573
    
    fbshipit-source-id: 457716d4661333eb2357f34316f3e495ab4fda24
    shergin authored and facebook-github-bot committed Apr 18, 2020
    Configuration menu
    Copy the full SHA
    62544c0 View commit details
    Browse the repository at this point in the history
  3. Fabric: "Attempt to mutate a sealed object." is now an assert (not ex…

    …ception)
    
    Summary:
    This is a debug-only feature that simply should be an assert. When it triggers in debugger and bubbles to some random exception catch block which makes it impossible to understand was exactly it happens. Making it an assert will stop debugger exactly where it happens.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: mdvacca
    
    Differential Revision: D21028571
    
    fbshipit-source-id: 3df4ec0da922026bb9df61081cb71113577e06e9
    shergin authored and facebook-github-bot committed Apr 18, 2020
    Configuration menu
    Copy the full SHA
    cc07baa View commit details
    Browse the repository at this point in the history
  4. Fabric: Implementation of getDebugDescription for std::array

    Summary:
    Yoga uses `std::array` a lot (and `std::array` is not a `std::vector`), so it's useful for printing Yoga values.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: mdvacca
    
    Differential Revision: D21028570
    
    fbshipit-source-id: c6bf114d5362f085ea201ecdc5b7d59646b33ebd
    shergin authored and facebook-github-bot committed Apr 18, 2020
    Configuration menu
    Copy the full SHA
    e1eef24 View commit details
    Browse the repository at this point in the history
  5. Fabric: componentregistry module was decoupled from uimanager

    Summary:
    We need to break up the `uimanager` module in order to solve circular dependencies problem (which future diff would have otherwise).
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D20885163
    
    fbshipit-source-id: 08eb1ba1d408fc0948e8d0da62380786a40973af
    shergin authored and facebook-github-bot committed Apr 18, 2020
    Configuration menu
    Copy the full SHA
    e56950d View commit details
    Browse the repository at this point in the history
  6. Fabric: scheduler module was decoupled from uimanager

    Summary:
    We need to break up the `uimanager` module in order to solve circular dependencies problem (which future diff would have otherwise).
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D20885645
    
    fbshipit-source-id: 8148bd934879802b076261ed86fa78acf0a07ed3
    shergin authored and facebook-github-bot committed Apr 18, 2020
    Configuration menu
    Copy the full SHA
    599f1ed View commit details
    Browse the repository at this point in the history
  7. Fabric: templateprocessor module was decoupled from uimanager

    Summary:
    We need to break up the `uimanager` module in order to solve circular dependencies problem (which future diff would have otherwise).
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D20885646
    
    fbshipit-source-id: b8e3199c0eacc57a5be1481595cf97c84f972293
    shergin authored and facebook-github-bot committed Apr 18, 2020
    Configuration menu
    Copy the full SHA
    7a2c685 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2020

  1. Migrate deprecated frameInterval to preferredFramesPerSecond (faceboo…

    …k#28675)
    
    Summary:
    [frameInterval](https://developer.apple.com/documentation/quartzcore/cadisplaylink/1621231-frameinterval) was deprecated in favor of [preferredFramesPerSecond](https://developer.apple.com/documentation/quartzcore/cadisplaylink/1648421-preferredframespersecond).
    
    This migrates the deprecated call over.
    
    ## Changelog
    
    <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
    https://github.com/facebook/react-native/wiki/Changelog
    -->
    
    [iOS] [Fixed] - Migrate frameInterval to preferredFramesPerSecond
    Pull Request resolved: facebook#28675
    
    Test Plan: Xcode should no longer throw warnings about the deprecated call.
    
    Differential Revision: D21109710
    
    Pulled By: shergin
    
    fbshipit-source-id: 772b9f625d3e22cd4d8cd60bddad57ff8611af54
    safaiyeh authored and facebook-github-bot committed Apr 19, 2020
    Configuration menu
    Copy the full SHA
    335f3aa View commit details
    Browse the repository at this point in the history
  2. Fabric: Fix case of Glog include in MountingTest.cpp (facebook#28616)

    Summary:
    This pull request changes the include of Glog from `<Glog/logging.h>` to `<glog/logging.h>` in `MountingTest.cpp`. This fixes building on a case-sensitive filesystem.
    
    ## Changelog
    
    [Internal] [Fixed] - Fabric: Fix case of Glog include in MountingTest.cpp
    Pull Request resolved: facebook#28616
    
    Test Plan: The `include` of Glog no longer causes issues with building `MountingTest.cpp` on a case-sensitive filesystem.
    
    Differential Revision: D21118085
    
    Pulled By: shergin
    
    fbshipit-source-id: c958c54bf88333fd5001127779c855ce8c2666c3
    empyrical authored and facebook-github-bot committed Apr 19, 2020
    Configuration menu
    Copy the full SHA
    de188a2 View commit details
    Browse the repository at this point in the history
  3. Fabric: Add Unicode prefix to AttachmentCharacter (facebook#28617)

    Summary:
    This pull request adds a Unicode `u8` prefix to the string literal returned in `AttributedString.cpp`'s `Fragment::AttachmentCharacter()`.
    
    This fixes the following error when building on MSVC:
    
    ```
    react\attributedstring\AttributedString.cpp(21): error C4566: character represented by universal-character-name '\uFFFC' cannot be represented in the current code page (1252)
    ```
    
    ## Changelog
    
    [Internal] [Fixed] - Fabric: Add Unicode prefix to AttachmentCharacter
    Pull Request resolved: facebook#28617
    
    Test Plan: The Fabric test suite has been ran on a Clang-based build of Fabric on macOS, and no regressions in it have been noted.
    
    Differential Revision: D21118078
    
    Pulled By: shergin
    
    fbshipit-source-id: c105de5e4edb67fed97ce44153a75d9d380bf588
    empyrical authored and facebook-github-bot committed Apr 19, 2020
    Configuration menu
    Copy the full SHA
    b000664 View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2020

  1. Fabric: Fixed incorrect early-return in `UIView+ComponentViewProtocol…

    …::updateLayoutMetrics`
    
    Summary:
    Before the change, an incorrect (NaN or Inf) values in LayoutMetrics might force an early return in the `updateLayoutMetrics:oldMetrics:` method implementation. This was not correct because the rest of the method also didn't run in this case, so it might force some value to stale.
    E.g., imagine we have an instruction that contains NaN size and `display: none`. Previously, the function might just return right before applying sizes and progress the stored "already applied" value of LayoutMetrics which will cause the view being visible even if it should not.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21110644
    
    fbshipit-source-id: 501319d7b1dcd5c18f27e0ceca3c8d207485c49b
    shergin authored and facebook-github-bot committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    6694ce0 View commit details
    Browse the repository at this point in the history
  2. Fix border-stroke drawing after resetting border-radius (facebook#28356)

    Summary:
    This PR fixes incorrect drawing of the View borders on Android, after changing the border-radius back to 0 *(and when no background-color is defined)*.
    
    This happens because the `drawRoundedBackgroundWithBorders` function in ReactViewBackgroundDrawable changes the style on the Paint object to `STROKE`. This style is however never reverted back to `FILL`. This change ensures that the Paint style is set to `FILL` for the full execution of the `drawRectangularBackgroundWithBorders` function.
    
    ## Changelog
    
    `[Android] [Fixed] - Fix border-drawing when changing border-radius back to 0`
    Pull Request resolved: facebook#28356
    
    Test Plan:
    **Faulty situation:**
    
    ![ezgif com-video-to-gif](https://user-images.githubusercontent.com/6184593/77153163-9759b280-6a99-11ea-82bb-33a1e0a4934c.gif)
    
    **After the fix:**
    
    ![ezgif com-video-to-gif (1)](https://user-images.githubusercontent.com/6184593/77153825-c91f4900-6a9a-11ea-8e0c-a4280b9e72b8.gif)
    
    Differential Revision: D21124741
    
    Pulled By: shergin
    
    fbshipit-source-id: 2044f8e8ad59a58df42b64d7ee8c4ad1d3b562f1
    IjzerenHein authored and facebook-github-bot committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    7757ad0 View commit details
    Browse the repository at this point in the history
  3. Fabric: Using proper clock in MountingTelemetryTest

    Summary:
    Apparently, `std::this_thread::sleep_for` uses a different clock to measure time which causes ofter misalignment with the clock which Telemery uses which makes the test flaky. Using the same clock should fix it.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21116058
    
    fbshipit-source-id: 52dde2e325776d365431a2a957dcc12dfe53f890
    shergin authored and facebook-github-bot committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    5dc6ede View commit details
    Browse the repository at this point in the history
  4. Fix rounded border drawing when border-radius is smaller than border-…

    …width (facebook#28358)
    
    Summary:
    This PR fixes the drawing of the border rounded edges when the border-radius is small than the border-width. The current implementation capped the possible border-radius making it impossible to set smaller border-radii when using thicker borders. After inspection it was found that the rounded-rect calculation is incorrect.
    
    ## Changelog
    
    `[Android] [Fixed] - Fix rounded border-drawing when border-radius is smaller than border-width`
    Pull Request resolved: facebook#28358
    
    Test Plan:
    **Faulty situation:**
    
    As you can see, when the border-radius becomes very low, the border is stuck at a minimum value. Only after setting the border-radius fully to 0 is it again rendered correctly.
    
    ![ezgif com-video-to-gif (2)](https://user-images.githubusercontent.com/6184593/77183540-c3435b00-6ace-11ea-950d-29a0ea1757bd.gif)
    
    **After the fix:**
    
    ![ezgif com-video-to-gif (3)](https://user-images.githubusercontent.com/6184593/77183619-e837ce00-6ace-11ea-93a5-910127d352b7.gif)
    
    Differential Revision: D21124739
    
    Pulled By: shergin
    
    fbshipit-source-id: cefd1776b77b5b9fb335e95fd7fdd7f345579dc4
    IjzerenHein authored and facebook-github-bot committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    28dce36 View commit details
    Browse the repository at this point in the history
  5. Fabric: ComponentDescriptor::cloneProps() now never returns the bas…

    …e props objects
    
    Summary:
    The diff changes how the `empty raw props` optimization works in `ComponentDescriptor::cloneProps()`. Now it only fires only when the base `props` object is null, which is practically all production cases we have (and care about). (I tried, in a normal run there were no cases where the empty raw props were passed with non-null props.) From the other side, the old behavior that may return the same props objects previously several times created bugs and practically unexpected results and practically disallowed to clone props objects easily.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21110608
    
    fbshipit-source-id: 884807cd8e9c5c3e6cc1c9e4c1f0227259cc21fb
    shergin authored and facebook-github-bot committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    7cc791b View commit details
    Browse the repository at this point in the history
  6. Upgrade to Jest 25

    Summary:
    This diff upgrades Jest to the latest version which fixes a bunch of issues with snapshots (therefore allowing me to enable the Pressable-test again). Note that this also affects Metro and various other tooling as they all depend on packages like `jest-worker`, `jest-haste-map` etc.
    
    Breaking changes: https://github.com/facebook/jest/blob/master/CHANGELOG.md
    
    This diff increases node_modules by 3 MiB, primarily because it causes more duplicates of `source-map` (0.8 MiB for each copy) and packages like `chalk` 3.x (vs 2.x). The base install was 15 MiB bigger and I reduced it to this size by playing around with various manual yarn.lock optimizations. However, D21085929 reduces node_modules by 11 MiB and the Babel upgrade reduced node_modules by 13 MiB. I will subsequently work on reducing the size through other packages as well and I'm working with the Jest folks to get rid of superfluous TypeScript stuff for Jest 26.
    
    Other changes in this diff:
    * Fixed Pressable-test
    * Blackhole node-notifier: It's large and we don't need it, and also the license may be problematic, see: jestjs/jest#8918
    * Updated jest-junit (not a Jest package) but blackholed it internally because it is only used for open source CI.
    * Updated some API calls we use from Jest to account for breaking changes
    * Made two absolutely egrigious changes to existing product code tests to make them still pass as our match of async/await, fake timers and then/promise using `setImmediate` is tripping up `regenerator` with `Generator is already run` errors in Jest 25. These tests should probably be rewritten.
    * Locked everything to the same `resolve` version that we were already using, otherwise it was somehow pulling in 1.16 even though nothing internally uses it.
    
    Changelog: [General] Update Jest
    
    Reviewed By: rickhanlonii
    
    Differential Revision: D21064825
    
    fbshipit-source-id: d0011a51355089456718edd84ea0af21fd923a58
    cpojer authored and facebook-github-bot committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    f248ba1 View commit details
    Browse the repository at this point in the history
  7. Apply placeholderColor to TextInput component

    Summary:
    Changelog: [Internal]
    
    TextInput's `placeholderTextColor` prop was being ignored. This diff fixes that.
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21064118
    
    fbshipit-source-id: 33f148c355cee846db010153e0c65ea43155c3c9
    sammy-SC authored and facebook-github-bot committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    5709996 View commit details
    Browse the repository at this point in the history
  8. Fix mistake in swapping left/right layout properties

    Summary:
    Changelog: [Internal]
    
    We were assigned `undefined` value to incorrect edge, instead of `YGEdgeLeft` it should have been `YGEdgeRight`.
    If node has `YGEdgeRight` value, it needs to be reassigned to `YGEdgeEnd` and its original value set to undefined.
    
    Reviewed By: mdvacca
    
    Differential Revision: D21095234
    
    fbshipit-source-id: fbecd9b7e6670742ad4a4bb097760aa10eec8685
    sammy-SC authored and facebook-github-bot committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    e7ef35c View commit details
    Browse the repository at this point in the history
  9. Fixed incorrect owner assignment in YGNode move constructor

    Summary:
    Assigning self as an owner makes a cycle which is obviously a bug.
    
    Changelog: [Internal] Small change in Yoga (should not affect RN).
    
    Reviewed By: SidharthGuglani
    
    Differential Revision: D21111423
    
    fbshipit-source-id: 1835561c055ac827f5ce98a044f25aed0d1845a5
    shergin authored and facebook-github-bot committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    8057550 View commit details
    Browse the repository at this point in the history
  10. Easy diff to add a TODO

    Summary:
    Easy diff to add a TODO to refactor `sendAccessibilityEvent` to use ViewCommands
    
    This was orginally added D17142507
    
    changelog: [Internal] Internal change
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21137348
    
    fbshipit-source-id: aff38ccad8dfbb222f83161e2bd5da82f543e5db
    mdvacca authored and facebook-github-bot committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    854f637 View commit details
    Browse the repository at this point in the history
  11. Add support for generating custom messages

    Summary:
    Until now we've generated scaffolding entirely based on the official devtools
    protocol spec. This diff adds support for defining custom domains in `custom.json`
    which will be merged with the upstream protocol JSON definition.
    
    ChangeLog: [Internal] Add support for Hermes-specific CDP messages
    
    Reviewed By: bestander
    
    Differential Revision: D20754605
    
    fbshipit-source-id: a8075f81816a40114d1a3332192c7aa076b17848
    willholen authored and facebook-github-bot committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    04bc315 View commit details
    Browse the repository at this point in the history
  12. Implement Hermes.setPauseOnLoad

    Summary:
    This Hermes-specific mode is similar to Debugger.setPauseOnExceptions
    and lets the VM know that it should enter a Pause state whenever a new
    script is loaded/executed.
    
    The debugger can then take its time to parse the source map and update
    any breakpoints, before automatically continuing.
    
    Changelog: [Internal] Implement a Hermes.setPauseOnLoad CDP call
    
    Reviewed By: bestander
    
    Differential Revision: D20754604
    
    fbshipit-source-id: 7f9d0638706c99e9dcb534699b633f658e364909
    willholen authored and facebook-github-bot committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    33ccc0a View commit details
    Browse the repository at this point in the history
  13. Switch isPackagerRunning to a class method.

    Summary:
    This diff exports `isPackagerRunning` as a class method to be used without and instance.
    
    Changelog: [Internal]
    
    Reviewed By: cpojer
    
    Differential Revision: D21094414
    
    fbshipit-source-id: 44becb59e3c08d66e4992c4c1b32d6efcd4fe257
    rickhanlonii authored and facebook-github-bot committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    7701275 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2020

  1. Fabric: Fixed getDirtied vs isDirty in YogaLayoutableShadowNode

    Summary:
    This is quite a fateful mistake. `getDirtied()` returns the pointer to a function which is obviously a mistake here; we should use `isDirty()` instead.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: mdvacca
    
    Differential Revision: D21028569
    
    fbshipit-source-id: 95212b31f4e32d51c594d5209f295397af3f1252
    shergin authored and facebook-github-bot committed Apr 21, 2020
    Configuration menu
    Copy the full SHA
    4afb836 View commit details
    Browse the repository at this point in the history
  2. Fabric: More strict policies to dirty Yoga nodes in YogaLayoutableSha…

    …dowNode
    
    Summary:
    Yoga uses a dirty flag to re-layout nodes. In normal, single-threaded approach the policy for dirtying is simple: if a node was changed, we need to dirty it. In the Concurrent Yoga approach, those rules are not so simple, and it seems we haven't formalized those rules yet.
    
    Investigating some layout issues that we have in Fabric, I tend to believe that we don't dirty as much we should. Hense this change adds mode dirtying.
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21092815
    
    fbshipit-source-id: 4603c97ccb79efcdf5e6a4cc450ebe61b63effb3
    shergin authored and facebook-github-bot committed Apr 21, 2020
    Configuration menu
    Copy the full SHA
    d639063 View commit details
    Browse the repository at this point in the history
  3. Allow iOS PlatformColor strings to be ObjC or Swift UIColor selectors (

    …facebook#28703)
    
    Summary:
    Per discussion in react-native-community/releases#186 the iOS `PlatformColor()` function is documented to use the semantic color names provided by the system.   The referenced HIG documentation itself links to the `UIColor` documentation for semantic colors names.   However, these names differ depending on if you are viewing the new Swift API docs or the Objective C docs.   The current Objective C implementation in react-native assumes Objective C UIColor selector names that are suffixed 'Color'.   But in Swift, Apple provides a Swift Extension on UIColor that makes aliases without the the 'Color' suffix and then makes the original selectors invalid presumably via `NS_UNAVAILABLE_SWIFT`.
    
    Since both selector names are valid depending on if you are using Objective C or Swift, let's make both forms be legal for `PlatformColor()`.   In `RCTConvert.m` there is a dictionary of legal selector names.   The code already supports the ability to have names be aliases of other selectors via a RCTSelector metadata key.   The change adds code to the initialization of the map: it iterates over the keys in the map, which are all ObjC style UIColor selectors, and creates aliases by duplicating the entries, creating key names by stripping off the ObjC "Color" suffix, adds the RCTSelector key referring to the original and then appends these new Swift aliases to the map.
    
    ## Changelog
    
    [iOS] [Changed] - Allow iOS PlatformColor strings to be ObjC or Swift UIColor selectors
    Pull Request resolved: facebook#28703
    
    Test Plan:
    The PlatformColorExample.js is updated to use the new, shorter Swift selector names.   There are still other examples in the same file and in unit tests that exercise the ObjC selector names.
    
    <img width="492" alt="PlatformColor" src="https://user-images.githubusercontent.com/30053638/79809089-89ab7d00-8324-11ea-8a9d-120b92edeedf.png">
    
    Reviewed By: shergin
    
    Differential Revision: D21147404
    
    Pulled By: TheSavior
    
    fbshipit-source-id: 0273ec855e426b3a7ba97a87645859e05bcd4126
    tom-un authored and facebook-github-bot committed Apr 21, 2020
    Configuration menu
    Copy the full SHA
    25793ea View commit details
    Browse the repository at this point in the history
  4. Update Differ test

    Summary:
    Update differ test so it passes again. Previously to D21111423 (I think) nodes were being incorrectly detected as updated even if they weren't different, so now there are fewer unnecessary Update mutations generated.
    
    Changelog: [Internal]
    
    Reviewed By: mdvacca
    
    Differential Revision: D21148647
    
    fbshipit-source-id: cab6e3ecd0a457e1ac3155b3468bcc56663dab0b
    JoshuaGross authored and facebook-github-bot committed Apr 21, 2020
    Configuration menu
    Copy the full SHA
    1fdb9ac View commit details
    Browse the repository at this point in the history
  5. Enable Yoga logging in Fabric Debug

    Summary:
    This diff extends Fabric to support Yoga logging
    
    changeLog: [Internal] Internal changes in Fabric to enable yoga logging
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21150195
    
    fbshipit-source-id: a2e8308a79a7b422bf9ecc3a65f822b305f02c5d
    mdvacca authored and facebook-github-bot committed Apr 21, 2020
    Configuration menu
    Copy the full SHA
    8c4efc9 View commit details
    Browse the repository at this point in the history
  6. Easy diff to document in code how to enable logging of Shadow Tree in…

    …strospection
    
    Summary:
    Easy diff to document in code how to enable logging of Shadow Tree instrospection
    
    changeLog: [Internal] Internal change used on Fabric
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21150196
    
    fbshipit-source-id: 8eb23ec3ea1d574b79b09333428ab52c851065dd
    mdvacca authored and facebook-github-bot committed Apr 21, 2020
    Configuration menu
    Copy the full SHA
    05c76be View commit details
    Browse the repository at this point in the history
  7. Flip text alignment in case layout direction is RTL

    Summary:
    Changelog: [Internal]
    
    Flip text alignment in case layout direction is RTL.
    
    Reviewed By: JoshuaGross, mdvacca
    
    Differential Revision: D21130371
    
    fbshipit-source-id: cf56ca052c17a48e321803b0f99f8a4baaa0e67b
    sammy-SC authored and facebook-github-bot committed Apr 21, 2020
    Configuration menu
    Copy the full SHA
    a136b34 View commit details
    Browse the repository at this point in the history
  8. Daily arc lint --take GOOGLEJAVAFORMAT

    Reviewed By: zertosh
    
    Differential Revision: D21154707
    
    fbshipit-source-id: 11956915c265f98e286638b91d66d51545e3a311
    generatedunixname89002005287564 authored and facebook-github-bot committed Apr 21, 2020
    Configuration menu
    Copy the full SHA
    19658a1 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2020

  1. Upgrade Flipper to 0.37.0 (facebook#28545)

    Summary:
    Bump flipper to 0.37 for both iOS and Android
    
    ## Changelog
    
    [Android] [Changed] - Upgrade Flipper to 0.37.0
    [iOS] [Changed] - Upgrade Flipper to 0.37.0
    Pull Request resolved: facebook#28545
    
    Test Plan: RNTester build pass
    
    Reviewed By: rickhanlonii
    
    Differential Revision: D20930069
    
    Pulled By: hramos
    
    fbshipit-source-id: a7cb719da3e51e6a42d27d5e64bc664398d0d3c5
    sunnylqm authored and facebook-github-bot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    17f025b View commit details
    Browse the repository at this point in the history
  2. Upgrade babel-eslint in xplat/js

    Summary:
    `babel-eslint` is the parser you can supply to ESLint based off of Babel.
    
    `babel-eslint` 10.1.0 is the newest production version of `babel-eslint`.
    
    There are very few changes between 10.0.1 (the lowest previous version) and 10.1.0. There are only 3 non-version-bump commits: 2 bug fixes and enabling parsing of Flow enums.
    
    The only project that was on a lower version than 10.0.1 was `/xplat/js/RKJSModules/Libraries/Relay/oss/__github__` - test below
    
    Changelog: [Internal]
    
    Reviewed By: cpojer
    
    Differential Revision: D21055850
    
    fbshipit-source-id: bae0d8af5c6d833a4dbb0ad775c8e5e78ead1051
    gkz authored and facebook-github-bot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    0b68f3c View commit details
    Browse the repository at this point in the history
  3. RN: Create RootTag Type

    Summary:
    Creates a `RootTag` type and refactors the `RootTagContext` module a bit.
    
    This creates space for eventually changing `RootTag` into an opaque type that is only created once by `AppContainer`, and only consumed by native abstractions.
    
    Changelog:
    [Internal]
    
    (Note: this ignores all push blocking failures!)
    
    Reviewed By: cpojer
    
    Differential Revision: D21127173
    
    fbshipit-source-id: 60177a6e5e02d6308e87f76d12a271114f8f8fe0
    yungsters authored and facebook-github-bot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    a850d11 View commit details
    Browse the repository at this point in the history
  4. RN: Add RootTag Type to TurboModule

    Summary:
    Adds `RootTag` as a valid type for arguments and return types in TurboModules (on both Android and iOS).
    
    This will enable us to change `RootTag` into an opaque type. There are two compelling reasons to do this:
    
    - JavaScript will no longer be able to safely depend on `RootTag` being a number (which means we can change this in the future).
    - Call sites using `unstable_RootTagContext` will can get a `RootTag`, but call sites using the legacy `context.rootTag` will not. This means the opaque type will give us a strategy for migrating away from legacy context and eventually making `unstable_RootTagContext` the only way to access `RootTag`.
    
    Changelog:
    [Internal]
    
    (Note: this ignores all push blocking failures!)
    
    Reviewed By: RSNara
    
    Differential Revision: D21127170
    
    fbshipit-source-id: baec9d7ad17b2f8c4527f1a84f604fc0d28b97eb
    yungsters authored and facebook-github-bot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    5242ad9 View commit details
    Browse the repository at this point in the history
  5. RN: Fix Codegen Schema Buck Dependency (facebook#28719)

    Summary:
    Pull Request resolved: facebook#28719
    
    The Buck dependencies for the schema rule is missing the source files for the new codegen (and specifically, the parser).
    
    Changelog:
    [Internal]
    
    (Note: this ignores all push blocking failures!)
    
    Reviewed By: cpojer
    
    Differential Revision: D21162993
    
    fbshipit-source-id: 4addb6f257134e245a5d86dd427ee2536ed6d658
    yungsters authored and facebook-github-bot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    6aab3f8 View commit details
    Browse the repository at this point in the history
  6. Flow 0.123.0 in xplat/js

    Summary:
    Changelog: [Internal]
    
    ## Sync of generated files
    
    Ran
    ```
    js1 upgrade www-shared -p core_windowless
    ```
    but had to manually revert
    ```
    RKJSModules/Libraries/www-shared/core_windowless/logging/FBLoggerType.flow.js
    RKJSModules/Libraries/www-shared/core_windowless/logging/FBLogger.js
    ```
    because they introduced more errors
    
    ## Flow version bump
    ```
    ~/fbsource/fbcode/flow/facebook/deploy_xplat.sh 0.123.0
    ```
    
    Reviewed By: gkz
    
    Differential Revision: D21159821
    
    fbshipit-source-id: e106fcb43e4fc525b9185f8fc8a246e6c3a6b14f
    panagosg7 authored and facebook-github-bot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    57fee33 View commit details
    Browse the repository at this point in the history
  7. Remove outdated metro type definitions

    Summary:
    RN itself does not depend on Metro any longer, which is abstracted away into the CLI. I don't think we need those type definitions any longer as we have proper Metro definitions internally. I'm removing them because they keep showing up in biggrep when I look for things.
    
    Changelog: [Internal]
    
    Reviewed By: GijsWeterings
    
    Differential Revision: D21089924
    
    fbshipit-source-id: 2845277af12dae0f0baefaf85adefffb6ef9f2a5
    cpojer authored and facebook-github-bot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    2ad827b View commit details
    Browse the repository at this point in the history
  8. Daily arc lint --take CLANGFORMAT

    Reviewed By: zertosh
    
    Differential Revision: D21175893
    
    fbshipit-source-id: 101734c1b968ce241a15648efdcaeabbd789952d
    generatedunixname89002005287564 authored and facebook-github-bot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    bf5f3c6 View commit details
    Browse the repository at this point in the history
  9. remove tvOS from template (facebook#28706)

    Summary:
    According to the [0.62 blog post](https://reactnative.dev/blog/2020/03/26/version-0.62), Apple TV support has moved to react-native-tvos.
    The template still contains info.plist for tvOS, so I've removed them for future releases.
    
    ## Changelog
    
    <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
    https://github.com/facebook/react-native/wiki/Changelog
    -->
    
    [General] [Removed] - Removed tvOS related files from the template
    Pull Request resolved: facebook#28706
    
    Test Plan: run `react-native init TestTemplate` and remove tvOS related files and verified that iOS and Android runs on emulator.
    
    Differential Revision: D21182211
    
    Pulled By: hramos
    
    fbshipit-source-id: 41d2e19e5158d7ec103a37c01a93cf511fc1e4c9
    Naturalclar authored and facebook-github-bot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    df03228 View commit details
    Browse the repository at this point in the history
  10. Fabric: ConcreteShadowNode::initialStateData() now accepts a `Shado…

    …wNodeFamilyFragment` instead of just a `SurfaceId`
    
    Summary:
    We need it to be able pass an `EventEmitter` object to constructed concrete State objects.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21169581
    
    fbshipit-source-id: 3eef0310de7e2f061108aa85c1a39678a43fe85e
    shergin authored and facebook-github-bot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    3246eae View commit details
    Browse the repository at this point in the history
  11. Fabric: Introducting ShadowNodeFamilyFragment::Value

    Summary:
    `ShadowNodeFamilyFragment::Value` is a value couter-part type for `ShadowNodeFamilyFragment`.
    We need that to be able safely copy data stored inside a `ShadowNodeFamilyFragment` object.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: kacieb
    
    Differential Revision: D21169580
    
    fbshipit-source-id: 1a485e1b2ae47bc7da9476a60466934ac9d61366
    shergin authored and facebook-github-bot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    f64b39e View commit details
    Browse the repository at this point in the history
  12. Overhaul RCTTurboModule creation and initialization

    Summary:
    ## Problems:
    In my investigation of T65656635, I realized that the TurboModule system has a number of problems:
    - In TurboModules, we use 1 lock to create n TurboModules. We should change this setup to n locks for n TurboModules. This way, two threads creating two different NativeModules don't compete for the same lock. Also, this is how it's done in Android (TurboModules & NativeModules), and iOS (NativeModules).
    - In TurboModules, we don't calculate "requires main queue setup" faithfully. In the legacy system, if a NativeModule has a custom `init` method or a custom `constantsToExport` method, it "requires main queue setup" with a warning.
    - In TurboModules, we don't create the NativeModule on the main queue, if "requires main queue setup" is true. Instead, the NativeModule is always created on the thread that requires it.
    - In TurboModules, we don't perform any concurrency control around `id<RCTTurboModule>` setup. We should.
    
    ## What this diff does
    In this diff, I fixed all the aforementioned issues by re-implementing `provideRCTTurboModule:`.
    
    **Algorithm Notes:**
    - **Gist:** When `n` threads race to create NativeModule `x`, only the first thread creates and sets up `x`. All others are told to wait. Once the creator thread finishes its job, it notifies all other waiting threads, which then wake up and return the newly created NativeModule. This algorithm was initially implemented in NativeModules for Android inside (ModuleHolder.java). I modified and implemented it for TurboModules for Android, and now this diff implements it for TurboModules for iOS.
    - The TurboModule cache is replace with a TurboModuleHolder map. A TurboModuleHolder manages the creation lifecycle of a TurboModule, and holds a condition variable and mutex for doing concurrency control around it. When the bridge invalidates, in TurboModuleManager, we set the `invalidating` flag to true, which prevents the insertion of new entries into the TurboModuleHolder map.
    - I added a `std::mutex` to serialize calls into the TurboModuleManagerDelegate, so we don't get races if the delegate isn't thread-safe.
    
    Changelog:
    [iOS][Fixed] - Re-implement RCTTurboModuleManager provideRCTTurboModule:
    
    Reviewed By: shergin
    
    Differential Revision: D21170099
    
    fbshipit-source-id: 8792812c2237d3bfc80c9834c818e011de85b0ea
    RSNara authored and facebook-github-bot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    2c473e1 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2020

  1. Fix folly::dynamic crash when attaching a debugger to Hermes

    Summary:
    folly_futures was compiled with and exported -DFOLLY_MOBILE=1, while
    folly_json did not. This flag disables fancy F14 data structures for
    folly::dynamic in favor of a simple std::unordered_map.
    
    This caused inlined/templated code from modules depending on
    folly_futures to disagree with the implementations in folly_json,
    leading to a crash.
    
    The only such libraries were libhermes-inspector and (transitively)
    libhermes-executor-debug, and these only use folly::dynamic for CDP
    serialization, which is why the problem was not more apparent.
    
    Changelog: [Internal] Fix crash when attaching a Hermes debugger
    
    Reviewed By: mhorowitz
    
    Differential Revision: D21193307
    
    fbshipit-source-id: 2b795bb6f4f7f991e2adaacec62d62616117322b
    willholen authored and facebook-github-bot committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    d06ee3d View commit details
    Browse the repository at this point in the history
  2. Set black as default text color for <TextInput/> on iOS (facebook#28708)

    Summary:
    This is a follow-up pull request to facebook#28280 (reviewed by shergin).
    This pull request tried to solve the problem of the default color in a TextInput in dark mode on iOS being white instead of black. I got suggested to solve the problem not on the level of RCTTextAttributes, but on the level of RCTUITextField.
    
    Setting `self.textColor = [UIColor black];` in the constructor did not work, because it gets overwritten by nil in `RCTBaseTextInputView.m`. There I implemented the logic that if NSForegroundColorAttributeName color is nil then the color is being set to black. I think the `defaultTextAttributes` property confuses here, because it ends up being the effective text attributes, e.g. if I unconditionally set the default text color to black, it cannot be changed in React Native anymore. So I put the nil check in.
    
    ## Changelog
    
    [iOS] [Fixed] - TextInput color has the same default (#000) on iOS whether in light or dark mode
    Pull Request resolved: facebook#28708
    
    Test Plan:
    I have manually tested the following:
    - The default text color in light mode is black
    - The default text color in dark mode is black
    - The color can be changed using the `style.color` attribute
    - Setting the opacity to 0.5 results in the desired behavior, the whole TextInput becoming half the opacity.
    – Setting the `style.color` to rgba(0, 0, 0, 0.5) works as intended, creating a half-opaque text color.
    
    Differential Revision: D21186579
    
    Pulled By: shergin
    
    fbshipit-source-id: ea6405ac6a0243c96677335169b214a2bb9ccc29
    JonnyBurger authored and facebook-github-bot committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    a2f8b9c View commit details
    Browse the repository at this point in the history
  3. Daily arc lint --take CLANGFORMAT

    Reviewed By: zertosh
    
    Differential Revision: D21202121
    
    fbshipit-source-id: 6acb53e6ca941e465b11aeac4215533c16067eed
    generatedunixname89002005287564 authored and facebook-github-bot committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    ca16256 View commit details
    Browse the repository at this point in the history
  4. RN: Rename { => Event}ObjectPropertyType in Codegen

    Summary:
    Straightforward rename to clarify the purpose of this type.
    
    Changelog: [Internal]
    
    Reviewed By: TheSavior
    
    Differential Revision: D21160790
    
    fbshipit-source-id: eaf5e8c9f51e16134e153a6321857234be1aa338
    yungsters authored and facebook-github-bot committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    ab9b212 View commit details
    Browse the repository at this point in the history
  5. RN: Rename {NativePrimitive => ReservedProp}TypeAnnotation in Codegen

    Summary:
    Straightforward rename to clarify the purpose of this type.
    
    The current naming made more sense before the codegen also produced code for NativeModules.
    
    Changelog: [Internal]
    
    Reviewed By: TheSavior
    
    Differential Revision: D21160793
    
    fbshipit-source-id: 6787ef298e32ff1b4d506afd831af96764f5af6f
    yungsters authored and facebook-github-bot committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    1b2bcb1 View commit details
    Browse the repository at this point in the history
  6. RN: Rename { => NativeModule}MethodTypeShape in Codegen

    Summary:
    Straightforward rename to clarify the purpose of this type.
    
    Changelog: [Internal]
    
    Reviewed By: TheSavior
    
    Differential Revision: D21160791
    
    fbshipit-source-id: 422d09243edda0660815eb2f0ce51f7e56134983
    yungsters authored and facebook-github-bot committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    b8bfc50 View commit details
    Browse the repository at this point in the history
  7. RN: Add RootTag Codegen Parser Test (and Cleanup)

    Summary:
    Adds a `RootTag` parser test for the new codegen for NativeModules/TurboModules.
    
    I'm doing this in a prerequisite commit in order to make the diff of the diff clearer when I implement proper support for `RootTag`.
    
    This also fixes some of the minor typos and mistakes that I noticed. I also wanted to land these benign snapshot changes independent of the upcoming behavior changes.
    
    Changelog: [Internal]
    
    Reviewed By: TheSavior
    
    Differential Revision: D21160792
    
    fbshipit-source-id: 5f29f34035da30d7afa2369dbc19e95954553e88
    yungsters authored and facebook-github-bot committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    064cb12 View commit details
    Browse the repository at this point in the history
  8. RN: Add RootTag to New NativeModule Codegen

    Summary:
    Adds support for `RootTag` in the new codegen for NativeModules/TurboModules.
    
    Changelog: [Internal]
    
    Reviewed By: TheSavior
    
    Differential Revision: D21160788
    
    fbshipit-source-id: 952189f6e8bc8fde8b403d4c0e77b5d66b3f03e4
    yungsters authored and facebook-github-bot committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    310b0c3 View commit details
    Browse the repository at this point in the history
  9. RN: Add RootTag to New Commands Codegen

    Summary:
    Adds support for `RootTag` in the new codegen for Native Component Commands.
    
    Changelog: [Internal]
    
    Reviewed By: TheSavior
    
    Differential Revision: D21169371
    
    fbshipit-source-id: 3b25433f3328e9c04cfe45bb176fc06d63559f14
    yungsters authored and facebook-github-bot committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    4d9fa4b View commit details
    Browse the repository at this point in the history
  10. BackHandler: specify function return type for handler (facebook#28192)

    Summary:
    Following the comment DefinitelyTyped/DefinitelyTyped#42618 (comment)
    
    Modify the flowtype of BackHandler function to have more specific return type.
    
    ## Changelog
    
    [General] [Changed] - Changed type of BackHandler to be more specific.
    Pull Request resolved: facebook#28192
    
    Test Plan: No flow error in RNTester
    
    Reviewed By: TheSavior
    
    Differential Revision: D20771113
    
    Pulled By: hramos
    
    fbshipit-source-id: 5ca65e2a2b3f8726b8fb4606473d8fad5b0ce730
    Naturalclar authored and facebook-github-bot committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    a903d1b View commit details
    Browse the repository at this point in the history
  11. Fabric: Simplifying Yoga and Fabric integration

    Summary:
    The integration with Yoga was pretty complex from day one. The first attempt to make it simpler was in D19963353 when we removed a bunch of layers of indirection. This is the second iteration that aimed to simplify the structure of methods and their responsibilities.
    
    The only conceptual change (that I am aware of) in this diff is that now we don't support (imaginary) case where a non-leaf YogaLayoutableShadowNode can have a non-YogaLayoutableShadowNode child. In the previous version, it was a no-op, now it's not supported and an assert will fire.
    
    Alongside with refactoring, this diff implements several helper functions that verify the invariants important for the Concurrent Layout in debug mode.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21198222
    
    fbshipit-source-id: cc085904948056f861562af5bd2571de45a743b9
    shergin authored and facebook-github-bot committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    78b1c85 View commit details
    Browse the repository at this point in the history
  12. Clean up comments about null state wrappers

    Summary:
    Updating state with a null wrapper is neither desirable, nor possible. The underlying task was closed, just cleaning up comments.
    
    Changelog: [Internal] comments only
    
    Reviewed By: mdvacca
    
    Differential Revision: D21186545
    
    fbshipit-source-id: d14ddd59d42e8fd91c6e7fd50037311d4e8d0b60
    JoshuaGross authored and facebook-github-bot committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    17adf54 View commit details
    Browse the repository at this point in the history
  13. Modal: disable view flattening explicitly for the children of Modal, …

    …the content wrappers
    
    Summary:
    I noticed that in ModalHostShadowNode.java (not used in Fabric), there's an assumption that the Modal will have exactly one child on the native side; this child is explicitly specified in Modal.js.
    
    However, in Fabric, these views are flattened and so the Modal will actually have N children - whatever children the product code passes into the Modal.
    
    In *theory* this should be fine, but might be causing issues. Not sure.
    
    This is an experiment and shouldn't be landed until we verify that (1) this actually matters, (2) that it fixes an issue with Modal on iOS or Android.
    
    Changelog: [Internal] Change to make Fabric consistent with non-Fabric Modal
    
    Reviewed By: mdvacca
    
    Differential Revision: D21191822
    
    fbshipit-source-id: 9d65f346387fd056649d4063d70220f637ba8828
    JoshuaGross authored and facebook-github-bot committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    bda8aae View commit details
    Browse the repository at this point in the history
  14. Support contentOffset property in Android's ScrollView and Horizont…

    …alScrollView
    
    Summary:
    For a very long time, iOS has supported the `contentOffset` property but Android has not:
    
    facebook#6849
    
    This property can be used, primarily, to autoscroll the ScrollView to a starting position when it is first rendered, to avoid "jumps" that occur by asynchronously scrolling to a start position.
    
    Changelog: [Android][Changed] ScrollView now supports `contentOffset`
    
    Reviewed By: mdvacca
    
    Differential Revision: D21198236
    
    fbshipit-source-id: 2b0773569ba42120cb1fcf0f3847ca98af2285e7
    JoshuaGross authored and facebook-github-bot committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    ed29ba1 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2020

  1. RN: Fix Text Layout Ignoring Parent Bounds

    Summary:
    Fixes text layout so that the parent bounds are correctly respected. This fixes two bugs:
    
    - **Parent width is not respected.** This was caused by the recent change to shrink-wrap text layout.
    - **Parent height is not respected.** This has always been a bug.
    
    After this change, Android will behave like iOS.
    
    Changelog:
    [Android] [Fixed] - Text layout no longer ignores parent bounds
    
    Reviewed By: mdvacca
    
    Differential Revision: D21199030
    
    fbshipit-source-id: cc072bdcff64167db1f79b7bf965e57a7396cdf4
    yungsters authored and facebook-github-bot committed Apr 24, 2020
    Configuration menu
    Copy the full SHA
    025be81 View commit details
    Browse the repository at this point in the history
  2. Remove unnecessary cast to int in TextInlineView measure functions

    Summary:
    This diff removes unnecessary (int) casts in the calculation of layout for TextInlineViews
    
    changeLog: [Internal][Android] Internal optimization on the calculation of layout for TextInlineViews
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21211532
    
    fbshipit-source-id: 920c1f88d042f3e1f6bfd0f560371f7482a62064
    mdvacca authored and facebook-github-bot committed Apr 24, 2020
    Configuration menu
    Copy the full SHA
    4ae2de2 View commit details
    Browse the repository at this point in the history
  3. Use RTL in RTLExample when Platform != android (facebook#28742)

    Summary:
    This change upstreams a small change we did in react-native-windows to allow the RTLExample RNTester page to function correctly on Windows.  The change is part of this Pr:
    microsoft/react-native-windows#4683
    Currently the direction property is gated behind a check for Platform == 'iOS', which means it only works on iOS.  Windows supports direction = 'rtl' so I've chanced this check to Platform != 'android'.
    
    ## Changelog
    
    <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
    https://github.com/facebook/react-native/wiki/Changelog
    -->
    
    [Internal] [Changed] - Changed RTLExample RNTester page to use direction = 'rtl' when Platform is not Android.
    Pull Request resolved: facebook#28742
    
    Test Plan: Confirmed this change works correctly in RNTester on Windows.  Have not confirmed iOS as I don't have Mac hardware.
    
    Differential Revision: D21235579
    
    Pulled By: shergin
    
    fbshipit-source-id: 47ab93c2bcd0dbc8347c6746081ae3c64f88faa5
    kmelmon authored and facebook-github-bot committed Apr 24, 2020
    Configuration menu
    Copy the full SHA
    fa69356 View commit details
    Browse the repository at this point in the history
  4. Add Dark Mode support to the App template and NewAppScreen components (

    …facebook#28711)
    
    Summary:
    This PR adds support for the dark mode and dynamic theme changing to the default App template and to the related `NewAppScreen` components. Using `useColorScheme` hook forced me to refactor a bit main `App.js` file, but I think those changes are step in the right direction according to way in which React Native is used in larger apps, so new `Section` component has been extracted to reduce code redundancy/repetition inside `App`.
    
    Additional color `darker` has been added to the `Colors` statics from `NewAppScreen` because `dark` was too bright for the Dark Mode backgrounds.
    
    Also main `StoryBoard` on iOS has been updated to use theme based colors instead of static or hardcoded ones. There was also an unused, empty `Label` which I have removed.
    
    ~~I'm not so much experienced with Android. If someone could also update Android splash screen (if Android requires such change) it will be nice. I want to look at this later using simulator.~~
    > I have updated the Android splash screen and tested this change on the Android emulator.
    
    If you have any comment or corrections feel free to post them out, I would like to put more work into this PR if it's needed. Dark Mode this days is a part of near every OS, so it could be considered as a standard feature. I hope those changes helps people which struggle with the basic theming implementation (+ there is now an example of hook and `children` prop usage in the template).
    
    ## Changelog
    
    [Internal] [Added] - Add dark mode support to the default app template
    Pull Request resolved: facebook#28711
    
    Test Plan:
    I have tested the App from the template on the iOS device and in Android emulator with RN `0.63.0-rc`.
    
    Screen recording on iOS (demonstarates both modes, both splash screens and transition):
    ![ezgif-6-e24ee8e839c9](https://user-images.githubusercontent.com/719641/80025923-a04b0300-84e1-11ea-824a-b4363db48892.gif)
    
    Screenshot of iOS app in Dark Mode:
    ![IMG_6542](https://user-images.githubusercontent.com/719641/79885748-c98f6480-83f7-11ea-8c73-1351a721d5d6.PNG)
    
    Screenshot of iOS app splash screen in Dark Mode:
    ![IMG_6544](https://user-images.githubusercontent.com/719641/79960431-add29f80-8485-11ea-985c-b39176024ffa.PNG)
    
    Screenshot of Android app in the emulator:
    ![Screenshot_1587566100](https://user-images.githubusercontent.com/719641/79995454-88f72000-84b7-11ea-810b-dfb70de03c2a.png)
    
    Differential Revision: D21236148
    
    Pulled By: shergin
    
    fbshipit-source-id: 0c8a9534d3a3f8f8099af939243a889ac4df6cda
    Simek authored and facebook-github-bot committed Apr 24, 2020
    Configuration menu
    Copy the full SHA
    2b56011 View commit details
    Browse the repository at this point in the history
  5. Allow use of std::tuple<> with decorators directly

    Summary:
    Previously, a derived class, WithTuple, was used.  This ran
    into bugs in MSVC (see microsoft/STL#121).
    Instead, use specialization to get the same result using std::tuple
    directly.  This avoids the bug, and is a cleaner API.
    
    Changelog: [Internal]
    
    Reviewed By: dulinriley
    
    Differential Revision: D21233677
    
    fbshipit-source-id: 1d75991847164e525b4ba70f65a90627e5f8cd56
    mhorowitz authored and facebook-github-bot committed Apr 24, 2020
    Configuration menu
    Copy the full SHA
    8173427 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2020

  1. Fabric: Added assert in ShadowNode

    Summary:
    It's not allowed to return nullptr from the callback. The assert ensures it which is helpful during development.
    
    Probably, we should consider using `gsl::not_null<>` here.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: sammy-SC
    
    Differential Revision: D21149891
    
    fbshipit-source-id: a5f77b35029f22b499491721036405682f812a38
    shergin authored and facebook-github-bot committed Apr 25, 2020
    Configuration menu
    Copy the full SHA
    fef8bc3 View commit details
    Browse the repository at this point in the history
  2. Fabric: Test for State Reconciliation mechanism

    Summary:
    It's not immediately obvious from the UI/UX when/if this mechanism breaks, so it's good to have a test.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21184718
    
    fbshipit-source-id: 25432a1398cff3ce61f62cf433e3cb73d7a7a93f
    shergin authored and facebook-github-bot committed Apr 25, 2020
    Configuration menu
    Copy the full SHA
    aad9960 View commit details
    Browse the repository at this point in the history
  3. ScrollView, HorizontalScrollView: support null contentOffset

    Summary:
    According to the Flow types, `contentOffset` is nullable. Support that.
    
    Changelog: [Internal] Fix to (1) support null contentOffset in ScrollView and HorizontalScrollView, added on Android after the last release. (2) Correctly add support for contentOffset in ScrollView (I missed that when adding it to HorizontalScrollView in the previous diff).
    
    Reviewed By: alsun2001
    
    Differential Revision: D21243028
    
    fbshipit-source-id: ebef9a9054a3e4dd88556739e836b7ece48fda12
    JoshuaGross authored and facebook-github-bot committed Apr 25, 2020
    Configuration menu
    Copy the full SHA
    30cc158 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2020

  1. All measure* calls should use the latest committed version of a Sha…

    …dowNode
    
    Summary:
    Because of StateReconciliation (?) it is possible, even likely, that eventually the ShadowNode that ReactJS holds onto will not be the latest ShadowNode, and will not contain the latest LayoutMetrics.
    
    This fixes the problem by always resolving the latest committed version of the ShadowNode before measuring it.
    
    Changelog: [Internal] Fabric measure bugfix
    
    Reviewed By: sammy-SC, mdvacca
    
    Differential Revision: D21248472
    
    fbshipit-source-id: a4f034c36d89a91a804f3b4cdf35e7ae748a1b91
    JoshuaGross authored and facebook-github-bot committed Apr 26, 2020
    Configuration menu
    Copy the full SHA
    8ca5594 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2020

  1. chore: remove tvOS from the e2e CI tests (facebook#28743)

    Summary:
    Refs facebook#28706
    
    This small PR removes `tvOS` platform and `HelloWorld-tvOS` references from the e2e CI tests script. Also a small typo in comment has been fixed.
    
    CC: dlowder-salesforce
    
    ## Changelog
    
    [Internal] [Removed] - remove tvOS from the e2e CI tests
    Pull Request resolved: facebook#28743
    
    Test Plan: Exec during `node ./scripts/run-ci-e2e-tests.js --ios` was successful.
    
    Differential Revision: D21252185
    
    Pulled By: shergin
    
    fbshipit-source-id: 56981f2c5c3038412e9f37a81084de87e296d7d2
    Simek authored and facebook-github-bot committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    dfdbf41 View commit details
    Browse the repository at this point in the history
  2. Fix calculating View position within a Window in split-screen mode on…

    … Android (facebook#28449)
    
    Summary:
    On Android, when using split-screen mode, the Window-relative position of a native View is not calculated properly when the app is running on the right (or bottom) half of the screen. The coordinates are currently calculated only based on View.getLocationOnScreen() with subtracting status bar height. Scenarios, where the window does not fill the entire screen (such as split-screen mode) are not supported.
    
    We need to use a more general solution to subtract the actual position of the window from position of the view within the screen. This PR fixes the issue by subtracting coordinates of the Window retrieved from View.getWindowVisibleDisplayFrame(), which covers all scenarios when Window can be in a different position than the screen (incl. status bar offset).
    
    ## Changelog
    
    [Android] [Fixed] - Calculating view position within the window in split-screen mode
    Pull Request resolved: facebook#28449
    
    Test Plan:
    1. Run an app in split-screen mode on the right half of the screen
    2. Call UIManagerModule.measureInWindow() from JS to fetch a position of a View within a Window
    3. Observe the wrong coordinates returned
    4. Try the same with the fix
    
    Reviewed By: mdvacca
    
    Differential Revision: D21246297
    
    Pulled By: shergin
    
    fbshipit-source-id: 1f54b1a5d6610be17bf05521200304db2ba263ab
    Jakub Kinst authored and facebook-github-bot committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    b020e7c View commit details
    Browse the repository at this point in the history
  3. Fix image instrumentation internal lifecycle

    Reviewed By: fkgozali
    
    Differential Revision: D20980822
    
    fbshipit-source-id: d0a4a031046509425fbf6662471246ed2ab48a4c
    p-sun authored and facebook-github-bot committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    e3e9008 View commit details
    Browse the repository at this point in the history
  4. Calling Paper TextInput setTextAndSelection view command now dirties …

    …layout
    
    Summary:
    Changelog: [Internal]
    
    Previously `setTextAndSelection` was not dirtying layout. This would cause an issue where `setTextAndSelection` causes layout change. For example calling setTextAndSelection with empty string on a multiline auto expanding text input.
    
    I changed one example in TextInputSharedExamples.js, "Live Re-Write (no spaces allowed) and clear" example is now multiline. This allows to test whether `setTextAndSelection` dirties layout. Enter multiline string to to the example text input and press clear. Observe that the text input shrinks to single line height.
    
    Reviewed By: shergin
    
    Differential Revision: D21182990
    
    fbshipit-source-id: de8501ea0b97012cf4cdf8d5f658649139f92da6
    sammy-SC authored and facebook-github-bot committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    e68f9bf View commit details
    Browse the repository at this point in the history
  5. Blur image in Image component if blurRadius prop is provided

    Summary:
    Apply `blurRadius` prop once image is loaded.
    
    Changelog: [Internal][iOS]
    
    Reviewed By: mdvacca
    
    Differential Revision: D21227536
    
    fbshipit-source-id: 241aa45f253a06d61e861f6719f14fabf3467b56
    sammy-SC authored and facebook-github-bot committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    5cf327e View commit details
    Browse the repository at this point in the history
  6. Fabric: Marking TextInput as a leaf Yoga node

    Summary:
    TextInput must have `LeafYogaNode` trait to be able contain non-yoga nodes.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: sammy-SC
    
    Differential Revision: D21252322
    
    fbshipit-source-id: 820f3ae4811cb475550419af501739c57c7164e1
    shergin authored and facebook-github-bot committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    a4b15a4 View commit details
    Browse the repository at this point in the history
  7. Move RuntimeExecutor to its own BUCK module (facebook#28730)

    Summary:
    Pull Request resolved: facebook#28730
    
    Moving RuntimeExecutor out of react/utils and into its own subdir of ReactCommon. I'm doing this because I'm going to be pulling this into CatalystInstance on Android, and I don't want to pull in all the files we don't need there; also, this should hopefully make the OSS NDK stuff easier (this uses the react/utils prefix to export, and I'm not sure if you can include a '/' in a gradle module name?)
    
    Changelog: [Internal]
    
    Reviewed By: shergin, mdvacca
    
    Differential Revision: D21098528
    
    fbshipit-source-id: 9fbd72901ece522b1caec3ec34fafb8f9b327275
    Emily Janzer authored and facebook-github-bot committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    79d5b20 View commit details
    Browse the repository at this point in the history
  8. Send key when onKeyPress event is fired from TextInput

    Summary:
    Changelog: [Internal]
    
    In `onKeyPress` event, we were not returning `key` property. This diff adds `key` property to `onKeyPress` event and removes other, redundant properties from `onKeyPress` event.
    
    The implementation has been translated from Paper.
    
    Reviewed By: shergin
    
    Differential Revision: D21250411
    
    fbshipit-source-id: f1e31381667acb9dec02d0b33883df8f8f5b2a4b
    sammy-SC authored and facebook-github-bot committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    027e8f9 View commit details
    Browse the repository at this point in the history
  9. Do not send events for changes coming from JavaScript

    Summary:
    Changelog: [Internal]
    
    When there is a change coming from javascript, avoid triggering `onChange ` and `onSelectionChange` events since JavaScript already has these changes. This is only necessary for multiline text.
    
    For changes coming through view commands, do not increment `_mostRecentEventCount`.
    
    Reviewed By: shergin
    
    Differential Revision: D21255228
    
    fbshipit-source-id: e972dab0eb3dd21f611ee5c71d755bab593ae9cc
    sammy-SC authored and facebook-github-bot committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    b871979 View commit details
    Browse the repository at this point in the history
  10. Fabric: Increasing threshold for MountingTelemetryTest

    Summary:
    We neede that to make the test less flaky.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: mdvacca
    
    Differential Revision: D21261487
    
    fbshipit-source-id: afec45e03be10ba071a5ab808ce13f95b5f475e3
    shergin authored and facebook-github-bot committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    26d3bca View commit details
    Browse the repository at this point in the history
  11. iOS: Fix refreshControl layouting (facebook#28236)

    Summary:
    In `react-native-navigation` we allow the usage of native iOS navigationBar **largeTitle** which cause the title to "jump" when pulling to refresh.
    We found that the layout calculations of the refreshControl element mess up the system behaviour.
    
    ## Changelog
    
    [iOS] [Fixed] - Fix refreshControl messes up navigationBar largeTitles
    Pull Request resolved: facebook#28236
    
    Test Plan:
    ### Before the fix:
    ![before](https://user-images.githubusercontent.com/10794586/75991307-f7c7ec00-5efe-11ea-8cd9-ab8c3fbe1dc1.gif)
    
    ### And after:
    ![after](https://user-images.githubusercontent.com/10794586/75990618-d9152580-5efd-11ea-8c72-5deb6d83a840.gif)
    
    ### How it looks like with react-native init app after the fix:
    ![ezgif com-video-to-gif (4)](https://user-images.githubusercontent.com/10794586/77253369-54970680-6c62-11ea-9ad6-3265e23044e6.gif)
    
    Differential Revision: D20587945
    
    Pulled By: shergin
    
    fbshipit-source-id: 94f560b17e367f4ef5e789f40c052396949b51a3
    yogevbd authored and facebook-github-bot committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    702ff6d View commit details
    Browse the repository at this point in the history
  12. Fix rounding error using double instead of float

    Summary: Changelog: [Internal] [Yoga] Use double instead of float during rounding process to prevent loss of precision.
    
    Reviewed By: mdvacca
    
    Differential Revision: D21227565
    
    fbshipit-source-id: 380b57535a356624cda8dc2017871a4ef3c882d1
    SidharthGuglani-zz authored and facebook-github-bot committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    fc5a626 View commit details
    Browse the repository at this point in the history
  13. Fix broken touches on all Fabric surfaces

    Reviewed By: shergin
    
    Differential Revision: D21261996
    
    fbshipit-source-id: f42c19295ac127eca653631faad0ced4900f4758
    sammy-SC authored and facebook-github-bot committed Apr 27, 2020
    Configuration menu
    Copy the full SHA
    81bdead View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2020

  1. Move ART Android files to FB internal

    Summary:
    ## Changelog:
    
    [General] [Changed] - Moves ART android files from RN to internal react shell.
    
    Reviewed By: cpojer
    
    Differential Revision: D21261077
    
    fbshipit-source-id: 1d3dc404313192540d64991911e3599e3e86351b
    luluwu2032 authored and facebook-github-bot committed Apr 28, 2020
    Configuration menu
    Copy the full SHA
    423b55b View commit details
    Browse the repository at this point in the history
  2. Check en0..en8 when generating ip.txt for iOS debug builds (facebook#…

    …28764)
    
    Summary:
    When generating ip.txt in an iOS debug build, search en0 through en8 for an IP address rather than only checking en0 and en1.  For example, on my Mac, the IP address I needed to use was on en5 and the IP address actually detected was a private network of one of my Parallels virtual machines (interface vnic0).
    
    ## Changelog
    
    <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
    https://github.com/facebook/react-native/wiki/Changelog
    -->
    
    [iOS] [Fixed] - Search en0 through en8 for the Metro Bundler's IP address when generating iOS debug builds
    Pull Request resolved: facebook#28764
    
    Test Plan: Should make no difference to users for whom react-native-xcode.sh already worked. On a Mac with multiple virtual machines installed, should prevent ip.txt getting the private IP address of a virtual machine.
    
    Differential Revision: D21280671
    
    Pulled By: shergin
    
    fbshipit-source-id: e6fe9c8344146626df96129968981462463201f7
    malord authored and facebook-github-bot committed Apr 28, 2020
    Configuration menu
    Copy the full SHA
    b2b23a2 View commit details
    Browse the repository at this point in the history
  3. Part 1: Make CatalystInstanceImpl.getNativeModule Nullable

    Summary:
    ## Description
    When the TurboModule and the NativeModule systems are alive at the same time, after RN cleanup, if a TurboModule is required, we return `null` from TurboModuleManager. This causes `CatalystInstanceImpl.getNativeModule` to do a lookup on NativeModule registry, which throws an `AssertionError`, because the TurboModule isn't found. Instead of throwing an `AssertionError` from `CatalystInstanceImpl.getNativeModule`, this diff instead has that method return `null` in this particular case.
    
    ## Rationale
    This should eliminate the crashes we're seeing in T46487253.
    
    ## Future action
    In the future, we should guard `CatalystInstanceImpl.getNativeModule` with an `if (mDestroyed) return null;` statement. This'll ensure that if NativeModules are required after React Native has started cleanup, they'll be returned as `null`. Right now, we either return the destroyed NativeModule object, or create/initialize the NativeMoulde and return it, which is wrong.
    
    Changelog:
    [Android][Changed] - Make CatalystInstance.getNativeModule nullable
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21272029
    
    fbshipit-source-id: 099ad9ab9fa2146299df4cf7f86ae7a8e526bb15
    RSNara authored and facebook-github-bot committed Apr 28, 2020
    Configuration menu
    Copy the full SHA
    1cef72a View commit details
    Browse the repository at this point in the history
  4. Part 2: Make CatalystInstanceImpl.getNativeModule Nullable

    Summary:
    This is the codemod portion of the parent diff.
    
    I modified all call-sites to `ReactContext.getNativeModule` to do a null check on the returned NativeModule.
    
    Changelog:
    [Android][Fixed] - Check if NativeModules returned from CatalystInstanceImpl.getNativeModule are null before using them.
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21272028
    
    fbshipit-source-id: 6bd16c6bf30605f2dfdf4c481352063712965342
    RSNara authored and facebook-github-bot committed Apr 28, 2020
    Configuration menu
    Copy the full SHA
    9263eb5 View commit details
    Browse the repository at this point in the history
  5. Revert D20587945: iOS: Fix refreshControl layouting

    Differential Revision:
    D20587945
    
    Original commit changeset: 94f560b17e36
    
    fbshipit-source-id: e8ec95b2ea8632ef09e132351a1458cf97671206
    shergin authored and facebook-github-bot committed Apr 28, 2020
    Configuration menu
    Copy the full SHA
    79bc7f9 View commit details
    Browse the repository at this point in the history
  6. Back out "Control concurrent calls into TMMDelegate from TMM"

    Summary:
    Original commit changeset: d22c4abfe87f
    
    This synchronization is redundant. See D21025965.
    
    Changelog: [Internal]
    
    Reviewed By: fkgozali
    
    Differential Revision: D21283284
    
    fbshipit-source-id: dae737fe08bbc8f60913baa6c6a58228611257ef
    RSNara authored and facebook-github-bot committed Apr 28, 2020
    Configuration menu
    Copy the full SHA
    3d20f49 View commit details
    Browse the repository at this point in the history
  7. Resolve RNTester Xcode warnings (facebook#28676)

    Summary:
    Resolve RNTester Xcode warnings.
    
    ## Changelog
    
    <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
    https://github.com/facebook/react-native/wiki/Changelog
    -->
    
    [Internal] [iOS] - Resolve RNTester Xcode warnings
    Pull Request resolved: facebook#28676
    
    Test Plan: Building RNTester no longer shows project setting warnings
    
    Differential Revision: D21109702
    
    Pulled By: hramos
    
    fbshipit-source-id: f7552d3a9857ee7415cd96622a0a79797a168698
    safaiyeh authored and facebook-github-bot committed Apr 28, 2020
    Configuration menu
    Copy the full SHA
    6de9f37 View commit details
    Browse the repository at this point in the history
  8. Update react.gradle (facebook#28776)

    Summary:
    Running `./gradlew assembleRelease` fails as the path to the CLI contains a new line at the end. We don't run this command in `debug` mode, hence it passed the testing. My bad.
    
    Fixed, checked in both `debug` with `bundleInDebug: true` and `release`.
    
    Fixes facebook#28700
    
    ## Changelog
    
    [INTERNAL] [ANDROID] - Fix `React.gradle` to build Android apps in production
    Pull Request resolved: facebook#28776
    
    Test Plan: Running `./gradlew assembleRelease` works
    
    Reviewed By: hramos
    
    Differential Revision: D21287789
    
    Pulled By: TheSavior
    
    fbshipit-source-id: dc3ec8eef7a919b072b562d2bd455e2f704bc083
    grabbou authored and facebook-github-bot committed Apr 28, 2020
    Configuration menu
    Copy the full SHA
    afdcdc7 View commit details
    Browse the repository at this point in the history
  9. Fix cleanup bug

    Summary:
    This is the iOS analogue to D21290582.
    
    Changelog:
    [iOS][Fixed] - TurboModule cleanup
    
    Reviewed By: fkgozali
    
    Differential Revision: D21290852
    
    fbshipit-source-id: c0975a1f320ad4ad4ef16eec82eca38389c71a0a
    RSNara authored and facebook-github-bot committed Apr 28, 2020
    Configuration menu
    Copy the full SHA
    00b3cbf View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2020

  1. Fix cleanup bug

    Summary:
    When I initially made TurboModuleManager.getModule thread-safe, I unintentionally broken TurboModule cleanup. This diff fixes that mistake.
    
    ## Mistake
    ```
      Override
      public void onCatalystInstanceDestroy() {
        synchronized (mTurboModuleCleanupLock) {
          mTurboModuleCleanupStarted = true;
        }
    
        final Set<String> turboModuleNames = new HashSet<>(mTurboModuleHolders.keySet());
    
        for (final String moduleName : turboModuleNames) {
          // Retrieve the TurboModule, possibly waiting for it to finish instantiating.
          final TurboModule turboModule = getModule(moduleName); // ERROR!
    
          if (turboModule != null) {
            // TODO(T48014458): Rename this to invalidate()
            ((NativeModule) turboModule).onCatalystInstanceDestroy();
          }
        }
    
    ```
    
    Before calling `getModule(moduleName)`, I set `mTurboModuleCleanupStarted = true`. This assignment makes all calls to `getModule` return `null`, which means that none of the TurboModules were having their `onCatalystInstanceDestroy()` method invoked.
    
    Changelog:
    [Android][Fixed] - TurboModule cleanup
    
    Reviewed By: fkgozali
    
    Differential Revision: D21290582
    
    fbshipit-source-id: 3645b9a4f8c6f41498ebd9d51f9b5775edf2dbd7
    RSNara authored and facebook-github-bot committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    e171c2b View commit details
    Browse the repository at this point in the history
  2. Create JRuntimeExecutor (facebook#28779)

    Summary:
    Pull Request resolved: facebook#28779
    
    Creating a JNI wrapper class for RuntimeExecutor so we can pass it to Fabric and TurboModules in Java.
    
    Changelog: [Internal]
    
    Reviewed By: RSNara
    
    Differential Revision: D21049385
    
    fbshipit-source-id: f833004225d9837acf6ffafd3988f89748cf12aa
    Emily Janzer authored and facebook-github-bot committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    23d6b8d View commit details
    Browse the repository at this point in the history
  3. refine invariant error message at scrollToIndex (facebook#28464)

    Summary:
    I refined the error message of scrollToIndex.
    
    When I used scrollToIndex with `index:0` and data that length is 0, I met the odd error message `Invariant Violation scrollToIndex out of range: requested index 0 but maximum is -1`.
    
    Next, I thought that scrollToIndex with `index:-1` meant scrollToTop without checking data length. I met `Invariant Violation: scrollToIndex out of range: requested index -1 but maximum is -1`
    
    Finally, I wondered what will happen to use scrollToIndex with `index:-1` and data that length is `5`. The result is `Invariant Violation: scrollToIndex out of range: requested index -1 but maximum is 5`
    
    The above error messages will confuse us. I clarified the boudaries and separated the error messages
    
    ## Changelog
    
    [General] [Fixed] - Clarified the boundaries in error message of scrollToIndex
    Pull Request resolved: facebook#28464
    
    Test Plan:
    I added 3 test cases to cover the new error messages for VirtualizedList.
    Run `yarn test` and confirm it passes.
    
    Reviewed By: cpojer
    
    Differential Revision: D21140133
    
    Pulled By: TheSavior
    
    fbshipit-source-id: 9a7a704f7ec599d833d2ed3ca2be059d950539b5
    sasurau4 authored and facebook-github-bot committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    78d2b3c View commit details
    Browse the repository at this point in the history
  4. Reject promise when if an error occurs while processing prefetching r…

    …esult
    
    Summary:
    This diff rejects the promise when if an error occurs while processing prefetching result, it applies the same concept as other methods in this class (e.g. see getSizeWithHeaders)
    
    changelog: [internal][Android] Internal change in RN Image prefetching
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21295612
    
    fbshipit-source-id: c3675e5f2d9c8e38094a538b388ff63a6ea18360
    mdvacca authored and facebook-github-bot committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    e9f29a3 View commit details
    Browse the repository at this point in the history
  5. Add hostname to loading banner on iOS

    Summary:
    This diff adds a hostname to the loading banner on iOS so it's clear which server you're loading from.
    
    Changelog: [Added] [iOS] Added hostname to loading banner.
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D21280252
    
    fbshipit-source-id: d7733c056f5fb63e32b247a4fa1476ab42c7da17
    rickhanlonii authored and facebook-github-bot committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    9699933 View commit details
    Browse the repository at this point in the history
  6. Update loading banner text and colors

    Summary:
    This diff updates the loading banner text and color on iOS for better UX.
    
    Flow before:
    - Loading from localhost:8081...
    - Loading 20% (1000/5000)...
    - Downloading JavaScript Bundle 20% (10/50)
    - Downloading JavaScript Bundle...
    
    After:
    - Loading from Metro...
    - Bundling 20%...
    - Downloading 20%...
    - Downloading...
    
    Changelog: [Added] [iOS] Updated loading banner messages and color
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D21279939
    
    fbshipit-source-id: fd7d90f85e25ce175a87087dfccf2180d49e3e98
    rickhanlonii authored and facebook-github-bot committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    3729fe8 View commit details
    Browse the repository at this point in the history
  7. Do not update loading banner message while hiding

    Summary:
    This diff fixes an issue where the loading banner message could update while the banner hide animation is going, catching your eye for no reason.
    
    Changelog: [Fixed] [iOS] Do not update loading banner message while hiding
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D21280786
    
    fbshipit-source-id: a10b33cd72f263d08eea6d8e94963514affbe24d
    rickhanlonii authored and facebook-github-bot committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    131c497 View commit details
    Browse the repository at this point in the history
  8. Delay loading banner inital message by 200ms to prevent flashing

    Summary:
    This diff fixes an issue where the initial "Loading from Metro..." message is flashed for a few milliseconds before the download progress kicks in. It's just jarring enough to be noticed and is ~600ms too fast to be read.
    
    This diff adds a delay so that if the loading progress starts within 200ms we go straight to the progress.
    
    Changelog: [Fixed] [iOS] Delay loading banner message to prevent flashing messages
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D21281870
    
    fbshipit-source-id: d28c1eae01c2ac9d79f356f1870f17dbb22a9d84
    rickhanlonii authored and facebook-github-bot committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    2b771b0 View commit details
    Browse the repository at this point in the history
  9. Speed up loading banner animations

    Summary:
    This diff reduces the minimum loading banner time and animation time to make the locating banner faster.
    
    Changelog: [General] [iOS] Speed up loading banner animations
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D21290517
    
    fbshipit-source-id: 111dff41df53b0246548e1da1db80c2188498a9c
    rickhanlonii authored and facebook-github-bot committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    3fb37b4 View commit details
    Browse the repository at this point in the history
  10. Guard all debug logs behind an MC

    Reviewed By: PeteTheHeat
    
    Differential Revision: D21292280
    
    fbshipit-source-id: 1701a945f126f35a53417b57e3162372d39e75f1
    RSNara authored and facebook-github-bot committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    97bc084 View commit details
    Browse the repository at this point in the history
  11. Don't allow download percentage to exceed expectations

    Summary:
    This diff updates the loading banner to protect against showing percentages over 100%
    
    Changelog: [Fixed] [iOS] Cap loading bar percentage at 100%
    
    Reviewed By: shergin
    
    Differential Revision: D21295809
    
    fbshipit-source-id: 343f53acafa126800367444562730eff4ae67af4
    rickhanlonii authored and facebook-github-bot committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    e27542b View commit details
    Browse the repository at this point in the history
  12. cleanup unused TODO

    Summary:
    Task is closed, I'm removing the TODO. I verified that the soft error is not being triggered
    
    changelog:[Internal][Android] Internal cleanup of fabric android
    
    Reviewed By: sammy-SC
    
    Differential Revision: D21303999
    
    fbshipit-source-id: 11d4a14c71d27ffc70a6d3b955a21085dd11859b
    mdvacca authored and facebook-github-bot committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    d7299e8 View commit details
    Browse the repository at this point in the history
  13. Move DevSettingsActivity from main to debug (facebook#28770)

    Summary:
    As described in DevSettingsActivity, it should be added to the apps
    debug/ instead of main/ manifest.
    
    ## Changelog
    Android Changed - Move DevSettingsActivity from `main` to `debug` manifest
    Pull Request resolved: facebook#28770
    
    Test Plan: Tested locally by building example app
    
    Differential Revision: D21281922
    
    Pulled By: shergin
    
    fbshipit-source-id: ec4dc7c0ac54367aa38cca5b4146ef71cf18b73b
    Your Name authored and facebook-github-bot committed Apr 29, 2020
    Configuration menu
    Copy the full SHA
    d8e6c45 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2020

  1. Delete .clang-tidy for jscallinvoker

    Summary:
    `JSCallInvoker` doesn't exist anymore, because it was renamed to `CallInvoker`. So, this `.clang-tidy` dotfile isn't necessary.
    
    Changelog: [Internal]
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D21318061
    
    fbshipit-source-id: 8098eef670cae35bf3c027c91f18f45eb7bcd33a
    RSNara authored and facebook-github-bot committed Apr 30, 2020
    Configuration menu
    Copy the full SHA
    7566bb4 View commit details
    Browse the repository at this point in the history
  2. Enable Animated in Venice

    Summary:
    This diff extends venice app to render an Animation example test
    
    changelog: [Internal][Android] Internal change to enable Animated in RN Bridgless mode
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D21317630
    
    fbshipit-source-id: 9726fea9baba86191e63df909639d1d47ef5f359
    mdvacca authored and facebook-github-bot committed Apr 30, 2020
    Configuration menu
    Copy the full SHA
    f7e8838 View commit details
    Browse the repository at this point in the history
  3. Fabric: Changes in State reconciliation

    Summary:
    I spent the last several days thinking about state reconciliation issues, some crashes (T65586949) that suspiciously happen somewhere inside, and a bunch of issues that might be connected to that (possibly, some of T65516263 sub-task).
    
    I cannot see some obvious problems in the current state reconciliation algorithm that might cause the crash (because of some use-after-free or other pure C++ issues), but I suspect some of the problems we experience might be caused by some details of how we reconcile states.
    
    In the current approach, we rank all states based on the "hierarchical" history of their creation (state version is being calculated based on the version of the base tree). That's usually fine but in some cases when trees are being constructed concurrently, a logical version of a based tree does not correspond to the local version of a committed tree. In other words, the linear history of commits does not always correspond to the "hierarchical" history of trees generation that was done by different parties (e.g. React vs native state update pipeline).
    
    In this diff, I tried to change the approach to change the algorithm to follow this logic: If some state is `obsolete` (already been committed and then replaced with newer one), we replace that with the most recent one. This change does not introduce the `obsolete` flag; is already used by State infra to avoid cloning nodes with an outdated state.
    
    Interestingly, it fixes the issue with an empty BottomSheet on Android (T66177144). See the attached video. The hope is that it's also will
    
    This change theoretically might affect all things that use State, so it hard to predict what can break and how. So, if we don't see obvious problems here, I would set up a GK/QE and run the experiment in prod.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21295137
    
    fbshipit-source-id: e5613218d3e11a56623cab9bbf2540495b2b24e8
    shergin authored and facebook-github-bot committed Apr 30, 2020
    Configuration menu
    Copy the full SHA
    afc3c97 View commit details
    Browse the repository at this point in the history
  4. Fabric: Gating for new state reconciliation

    Summary:
    The change is gated by two QEs (iOS and Android).
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: mdvacca
    
    Differential Revision: D21317797
    
    fbshipit-source-id: 34bfd9546600d9cb3467bddfc61363a16683f81f
    shergin authored and facebook-github-bot committed Apr 30, 2020
    Configuration menu
    Copy the full SHA
    f746119 View commit details
    Browse the repository at this point in the history
  5. Replace duplicate code in AndroidInfoModule with call to AndroidInfoH…

    …elpers (facebook#28756)
    
    Summary:
    The AndroidInfoModule class defines a `getServerHost()` method that duplicates the logic in `AndroidInfoHelpers.getServerHost(context)`. This commit makes AndroidInfoModule call into AndroidInfoHelpers so that potential future changes to `AndroidInfoHelpers.getServerHost` don't need to be duplicated in `AndroidInfoModule.getServerHost`.
    
    ## Changelog
    
    [Android] [Changed] - Internal change to make `PlatformConstants` use the same method to determine `ServerHost` as other code paths
    Pull Request resolved: facebook#28756
    
    Test Plan: Tested by running the RNTester app and editing the root component to print out `NativeModules.PlatformConstants.getConstants()` and verified one of the properties was: `"ServerHost": "10.0.2.2:8081"`.
    
    Differential Revision: D21252158
    
    Pulled By: shergin
    
    fbshipit-source-id: b460197e5f1d972a5b91991c32a929294e358d9f
    ide authored and facebook-github-bot committed Apr 30, 2020
    Configuration menu
    Copy the full SHA
    d20ac69 View commit details
    Browse the repository at this point in the history
  6. Daily arc lint --take GOOGLEJAVAFORMAT

    Reviewed By: zertosh
    
    Differential Revision: D21325542
    
    fbshipit-source-id: d4c70da59c67c1f7dfcd36f06bbfe0eec5d4e824
    generatedunixname89002005287564 authored and facebook-github-bot committed Apr 30, 2020
    Configuration menu
    Copy the full SHA
    673cbb3 View commit details
    Browse the repository at this point in the history
  7. Set contentView's frame in setter

    Summary:
    In D20836890 we no longer set `_contentView.frame` inside `layoutSubviews`.
    
    This doesn't work well with component views that set their `contentView` after `updateLayoutMetrics` is called. For Example legacy interop which sets its contentView in the `finalizeUpdates` method. Other component views that set their contentView during initialisation are fine.
    
    Changelog: [Internal]
    
    Reviewed By: shergin
    
    Differential Revision: D21302108
    
    fbshipit-source-id: 5adcf489e4e650ac04b84c836a8f8d6f55a77267
    sammy-SC authored and facebook-github-bot committed Apr 30, 2020
    Configuration menu
    Copy the full SHA
    0569221 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2020

  1. Smaller loading bar based on feedback

    Summary:
    This diff removes the hostname from the loading bar and shrinks it down so it's inside the margins of the safe area view, never blocking app content inside the safe area.
    
    Changelog: [General] [iOS] Shrink loading bar down to not cover safe area.
    
    Reviewed By: shergin
    
    Differential Revision: D21339480
    
    fbshipit-source-id: e8416af63b7e06bcc21c7b6277d5d01d61eb3f73
    rickhanlonii authored and facebook-github-bot committed May 1, 2020
    Configuration menu
    Copy the full SHA
    f0dfd35 View commit details
    Browse the repository at this point in the history
  2. Reduce exposure of UIManagerModule in the NativeAnimatedNodesManager …

    …class
    
    Summary:
    This diff reduces exposure of UIManagerModule in the NativeAnimatedNodesManager class, this is necessary to enable NativeDriverAnimations in Venice
    
    changelog: [Internal][Android] Internal change to enable native driver animations in RN bridgless mode
    
    Reviewed By: ejanzer
    
    Differential Revision: D21317629
    
    fbshipit-source-id: 81cd4ade296de4757acefe566e1466154d6b4e4b
    mdvacca authored and facebook-github-bot committed May 1, 2020
    Configuration menu
    Copy the full SHA
    f82a6d7 View commit details
    Browse the repository at this point in the history
  3. Cleanup scheduleMountItem method

    Summary:
    scheduleMountItem supports multi threading now, cleanning up TODO
    
    changelog: [Internal][Android] Internal cleanup
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21318108
    
    fbshipit-source-id: dffac4d541bc2d0f781ddcb8f17f5d1b7e44b79b
    mdvacca authored and facebook-github-bot committed May 1, 2020
    Configuration menu
    Copy the full SHA
    919554f View commit details
    Browse the repository at this point in the history
  4. Cleanup ReactRootView

    Summary:
    This diff removes the variable 'useSurface' which wasn't beeing used in ReactRootView anymore
    
    changelog: [Internal][Android] Internal cleanup of ReactRootView
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21318109
    
    fbshipit-source-id: f850b27811608d16b22b6a3964455b172705c4c7
    mdvacca authored and facebook-github-bot committed May 1, 2020
    Configuration menu
    Copy the full SHA
    09487e4 View commit details
    Browse the repository at this point in the history
  5. Set layout metrics during initial render of Fabric

    Summary:
    This diff refactors the initial render of Fabric in order to set the layout metrics as we start the surface.
    
    This prevents to create an additional fabric commit during initial render. Also this migth help fixing T63495589 (I wasn't able to repro T63495589 again when using this diff)
    
    changelog: [Internal][Android] Internal change to reduce the amount of commits during initial render of Fabric
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21330072
    
    fbshipit-source-id: 758c49b52ea4c12d5623b7c7d68c7318f4a6cd83
    mdvacca authored and facebook-github-bot committed May 1, 2020
    Configuration menu
    Copy the full SHA
    65d52a5 View commit details
    Browse the repository at this point in the history
  6. Use InteropLayer for ReactART

    Summary:
    Changelog: [Internal]
    
    Use InteropLayer to bridge ReactART into Fabric.
    
    Reviewed By: shergin
    
    Differential Revision: D21302151
    
    fbshipit-source-id: 46deb381389c6fa87ecad296f616fbaccb29fe30
    sammy-SC authored and facebook-github-bot committed May 1, 2020
    Configuration menu
    Copy the full SHA
    2047041 View commit details
    Browse the repository at this point in the history
  7. fix duration calculation for RCTUIImageViewAnimated

    Summary:
    ## Changelog:
    [iOS] [Fixed] - Fix duration calculation for RCTUIImageViewAnimated
    
    Reviewed By: p-sun, shergin
    
    Differential Revision: D21321089
    
    fbshipit-source-id: 7464231bbc3b90e70d3ba95288fd90707d3d24af
    Boyang Yu authored and facebook-github-bot committed May 1, 2020
    Configuration menu
    Copy the full SHA
    12f8b25 View commit details
    Browse the repository at this point in the history
  8. Update cocoapods, fix RNTester

    Summary:
    Updating pods and fixing an issue in the RN podfile.
    
    Changelog: [iOS][Fixed] Update podfile for RNTester
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D21336180
    
    fbshipit-source-id: 4d51f53466ec2d432cf7a5775cb4d69d47423077
    Emily Janzer authored and facebook-github-bot committed May 1, 2020
    Configuration menu
    Copy the full SHA
    c25911b View commit details
    Browse the repository at this point in the history
  9. Bump @react-native-community/eslint-config in new app template

    Summary: Changelog: [Changed][General] Update react-native-community/eslint-config to 1.1.0, adding the new color rule
    
    Reviewed By: rickhanlonii
    
    Differential Revision: D21342153
    
    fbshipit-source-id: ac1367353d4d3e69b6df29dc16f9fcb60cde3519
    TheSavior authored and facebook-github-bot committed May 1, 2020
    Configuration menu
    Copy the full SHA
    780f06c View commit details
    Browse the repository at this point in the history
  10. Fabric: Fixing executeSynchronouslyOnSameThread_CAN_DEADLOCK

    Summary:
    In D20551411 we (I) replaced `std::mutex` with `std::recursive_mutex` in `executeSynchronouslyOnSameThread_CAN_DEADLOCK` in order to support synchronous `RuntimeExecutor`. It turned out that the idea was cool but totally incorrect. Quite obviously, double locking recursive mutex on the same thread does nothing, so the whole setup does not work at all.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: sammy-SC
    
    Differential Revision: D21328072
    
    fbshipit-source-id: 7f1f81de61c36adb167fe624ada3bd71913bdf7c
    shergin authored and facebook-github-bot committed May 1, 2020
    Configuration menu
    Copy the full SHA
    56592c5 View commit details
    Browse the repository at this point in the history
  11. Revert D21336180: Update cocoapods, fix RNTester

    Differential Revision:
    D21336180
    
    Original commit changeset: 4d51f53466ec
    
    fbshipit-source-id: 5519bc0457f14060e793d2da454489b77fce923f
    Emily Janzer authored and facebook-github-bot committed May 1, 2020
    Configuration menu
    Copy the full SHA
    bf0539f View commit details
    Browse the repository at this point in the history

Commits on May 2, 2020

  1. Refactor ReactCallerContextFactory to recive surfaceID as a parameter

    Summary:
    This diff refactors the ReactCallerContextFactory class to recive surfaceID as a parameter instead of ThemedReactContext
    This is necessary for the next diff of the stack
    
    changelog: [Internal][Android]
    
    Reviewed By: fkgozali
    
    Differential Revision: D21362265
    
    fbshipit-source-id: d0079788049fe86d2873eb6aa4bf1115b33457af
    mdvacca authored and facebook-github-bot committed May 2, 2020
    Configuration menu
    Copy the full SHA
    8c45255 View commit details
    Browse the repository at this point in the history
  2. Inject Fresco.ImagePipeline into ImageLoaderModule

    Summary:
    This diff injects Fresco.ImagePipeline into ImageLoaderModule in order to ensure prefetching uses the same ImagePipeline than ReactImageView
    
    changelog: [internal][Android]
    
    Reviewed By: fkgozali
    
    Differential Revision: D21362267
    
    fbshipit-source-id: d6f55cffb6be6a012c2afb4ad5db2072bc7100ec
    mdvacca authored and facebook-github-bot committed May 2, 2020
    Configuration menu
    Copy the full SHA
    3da8103 View commit details
    Browse the repository at this point in the history
  3. Extend logging of image prefetching to include react_native contextChain

    Summary:
    This diff extends the logging of image prefetching to include react_native ID in the ContextChain of the Fresco logger.
    
    This is necesary to properly assign pre-fetching of RN Android images to the react_native ID
    
    changelog: [Internal][Android]
    
    Reviewed By: fkgozali
    
    Differential Revision: D21362266
    
    fbshipit-source-id: ff64f0ebd12f61b713996558eb2d962f96ad8d94
    mdvacca authored and facebook-github-bot committed May 2, 2020
    Configuration menu
    Copy the full SHA
    eb60019 View commit details
    Browse the repository at this point in the history
  4. Fix Fb4aReactPackageTest.testGetNativeModulesByName test

    Summary:
    This diff refactors the ImageLoaderModule class in order to prevent early execution of Fresco.getImagePipeline method when prefetching MC is disabled (see stack D21362266)
    
    changelog: [Internal][Android]
    
    Reviewed By: shergin
    
    Differential Revision: D21368516
    
    fbshipit-source-id: 53f99cd3c3f4848364182cb954a8d34821cb6d9e
    mdvacca authored and facebook-github-bot committed May 2, 2020
    Configuration menu
    Copy the full SHA
    03385ac View commit details
    Browse the repository at this point in the history

Commits on May 3, 2020

  1. Remove docs from jscodeshift

    Summary:
    I removed 1 MiB from `jscodeshift` as it was shipping with docs: facebook/jscodeshift@5885662
    
    Changelog: [Internal]
    
    Reviewed By: yungsters
    
    Differential Revision: D21368889
    
    fbshipit-source-id: 452fd4cedcc749d972adbb69df5c95117dd55b15
    cpojer authored and facebook-github-bot committed May 3, 2020
    Configuration menu
    Copy the full SHA
    1787c16 View commit details
    Browse the repository at this point in the history
  2. iOS: when the bridge has been invalidated, NativeModule lookup should…

    … just return nil
    
    Summary:
    There's a corner case where:
    * The bridge gets invalidated, and native modules are cleaning up themselves (but not done yet)
    * Something asks for a NativeModule instance - ideally it should just get nil at this point
    * If TM Manager is invalidating, we get nil correctly, but we continue thru the old NativeModule lookup logic
    * The latter will fail anyway, and would throw a redbox (RCTLogError).
    
    So, if the bridge is invalidated, if TM Manager returns nil, we should just return nil for old NativeModule lookup.
    
    The module of interest is RCTImageLoader, which was requested by RCTImageView on deallocation. The problem is RCTImageView got dealloc'ed **after** the bridge has been invalidated, so the lookup would always fail...
    
    Bonus: RCTImageView should just keep a weak ref to the RCTImageLoader, so that:
    * if the imageLoader is still alive on image dealloc, it can still access them (last minute "meaningless" cleanup)
    * if the imageLoader is gone, then the image deallocation doesn't do anything
    
    Changelog: [iOS] [Fixed] - Fix module lookup race condition on bridge invalidation.
    
    Reviewed By: p-sun, sammy-SC
    
    Differential Revision: D21371845
    
    fbshipit-source-id: 862dc07de18ddbfb90e87e24b8dbd001147ddce4
    fkgozali authored and facebook-github-bot committed May 3, 2020
    Configuration menu
    Copy the full SHA
    8ad8107 View commit details
    Browse the repository at this point in the history
  3. Fix invalid type annotations

    Summary:
    Our parsers accept these but they are invalid. This fixes them.
    
    Changelog: [Internal]
    
    Reviewed By: yungsters
    
    Differential Revision: D21373812
    
    fbshipit-source-id: 6084757b9f842644fe629ae5e6d85baec611588d
    cpojer authored and facebook-github-bot committed May 3, 2020
    Configuration menu
    Copy the full SHA
    87d000f View commit details
    Browse the repository at this point in the history

Commits on May 4, 2020

  1. Fixes TextInput shaking when typing Chinese (facebook#28805)

    Summary:
    Fixes facebook#28488.
    
    ## Changelog
    
    [iOS] [Fixed] - Fixes TextInput shaking when typing Chinese
    Pull Request resolved: facebook#28805
    
    Test Plan: Demo see facebook#28488.
    
    Differential Revision: D21376803
    
    Pulled By: shergin
    
    fbshipit-source-id: b1fe6cc5f67d42ef98a6c12b8ab9990feac0e2a7
    zhongwuzw authored and facebook-github-bot committed May 4, 2020
    Configuration menu
    Copy the full SHA
    9cdc19a View commit details
    Browse the repository at this point in the history
  2. VirtualizedList: Migrate to React.Context

    Summary:
    Migrates `VirtualizedList` off legacy context by creating `VirtualizedListContext`.
    
    Changelog:
    [General][Changed] - Migrated `virtualizedList` legacy context to `React.Context`.
    
    Reviewed By: TheSavior
    
    Differential Revision: D21370882
    
    fbshipit-source-id: 2fa99ee0bc0e6b747a2d3fe7c66ee402c6b9c5af
    yungsters authored and facebook-github-bot committed May 4, 2020
    Configuration menu
    Copy the full SHA
    7bd694f View commit details
    Browse the repository at this point in the history
  3. VirtualizedList: Remove PropTypes Dependency

    Summary:
    Removes `PropTypes` as a dependency of `VirtualizedList` by no longer validating the return value of `getItemLayout`.
    
    Changelog: [Internal]
    
    Reviewed By: TheSavior, cpojer
    
    Differential Revision: D21370890
    
    fbshipit-source-id: 966db3557b714987aa91179c7654a5ebf27818ad
    yungsters authored and facebook-github-bot committed May 4, 2020
    Configuration menu
    Copy the full SHA
    ddea7c7 View commit details
    Browse the repository at this point in the history
  4. Remove @babel/preset-env

    Summary:
    `babel/preset-env` pulls in a number of unused deps, like `caniuse-lite` (3 MiB) that knows about which browsers support certain features. We do not ship to browsers and always know which version of node we are using, so we don't need to pull this in.
    
    I changed `jscodeshift` to optionally depend on `babel/preset-env` instead of always pulling it in.
    
    This reduces node_modules by 7 MiB.
    
    Changelog: [Internal]
    
    Reviewed By: yungsters
    
    Differential Revision: D21374475
    
    fbshipit-source-id: 6f55e96e990ec0ca12f17bb3657bfa5429796b93
    cpojer authored and facebook-github-bot committed May 4, 2020
    Configuration menu
    Copy the full SHA
    8acb2b3 View commit details
    Browse the repository at this point in the history
  5. Add prepareForReuse to RCTSafeAreaViewComponentView

    Summary:
    Changelog: [internal]
    
    As part of recycle, we should delete state. This is a common pattern used in other components as well.
    
    Reviewed By: shergin
    
    Differential Revision: D21348782
    
    fbshipit-source-id: a5dee2f4ccee9b19498db31dab1983d8879dca71
    sammy-SC authored and facebook-github-bot committed May 4, 2020
    Configuration menu
    Copy the full SHA
    577fdea View commit details
    Browse the repository at this point in the history
  6. chore: remove Kotlin version from the default template (facebook#28626)

    Summary:
    The default application requires Kotlin version that is not supported by the Gradle plugin (should be at least `1.3.10`). However, instead of upgrading, we should remove it entirely. Here's why.
    
    This commit facebook@29d3dfb introduced Detox for RNTester Android application.
    
    Since the commit doesn't mention Detox for the default application and there are no Detox tests present by default in the default application, I believe that this addition was performed by a mistake.
    
    The best way is to remove Kotlin from the default template. This step is described in the Detox documentation and all users that are integrating Detox will be asked to perform it anyway. No need to do it for them.
    
    ## Changelog
    
    [ANDROID] [INTERNAL] - remove Kotlin from the default template
    Pull Request resolved: facebook#28626
    
    Test Plan: Building a brand new project with `master` should work
    
    Differential Revision: D21388961
    
    Pulled By: shergin
    
    fbshipit-source-id: 92666aa67f92b29f4e7f9c036b332bd058cdd49e
    grabbou authored and facebook-github-bot committed May 4, 2020
    Configuration menu
    Copy the full SHA
    ced959b View commit details
    Browse the repository at this point in the history
  7. Fix Optimized Differ (was generating extraneous Create mutations)

    Summary:
    When we call `.erase` on the TinyMap, it sets the key of the element to 0. When we call `.begin()` later, TinyMap will sometimes, but not always, clean up the underlying Vector. This means that *most* of the time, underlying erased elements will be removed from the Vector; but sometimes erased elements will still be there when iterating over it.
    
    This was causing us to generate extra "Create" mutations.
    
    To fix this, for now we just check for zeroed-out elements when iterating over the vector.
    
    Changelog: [Internal]
    
    Reviewed By: mdvacca
    
    Differential Revision: D21389371
    
    fbshipit-source-id: 1e641050987d40a3f3e31499dcb373cfb28ae6f8
    JoshuaGross authored and facebook-github-bot committed May 4, 2020
    Configuration menu
    Copy the full SHA
    d815be1 View commit details
    Browse the repository at this point in the history
  8. Add warning when scrollRef does not have a scrollTo method

    Summary:
    Add a `console.warn()` call when calling `_scrollRef.scrollTo`, because `scrollTo` is not guaranteed to exist on `_scrollRef`.
    
    Context:
    `VirtualizedList` holds `_scrollRef`, which is usually a reference to a `ScrollView` component. However, there are several cases where it holds a `View` or other type of component instead.
    
    A custom component can be passed in to `renderScrollComponent`, and then `_scrollRef` will point to that custom component. Additionally, if two VirtualizedLists are nested with the same orientation, `_defaultRenderScrollComponent` will return a View instead of a ScrollView.
    
    Due to these possibilities, `_scrollRef` is not guaranteed to have a `scrollTo` method.
    
    Changelog: [General] [Added] - Add warning when scrollRef does not have a scrollTo method
    
    Reviewed By: JoshuaGross, TheSavior
    
    Differential Revision: D21386842
    
    fbshipit-source-id: 01e167e0ae0edea8f29853e8b242ce88a5103b49
    kacieb authored and facebook-github-bot committed May 4, 2020
    Configuration menu
    Copy the full SHA
    7f2515e View commit details
    Browse the repository at this point in the history
  9. Don't use #import in C++ Code (facebook#28825)

    Summary:
    While #import is common in Objective C, it's a vendor specific extension in C++, only supported by GCC/Clang, and only when -pedantic is off. Its use causes build breaks with MSVC. Replace it with the standard #include.
    
    ## Changelog
    
    [Internal] [Fixed] - Don't use #import in C++ Code
    Pull Request resolved: facebook#28825
    
    Test Plan: We've ben running this change within react-native-windows for some time.
    
    Differential Revision: D21391233
    
    Pulled By: shergin
    
    fbshipit-source-id: c0f94f314c46d6ac24067bbdcd5aaaeec9da283f
    NickGerleman authored and facebook-github-bot committed May 4, 2020
    Configuration menu
    Copy the full SHA
    30a89f3 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2020

  1. Fix unit test compilation on Android

    Summary:
    Before, compilation fails with P130281113. After fixing BUCK target, fails with P130281201.
    
    After all changes, the tests succeed.
    
    Changelog: [Internal]
    
    Reviewed By: mdvacca
    
    Differential Revision: D21390996
    
    fbshipit-source-id: c85aa43b3ef7fc9642d226ae706c937b2a5a408d
    JoshuaGross authored and facebook-github-bot committed May 5, 2020
    Configuration menu
    Copy the full SHA
    ca144fc View commit details
    Browse the repository at this point in the history
  2. Support calling LayoutAnimation APIs in Fabric from JS

    Summary:
    Call Fabric's LayoutAnimation APIs from JS.
    
    Changelog: [Internal] A step towards supporting LayoutAnimations on Fabric
    
    Reviewed By: shergin, mdvacca
    
    Differential Revision: D21297975
    
    fbshipit-source-id: 6d530b01d8152e7c803a7c0299b918a32fb39dc0
    JoshuaGross authored and facebook-github-bot committed May 5, 2020
    Configuration menu
    Copy the full SHA
    aae38c3 View commit details
    Browse the repository at this point in the history
  3. Differ: fix TinyMap to prevent possible crashes in find() and `begi…

    …n()`, and prevent erased elements from being iterated over
    
    Summary:
    The core issue solved in D21389371 was that erased elements of a TinyMap were being iterated over, because TinyMap has somewhat-complicated logic around cleaning out the underlying vector. In some very marginal cases, vectors were not being cleaned and an iterator pointing at erased elements was being returned.
    
    The diff prevents some possible crashes in `begin()` and `find()` while making it much less likely to iterate over erased elements.
    
    We also add a unit test to catch the case fixed in D21389371, in particular.
    
    We also are keeping the code added in D21389371 (for now) since it's a cheap check, and will be a safeguard until we have rigorous testing around TinyMap. To be clear that logic should noop currently, but will prevent crashes in case guarantees around TinyMap change in the future.
    
    Currently there is only one line of code that actually uses the TinyMap iterator, so this should be safe.
    
    Reviewed By: shergin
    
    Differential Revision: D21392762
    
    fbshipit-source-id: 36dc998958c230fad01af93338974f8889cbcf55
    JoshuaGross authored and facebook-github-bot committed May 5, 2020
    Configuration menu
    Copy the full SHA
    bb5d043 View commit details
    Browse the repository at this point in the history
  4. Allow passing partial contentOffset to ScrollView on Android (faceboo…

    …k#28817)
    
    Summary:
    Since support for contentOffset was added to horizontal ScrollView on android (30cc158) I'm seeing a crash in my app because of a library. What happens is that it passes a partial object for contentOffset so something like `{x: 1}` which causes a crash on Android.
    
    According to the flow types the object should always contain both x and y but I think we should preserve the runtime behaviour and just use 0 like iOS does.
    
    ## Changelog
    
    [Android] [Fixed] - Allow passing partial contentOffset to ScrollView on Android
    Pull Request resolved: facebook#28817
    
    Test Plan: Tested that passing partial object for contentOffset does not crash.
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21396319
    
    Pulled By: shergin
    
    fbshipit-source-id: 4b52c868e3bfe183ff7f68a76ac34d1abd5e1069
    janicduplessis authored and facebook-github-bot committed May 5, 2020
    Configuration menu
    Copy the full SHA
    0348953 View commit details
    Browse the repository at this point in the history
  5. Pass initial props to WrapperComponent

    Summary:
    `renderApplication` receives the root component that we need to render and an optional wrapper component. There are cases where we want to use the initial props passed to the root component in the wrapper component as well (e.g.: to provide a specific context to the root component), so this adds modifies `AppContainer` to accept the initial props and inject them into the wrapper component.
    
    Changelog: [General] [Added] - Modified `renderApplication` to forward `initialProps` to `WrapperComponent`
    
    Reviewed By: fkgozali
    
    Differential Revision: D21347486
    
    fbshipit-source-id: 1c4f702a3875077630de1a44d3ac9ef2c80bc10c
    rubennorte authored and facebook-github-bot committed May 5, 2020
    Configuration menu
    Copy the full SHA
    4f5a092 View commit details
    Browse the repository at this point in the history
  6. Upgrade to Jest 26

    Summary:
    * Brings performance improvements from 25.5.x
    * Reduces node_modules by 3 MiB, see https://github.com/facebook/jest/pull/9950/files?short_path=63580dd#diff-63580dd1e7078ce037f10f2fee7553b9
    * Breaking changes: https://github.com/facebook/jest/blob/master/CHANGELOG.md
    
    Changelog: [Internal]
    
    Reviewed By: rubennorte
    
    Differential Revision: D21369069
    
    fbshipit-source-id: 81a9d50f8e541293a85ce3957cb962930ca05b11
    cpojer authored and facebook-github-bot committed May 5, 2020
    Configuration menu
    Copy the full SHA
    1740233 View commit details
    Browse the repository at this point in the history
  7. Make column match fuzzy

    Summary:
    We are currently very strict about breakpoint location matching. This
    diff allows some fuzz in the column, but not in the line.
    
    Changelog: [Internal] Setting Hermes breakpoints no longer requires exact column match
    
    Reviewed By: avp
    
    Differential Revision: D21343198
    
    fbshipit-source-id: a59786a9d63f9fe1ed576835ed660ba3343affe1
    willholen authored and facebook-github-bot committed May 5, 2020
    Configuration menu
    Copy the full SHA
    4459c08 View commit details
    Browse the repository at this point in the history
  8. Fix type of exported Touchables: ComponentType -> AbstractComponent (f…

    …acebook#28737)
    
    Summary:
    Fixes facebook#28726
    
    When importing TouchableOpacity, it is treated as any by Flow. Replacing ComponentType with AbstractComponent works.
    
    The [Flow documentation](https://flow.org/en/docs/react/types/#toc-react-componenttype) says the following about ComponentType:
    > Note: In 0.89.0+, React.ComponentType is an alias for React.AbstractComponent<Config, any>, which represents a component with config type Config and any instance type.
    
    So I'm thinking that since the instance type is treated as any with ComponentType, Flow treats TouchableOpacity as any as well.
    
    ## Changelog
    
    <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
    https://github.com/facebook/react-native/wiki/Changelog
    -->
    
    [General] [Fixed] - Fix Touchable{Opacity,Bounce,Highlight} being exported as `any` (Flow)
    Pull Request resolved: facebook#28737
    
    Test Plan: I have done the same changes to react-native in my project's node_modules and seen that the components TouchableOpacity went from any to AbstractComponent with some props. Now I have a bunch of errors because I'm sending in wrong props to some touchables, which is good!
    
    Reviewed By: cpojer
    
    Differential Revision: D21362601
    
    Pulled By: TheSavior
    
    fbshipit-source-id: 5b98cc79eaef034eccdb7f47242f9f44be2ef2b8
    draperunner authored and facebook-github-bot committed May 5, 2020
    Configuration menu
    Copy the full SHA
    de7f69a View commit details
    Browse the repository at this point in the history
  9. Import folly and adjust whitespace to match old codegen

    Summary:
    Import folly to handle optionals (`folly::Optional<__type__>`)
    
    Sort modules and indent generated code to match output from the old codegen. While not strictly necessary as these are generated files that should not be edited by hand, I found that matching the old codegen in this regard made it less of a chore when it came to comparing the output of both codebases.
    
    Changelog: [Internal]
    
    Reviewed By: RSNara
    
    Differential Revision: D21395231
    
    fbshipit-source-id: 289d617d7a2d93724456c80afea57a49c108cb9b
    hramos authored and facebook-github-bot committed May 5, 2020
    Configuration menu
    Copy the full SHA
    e8060ae View commit details
    Browse the repository at this point in the history

Commits on May 6, 2020

  1. Update native module specs

    Summary: As titled.
    
    Reviewed By: fkgozali
    
    Differential Revision: D21417307
    
    fbshipit-source-id: 7c6b0179f9f1a5108da241d181a24f707a083deb
    Emily Janzer authored and facebook-github-bot committed May 6, 2020
    Configuration menu
    Copy the full SHA
    edfd965 View commit details
    Browse the repository at this point in the history
  2. Smoother scrolling in ScrollView, HorizontalScrollView

    Summary:
    Android ScrollView/HorizontalScrollView `smoothScrollTo` contains some logic that, if called multiple times in a short amount of
    time, will treat all calls as part of the same animation and will not lengthen the duration
    of the animation. This means that, for example, if the user is scrolling rapidly, multiple
    pages could be considered part of one animation, causing some page animations to be animated
    very rapidly - looking like they're not animated at all.
    
    We use a custom animation to perform `smoothScrollTo` to improve the UX.
    
    This resolves a longstanding issue in non-Fabric RN, as well as Fabric, since this code is shared between the platforms.
    
    Changelog: [Update] Android ScrollView/HorizontalScrollView scrolls using custom animations instead of default Android `smoothScrollTo` implementation, leading to smoother scrolls for paginated ScrollViews
    
    Reviewed By: mdvacca
    
    Differential Revision: D21416520
    
    fbshipit-source-id: 6ebe63cb054a98336b6e81253d35623fe5522f89
    JoshuaGross authored and facebook-github-bot committed May 6, 2020
    Configuration menu
    Copy the full SHA
    10314fe View commit details
    Browse the repository at this point in the history
  3. Cleanup unused dependencies

    Reviewed By: kassens
    
    Differential Revision: D21281288
    
    fbshipit-source-id: cf566ad0628dc179b3753f2f25a11637c33dee24
    cpojer authored and facebook-github-bot committed May 6, 2020
    Configuration menu
    Copy the full SHA
    530dffa View commit details
    Browse the repository at this point in the history
  4. iOS: Animated image should animate at the same speed regardless of fr…

    …amerate
    
    Summary:
    In iOS 11, [CADisplayLink](https://developer.apple.com/documentation/quartzcore/cadisplaylink)'s frameInterval was deprecated in favor of preferredFramesPerSecond, but these two properties have different underlying assumptions.
    
    - set frameInterval to 2 for 30fps
    - set preferredFramesPerSecond to 30 for 30fps. When you use preferredFramesPerSecond, assume frameInterval is 1.
    
    This fix ensures gifs in <Image> component will animate at same speed regardless of framerate.
    
    Reviewed By: shergin
    
    Differential Revision: D21414014
    
    fbshipit-source-id: 40ab23bab1990cf65d2802830b6835f350999537
    p-sun authored and facebook-github-bot committed May 6, 2020
    Configuration menu
    Copy the full SHA
    b0d0e51 View commit details
    Browse the repository at this point in the history
  5. LogBox - Always display the first fatal error

    Summary:
    This diff fixes an off-by-one error probably caused by my font ligatures where when exactly two exceptions are thrown at the same time we would show the second exception instead of the first. If three or more were thrown, we would show the second.
    
    I also fixed some tests that had the wrong descriptions and wrong behavior enforced.
    
    Changelog: [Internal]
    
    Reviewed By: cpojer
    
    Differential Revision: D21413186
    
    fbshipit-source-id: 8e2940c89251dc042b10c6a2a2186089b6e7b53d
    rickhanlonii authored and facebook-github-bot committed May 6, 2020
    Configuration menu
    Copy the full SHA
    5066b66 View commit details
    Browse the repository at this point in the history
  6. Rename error titles

    Summary:
    Based on feedback we're updating these titles to be more clear for their source.
    
    Changelog: [Internal]
    
    Reviewed By: cpojer
    
    Differential Revision: D21413486
    
    fbshipit-source-id: c144e7f759a4ff263b7ec80fa643eeb8ffac741b
    rickhanlonii authored and facebook-github-bot committed May 6, 2020
    Configuration menu
    Copy the full SHA
    41f0d9b View commit details
    Browse the repository at this point in the history
  7. Moved some NativeModule JS specs to OSS

    Summary:
    For some reason the specs were internal, but the native impl is still in github. So let's move these to github for consistency.
    
    Changelog: [Internal]
    
    Reviewed By: hramos
    
    Differential Revision: D21419934
    
    fbshipit-source-id: f2c4486edca43c4348f3a3c6ce98f76a322bab0b
    fkgozali authored and facebook-github-bot committed May 6, 2020
    Configuration menu
    Copy the full SHA
    de667ff View commit details
    Browse the repository at this point in the history
  8. Deploy Flow v0.124.0 to xplat/js

    Summary:
    Changelog: [Internal]
    
    allow-large-files
    
    Reviewed By: samwgoldman, cpojer
    
    Differential Revision: D21413059
    
    fbshipit-source-id: f3d111b40bfb88c182eab022925f7ae2dc47bc6b
    nmote authored and facebook-github-bot committed May 6, 2020
    Configuration menu
    Copy the full SHA
    0c2c4bf View commit details
    Browse the repository at this point in the history
  9. RN: Workaround Fabric + Virtual Text Press Bug

    Summary:
    Workaround for a bug with Fabric when pressing on virtual text.
    
    Changelog:
    [Internal]
    
    (Note: this ignores all push blocking failures!)
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21432793
    
    fbshipit-source-id: fe20eeadd5365707fb71edae7a76d374e26b4c86
    yungsters authored and facebook-github-bot committed May 6, 2020
    Configuration menu
    Copy the full SHA
    d14b89b View commit details
    Browse the repository at this point in the history
  10. Fabric: Backward-compatible behaviour of measureInWindow and measure

    Summary:
    Before this change, in case of incorrect measurements, Fabric's implementation of `measure` and `measureInWindow` incorrectly returned negative height and width. Now it returns zeros (as classic React Native does).
    
    Fabric:
    This does not fix `measureLayout` called for virtual nodes. This is not so trivially to fix and it will be done separately.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: JoshuaGross, yungsters, mdvacca
    
    Differential Revision: D21433239
    
    fbshipit-source-id: fbaf5ee35c690506822c634daac4426542c2cdcf
    shergin authored and facebook-github-bot committed May 6, 2020
    Configuration menu
    Copy the full SHA
    fa5b4c9 View commit details
    Browse the repository at this point in the history
  11. Upgrade to Yargs 15

    Summary:
    Only breaking changes appear to be dropped Node 6 support: https://github.com/yargs/yargs/blob/master/CHANGELOG.md. Deduplicates quite a few copies of Yargs, yay!
    
    Changelog: [Internal]
    
    (Note: this ignores all push blocking failures!)
    
    Reviewed By: motiz88
    
    Differential Revision: D21426137
    
    fbshipit-source-id: b091e29ac2d9464d6ce9a716a99f7ae156a91a01
    cpojer authored and facebook-github-bot committed May 6, 2020
    Configuration menu
    Copy the full SHA
    21d7a35 View commit details
    Browse the repository at this point in the history
  12. Ez Extend logging of Fabric

    Summary:
    Quick diff to log of content of UpdateState mount item. This is useful for debugging. Note this will ONLY be logged when the constant FabricUIManager.IS_DEVELOPMENT_ENVIRONMENT is set to true
    
    changelog: [Internal][Android] internal log for fabric android
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21428345
    
    fbshipit-source-id: d000eb6dbdd39d15935fa2102072790e17372682
    mdvacca authored and facebook-github-bot committed May 6, 2020
    Configuration menu
    Copy the full SHA
    ff0c625 View commit details
    Browse the repository at this point in the history
  13. Fix measureLayout function for Virtual Nodes

    Summary:
    This diff fixes a NullPointerException thrown when calling measureLayout function on a virtual node.
    
    changelog: [Android] Fix measureLayout function for VirtualTexts
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21435030
    
    fbshipit-source-id: aba6d81f333464e49d2d769b111842e7ae8ce769
    mdvacca authored and facebook-github-bot committed May 6, 2020
    Configuration menu
    Copy the full SHA
    5c48c94 View commit details
    Browse the repository at this point in the history

Commits on May 7, 2020

  1. Update cocoapods (facebook#28833)

    Summary:
    Pull Request resolved: facebook#28833
    
    The checked-in RNTester podfile was generated using Cocoapods version 1.9.1. This doesn't match the version currently used in CircleCI, which is 1.8.4. In order to update the offline mirrors and land them without breaking CircleCI, it seems we need to switch back to 1.8.4. This diff updates the podfile back to 1.8.4 and updates the offline mirrors.
    
    Reviewed By: fkgozali
    
    Differential Revision: D21392989
    
    fbshipit-source-id: b14aa6e2798175534e9416410ba9d6877fb718c0
    Emily Janzer authored and facebook-github-bot committed May 7, 2020
    Configuration menu
    Copy the full SHA
    ca105f8 View commit details
    Browse the repository at this point in the history
  2. Fabric: Introducing RunLoopObserver

    Summary:
    `RunLoopObserver` is one of the core interfaces that bridge intrinsically platform-specific functionality to cross-platform React Native core. `RunLoopObserver` allows subscribing for notifications about changes in a run loop life cycle. Primarily it supposed to be used for observing UI (aka main) and JavaScript execution thread/run-loop.
    Having a `RunLoopObserver` implemented in a platform-specific manner allows building these components in a cross-platform manner:
    * Sync and async UI event delivery pipeline;
    * Timing for some animation engine;
    * Timers (probably additional features are required).
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: sammy-SC
    
    Differential Revision: D21341997
    
    fbshipit-source-id: 7ef61fb51f550dd0f2e89c64af657e0f0de029aa
    shergin authored and facebook-github-bot committed May 7, 2020
    Configuration menu
    Copy the full SHA
    d76e03f View commit details
    Browse the repository at this point in the history
  3. Fabric: Cross-platform implementation of SynchronousEventBeat and `…

    …AsynchronousEventBeat`
    
    Summary:
    `SynchronousEventBeat` and `AsynchronousEventBeat` are a cross-platform re-implementation of run loop related parts of `MainRunLoopEventBeat` and `RuntimeEventBeat` (iOS specific classes for now). In the future, they will replace iOS- and Android-specifc event beat classes.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: sammy-SC
    
    Differential Revision: D21341996
    
    fbshipit-source-id: 8eda9a5df537cd666b7728e32212a8bb5ddb3ab7
    shergin authored and facebook-github-bot committed May 7, 2020
    Configuration menu
    Copy the full SHA
    025b6a7 View commit details
    Browse the repository at this point in the history
  4. third-party | Move glog from xplat/third-party to third-party and cre…

    …ate temporary redirect.
    
    Summary:
    Move and create an empty rule that redirects as well, to handle //arvr rules
    Need to do this way, since ovrsource sync rules are in different repo.
    
    allow_many_files
    allow-large-files
    
    Steps:
    - [X] Move glog from xplat/third-party to /third-party
    - [ ] Update references in ovrsource to translate to //third-party instead of //xplat/third-party
    - [ ] Get rid of temporary rule
    - [ ] Update fbsource/third-party/glog to 0.3.5 (what we have in ovrsource)
    
    Changelog: [Internal] Update reference for glog from xplat/third-party to /third-party.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D21363584
    
    fbshipit-source-id: c1ffe2dd615077170b03d98dcfb77121537793c9
    nlutsenko authored and facebook-github-bot committed May 7, 2020
    Configuration menu
    Copy the full SHA
    f4815fb View commit details
    Browse the repository at this point in the history
  5. Fix Animated type

    Summary:
    - Fixed typing of Animated and fixed the callsites
    
    Changelog: [Internal]
    
    Reviewed By: kacieb
    
    Differential Revision: D21311870
    
    fbshipit-source-id: 386fb496ab00ef7917273dc3eb65e1ed76a8dd33
    rijn authored and facebook-github-bot committed May 7, 2020
    Configuration menu
    Copy the full SHA
    851644c View commit details
    Browse the repository at this point in the history
  6. Add virtual destructor to JSError

    Summary:
    We consume Hermes through multiple .so's, which means we have multiple (weak) typeinfo definitions of facebook::jsi::JSError. Previously we were using gnustl, which would strcmp typeinfo to decide whether a certain exception handler applies, which meant this didn't cause any major issues. However since this is deprecated, we recently switched to libc++, which does not have this by behaviour (or it does, but behind a flag I'm not sure how to enable). This causes any JS exceptions to fall through from our exception handlers and fatal the app.
    
    This problem is actually documented in the common Android NDK problems page: https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md#rtti_exceptions-not-working-across-library-boundaries
    
    The suggested solution is to ensure that any exception types have a key function defined (a non-pure, out-of-line virtual function). The simplest one to add is a virtual destructor. This makes the object file that holds the implementation of the destructor export a non-weak typeinfo definition which will at load time override the other weak versions.
    
    I'm not sure why we're the first to hit this. RN's JSIExecutor doesn't explicitly reference JSError which probably helps (https://github.com/facebook/react-native/blob/master/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp#L256-L258) and they also don't use unguarded callbacks like we do.
    
    Changelog: [Internal]
    
    Reviewed By: mhorowitz
    
    Differential Revision: D21426524
    
    fbshipit-source-id: 474284ada1ca2810045dc4402c420879447f9308
    javache authored and facebook-github-bot committed May 7, 2020
    Configuration menu
    Copy the full SHA
    e566c7e View commit details
    Browse the repository at this point in the history
  7. Handle initialProps as optional in renderApplication

    Summary:
    Pass a default empty object to `AppContainer` if no `initialProps` were passed to `renderApplication`.
    
    This prevents issues on Android, where we do not pass a default empty `initialProps` from native, as we do on iOS.
    
    Changelog: [General] [Fixed] - Handle nullish `initialProps` correctly in `renderApplication`
    
    Reviewed By: motiz88
    
    Differential Revision: D21448692
    
    fbshipit-source-id: 9630bdc2414532999abf3bf9da25047f0482fcab
    rubennorte authored and facebook-github-bot committed May 7, 2020
    Configuration menu
    Copy the full SHA
    26c120c View commit details
    Browse the repository at this point in the history
  8. Enable with CocoaPods :configuration (facebook#28796)

    Summary:
    ~~⚠️ Depends on facebook/flipper#1086 and a new Flipper release.~~
    Fixes facebook@17f025b#commitcomment-38831234
    
    Currently user’s are being told to add a definition of the `FB_SONARKIT_ENABLED` macro and examples, including those in stock React Native templates, set this for the user by making use of a `post_install` hook in the user’s `Podfile`. This leads to confusion, fragile code [when a user’s project dir structure deviates from vanilla], and is ultimately not necessary as CocoaPods already has dedicated mechanisms to:
    
    * specify build settings (through the `xcconfig` property);
    * and selectively include certain pods only in certain build configurations (e.g. debug).
    
    ## Changelog
    
    <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
    https://github.com/facebook/react-native/wiki/Changelog
    -->
    
    [iOS] [Changed] - Entirely control Flipper being enabled through inclusion in Podfile and optionally limiting to certain build configurations using the `:configuration` directive.
    Pull Request resolved: facebook#28796
    
    Test Plan: Tested using the changes of facebook/flipper#1086 in a new app that uses RN `master`.
    
    Reviewed By: priteshrnandgaonkar
    
    Differential Revision: D21449754
    
    Pulled By: passy
    
    fbshipit-source-id: 9ff7c7f4ffc32b364b1edd82b94e0b80c3997625
    alloy authored and facebook-github-bot committed May 7, 2020
    Configuration menu
    Copy the full SHA
    7bb1c4e View commit details
    Browse the repository at this point in the history
  9. Support excluding multiple platforms.

    Summary:
    Currently the schema only allows to exclude a single platform (iOS OR Android). There are cases where we need to exclude multiple. This change converts the previous `excludePlatform` string property into an `excludePlatforms` array.
    
    Changelog:
    [Internal][Changed] - Added support to exclude multiple platforms in Codegen.
    
    Reviewed By: sammy-SC
    
    Differential Revision: D21426950
    
    fbshipit-source-id: eff36ffa207109274794b4b300bf6313f8286161
    joaovieira authored and facebook-github-bot committed May 7, 2020
    Configuration menu
    Copy the full SHA
    16ea9ba View commit details
    Browse the repository at this point in the history

Commits on May 8, 2020

  1. Extend ParagraphAttribute to store the includeFontPadding prop

    Summary:
    This diff extends the ParagraphAttribute class to store the value of the includeFontPadding prop.
    Note that this is an Android only prop, I'm not creating android blocks to improve "cleanliness" of the code.
    
    changelog: [Internal][Fabric] Internal change in Fabric to support Text.includeFontPadding prop in fabric
    
    Reviewed By: shergin
    
    Differential Revision: D21446738
    
    fbshipit-source-id: 0543e86aa18ce10f7a56bbaafe111cce0179ea86
    mdvacca authored and facebook-github-bot committed May 8, 2020
    Configuration menu
    Copy the full SHA
    4e59508 View commit details
    Browse the repository at this point in the history
  2. Extend Text measurement to support includeFontPadding prop

    Summary:
    This diff exposes the Text.includeFontPadding prop to java, then it uses the prop to calculate the height of Text components correctly.
    
    changelog: [Internal][Fabric] Internal change in Fabric to support Text.includeFontPadding prop in fabric
    
    Reviewed By: shergin
    
    Differential Revision: D21446737
    
    fbshipit-source-id: efe73fb6b0d402c3275ac8c012fa8fa06b743bdd
    mdvacca authored and facebook-github-bot committed May 8, 2020
    Configuration menu
    Copy the full SHA
    561a97f View commit details
    Browse the repository at this point in the history
  3. Small refactor on text measure method

    Summary:
    Quick refactor of TextLayoutManager class
    
    changelog: [Internal]
    
    Reviewed By: shergin
    
    Differential Revision: D21446736
    
    fbshipit-source-id: a32bdf534b167e128c8c0054cf6a126131fa740a
    mdvacca authored and facebook-github-bot committed May 8, 2020
    Configuration menu
    Copy the full SHA
    11b9bad View commit details
    Browse the repository at this point in the history
  4. Handle optional return types/values

    Summary:
    Use folly to wrap optional return types and values as needed.
    
    Changelog: [Internal]
    
    Reviewed By: RSNara
    
    Differential Revision: D21395439
    
    fbshipit-source-id: a0e84e20717887e79a8565332a11fef42ebd3487
    hramos authored and facebook-github-bot committed May 8, 2020
    Configuration menu
    Copy the full SHA
    853dc04 View commit details
    Browse the repository at this point in the history
  5. Avoid redefining id when a property is named 'id'

    Summary:
    Handle properties named 'id' as a special case.
    
    An example of a native module that ran afoul of this is `ExceptionsManager`.
    
    Observe how the ExceptionsManager spec at `Libraries/Core/NativeExceptionsManager.js` defines the ExceptionData type as containing an `id` property:
    
    ```
    export type ExceptionData = {
      message: string,
      originalMessage: ?string,
      name: ?string,
      componentStack: ?string,
      stack: Array<StackFrame>,
      id: number,
      isFatal: boolean,
      // flowlint-next-line unclear-type:off
      extraData?: Object,
      ...
    };
    ```
    
    Prior to this change, the generated code would redefine id in the SpecReportExceptionData struct...
    
    ```
     namespace JS {
       namespace NativeExceptionsManager {
         struct SpecReportExceptionData {
           // ...redacted...
           double id() const; <---
           // ...redacted...
    
           SpecReportExceptionData(NSDictionary *const v) : _v(v) {}
         private:
           NSDictionary *_v;
         };
       }
     }
    ```
    
    ...which would result in a build time error:
    
    ```
     inline double JS::NativeExceptionsManager::SpecReportExceptionData::id() const
     {
       id const p = _v[@"id"];
       ^--- build time error here
       return RCTBridgingToDouble(p);
     }
    ```
    
    Comparing the above example  with the currently checked in `FBReactNativeSpec.h`, I see the expected output should be:
    
    ```
     namespace JS {
       namespace NativeExceptionsManager {
         struct SpecReportExceptionData {
           // ...redacted...
           double id_() const;
           // ...redacted...
    
           SpecReportExceptionData(NSDictionary *const v) : _v(v) {}
         private:
           NSDictionary *_v;
         };
       }
     }
    ```
    
    ...and...
    
    ```
    inline double JS::NativeExceptionsManager::SpecReportExceptionData::id_() const
     {
       id const p = _v[@"id"];
       return RCTBridgingToDouble(p);
     }
    ```
    
    Changelog: [Internal]
    
    Reviewed By: fkgozali
    
    Differential Revision: D21395463
    
    fbshipit-source-id: e412648013ff9f70ebd294b6f5f81f1faccb4604
    hramos authored and facebook-github-bot committed May 8, 2020
    Configuration menu
    Copy the full SHA
    6e88ab6 View commit details
    Browse the repository at this point in the history
  6. Eager initialize Fabric Android classes

    Summary:
    This diff eager initializes Fabric Android classes. This should help load all the Fabric classes at Bridge load time.
    
    changelog: [Internal]
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21460507
    
    fbshipit-source-id: 4b8d5c4e2d19e3a7eb3077027071e64ff16f1cbd
    mdvacca authored and facebook-github-bot committed May 8, 2020
    Configuration menu
    Copy the full SHA
    14a0f3f View commit details
    Browse the repository at this point in the history
  7. Remove Hermes.setPauseOnLoad message

    Summary:
    This removes the Hermes.setPauseOnLoad. It will be replaced by the more standard
    Debugger.setInstrumentationBreakpoint's "beforeScriptExecution" event.
    
    ChangeLog: [Internal] Remove Hermes.setPauseOnLoad message (to be replaced)
    
    Reviewed By: mhorowitz
    
    Differential Revision: D21418219
    
    fbshipit-source-id: 93c53801c23487f9336b322c2bd737663ec21b97
    willholen authored and facebook-github-bot committed May 8, 2020
    Configuration menu
    Copy the full SHA
    938aa86 View commit details
    Browse the repository at this point in the history
  8. Add support for Debugger.setInstrumentationBreakpoint

    Summary:
    This diff adds support for the "beforeScriptWithSourceMapExecution" instrumentation
    breakpoint via "Debugger.setInstrumentationBreakpoint".
    
    CDP describes it as a breakpoint, but we just set a flag in the inspector. A
    fake breakpoint ID is synthesized for optional removal later.
    
    Changelog: [Internal] Add Debugger.setInstrumentationBreakpoint to Hermes Inspector
    
    Reviewed By: mhorowitz
    
    Differential Revision: D21418218
    
    fbshipit-source-id: 90fa49c0954980993815322d3a7effee416ed5db
    willholen authored and facebook-github-bot committed May 8, 2020
    Configuration menu
    Copy the full SHA
    bf837d6 View commit details
    Browse the repository at this point in the history
  9. label react-native-github targets

    Summary:
    For internal code attribution.
    
    Changelog: [Internal]
    
    Reviewed By: zlern2k
    
    Differential Revision: D21468924
    
    fbshipit-source-id: 59cd2a52e0ae46bedbf54816820a5f40b684da8b
    fkgozali authored and facebook-github-bot committed May 8, 2020
    Configuration menu
    Copy the full SHA
    164d47f View commit details
    Browse the repository at this point in the history
  10. Add script to generate native modules specs with react-native-codegen

    Summary:
    Adds a script that uses `react-native-codegen` to generate FBReactNativeSpec.
    The generated output should not be considered ready for production use at this time.
    The goal of adding this script at this time is to demonstrate the current status of native modules specs code generation in open source.
    
    For example, the generated output may be used in RNTester, with some modifications due to some naming differences in react-native-codegen's output when compared to the FBReactNativeSpec files generated by the old codegen.
    
    Usage:
    
    ```
    ./scripts/generate-native-modules-specs.sh ./codegen-out
    ```
    
    Changelog: [Internal]
    
    Reviewed By: TheSavior
    
    Differential Revision: D21471004
    
    fbshipit-source-id: 5ff3c57807d9ba2c91dc7fe32d227d218732b059
    hramos authored and facebook-github-bot committed May 8, 2020
    Configuration menu
    Copy the full SHA
    91a49d8 View commit details
    Browse the repository at this point in the history
  11. Update .gitignore (facebook#28789)

    Summary:
    When you profile your heap and memory allocations with Memory Profiler, files with *.hprof extension are created in /android folder that has big sizes (up to 600 MB for each). These files may be needed to add to gitignore.
    
    ## Changelog
    
    <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
    https://github.com/facebook/react-native/wiki/Changelog
    -->
    
    [Android] [Added] - Add *.hprof files to gitignore
    Pull Request resolved: facebook#28789
    
    Differential Revision: D21432927
    
    Pulled By: hramos
    
    fbshipit-source-id: a20f12645de5ca0874c9130094e2f97fe16b2203
    enesozturk authored and facebook-github-bot committed May 8, 2020
    Configuration menu
    Copy the full SHA
    69ce9c2 View commit details
    Browse the repository at this point in the history
  12. Codegen: Add prepublish script to build Flow files (facebook#28827)

    Summary:
    *This is a follow-up to facebook#28645, redone using a build script based off of Metro's build script instead of using `flow-remove-types` and `flow-copy-source`.*
    
    This pull request adds a build step to `react-native-codegen` that builds the Flow-annotated JS files so that users of the NPM module `react-native-codegen` do not need to use require hooks to be able to import it.
    
    A new build script, `scripts/build.js` is added that builds every JS file in `src/` into a `lib/` folder, and also copies over the original Flow annotated files to `lib/` with a `.js.flow` extension, so users of `react-native-codegen` can still typecheck against it using Flow. The shell scripts in `src` are also copied over. It is based off of the [build script from Metro](https://github.com/facebook/metro/blob/00867816eb9b2f69c8af9cebb523e9e4d280671a/scripts/build.js)
    
    ## Changelog
    
    [General] [Added] - Codegen: Add prepublish script to build Flow files
    Pull Request resolved: facebook#28827
    
    Test Plan:
    I am able to make use of the Codegen scripts without needing to use the `flow-node` CLI or the `flow-remove-types/register`
    require hook.
    
    Reviewed By: cpojer
    
    Differential Revision: D21412173
    
    Pulled By: hramos
    
    fbshipit-source-id: 26ae67cdd04652ca4700a069a234a25558773cb1
    empyrical authored and facebook-github-bot committed May 8, 2020
    Configuration menu
    Copy the full SHA
    c67e1fe View commit details
    Browse the repository at this point in the history
  13. Remove RCTLogError from RCTScrollViewManager.calculateChildFrames

    Summary: Changelog: [Internal]
    
    Reviewed By: mdvacca
    
    Differential Revision: D21483553
    
    fbshipit-source-id: 0c681979a4988c36cfa6f05aa5bca896590f9e3d
    sammy-SC authored and facebook-github-bot committed May 8, 2020
    Configuration menu
    Copy the full SHA
    77d1380 View commit details
    Browse the repository at this point in the history
  14. Enable animations in bridgeless mode on iOS

    Reviewed By: ejanzer
    
    Differential Revision: D21465166
    
    fbshipit-source-id: b34e8e97330b897e20d9a4b05dba1826df569e16
    Peter Argany authored and facebook-github-bot committed May 8, 2020
    Configuration menu
    Copy the full SHA
    13ee5c4 View commit details
    Browse the repository at this point in the history
  15. Expose RuntimeExecutor on CatalystInstance (facebook#28851)

    Summary:
    Pull Request resolved: facebook#28851
    
    This diff creates a RuntimeExecutor that uses the bridge and exposes it on CatalystInstanceImpl.
    
    Changelog: [Internal]
    
    Reviewed By: mdvacca, RSNara
    
    Differential Revision: D21051949
    
    fbshipit-source-id: b3977fc14fa19089f33e297d29cedba0d067526d
    Emily Janzer authored and facebook-github-bot committed May 8, 2020
    Configuration menu
    Copy the full SHA
    a4a47b9 View commit details
    Browse the repository at this point in the history
  16. Inject ImagePipeline into FrescoModule

    Summary:
    This diff refactors the FrescoModule in order to receive an ImagePipeline as a parameter. This is necessary to ensure the same ImagePipeline is used by every RN module
    
    changelog: [Internal][Android]
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D21428346
    
    fbshipit-source-id: 70a6cc57c8585fe74b6d0b0d1fd86c539974ec23
    mdvacca authored and facebook-github-bot committed May 8, 2020
    Configuration menu
    Copy the full SHA
    f535c8b View commit details
    Browse the repository at this point in the history

Commits on May 9, 2020

  1. Fabric: Calling JSVM GC on memory pressure event on iOS

    Summary:
    This change is especially important for Fabric when a lot of objects (mostly `ShadowNode`s) have shared ownership. Without this change, JSVM could not know that bunch of natively allocated objects should be deallocated.
    
    Changelog: [Internal] Fabric-specific internal change.
    
    Reviewed By: dulinriley
    
    Differential Revision: D21484773
    
    fbshipit-source-id: 46e32de0f108082e60df346884c9287023156149
    shergin authored and facebook-github-bot committed May 9, 2020
    Configuration menu
    Copy the full SHA
    aece57b View commit details
    Browse the repository at this point in the history

Commits on May 10, 2020

  1. TextInput: Default blurOnSubmit in JS

    Summary:
    Consolidates the logic for the default value of `blurOnSubmit` on `TextInput` in the JavaScript component.
    
    This only materially impacts Fabric.
    
    Changelog:
    [Internal]
    
    Reviewed By: mdvacca
    
    Differential Revision: D21491482
    
    fbshipit-source-id: 16d8aba32e7d0321a4583e87e03405ea587e35d4
    yungsters authored and facebook-github-bot committed May 10, 2020
    Configuration menu
    Copy the full SHA
    a1ac251 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2021

  1. Configuration menu
    Copy the full SHA
    fd34ef0 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2021

  1. Configuration menu
    Copy the full SHA
    8f6b9fb View commit details
    Browse the repository at this point in the history
  2. Merge commit 'f0dfd35108dd3f092d46b65e77560c35477bf6ba' into amgleitm…

    …an/0.64-merge-2020-mm-dd
    amgleitman committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    78a3b4b View commit details
    Browse the repository at this point in the history
  3. Merge commit '03489539146556ec5ba6ba07ac338ce200f5b0f4' into amgleitm…

    …an/0.64-merge-2020-mm-dd
    amgleitman committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    eea1457 View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2021

  1. Merge commit 'a1ac2518a364ebcd3cc024a22229cadc1791e1c4' into amgleitm…

    …an/0.64-merge-2020-mm-dd
    amgleitman committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    a0e38c7 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2021

  1. Configuration menu
    Copy the full SHA
    e715297 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2021

  1. Configuration menu
    Copy the full SHA
    f092770 View commit details
    Browse the repository at this point in the history