Merge from upstream through 2020-05-09#806
Conversation
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
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
… in xplat Summary: Old deprecated function. Changelog: [Internal] Reviewed By: nlutsenko Differential Revision: D20148856 fbshipit-source-id: 79d6fb97824b059e50f67ff5a0b4c38ec7a19469
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
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
…#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  `<Pressable android_ripple={{borderless: false}}>` in this PR  Differential Revision: D20952026 Pulled By: TheSavior fbshipit-source-id: df2b95fc6f20d7e958e91805b1a928c4f85904f1
…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
Summary: Label some BUCK targets properly. Changelog: [Internal] Reviewed By: shergin Differential Revision: D20960917 fbshipit-source-id: 42fa2266105b6c3dd5108a1b56035a19a95cd61f
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
…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
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
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
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
… 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
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
…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
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
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
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
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
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
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
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
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
Reviewed By: motiz88 Differential Revision: D20697095 fbshipit-source-id: ef35d02da0916109ce528d3026f7ca0956911dda
…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
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
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
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
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
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
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
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
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
Summary: For internal code attribution. Changelog: [Internal] Reviewed By: zlern2k Differential Revision: D21468924 fbshipit-source-id: 59cd2a52e0ae46bedbf54816820a5f40b684da8b
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
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
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
Summary: Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D21483553 fbshipit-source-id: 0c681979a4988c36cfa6f05aa5bca896590f9e3d
Reviewed By: ejanzer Differential Revision: D21465166 fbshipit-source-id: b34e8e97330b897e20d9a4b05dba1826df569e16
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
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
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
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
…an/0.64-merge-2020-mm-dd
…an/0.64-merge-2020-mm-dd
…an/0.64-merge-2020-mm-dd
|
I'm super excited to see macos integrating new upstream changes. Getting macOS up to date will have an incredibly large impact across the RN ecosystem. Something I've had success with for Windows merges was to limit a single integration to about a week of upstream changes. At that granularity you can inspect individual commits, either looking for changes that intersect with forked code, or doing a narrow search for what change could have caused a regression. |
|
"One of the more unusual modifications we had to do to ensure compatibility is the addition of the #if 0 block in React/CoreModules/RCTDevLoadingView.mm. Thankfully, we're blocking out unused code, so it shouldn't be a big deal. This will get cleaned up once we fix this upstream and get microsoft/react-native-macos caught up to that future commit." Can you elaborate on this? How do we know it's unused? Did fb add a #if 0 and we just don't have that commit synced yet? |
I've been doing this locally when moving forward. This PR is just several of these steps forward at a time. |
I know |
|
|
||
| for (ARTNode *node in self.subviews) { | ||
| [node renderTo:context]; | ||
| for (RCTPlatformView *subview in self.subviews) { // TODO(macOS GH#774) |
There was a problem hiding this comment.
Did you add this? If so can we be explicit exactly what lines we're adding and why?
There was a problem hiding this comment.
The only thing I changed is replacing UIView with RCTPlatformView.
Please select one of the following
Summary
Merge facebook/react-native's main branch into react-native-macos's main branch through 2020-05-09 23:59:59 PDT (specifically, a1ac251).
These changes were made by repeatedly running
git merge <commit-id>and resolving merge conflicts as needed.One of the more unusual modifications we had to do to ensure compatibility is the addition of the
#if 0block in React/CoreModules/RCTDevLoadingView.mm. Thankfully, we're blocking out unused code, so it shouldn't be a big deal. This will get cleaned up once we fix this upstream and get microsoft/react-native-macos caught up to that future commit.Validation