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

21447 Коммитов

Автор SHA1 Сообщение Дата
Tim Yung d4e29ecdaa RN: Fix `ScrollView` Type Errors
Summary:
Fixes some of the type errors in `ScrollView` that were previously being suppressed by comments. This also slightly simplifies the implementation of `ScrollView`.

Changelog:
[Internal]

Reviewed By: kacieb

Differential Revision: D25097225

fbshipit-source-id: a444db8179c91e264671d8f32431b93c4da8dfc4
2020-11-19 15:55:23 -08:00
Tim Yung 54a067e61e RN: Refactor `ScrollView` Style Splitting
Summary:
Rewrites `splitLayoutProps`, which is only used by `ScrollView`.

- Improve type safety by avoiding `DangerouslyImpreciseStyle`.
- Avoid allocating objects when it is not necessary.
- Avoid allocating a object enumeratig layout props by using a switch statement.

Changelog:
[Internal]

Reviewed By: JoshuaGross, kacieb

Differential Revision: D25097226

fbshipit-source-id: 2050c03b681024212c06a48b7eb05f28c14415f9
2020-11-19 15:55:23 -08:00
Tim Yung 7e7527e7db RN: Preserve Style Type in `flattenStyle`
Summary:
Refactors `flattenStyle` so that it preserves the style type of the argument. This lets us avoid using `DangerouslyImpreciseStyleProp` where we can.

Changelog:
[Internal]

Reviewed By: JoshuaGross, nadiia, kacieb

Differential Revision: D25097227

fbshipit-source-id: df6af6fefab25dbb62e3c81897c3cef98619a9c7
2020-11-19 15:55:23 -08:00
Joshua Gross b3865a9143 LayoutAnimations: attempt to re-queue animations if an UPDATE conflicts with a REMOVE+INSERT (move) without a corresponding Update
Summary:
Imagine the scenario in which there's an ongoing UPDATE animation; a REMOVE+INSERT (move) is queued up for the same tag, but there's no
new corresponding UPDATE - so maybe the indices of the view have changed, but the layout stays the same. Under the old model, the previous animation would be canceled and the node would jump to the final position. In theory, if there's no new UPDATE, we should continue animating the node to its final position.

I'm much happier with this - conflicting animations transition into each other super seamlessly now, and I think the logic is more straightforward as well.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D25071664

fbshipit-source-id: fcefc4619dc34cdafdc4d8e8e730b935e5528290
2020-11-19 14:53:23 -08:00
Joshua Gross 0423eab4ee LayoutAnimations: remove noisy, non-useful log
Summary:
This is noisy when enabled, and not very useful.

Changelog: [Internal]

Reviewed By: PeteTheHeat

Differential Revision: D25071584

fbshipit-source-id: 7205b5fa39622feccaf315ccebb181dbdac4281d
2020-11-19 14:53:23 -08:00
Joshua Gross a45c921396 Keep "previous" ShadowView for animations consistent with MOVE sequences (UPDATE/REMOVE/INSERT)
Summary:
See comments, hopefully they explain this situation. This fixes the last remaining case that I have repro'd where StubViewTree asserts fire.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D25062135

fbshipit-source-id: a28afba21f4094200aa0502b1e085dcbc10f9835
2020-11-19 14:53:23 -08:00
Joshua Gross 5bd5fcdd38 LayoutAnimations: ensure that all mutations retain the correct "old" node
Summary:
The current implementation of LayoutAnimations assumed that the "previous/old" ShadowView passed into the diff mutation didn't matter except for purposes of diffing.

As it turns out, iOS components could possibly use the "old" version of props, state, etc - so we should try to keep track of the current value in the tree as much as possible.

This diff accomplishes that by keeping track of the "previous" view, which the AnimationDriver will update over time. This also allows us to simplify logic around conflicting animations.

I'm also adding a few additional asserts to assist in debugging.

This doesn't totally eliminate all asserts hit on iOS, yet, but it does reduce the number of times the asserts are hit in StubViewTree.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D25048644

