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

20042 Коммитов

Автор SHA1 Сообщение Дата
David Vacca 5c48c94f8c 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
2020-05-06 16:35:27 -07:00
David Vacca ff0c62504b 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
2020-05-06 16:35:27 -07:00
Christoph Nakazawa 21d7a357f6 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
2020-05-06 15:36:35 -07:00
Valentin Shergin fa5b4c9e0c 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
2020-05-06 15:16:04 -07:00
Tim Yung d14b89bd8a 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
2020-05-06 14:23:05 -07:00
Nat Mote 0c2c4bf33c 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
2020-05-06 12:32:21 -07:00
Kevin Gozali de667fffa4 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
2020-05-06 12:20:48 -07:00
Rick Hanlon 41f0d9ba8f 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
2020-05-06 11:40:22 -07:00
Rick Hanlon 5066b662f2 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
2020-05-06 11:40:22 -07:00
Paige Sun b0d0e51a77 iOS: Animated image should animate at the same speed regardless of framerate
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
2020-05-06 10:38:14 -07:00
Christoph Nakazawa 530dffa342 Cleanup unused dependencies
Reviewed By: kassens

Differential Revision: D21281288

fbshipit-source-id: cf566ad0628dc179b3753f2f25a11637c33dee24
2020-05-06 04:35:01 -07:00
Joshua Gross 10314fe621 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
2020-05-05 22:27:47 -07:00
Emily Janzer edfd965c46 Update native module specs
Summary: As titled.

Reviewed By: fkgozali

Differential Revision: D21417307

fbshipit-source-id: 7c6b0179f9f1a5108da241d181a24f707a083deb
2020-05-05 19:37:02 -07:00
Héctor Ramos e8060ae103 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
2020-05-05 16:01:55 -07:00
Mats Byrkjeland de7f69a58e Fix type of exported Touchables: ComponentType -> AbstractComponent (#28737)
Summary:
Fixes https://github.com/facebook/react-native/issues/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: https://github.com/facebook/react-native/pull/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
2020-05-05 12:44:50 -07:00
Will Holen 4459c08219 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
2020-05-05 12:04:10 -07:00
Christoph Nakazawa 1740233f38 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
2020-05-05 08:33:16 -07:00
Rubén Norte 4f5a092bf6 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
2020-05-05 04:54:56 -07:00
Janic Duplessis 0348953914 Allow passing partial contentOffset to ScrollView on Android (#28817)
Summary:
Since support for contentOffset was added to horizontal ScrollView on android (30cc158a87) 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: https://github.com/facebook/react-native/pull/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
2020-05-04 21:54:35 -07:00
Joshua Gross bb5d04366a Differ: fix TinyMap to prevent possible crashes in `find()` and `begin()`, 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
2020-05-04 21:28:35 -07:00
Joshua Gross aae38c3dfe 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
2020-05-04 21:28:35 -07:00
Joshua Gross ca144fca3f 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
2020-05-04 21:28:34 -07:00
Nick Gerleman 30a89f30c6 Don't use #import in C++ Code (#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: https://github.com/facebook/react-native/pull/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
2020-05-04 16:52:24 -07:00
Kacie Bawiec 7f2515ece8 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
2020-05-04 16:42:13 -07:00
Joshua Gross d815be1c99 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
2020-05-04 16:04:51 -07:00
Mike Grabowski ced959bb3d chore: remove Kotlin version from the default template (#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 29d3dfbd19 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: https://github.com/facebook/react-native/pull/28626

Test Plan: Building a brand new project with `master` should work

Differential Revision: D21388961

Pulled By: shergin

fbshipit-source-id: 92666aa67f92b29f4e7f9c036b332bd058cdd49e
2020-05-04 14:41:04 -07:00
Samuel Susla 577fdeaa62 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
2020-05-04 02:59:19 -07:00
Christoph Nakazawa 8acb2b3a3e 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
2020-05-04 01:12:12 -07:00
Tim Yung ddea7c76b3 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
2020-05-04 01:00:07 -07:00
Tim Yung 7bd694fc6f 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
2020-05-04 01:00:06 -07:00
zhongwuzw 9cdc19a936 Fixes TextInput shaking when typing Chinese (#28805)
Summary:
Fixes https://github.com/facebook/react-native/issues/28488.

## Changelog

[iOS] [Fixed] - Fixes TextInput shaking when typing Chinese
Pull Request resolved: https://github.com/facebook/react-native/pull/28805

Test Plan: Demo see https://github.com/facebook/react-native/issues/28488.

Differential Revision: D21376803

Pulled By: shergin

fbshipit-source-id: b1fe6cc5f67d42ef98a6c12b8ab9990feac0e2a7
2020-05-04 00:28:58 -07:00
Christoph Nakazawa 87d000f890 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
2020-05-03 12:09:48 -07:00
Kevin Gozali 8ad810717e 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
2020-05-03 09:32:54 -07:00
Christoph Nakazawa 1787c161a9 Remove `docs` from `jscodeshift`
Summary:
I removed 1 MiB from `jscodeshift` as it was shipping with docs: 5885662920

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D21368889

fbshipit-source-id: 452fd4cedcc749d972adbb69df5c95117dd55b15
2020-05-03 02:10:31 -07:00
David Vacca 03385ac1d6 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
2020-05-02 11:06:47 -07:00
David Vacca eb6001998b 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
2020-05-01 17:19:29 -07:00
David Vacca 3da8103679 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
2020-05-01 17:19:29 -07:00
David Vacca 8c45255fa5 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
2020-05-01 17:19:28 -07:00
Emily Janzer bf0539fb51 Revert D21336180: Update cocoapods, fix RNTester
Differential Revision:
D21336180

Original commit changeset: 4d51f53466ec

fbshipit-source-id: 5519bc0457f14060e793d2da454489b77fce923f
2020-05-01 15:11:39 -07:00
Valentin Shergin 56592c500f 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
2020-05-01 14:56:16 -07:00
Eli White 780f06cd47 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
2020-05-01 14:22:20 -07:00
Emily Janzer c25911bea8 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
2020-05-01 13:51:47 -07:00
Boyang Yu 12f8b2598f 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
2020-05-01 12:41:31 -07:00
Samuel Susla 2047041c53 Use InteropLayer for ReactART
Summary:
Changelog: [Internal]

Use InteropLayer to bridge ReactART into Fabric.

Reviewed By: shergin

Differential Revision: D21302151

fbshipit-source-id: 46deb381389c6fa87ecad296f616fbaccb29fe30
2020-05-01 03:47:26 -07:00
David Vacca 65d52a59b0 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
2020-05-01 00:19:59 -07:00
David Vacca 09487e4e95 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
2020-05-01 00:19:58 -07:00
David Vacca 919554f2c6 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
2020-05-01 00:19:58 -07:00
David Vacca f82a6d78c9 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
2020-05-01 00:19:58 -07:00
Rick Hanlon f0dfd35108 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
2020-04-30 19:40:17 -07:00
Samuel Susla 0569221af1 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
2020-04-30 10:30:25 -07:00