Граф коммитов

20137 Коммитов

Автор SHA1 Сообщение Дата
Aditya Kumar c2c0581afb Enabling [-Werror,-Wunused-property-ivar] (#28895)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/28895

## Summary
Enabling [-Werror,-Wunused-property-ivar]

## Changelog
[Warning] [-Werror,-Wunused-property-ivar] Enable the warning

## Test Plan
Build

Reviewed By: jdthomas

Differential Revision: D20961613

fbshipit-source-id: 8ec73935384800581a71ad96957b716a0d894152
2020-05-15 08:52:39 -07:00
Tim Yung 505441fb2d JS: Fix Spelling of JavaScript
Summary:
Fixes some misspellings of JavaScript.

Changelog:
[Internal]

Reviewed By: cpojer

Differential Revision: D21536786

fbshipit-source-id: d5551dfbb3895d0806d31ba38ecaeeeb7843bf20
2020-05-15 00:39:01 -07:00
Keegan Mendonca 2b0208b399 Revert D21585006: Rename <ReactCommon/NativeModulePerfLogger.h> to <reactperflogger/NativeModulePerfLogger.h>
Differential Revision:
D21585006

Original commit changeset: e3339273af5d

fbshipit-source-id: cb4ff227edcc16842c7539bf71c912cd4ec478e0
2020-05-14 21:48:44 -07:00
David Vacca 84bca09f87 Fix position of TextInlineViews when nesting multiple Text components
Summary:
This diff fixes the position of TextInlineViews when nesting multiple Text.
The root is that we were not taking into consideration LayoutOffset of nested TextViews during the calculation of the nested views.

changelog: [Internal] Internal fix in Fabric

Reviewed By: JoshuaGross

Differential Revision: D21586893

fbshipit-source-id: 55e6ad0cf95222588ffe9185f5e22baea1059448
2020-05-14 21:42:37 -07:00
David Vacca cf171e4e04 Extend Binding to log only when a MC is enabled
Summary:
This diff integrates the logging of Binding class using a MC

changelog: [Internal] Internal change to control logging of Fabric

Reviewed By: JoshuaGross

Differential Revision: D21574813

fbshipit-source-id: e7b2acbaa4cb8a8e748db91af5c6960cd47b520e
2020-05-14 21:42:36 -07:00
David Vacca 756eec6cf5 Implement eager initialization of Fabric
Summary:
This diff implements the eager initialization of fabric based on the param created in previous diffs

changelog: [Internal] Internal change in Fabric

Reviewed By: JoshuaGross

Differential Revision: D21574815

fbshipit-source-id: 1dfd2611ce8c8529ce5f6a7a8c48f8bee19be256
2020-05-14 21:42:36 -07:00
David Vacca aba321b4fb Create new Feature flag to eager initialize Fabric
Summary:
This diff exposes a new react feature flag to eager initialize fabric

changelog: [Internal] Internal change in Fabric

Reviewed By: JoshuaGross

Differential Revision: D21574814

fbshipit-source-id: c74fb316963fe92e43ce0ca6262cb73a6a4acb7f
2020-05-14 21:42:36 -07:00
Ramanpreet Nara 9f3c7af400 Rename <ReactCommon/NativeModulePerfLogger.h> to <reactperflogger/NativeModulePerfLogger.h>
Summary:
## Motivation
This rename will fix the following CircleCI build failures:
- [test_ios_unit_frameworks](https://circleci.com/gh/facebook/react-native/150473?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link)
- [test_ios_detox_frameworks](https://circleci.com/gh/facebook/react-native/150474?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link)

## Investigation
We have 4 podspec targets that map to the same header namespace (i.e: `header_dir`) `ReactCommon`:
- **New:** `React-perflogger`: Directory is `ReactCommon/preflogger`, and contains `NativeModulePerfLogger.{h,cpp}`.
- `React-runtimeexecutor`: Directory is `ReactCommon/runtimeexecutor`, and contains only `RuntimeExecutor.h`
- `React-callinvoker`: Directory is `ReactCommon/callinvoker`, and contains only `CallInvoker.h`
- `ReactCommon/turbomodule/core`: Directory is `ReactCommon/turbomodule`, and contains C++ files, as well has header files.

**The problem:**
We couldn't import headers from `React-perflogger` in `ReactCommon/turbomodule/core` files.

**The cause:**
I'm not entirely sure why, but I was able to discern the following two rules by playing around with the podspecs:
1. If your podspec target has a cpp file, it'll generate a framework when `USE_FRAMEWORKS=1`.
2. Two different frameworks cannot map to the same `module_name` or `header_dir`. (Why? No clue. But something breaks silently when this is the case).

So, this is what happened when I landed `React-perflogger` (D21443610):
1. The TurboModules code generates the `ReactCommon` framework that uses the `ReactCommon` header namespace.
2. `React-runtimeexecutor` and `React-callinvoker` also used the `ReactCommon` header namespace. However, neither generate a framework because of Rule 1.
3. When I comitted `React-perflogger`, I introduced a second framework that competed with the `ReactCommon` framework (i.e: TurboModules code) for the `ReactCommon` header namespace. Rule 2 violation.

## Thoughts on renaming
- `<perflogger/NativeModulePerfLogger.h>` is too generic, and the `perflogger` namepsace is used internally within FB.
- `<react/perflogger/NativeModulePerfLogger.h>` matches our fabric header format, but I'm pretty sure that slashes aren't allowed in `header_dir`: I tested this and it didn't work. IIRC, only alphanumeric and underscore are valid characters for `header_dir` or `module_name`. So, I opted to just use `reactperflogger`.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D21585006

fbshipit-source-id: e3339273af5dfd65a1454d87213d1221de6a4651
2020-05-14 20:54:57 -07:00
Joshua Gross eb12cb5bbc Support interpolating `transform` View property
Summary:
For Fabric LayoutAnimations, we need to support interpolating the Transform property (which really ends up just being interpolation of ScaleX, ScaleY, or ScaleXY transforms - not arbitrary matrices).

To support that, we need to be able to convert Transform back to folly::dynamic, and on the Java side we need to support accepting arbitrary matrices instead of transform maps of properties.

Changelog: [Internal] Fabric-only changes

Reviewed By: sammy-SC

Differential Revision: D21564590

fbshipit-source-id: b137f659b27e4b8fae83921a28ccf46035e18651
2020-05-14 12:38:00 -07:00
Samuel Susla a7bbc858c5 Use vector.empty() to check for emptyness
Summary:
Changelog: [Internal]

Using `empty()` vs `size() == 0` or `size() > 0`.
It is a more semantic way to check whether container is empty or not.

Reviewed By: JoshuaGross

Differential Revision: D21573183

fbshipit-source-id: b83283f687432a037941852114717a0f014e28db
2020-05-14 11:58:58 -07:00
Samuel Susla 5c60247981 Use east const in ScrollViewProps
Summary:
Changelog: [Internal]

For consistency, switching west const to east const.

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D21574239

fbshipit-source-id: eb3459c63f731f51b24f40f9f80b574661ffd935
2020-05-14 11:52:05 -07:00
Samuel Susla 060250dcb0 Add support for ScrollView.contentOffset
Summary:
Changelog: [Internal]

Fabric's scrollview didn't have `contentOffset` implemented.

Reviewed By: JoshuaGross

Differential Revision: D21573179

fbshipit-source-id: 258c1cfa3398336f74d7ab033d90edcec7095292
2020-05-14 11:52:05 -07:00
Sidharth Guglani 5c0a3a61d5 throw std::logic_error instead of aborting the process and convert to java exception
Summary: Changelog: [Internal][Yoga] throw std::logic_error instead of aborting the process and convert to java exception for jni layer

Reviewed By: pasqualeanatriello

Differential Revision: D21301235

fbshipit-source-id: 148b27920e62990a271e1d0df8c85a2cc42f4fd4
2020-05-14 06:34:25 -07:00
Samuel Susla 16d15209e5 Remove branching for optimized differ QE
Summary: Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D21556312

fbshipit-source-id: 0d6d275de2d691cb42e5e70e5bf19bcc983cae12
2020-05-14 05:30:48 -07:00
Ramanpreet Nara 0b8a82a6ee Instrument sync and async method calls (#28893)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/28893

`JSIExecutor::callSerializableNativeHook` converts the arguments from `JSI::Value` to `folly::dynamic`. Then, `RCTNativeModule` converts the arguments from `folly::dynamic` to ObjC data structures in its `static invokeInner` function.

Therefore, I decided to start the sync markers inside `JSIExecutor::callSerializableNativeHook`, which required me to expose these two methode `ModuleRegistry::getModuleName` and `ModuleRegistry::getModuleSyncMethodName`. This shouldn't modify performance because we eagerly generate a NativeModule's methods when it's first required. So, at worst, this is doing a cache lookup.

Changelog: [Internal]

Reviewed By: PeteTheHeat

Differential Revision: D21443610

fbshipit-source-id: 67cf563b0b06153e56e63ba7e186eea31eafc853
2020-05-13 20:28:18 -07:00
Ramanpreet Nara bf0e516086 Instrument async method call batch preprocessing
Summary:
NativeModule async method calls are queued up on the JS side, and flushed to C++ on every Native -> JS call. Before we execute the batch of async NativeModule method calls, we convert it (a JS object) from a `jsi::Value` to a `folly::dynamic` object in `JSIExecutor::callNativeModules`. Then, in `JsToNativeBridge::callNativeModules`, we convert this `folly::dynamic` object into an `std::vector<MethodCall>`, before finally looping over these `MethodCall`s and invoking each NativeModule async method call.

The markers I'm adding in this diff measure this `jsi::Value -> folly::dynamic -> std::vector<MethodCall>` pre-processing.

Changelog: [Internal]

Reviewed By: PeteTheHeat

Differential Revision: D21435455

fbshipit-source-id: 4c5a9e2b73c1a2a49d7a8f224a0d30afe3a0c79c
2020-05-13 20:28:17 -07:00
Ramanpreet Nara 9f310a2b15 Instrument JS requires
Summary:
This diff instruments two markers:
- JSRequireBeginning: From the start of the JS require to when we start creating the platform NativeModule
- JSRequireEnding: From the end of platform NativeModule create to the end of the JS require

In order to accomplish this, I had modify `ModuleRegistry::ModuleRegistry()` to accept a `std::shared_ptr<NativeModulePerfLogger>`. I also had to implement the public method `ModuleRegistry::getNativeModulePerfLogger()` so that `JSINativeModules` could start logging the JS require beginning and ending.

Changelog: [Internal]

Reviewed By: PeteTheHeat

Differential Revision: D21418803

fbshipit-source-id: 53828817ae41f23f3f04a95b1d3ac0012735da48
2020-05-13 20:28:17 -07:00
Ramanpreet Nara c3783b5da6 Instrument module create
Summary:
`RCTModuleData instance` is the entry-point for creating and initializing NativeModules on iOS. This diff instruments module-create for the legacy NativeModule system.

Changelog: [Internal]

Reviewed By: PeteTheHeat

Differential Revision: D21415435

fbshipit-source-id: 8554e41cba9105ef528a9a63c49042b99ebf8751
2020-05-13 20:28:17 -07:00
Ramanpreet Nara 0b7bcd36ef Instrument RCTModuleData create
Summary:
`RCTModuleData` holds our NativeModule classes/objects. This diff instruments `RCTModuleData` create.

Changelog: [Internal]

Reviewed By: PeteTheHeat

Differential Revision: D21415433

fbshipit-source-id: 7738f763c185e20f756d9bb2eff4a9493cde74e8
2020-05-13 20:28:16 -07:00
Ramanpreet Nara c98f36c676 Switch TurboModules over to NativeModulePerfLogger
Reviewed By: PeteTheHeat

Differential Revision: D21363243

fbshipit-source-id: 9836b6651107c924ab9ab8e1ed73b156aed58d9f
2020-05-13 20:28:16 -07:00
Ramanpreet Nara 0486640571 Introduce NativeModulePerfLogger
Summary:
## Description
This diff introduces `NativeModulePerfLogger`, its BUCK, Cocoapod, android-ndk targets. This diff also wires up those targets into the React Native bridge and TurboModules targets, so that we get signal on if the code compiles.

This diff also introduces `TurboModulePerfLogger`, which is a namespace that holds the `NativeModulePerfLogger` that'll do perf-logging for TurboModules.

## How will perflogging work on iOS?
1. Each application will, during React Native initialization, create a NativeModule perf logger.
2. If TurboModules are enabled, we'll call `TurboModulePerfLogger::setInstance(perfLogger)`. If TurboModules are disabled, we'll call `NativeModulePerfLogger::setInstance(perfLogger)`.
3. TurboModules, when they're created and used, will log events via `TurboModulePerfLogger::getInstance()`. NativeModules (i.e: bridge modules), when they're created and used, will log events via the `NativeModulePerfLogger::getInstance()`.

> **Note:** The NativeModule system will log events for non-TurboModules as well. Maybe we should log events for only NativeModules that conform to the `TurboModule` interface, when TurboModules are disabled. This'll ensure a fair comparison between the two systems.

## How will perflogging work on Android?
Please see the subsequent diff.

allow-large-files

Changelog:
[Both][Added] - Introduce `NativeModulePerfLogger`

Reviewed By: PeteTheHeat

Differential Revision: D21318053

fbshipit-source-id: 6ddf5b5a80bdc4076d2dd6588067e2b0ec8c2c6b
2020-05-13 20:28:15 -07:00
Rick Hanlon c3a3d42e00 Fix dev tool hotkets in RNTester
Summary:
This diff fixed hotkeys for dev tools like cmd+d, cmd+r, and cmd+i when Turbo Modules are enabled until we have a proper way to eagerly initialize turbo modules.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D21517482

fbshipit-source-id: 8c68bc126361aa961a4f05c93dc19ada32fe44c7
2020-05-13 19:32:19 -07:00
David Vacca 0199a0392c Revisit deprecated methods in UIManagerModule and update javadoc
Summary:
Ez diff that revisits deprecated methods in UIManagerModule and update javadoc

Motivation: I'm cleaning up my fabric backlog before lockdown
changelog: [Android] Update documentation of UIManagerModule methods

Reviewed By: JoshuaGross

Differential Revision: D21487609

fbshipit-source-id: 896ae21e02d5b1aa57b7158d714986fd1f8c9c5c
2020-05-13 18:18:31 -07:00
David Vacca d0c4c5eaf9 Delete playTouchSound from UIManagerModule
Summary:
This diff deletes the deprecated PlayTouchSound method from UIManagerModules.

I verified there are no callsites of this method in Facebook sourcecode

changelog: [BREAKING][Android] Deletes the method PlayTouchSound method from UIManagerModule, this method was moved to the SoundManagerModule class.

Motivation: I'm cleaning up my fabric backlog before lockdown

Reviewed By: JoshuaGross, TheSavior

Differential Revision: D21487612

fbshipit-source-id: f630e2b7f927e0b607a30b9f4904feb63a561ab9
2020-05-13 18:18:31 -07:00
Valentin Shergin 0aac4c39d9 Fabric: Unifying interface of stub TextLayoutManager with actual ones
Summary:
The interface of css/TextLayoutManager now matches acual platform-specific implementations, so now CXX tests compiles and usable.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D21518656

fbshipit-source-id: cece3bea14c70410eea22abafb424f7a2cb201c0
2020-05-13 16:42:18 -07:00
David Vacca 6570f7887b Extend ReactShadowNode API to expose flex props
Summary:
This diff extends the ReactShadowNode API to expose flex props, this is going to be used by some components that require access to it

changeLog: [Android][Added] Exposed getFlex method as part of ReactShadowNode API

Reviewed By: JoshuaGross

Differential Revision: D21554663

fbshipit-source-id: 26c9a3fe5f72a84120b16b553ab08231817c0efa
2020-05-13 15:44:24 -07:00
Joshua Gross d269844cc1 LayoutAnimations: have each Props struct do its own interpolation
Summary:
Each ComponentDescriptor becomes capable of doing its own interpolation over props for animation purposes.

This new custom interpolator is called by default by the ConcreteComponentDescriptor, but `ComponentDescriptor::interpolateProps` is a virtual function and each ComponentDescriptor can provide custom interpolation if necessary.

For now, only View does any actual interpolation, to support LayoutAnimations.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D20965310

fbshipit-source-id: e1c1588107848e94c155efecb0da1cc1619ae544
2020-05-13 15:40:34 -07:00
Valentin Shergin 179b53bd89 Back out "Fabric: Calling JSVM GC on memory pressure event on iOS"
Summary:
Reverted for now because it causes a crash.

Original commit changeset: 46e32de0f108 (D21484773)

Changelog: [Internal]

Reviewed By: sammy-SC, kacieb

Differential Revision: D21555488

fbshipit-source-id: 555a143fe8cf4c8806d910803f104271454f5797
2020-05-13 13:46:56 -07:00
Eli White 66103277d2 Pressable: Rename pressRectOffset to pressRetentionOffset to be consistent with other touchables
Summary:
Text and the other Touchables have this prop called pressRetentionOffset. Pressable should be consistent with that.

Changelog:
[Breaking][General]: Pressable: Rename pressRectOffset to pressRetentionOffset to be consistent with other touchables

Reviewed By: yungsters

Differential Revision: D21552255

fbshipit-source-id: 31e64bad9e48ac98e4934dd2f4c0a7f526de5cb6
2020-05-13 12:59:48 -07:00
Samuel Susla d9593ae1b3 Add support for ScrollView.centerContent in Fabric
Summary:
Changelog: [Internal]

ScrollView didn't support centerContent prop. The implementation is copied over from Paper.

I added an example of this prop in RNTester.

Reviewed By: JoshuaGross

Differential Revision: D21548270

fbshipit-source-id: 28f6c8d769c5a6bc1d111b33970a06b95c259132
2020-05-13 12:28:54 -07:00
Martin Sherburn 77ef8f881f When debugger is attached continue to receive console messages
Summary:
I noticed an issue when the hermes debugger was attached. Console messages would no longer appear in the terminal. This is because the hermes inspector overrides the console object with its own to intercept messages and send them to the debug client.
With this change I made it so that messages are sent to the original console as well instead of completely replacing it.

Changelog:
[General][Fixed] - When Hermes debugger is enabled continue to send log messages to the console

Reviewed By: mhorowitz

Differential Revision: D21509895

fbshipit-source-id: 6d91c4b82682e404679533be14b3e5f12e687e79
2020-05-13 07:20:20 -07:00
David Vacca e3f4a7ba09 Fix precision of TextInlineViews in Android
Summary:
TextInlineViews in Android was incorrectly converting values to from float to int, this produced to loose precision and to render incomplete texts in some components.
This diff changed the types from int to float, avoiding loose precision.

The impact of this bug is not that high because in the conversion to int we were using Math.ceil(), which was already rounding the result to the next pixel.

changeLog: [Android][Fixed] Fix precision of TextInlineViews in Fabric Android

Reviewed By: JoshuaGross, shergin

Differential Revision: D21541159

fbshipit-source-id: 4741ab96964c35af1c1b7d3e821e505ecef2efce
2020-05-13 00:42:36 -07:00
Peter Argany 774ebd9c12 Cleanup logbox imports
Summary:
Was looking at removing logbox from CoreModules, realized it had a bunch of extra deps.

Changelog: [Internal]

Reviewed By: rickhanlonii

Differential Revision: D21535374

fbshipit-source-id: 2427cc66fa34635b49ac4b4fafaf0b6481f5687d
2020-05-12 22:40:29 -07:00
Rick Hanlon 94c45af136 Add dark mode to loading progress
Summary:
This diff updates the loading banner to respect the RCTAppearance dev mode setting.

Changelog: [General] [iOS] Add dark mode support to loading banner

Reviewed By: fkgozali

Differential Revision: D21429148

fbshipit-source-id: d7d9e778245112a19accf813dcff693f0d187a38
2020-05-12 20:56:06 -07:00
Peter Argany b01fcee4ce Get redbox working in bridgeless mode, disable logbox
Summary: This enables redbox in bridgeless mode, by removing a dep on the bridge. It also disables full screen logbox, since I couldn't figure out how to get it working without the bridge.

Reviewed By: rickhanlonii, ejanzer

Differential Revision: D21440233

fbshipit-source-id: cb1730fefe1639135fdf06039031975d53f95229
2020-05-12 19:55:37 -07:00
Emily Janzer df08d65920 Disable animations on Android again
Summary: We don't yet have native driver support for animations in bridgeless mode on Android, which leads to some weird bugs (like an overlay that never disappears). Let's just disable animations on Android again.

Reviewed By: mdvacca

Differential Revision: D21537982

fbshipit-source-id: b4e8882a414fecbd52dd25e02325b5c588ee68c0
2020-05-12 19:39:36 -07:00
Paige Sun e5a6655e71 iOS: Fix Animated image crash when CADisplayLink target in RCTWeakProxy is nil
Summary:
## Problem
When self is nil, this may crash in RCTUIImageViewAnimated.m.

```
_displayLink = [CADisplayLink displayLinkWithTarget:[RCTWeakProxy weakProxyWithTarget:self] selector:selector(displayDidRefresh:)];
```

## Fix

Replace `RCTWeakProxy` with a concrete class `RCTDisplayWeakRefreshable` that has the displayDidRefresh method, that calls the displayDidRefresh method in its weak target.

### Original Github Issue
https://github.com/facebook/react-native/pull/28070#issuecomment-619295254

Changelog: [iOS] [Fixed] -  Fix Animated image crash when CADisplayLink target in RCTWeakProxy is nil

Reviewed By: shergin

Differential Revision: D21419385

fbshipit-source-id: da7c3c38f81ea54f633da7f59359e07680ea2faf
2020-05-12 17:08:43 -07:00
Vitaly Potlov 649e1b787f Fixing typo in comment (#28882)
Summary:
I was reading the code and noticed the typo.

## Changelog

Doesn't affect the code.

[General] [Fixed] - Message
Pull Request resolved: https://github.com/facebook/react-native/pull/28882

Differential Revision: D21529436

Pulled By: shergin

fbshipit-source-id: 82929a6f1fe7b5510ee17fff547aae9d5125891c
2020-05-12 13:22:58 -07:00
Valentin Shergin f78bd0e72a Fabric: Fixed incorrect memory management in Scheduler
Summary:
The previous implementation was incorrect causing a memory leak. In the new approach, we use a shared pointer to optional to be able to construct that ahead of time and then fill with actual value.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D21516794

fbshipit-source-id: ddcbf8a1ad2b1f629ae4ff2842edeb7bb2a275a6
2020-05-12 11:28:34 -07:00
Samuel Susla 91468b76c6 Download image of size based on image view size, not image size
Summary:
Changelog: [internal]

Fabric asks server for images of their real size and scale, not images of size that they would take up on the screen once rendered. Also scale of the screen is incorrect. This causes images to be twice as large as they have to be.

Look at the size of the first image size here in Paper, it is `{310.5, 207}`.
{F235394066}

If you compare it with Fabric, there it is `{800, 381}`
{F235394115}

It isn't just the size, but scale of request image as well. Fabric always asks for image of scale 1, unlike Paper which takes screen scale into account.

Reviewed By: shergin

Differential Revision: D21255794

fbshipit-source-id: 9db3ccafec1c09cedc5db5ac0a435a28a4c30c85
2020-05-12 11:10:21 -07:00
Samuel Susla 43de8ea2ba Fix opacity not being animated on Text component
Reviewed By: shergin

Differential Revision: D21523725

fbshipit-source-id: 80be40fd1314b7e1cbaa827ca52f917ba5bc916e
2020-05-12 10:32:22 -07:00
Kacper Wiszczuk 8ffa180d80 imp: Add titlePlaceholder in template.config.js (#26218)
Summary:
In the latest `react-native-cli` we've added more flexibility for setting application title. New config key was introduced - `titlePlaceholder` - which will be changed during init process.

PR: https://github.com/react-native-community/cli/pull/650

## Changelog

[General] [Added] - Introduce `titlePlaceholder` for template configuration.
Pull Request resolved: https://github.com/facebook/react-native/pull/26218

Test Plan: Initialization works with the default template

Differential Revision: D17091492

Pulled By: shergin

fbshipit-source-id: 239110f2ad6f817d750575fa366ab49d146b36c1
2020-05-12 09:09:23 -07:00
Moti Zilberman b4785e5144 Forward all bundle URL params through HMR and bundle splitting
Summary:
Forwards any extra parameters set on the main bundle URL (in development) to the derived bundle URLs used in hot reloading and bundle splitting.

Changelog: [General] - Forward URL parameters from main bundle to hot reloaded bundles

Reviewed By: cpojer

Differential Revision: D21455592

fbshipit-source-id: e1c375e3b6a0f3387372f1d96498dbf7d5237a09
2020-05-12 07:35:51 -07:00
Moti Zilberman 9b5359133b Add package name / bundle ID to bundle URL in development
Summary:
Adds the package name (Android) / bundle ID (iOS) as a new URL parameter named `app` in the bundle URL. This currently has no effect on Metro, which will ignore it for bundling / caching purposes.

Changelog: [General] - Add package name / bundle ID to bundle URL in development

Reviewed By: cpojer

Differential Revision: D21429764

fbshipit-source-id: 394fe50dba72219f7594ebeac9486a8264a836a6
2020-05-12 07:35:50 -07:00
Lulu Wu 63099c40e6 Migrate Android view managers to type-safe commands generated by JS codegen
Summary:
## Changelog:

[General] [Changed] - Migrate Android view managers to type-safe commands generated by JS codegen.

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D21406461

fbshipit-source-id: 93584b240314254675a36a58c4d0c0880d6889fb
2020-05-12 04:37:44 -07:00
Samuel Susla 8f90ce26a5 Break retain cycle in RCTLegacyViewManagerInteropCoordinator
Summary: Breaks retain cycle by having weak reference to bridge.

Reviewed By: shergin

Differential Revision: D21501419

fbshipit-source-id: 7526ceefceb59e296c6f4944cac5069cb62b33a5
2020-05-12 03:48:30 -07:00
Janic Duplessis d30c920749 Mention using bundler to install cocoapods in RNTester README (#28873)
Summary:
This makes sure the proper version of cocoapods gets used, this will avoid noise in diffs if someone ends up updating pods with a different version.

## Changelog

[Internal] [Changed] - Mention using bundler to install cocoapods in RNTester README
Pull Request resolved: https://github.com/facebook/react-native/pull/28873

Test Plan: N/A

Differential Revision: D21519862

Pulled By: shergin

fbshipit-source-id: 3dc555bc3aee6bee10127ba5b5862302a63346c4
2020-05-11 23:28:59 -07:00
Emily Janzer 6c4224ea9b Use UIManagerHelper to access EventDispatcher in ReactViewManager
Summary:
ReactViewManager uses the bridge (CatalystInstance) to access the UIManagerModule in its onClick method. This doesn't work in bridgeless mode, so I'm replacing this callsite with the new API, which uses UIManagerHelper + the reactTag to look up the appropriate UIManager (Paper or Fabric), and get the EventDispatcher from that.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D21510243

fbshipit-source-id: c2c6111e73c49ca6bf873819db8ece71c66417e4
2020-05-11 18:59:05 -07:00
Joshua Gross dba588741c Always run the momentum scroll Runnable so scroll position is updated on Fabric
Summary:
This early return is a very minor perf optimization, and it complicates things on Fabric: if scroll perf logging is disabled, the scroll position in C++ (State) doesn't get updated for the scrollview.

Just remove it. Always run the Runnable, no matter what.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D21503695

fbshipit-source-id: 13dfe232d692ff544bff725a2344a66b572f5444
2020-05-11 11:14:17 -07:00
Kevin Gozali 3c9013402e xplat code ownership
Summary:
For internal code attribution.

Changelog: [Internal]

Reviewed By: zlern2k

Differential Revision: D21496969

fbshipit-source-id: 9fa27a758df19c16fd2087ce964132eaa70dc91f
2020-05-11 10:24:35 -07:00