fbshipit-source-id: d00aeece5af04624d8193063be453c7ce4a6e565
2020-11-19 14:53:23 -08:00
Nick Gerleman 6d2a527984 Avoid eating clicks/taps into ScrollView when using physical keyboard (#30374)
Summary:
This is an extension of https://github.com/facebook/react-native/issues/29798 which was reverted due to cases where the soft keyboard could not be dismissed.

## 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] - Avoid eating clicks/taps into ScrollView when using physical keyboard

Pull Request resolved: https://github.com/facebook/react-native/pull/30374

Test Plan: Validated with iOS simulator that taps on default ScrollView will dismiss soft keyboard and be eaten if open, but taps are not eaten when emulating a connected physical keyboard.

Reviewed By: kacieb

Differential Revision: D24935077

Pulled By: lyahdav

fbshipit-source-id: 19d9cf64547e40a35f9363896e3abbdccb95b546
2020-11-19 13:12:41 -08:00
Samuel Susla eaab64764e Do not remove oldChildShadowView from mutation
Summary:
Changelog: [internal]

This diff reverts some changes in D23886519 (9f00752a97), I was not able to repro the issues that D23886519 (9f00752a97) is fixing.
`oldChildShadowView` must be defined for update mutation.

Reviewed By: JoshuaGross

Differential Revision: D25088008

fbshipit-source-id: 956d0cc536e35376ce0e1cc09f7c5b66cb89fc77
2020-11-19 11:57:55 -08:00
Samuel Susla 5af6a44de3 Back out "Back out "[RN] Fabric: Strengthening StubView mutating validation""
Summary:
Changelog: [internal]

Original commit changeset: b6109a45f153

Reviewed By: JoshuaGross

Differential Revision: D25020497

fbshipit-source-id: c52d5ad03dd1049ac66ecb2d82b5018a05bb4f19
2020-11-19 11:57:55 -08:00
Tim Yung 6a547c6c57 RN: Create `NativeComponentRegistry`
Summary:
Creates `NativeComponentRegistry` which makes native component initialization more declarative and configurable through an optionally configurable provider.

The next diff converts `ScrollView` to use this new abstraction as a demonstration. The plan would be to use this to replace all current manual call sites of `registerGeneratedViewConfig`, and then the ones generated via the Babel plugin.

Migrating to this will not change any production behavior, but it will enable verification of `ViewConfig` in development.

Changelog:
[Internal]

Reviewed By: JoshuaGross

Differential Revision: D25084468

fbshipit-source-id: 9c758ddc279bf937a401a868a066907a94098f37
2020-11-19 10:55:50 -08:00
Michał Pierzchała c797fcf5aa chore: Bump CLI to ^5.0.1-alpha.0 (#30420)
Summary:
Upgrading CLI to latest. This diff is intended to be cherry-picked to 0.64.

cc grabbou kelset alloy

## Changelog

[Internal] [Changed] - Bump CLI to ^5.0.1-alpha.0

Pull Request resolved: https://github.com/facebook/react-native/pull/30420

Test Plan: None

Reviewed By: MichaReiser

Differential Revision: D25063261

Pulled By: cpojer

fbshipit-source-id: e1788fd40db2b00daaf888e7b2afaf708ade5451
2020-11-19 04:50:37 -08:00
Tim Yung f6b8736b09 RN: Update ViewConfig for ScrollView
Summary:
Updates `ReactScrollViewManager` and the `ViewConfig` for `ScrollView` so that they are equivalent.

- `inverted` was missing.
- `contentOffset` was missing differ on Android. (However, there does not seem to be any perceivable behavior difference besides the native `ViewConfig` being different.)

Changelog:
[Internal]

Reviewed By: JoshuaGross

Differential Revision: D25084470

fbshipit-source-id: 8bea3b7a692c1038819a4147b174583a4faa71e9
2020-11-19 02:52:00 -08:00
Tim Yung de92e7405d RN: Refactor `ViewConfig` Inflation
Summary:
Refactors the conversion of a `PartialViewConfig` into a `ViewConfig` to a separate function so that it can be reused.

Changelog:
[Internal]

Reviewed By: JoshuaGross

Differential Revision: D25084469

fbshipit-source-id: 8a7f53ff2c68860697c791c37a6abbfd3213a0f9
2020-11-19 02:52:00 -08:00
Luna Wei 003d72d80b Provide default device scale
Summary:
Changelog:
[Internal][Fixed] - Provide a default device scale

Reviewed By: kacieb

Differential Revision: D24975788

fbshipit-source-id: 5f2158d7b704713b6a759734943e52228c9cafbc
2020-11-18 21:27:17 -08:00
Tim Yung 5b527fefcb RN: Fix `registerGeneratedViewConfig` Types
Summary:
Fixes types in `registerGeneratedViewConfig` and also removes some unnecessary hacks for the `ReactNativeViewViewConfig` type.

Changelog:
[Internal]

Reviewed By: JoshuaGross

Differential Revision: D25076608

fbshipit-source-id: 5cb2060e11db598b42fbb7f2f8aecfd7f4b262ef
2020-11-18 21:19:13 -08:00
Tim Yung e136aa3fc4 RN: Cleanup ViewConfig Types
Summary:
Cleans up the Flow types for React Native ViewConfig. After this diff, we will have two new canonical types:

- `ViewConfig` which is what we get from native and what is registered in the `ReactNativeViewConfigRegistry`.
- `PartialViewConfig` which is what we generate statically and augment at runtime before registering with the `ReactNativeViewConfigRegistry`.

Changelog:
[Internal]

Reviewed By: JoshuaGross

Differential Revision: D25075299

fbshipit-source-id: 4b53927b2db437b615447b711e83db355d0cfa55
2020-11-18 21:19:12 -08:00
Tim Yung 69b4611049 RN: Hoist Reflection from Verification
Summary:
Hoists the call to `getNativeComponentAttributes` out of the verification function so that it's easier to keep track of when this function is and is not called.

The purpose of this will become clearer in a future refactor.

Changelog:
[Internal]

Reviewed By: ejanzer

Differential Revision: D25072600

fbshipit-source-id: bc42461baae3476fa7ecb6186c4256dd23921ed5
2020-11-18 21:19:12 -08:00
Tim Yung 9611a7b43e RN: Move RN$Bridgeless Check to Registration
Summary:
Moves the `RN$Bridgeless` check as part of moving more logic out of the verification function.

Changelog:
[Internal]

Reviewed By: ejanzer

Differential Revision: D25072601

fbshipit-source-id: 929230c02a6eaa1b724f7fd2e1a691a7c20c4b11
2020-11-18 21:19:12 -08:00
Luke Walczak a7c1c5aff2 Add possibility to disable buttons in action sheet ios (#28979)
Summary:
_**Fixed**_ version of [the previous PR](https://github.com/facebook/react-native/pull/28792) after reverting [changes](c8d678abcf (commitcomment-39299254))

----

I've noticed that currently there is no option to disable button within the `ActionSheetIOS`. It can be really useful and decided to extend the API to support that functionality.

I added a new option called `disabledButtonsIndices` to `ActionSheetIOS` which is an array of button indices which should be disabled.

`ActionSheetIOS` documentation - PR https://github.com/facebook/react-native-website/pull/1898

## Changelog

[iOS] [Added] - Add disableButtonsIndices option to ActionSheetIOS component

Pull Request resolved: https://github.com/facebook/react-native/pull/28979

Test Plan:
1. Run the `RNTester`
2. Choose `ActionSheetIOS`
3. Check the fourth example `Show Action Sheet with disabled buttons`
4. `Option 1` and `Option 2` should be disabled

screenshot | gif
 --- | ---
<img width="493" alt="Screenshot 2020-04-30 at 15 16 22" src="https://user-images.githubusercontent.com/22746080/80739025-1ec52780-8b16-11ea-8b1c-30bb40ad8c99.png"> | <img src="https://user-images.githubusercontent.com/22746080/80739043-24227200-8b16-11ea-8bcb-af25eb57baac.gif" width="493" />

Reviewed By: sammy-SC

Differential Revision: D21727497

Pulled By: PeteTheHeat

fbshipit-source-id: 749b6c623eb8a44fe2bd96829ce89be5310e2368
2020-11-18 21:11:48 -08:00
Tim Yung 130618fd85 RN: Suppress RCTVirtualText Warning in Bridgeless
Summary:
The `DummyUIManager` module warns whenever `RCTVirtualText` is initialized. This stops that.

Changelog:
[Internal]

Reviewed By: PeteTheHeat

Differential Revision: D25073194

fbshipit-source-id: 8b9052d1cbb9a4defa5efbd110e1a91cd8884c48
2020-11-18 20:59:24 -08:00
Peter Argany bea3495fd0 Fix crash in RCTLegacyViewManagerInteropCoordinator
Summary:
Like the task mentions `strongSelf->_eventInterceptors` was crashing, probably because the coordinator was cleaned up before this block ran.

Check to make sure self is still valid before attempting to access any instance variables.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D25073812

fbshipit-source-id: cdf666f2ac028b5523097f15ff51fbae9f9ffbd8
2020-11-18 19:36:05 -08:00
Samuel Susla 19d4cc2d49 Implement ScrollView.zoomToRect
Summary: Changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D24991008

fbshipit-source-id: 6048246a784b94a321281547d966379badd8f6fd
2020-11-18 15:32:30 -08:00
inokawa cf97c1f3bd Fix typo (#30330)
Summary:
Fix typo in comment

## 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
-->

[CATEGORY] [TYPE] - Message

Pull Request resolved: https://github.com/facebook/react-native/pull/30330

Reviewed By: fkgozali

Differential Revision: D25062086

Pulled By: PeteTheHeat

fbshipit-source-id: 251bf1d4f4986f77ae72f7654796ae1d49c1863d
2020-11-18 12:13:24 -08:00
Samuel Susla a6b785553b Check error code returned from vImageBoxConvolve_ARGB8888
Summary:
Changelog: [internal]

If value returned from `vImageBoxConvolve_ARGB8888` is negative, an error occurred.
Converting a negative number to `unsigned long` produces a large positive number (larger than memory). Trying to allocate that much memory fails, malloc returns NULL, and abort triggered inside `RCTBlurredImageWithRadius`.

To fix this we need to check for return value from `vImageBoxConvolve_ARGB8888`.

Documentation: https://developer.apple.com/documentation/accelerate/1515945-vimageboxconvolve_argb8888?language=objc

Reviewed By: JoshuaGross

Differential Revision: D25055827

fbshipit-source-id: 2c46ae6eea5cfcc95c2b552c7cd2bc60125fd24a
2020-11-18 09:39:57 -08:00
Samuel Susla 3c8d0112b3 Use variable instead of reference
Summary:
Changelog: [internal]

Reference here is incorrect, we need a container for `ShadowViewMutation`.

Reviewed By: JoshuaGross

Differential Revision: D25024080

fbshipit-source-id: f59a18d859ad391bc168c8990d40b25d18003f74
2020-11-18 06:57:10 -08:00
Samuel Susla 312226362d Add const annotations to LayoutAnimationKeyFrameManager
Summary: Changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D25023706

fbshipit-source-id: 678377e2c471386670d1eab9c5adbe8aa6473a3c
2020-11-18 06:57:10 -08:00
Bartosz Kaszubowski 8cc44678ce switch Readme version badge source to shields.io (#30411)
Summary:
Lately there are some loading issues for the `fury.io` badges service which results in missing image and alt text visible in the Readme.

This PR fixes that issue by switching to `shields.io` version badge - badge service that has been used for few other badges already.

## 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] - change Readme npm version badge to `shields.io`

Pull Request resolved: https://github.com/facebook/react-native/pull/30411

Test Plan: All badges will appear in the Readme file. {emoji:1f642}

Reviewed By: cpojer

Differential Revision: D25040061

Pulled By: hramos

fbshipit-source-id: 2ef6b94ff39ec21573b7e58318aba653fd716037
2020-11-17 20:04:52 -08:00
Kevin Gozali 9eb23e741f Android OSS: Solve some Javadoc warning due to missing dependencies
Summary:
A bunch of deps were missing when generating Javadoc, producing warnings. One issue was:

```
project.getConfigurations().getByName("compile").asList()
```

Seems to be deprecated (?), so this list is always empty. The mitigation is to create a new configuration that just inherits from `api()` dependencies, so that we can add them in Javadoc task.

The other problem (not solved in this commit), is that some deps are .aar files, which require some manual unpacking before they can be processed: https://stackoverflow.com/questions/35853906/how-to-generate-javadoc-for-android-library-when-it-has-dependencies-which-are-a

Note that this is separate fix from https://github.com/facebook/react-native/pull/30417

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D25041164

fbshipit-source-id: 2ee8b268c2d38e3ecbf622c05c3c56123b7a15a6
2020-11-17 18:27:35 -08:00
Nick Gerleman b841ee6fb8 Fix :ReactAndroid:androidJavadoc task (#30417)
Summary:
Fixes https://github.com/facebook/react-native/issues/30415

This is a quick and dirty fix to unblock publish, of excluding a class from Javadoc generation that is importing a class current build logic cannot handle. This is not a long-term fix for the issue.

## 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] [Fixed] - Fix :ReactAndroid:androidJavadoc task

Pull Request resolved: https://github.com/facebook/react-native/pull/30417

Test Plan: Tested that the task now completes locally.

Reviewed By: lunaleaps

Differential Revision: D25041282

Pulled By: fkgozali

fbshipit-source-id: f774ab30a09db473178e2a51c77860e4985dd8e3
2020-11-17 18:27:35 -08:00
Peter Argany 53858ceaa3 Add reset method to RCTFabricSurface [2/N]
Summary:
This method allows a surface to re-render from scratch, without having to delete and reinstantiate the surface.

Changelog: [iOS] Added reset method to RCTFabricSurface to help with reloads

Reviewed By: RSNara

Differential Revision: D25000509

fbshipit-source-id: f74170aa78cc84491ad2679f130ed3c8965bbe34
2020-11-17 14:50:18 -08:00
Samuel Susla 3a0ed2e551 Implement zoom in ScrollView
Summary: changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D24991161

fbshipit-source-id: 6f36cc21b89554006a744da8d32349ff21ccd68f
2020-11-17 11:16:42 -08:00
Samuel Susla 2669118fc8 Make event coalescing more aggressive
Summary:
Changelog: [internal]

Previous implementation of coalescing would only look at the last element in `eventQueue_` and if it was the same type and target, it would coalesce the two together. This was problem when user would scroll in UIScrollView, this triggers onTouchMove and onScroll events at high rates and prevents coalescing of them.

This changes changes the behaviour to search the `eventQueue_` backwards for an event of the same type and target. If one if found, it is moved into its place. If even of another type is found before for the same target, the event is pushed back onto the queue.

Reviewed By: JoshuaGross

Differential Revision: D24992941

fbshipit-source-id: fc1eae4ecd100af6202346674778b0634ed7a15b
2020-11-17 04:21:01 -08:00
Ramanpreet Nara 27cf82074d Guard against initializer interruptions in {Catalyst,Work,RNTester}TurboModuleManagerDelegate
Summary:
Migrate over to [how we load so libraries in Fb4aTurboModuleManagerDelegate](https://fburl.com/diffusion/wu0mcr8o).

## Motivation
When we migrated Twilight over to TurboModules, we used the CatalystTurboModuleManager as a template. This led to a production crash (T70918829) because we weren't loading so's this way. The fix: D24894071.

I'm updating these two TMMDelegates so that people don't fall into the same trap when migrating other Standalone apps.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D24992931

fbshipit-source-id: 3ac3b8c30a67e24f79021f915abf5ae980d5b5d3
2020-11-17 00:34:48 -08:00
Brian Vaughn 68a476103a Name a bunch of anonymous RN contexts
Summary:
Changelog:
[General] [Changed] - Added (DEV-only) `displayName` to some RN contexts to make them more easy to differentiate when debugging.

Reviewed By: lunaleaps

Differential Revision: D24993068

fbshipit-source-id: 4904259eda50444c2f74700a3540ff4fd02ac322
2020-11-16 13:12:09 -08:00
Joshua Gross bbd0f03481 Removing pre-API 21 code
Summary:
We don't support pre-API 21/Android <5/pre-Lollipop anymore; delete related code or checks.

No need for this to make it to the changelog, this announcement was already made.

Changelog: [Internal]

Reviewed By: ejanzer

Differential Revision: D24965249

fbshipit-source-id: e537e62e8eb18878c29afe17b8c7861d095a37b7
2020-11-16 12:43:14 -08:00
Paige Sun 0937f13cc3 Do not log image if it fails lifecycle assert in getWillRequestUrlTime
Reviewed By: sammy-SC

Differential Revision: D24990452

fbshipit-source-id: ce4d5ec9e3cf237c6edbd17368f2dcf3aecbec2b
2020-11-16 12:39:00 -08:00
Marshall Roch f1f7168795 Deploy Flow v0.138.0
Summary: Changelog: [Internal]

Reviewed By: dsainati1

Differential Revision: D24993067

fbshipit-source-id: ef2ffb61269be49afa970283a7ccef0b4475898a
2020-11-16 12:19:01 -08:00
Joshua Gross 752e7ab1f9 Experiment to replace Fabric MountItem lists with concurrent queues (re-land)
Summary:
Currently, queuing any sort of MountItem or getting the list of MountItems requires synchronization. Since these can be queued up at any point from the JS thread, there will, in theory, be constant contention between JS and UI thread.

To see if this is true, I'm creating an experiment instead of just switching over to concurrent structures. After seeing results, we can hopefully make a decision and delete the non-concurrent stuff or improve on it somehow.

The original was unlanded in D24973616 (26787e2260) due to a typo, which has been fixed now. The typo was that in Blocking Mode, we queued up all PreMountItems to the concurrent PreMountItems queue.

Changelog: [Internal]

Reviewed By: ShikaSD

Differential Revision: D24974851

fbshipit-source-id: d081c081bbd0de445bb92408f0ec822056b905a5
2020-11-14 12:19:56 -08:00
Andrei Shikov 26787e2260 Back out "Experiment to replace Fabric MountItem lists with concurrent queues"
Summary:
Changelog: [Internal]

Original commit changeset: fcbdeda51f91

Reviewed By: rubennorte

Differential Revision: D24973616

fbshipit-source-id: 4d21211d329c77dba50972a26b1daeccfffad912
2020-11-14 08:59:02 -08:00
Koichi Nagaoka d85d5d2e19 Fix cannot working Modal's onDismiss. (#29882)
Summary:
Fixes: https://github.com/facebook/react-native/issues/29455

Modal's onDismiss is not called on iOS.
This issue occurred the commit bd2b7d6c03 and was fixed the commit 27a3248a3b.
However, the master and stable-0.63 branches do not have this modified commit applied to them.

## 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] - Modal's onDismiss prop will now be called successfully.

Pull Request resolved: https://github.com/facebook/react-native/pull/29882

Test Plan:
Tested on iOS with this change:

1. Set function Modal's onDismiss prop.
1. Set Modal's visible props is true. (show Modal)
1. Set Modal's visible props is false. (close Modal)
1. The set function in onDismiss is called.

Reviewed By: shergin

Differential Revision: D24648412

Pulled By: hramos

fbshipit-source-id: acf28fef21420117c845d3aed97e47b5dd4e9390
2020-11-13 23:56:09 -08:00
Joshua Gross 47000756fe Add more systrace sections to FabricJSIModuleProvider
Summary:
Adding more Systrace sections to get perf information during critical paths.

Changelog: [Internal]

Reviewed By: ejanzer

Differential Revision: D24960195

fbshipit-source-id: 099e9cfac8ac87287e48e9915e6b28fe7a448783
2020-11-13 21:53:37 -08:00
Joshua Gross c609952ddb Add Systrace sections to UIImplementationProvider
Summary:
Add Systrace sections to initialization of non-Fabric UIImplementationProvider. This path is sometimes invoked during startup of Fabric so I'd like to gather more information about its impact.

Changelog: [Internal]

Reviewed By: ejanzer

Differential Revision: D24959965

fbshipit-source-id: a8555b8db284d00f97c71ca859cb2020409cb110
2020-11-13 21:53:36 -08:00
Joshua Gross 66e536739e Add additional debug logging for startSurface crashes
Summary:
There are a very, very small number of crashes in production that are hitting this line. I would like to understand what the existing tag ID is (perhaps it's eqal to the ID being set, which would indicate "double-start"). If not, it indicates that fragments are being reused somewhere, or something else odd is going on with lifecycles.

Changelog: [Internal]

Reviewed By: ejanzer

Differential Revision: D24953785

fbshipit-source-id: 079c86cdb571749662cca46feeaebdd6cb1281f4
2020-11-13 21:53:36 -08:00
Joshua Gross 23def0f8f0 Experiment to replace Fabric MountItem lists with concurrent queues
Summary:
Currently, queuing any sort of MountItem or getting the list of MountItems requires synchronization. Since these can be queued up at any point from the JS thread, there will, in theory, be constant contention between JS and UI thread.

To see if this is true, I'm creating an experiment instead of just switching over to concurrent structures. After seeing results, we can hopefully make a decision and delete the non-concurrent stuff or improve on it somehow.

Changelog: [Internal]

Reviewed By: ejanzer

Differential Revision: D24942110

fbshipit-source-id: fcbdeda51f91f4bd430a20d7484854fb1e94a832
2020-11-13 21:53:36 -08:00
Tim Yung 480dabd665 RN: Remove Android `setTimeout` Warning
Summary:
Many third-party libraries (especially data management and caching ones) make use of long timeouts.

There are currently no plans to change `setTimeout` on Android to support firing when apps are in the background. In the meantime, this warning is not actionable for developers who are using these frameworks. Their workarounds are to 1) deal with the noise in their logs, or 2) suppress the warning.

Changelog:
[General][Removed] - Removed warning on Android for `setTimeout` with delays greater than 1 minute.

Reviewed By: lunaleaps

Differential Revision: D24964958

fbshipit-source-id: 1b40c8ba95d554c29dec74477aa63ea3ef8e4768
2020-11-13 18:07:37 -08:00
Nadiia D 9be3356e02 replace defaultProps usage in functional components
Summary:
Changelog:
[General] [Removed] - Replace defaultProps usage in functional components

Reviewed By: kacieb

Differential Revision: D24907836

fbshipit-source-id: 05c7381b66c7738790eff5fea594791c3ecfa12e
2020-11-13 17:07:11 -08:00
Dulmandakh 2798e7172b remove ReactFragmentActivity (#30331)
Summary:
Remove ReactFragmentActivity class, which was deprecated at least since 0.58.

## Changelog

[Android] [Changed] - remove ReactFragmentActivity class.

Pull Request resolved: https://github.com/facebook/react-native/pull/30331

Reviewed By: makovkastar

Differential Revision: D24914082

Pulled By: fkgozali

fbshipit-source-id: 6833b76552a1fc19680f96501d4b8e2ff03c2c39
2020-11-13 09:55:40 -08:00
Samuel Susla 53862a1b5a Back out "Fabric: Strengthening StubView mutating validation"
Summary:
Changelog: [internal]

Original commit changeset: 8c8a3d8e205c

Reviewed By: ShikaSD

Differential Revision: D24951341

fbshipit-source-id: b6109a45f1537a9edc702eafac1736e801fbedc9
2020-11-13 08:50:52 -08:00
Kevin Gozali 58c80d4f8d Use codegen from source in default iOS template apps
Summary:
Add the `react-native-codegen` source to the `react-native` npm package.
Instead of using `react-native-codegen` from npm, the iOS app template will now build the package from source. Doing so removes the need to carefully time `react-native-codegen` npm releases to oss `react-native` releases, as the codegen and the oss release will be cut at the same time.

Changelog: [Internal] - Removed react-native-codegen dependency from iOS app template

Reviewed By: TheSavior

Differential Revision: D24904655

fbshipit-source-id: a07932bc748e2afb9359de584181bcb9dd0810ea
2020-11-12 22:30:28 -08:00