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

22504 Коммитов

Автор SHA1 Сообщение Дата
Samuel Susla e5921f7f38 Fix horizontal scrolling in RTL scripts
Summary:
Changelog: [internal]

Fabric's scrollView now supports horizontal scroll view.

Reviewed By: JoshuaGross

Differential Revision: D26608231

fbshipit-source-id: 176a7802fa580247d12657e08780805daacd8357
2021-02-24 06:29:51 -08:00
Samuel Susla c060f368b9 Check for null in eventTargetFromValue
Summary:
Changelog: [internal]

Check for null before passing it to `EventTarget` constructor.

Reviewed By: JoshuaGross

Differential Revision: D26605779

fbshipit-source-id: a2773c8123d83c25736bccefe656d1def8794091
2021-02-24 06:07:16 -08:00
Samuel Susla f7eecc68cb Nullcheck before dispatching view command
Summary:
Changelog: [internal]

`shadowNodeFromValue` can return nullptr. Let's make sure it returns valid value before dispatching command.

Reviewed By: JoshuaGross

Differential Revision: D26605350

fbshipit-source-id: eb9a0347c95ba07fd7e9b7ddeca7e6d6011f50ad
2021-02-24 01:59:44 -08:00
Janic Duplessis e67811e7a6 Fix RefreshControl layout when removed from window (#31024)
Summary:
Since iOS 14 refresh control is sometimes visible when it shouldn't. It seems to happen when it is removed and added back to the window. This repros easily when using react-native-screens with react-navigation tabs. Inactive tabs are detached from the window to save resources.

Calling endRefreshing when refresh control is added to the window fixes the layout. It will also be called on first mount where it is not necessary, but should be a no-op and didn't cause any issues. I also decided to call it for all ios versions, although it is only needed on iOS 14+ to avoid forking behavior more.

## Changelog

[iOS] [Fixed] - Fix RefreshControl layout when removed from window

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

Test Plan:
Before:

https://user-images.githubusercontent.com/2677334/108666197-93ea5a80-74a4-11eb-839b-8a4916967bf8.mov

After:

https://user-images.githubusercontent.com/2677334/108666223-9ea4ef80-74a4-11eb-8489-4e5d257299c8.mov

Reviewed By: shergin

Differential Revision: D26590759

Pulled By: PeteTheHeat

fbshipit-source-id: b8c06068a24446b261cbeb88ff166289724031f1
2021-02-23 14:54:36 -08:00
Andrei Shikov 36ca57ee25 Mark rn tester flavours as debuggable
Summary:
Changelog: [Internal]

Debuggable flag defines multiple things for flavours including `NDEBUG` flag in native builds. We need to explicitly state this from build.gradle to use it.

Reviewed By: JoshuaGross

Differential Revision: D26610482

fbshipit-source-id: e0c8095e239241c57a119e561b125cab16bf299f
2021-02-23 13:23:31 -08:00
Samuel Susla d20b5e1481 Check for nullptr to prevent crash
Summary:
Changelog: [internal]

Prevent crash when casting of state to `ImageShadowNode::ConcreteState` fails. This doesn't fix root cause of the problem but stops the app from crashing.

Reviewed By: JoshuaGross

Differential Revision: D26604807

fbshipit-source-id: 17a2ead56ac68e560070ed4defd364a9d1dfd1e8
2021-02-23 10:13:24 -08:00
Nadiia D 7b09eb54e7 Use flow strict-local
Summary:
Changelog:
[General][Changed] TextInput: use flow strict-local

Reviewed By: kacieb

Differential Revision: D26573763

fbshipit-source-id: 9d7d48310dd41949d07ad7616c4713b521c2545d
2021-02-22 18:30:01 -08:00
Luna Wei 174372c178 SectionList Separators Example
Summary:
Changelog:
[General][Added] - Added an example showcasing how separator callbacks work in SectionList for RNTester

Reviewed By: nadiia

Differential Revision: D26575122

fbshipit-source-id: 46710e2647c84bdf083265ce04ba330bd70eb2a7
2021-02-22 17:06:22 -08:00
Samuel Susla 270060e1d9 Pass weak pointers to background executor lambda
Summary:
Changelog: [internal]

### Why does the crash happen?

The crash can happen if runtime is destroyed before background executor lambda is run. Destroying a shadow node after runtime leads to a crash through the chain of ownerships.

Chain of ownership:
`ShadowNode -> ShadowNodeFamily -> EventEmitter -> EventTarget -> Pointer`

Pointer tries to call `invalidate` method on raw pointer to the runtime which is gone.

https://www.internalfb.com/intern/diffusion/FBS/browse/master/xplat/js/react-native-github/ReactCommon/jsi/jsi/jsi.h?commit=2ee3ae0c6a64&lines=335-339

To work around this, weak pointers are passed to lambda. This way the lambda is less likely to be the last owner of shadow nodes. Possibility of race still exists but it less likely to happen.

## Other solution
Alternatively, we could make sure native Runnable queue in Java is emptied as part of tear down process. We can even implement both solutions as they are semantically correct.

Reviewed By: shergin

Differential Revision: D26582554

fbshipit-source-id: b1b8a92237902bc4c40376176f575caa24a41a05
2021-02-22 17:02:19 -08:00
Luna Wei 33ff4445dc Fix disabled behavior
Summary:
Changelog:
[General][Fixed] - Pass disabled prop to pressability config

Reviewed By: kacieb

Differential Revision: D26590399

fbshipit-source-id: dd4f8f25d1b243b2983cd4ffaadb5d3dc6f3ed3e
2021-02-22 16:56:48 -08:00
Nadiia D c4aa411ee3 Replace Touchable with usePressability hook
Summary:
Changelog:
[General][Changed] textInput component changes:
- use Pressability hook directly
- no more cloning the component

Reviewed By: yungsters, kacieb

Differential Revision: D26573762

fbshipit-source-id: 17b47c8b0b9af22796d6e1528e8e3c16b5ed5d51
2021-02-22 15:39:57 -08:00
Valentin Shergin 099e7aa94d Fabric: New way (third attempt) to specify layout constraints for YGNodeCalculateLayout
Summary:
Surprisingly, it's not that trivial to pass `LayoutContrants` to `YGNodeCalculateLayout` in a way that always works. The problem is that `YGNodeCalculateLayout` does not allow expressing the constraints explicitly, so we need to pass them as `YGStyle` properties of a root node. With this approach, we unconditionally apply them as `YGStyle`s as actual values or `Undefined` value (which overrides some other values that can be previously set by calling this function or other code). We also intentionally preserve `height` and `width` values because it's a common use-case when a component explicitly specifies its size.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: mdvacca

Differential Revision: D26583550

fbshipit-source-id: 2cd506fbdc9e6a1a8f119d09ccfd34f876a13625
2021-02-22 14:47:40 -08:00
Lulu Wu abf079abb8 Make TTRC markers consistent between Bridge and Bridgeless
Summary:
The purpose of this change is to make TTRC markers work similarly for bridge loading and bridgeless loading so we could compare performance between them.

There are mainly four cases involved:
 ```REACT_BRIDGE_LOADING_START,
 REACT_BRIDGE_LOADING_END,
 REACT_BRIDGELESS_LOADING_START,
 REACT_BRIDGELESS_LOADING_END
```
First 2 are for beginning/ending of bridge loading which includes creating fragment, loading JS bundle, running JS bundle and creating react instance. Last 2 are for similar purpose with bridgeless.

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D26514499

fbshipit-source-id: 65d6f3cc7de9e07a7a3a802dd77138e74c23aa5b
2021-02-22 12:42:44 -08:00
Andrei Shikov c6d7af60fa Use lazy configuration APIs in the react app plugin
Summary:
Changelog:
[Internal] - Use lazy task APIs in the Gradle new plugin

Gradle now migrates to [lazy task APIs](https://docs.gradle.org/current/userguide/lazy_configuration.html) to help with project configuration time. It helps even in the rn-tester case, e.g. `./gradlew help` executes in 2-3s instead of 20s.

The migration is quite simple - use `Provider` and `tasks.register` instead of `task.create` everywhere.

Reviewed By: mdvacca

Differential Revision: D25946748

fbshipit-source-id: 2ccd2f881afe7601e506dc7adcc8a658c7267328
2021-02-22 08:16:52 -08:00
Andrei Shikov 959e135d80 Extract bundle task
Summary:
Changelog: [Internal]

Extracts task definition for bundling and hermes binary into separate tasks in the new plugin.

Reviewed By: mdvacca

Differential Revision: D25915057

fbshipit-source-id: b1d8a4b5e8789c3b7832efea13274435c9391ccb
2021-02-22 08:16:51 -08:00
Andrei Shikov dbbc1c1624 Add react build app plugin and extension
Summary:
Changelog:
[Android][Added] - Basic definition for react gradle plugin

Adds plugin and build configuration + copies config from react.gradle to extension.
Copies internals of react.gradle to the plugin. Will be refactored in the next commits.

Reviewed By: mdvacca

Differential Revision: D25693008

fbshipit-source-id: b0feaa02cee8a1ee94d032426d19c501ff3b2534
2021-02-22 08:16:51 -08:00
Samuel Susla f303266d69 Correctly handle null values in dynamic props in prop forwarding
Summary:
Changelog: [internal]

shergin found that folly's merge_patch implementation doesn't propagate `null` correctly (details in D26435620 (1e9f63fe27)). This is a requirement and needs to be adjusted in props forwarding on Android.

As far as we know this isn't causing any bugs but it is an error that should be fixed.

Reviewed By: shergin

Differential Revision: D26545821

fbshipit-source-id: 9edd24aecfcde17f5d9c1197f65db0e0f3f9e364
2021-02-22 05:53:24 -08:00
Joshua Gross 1fe5cac52a Remove custom STUB_VIEW_ASSERT in favor of react_native_assert
Summary:
We have a custom STUB_VIEW_ASSERT that helps debugging stub view issues on platforms (like iOS) where flushing logs around assert-time isn't 100% guaranteed.

Move that logic into react_native_assert since it's generally useful.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26567218

fbshipit-source-id: 79f5ae66fc65a0af48dbcf4c7204ac8245911cb0
2021-02-20 20:08:02 -08:00
Joshua Gross b3930f935f Convert most Fabric Cxx code to use react_native_assert instead of assert
Summary:
See react_native_assert.{h,cpp}. Because of the BUCK+Android issue where NDEBUG is always defined, we use react_native_assert instead of assert to enable xplat asserts in debug/dev mode.

This migrates most of the codebase, but probably not 100%. The goal is to increase assertion coverage on Android, not to get to 100% (yet).

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D26562866

fbshipit-source-id: a7bf2055b973e1d3650ed8d68a6d02d556604af9
2021-02-19 20:52:52 -08:00
Joshua Gross 2d51f4b499 Define RN_SHADOW_TREE_INTROSPECT and enable shadow tree assertions on Android
Summary:
These assertions will already run by default on iOS, macOS, Windows, etc, all OSes except Android because of a longstanding Buck+Android NDEBUG issue.

Align platforms by using REACT_NATIVE_DEBUG flag.

Only impacts debug/dev builds.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D26561977

fbshipit-source-id: 324875c48b2a138e8ab55630c3e2ec43c2f768c3
2021-02-19 20:52:51 -08:00
Joshua Gross b557ea6bb8 Ensure that all Fabric modules are compiled with the same preprocessor flags
Summary:
Define get_react_native_preprocessor_flags() as a stub for OSS.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D26561978

fbshipit-source-id: 9e5b1b25f52760f9bacc908639e2bab1cf85da1e
2021-02-19 20:52:51 -08:00
Nadiia D 7f005e6077 Add cancelable prop, use mixed return type for event handlers
Summary:
Changelog:
[General][Added] Added `cancelable` prop to Pressable.
[General][Changed] Event handlers return mixed type instead of void.

Reviewed By: yungsters

Differential Revision: D26432837

fbshipit-source-id: c7bafdec085d08a06e859b45bff91a3b07d747ed
2021-02-19 17:54:19 -08:00
simek 927573c581 Flow: fix VirtualizedList issues, remove few no longer valid suppressions (#30128)
Summary:
This PR fixes few suppressed Flow issues in `VirtualizedList` component.

I have also removed few no longer valid Flow suppressions in `ActivityIndicator` and `ReactNativeTestTools`.

## Changelog
[General] [Fixed] - Flow: fix few issues in `VirtualizedList`,
[General] [Removed] - Flow: remove few no longer valid suppressions in `ReactNativeTestTools`

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

Test Plan: Successful run of `yarn flow` check.

Reviewed By: kacieb

Differential Revision: D26489398

Pulled By: lunaleaps

fbshipit-source-id: db71d8bfeb3b6dc5a2738a73ac6644aef4a0311b
2021-02-19 14:31:33 -08:00
Peter Argany 995e962af4 Fix fast refresh settings in RN Dev Menu
Summary:
Changelog: [Internal]

This moves enabling/disabling fast refresh off of `bridge.enqueueJSCall` in bridgeless mode.

Reviewed By: sammy-SC

Differential Revision: D26290378

fbshipit-source-id: ed8a3389b9812cedf7181971656dacd98ff7ecfd
2021-02-19 13:47:26 -08:00
Peter Argany 2548d424ce Make RCTDevSettings conform to RCTBundleHolderModule
Summary:
Changelog: [Internal]

This diff allows `RCTDevSettings` to access bundleURL directly instead of relying on the bridge.

Reviewed By: RSNara

Differential Revision: D26289592

fbshipit-source-id: e22e583e51323bfe66f6e424d9f47edf71b1ed9f
2021-02-19 13:47:26 -08:00
Peter Argany dd1ac9de24 Introducting RCTBundleHolderModule (name pending)
Summary:
Changelog: [Internal]

Problem:

The Bridge holds and exposes the bundle URL for native modules to inspect via `bridge.bundleURL`.

Solution:

This follows the same pattern we've been using for attaching objects to native modules: declare a protocol with the required object, attach that object during module init.

Differential Revision: D26289581

fbshipit-source-id: 35ae83912e392be84f55c8d056c8da15ba75060f
2021-02-19 13:47:25 -08:00
Peter Argany 441d630ed0 Enable dev tools setup in bridgeless mode
Summary:
Changelog: [Internal]

I'm trying to get Fast refresh working in bridgeless mode. I need the `    require('./setUpReactRefresh');` line to be executed to do so.

I'm not sure why this was commented out in the first place, it seems to be working fine in FBiOS/FB4A.

Reviewed By: p-sun

Differential Revision: D26289573

fbshipit-source-id: 6151f781c31e3aadaebfeb759d3eb776e8b525cc
2021-02-19 13:47:25 -08:00
Peter Argany f0faa7843c Remove iOS10/tvOS10 support from remaining podfiles
Summary: Changelog: [iOS] Remove iOS10/tvOS10 support from remaining podfiles

Reviewed By: shergin

Differential Revision: D26410811

fbshipit-source-id: 9050346def5070338e709ff102a284a828821586
2021-02-19 13:47:25 -08:00
Pieter Vanderwerff 9abafd1c27 Deploy v0.145.0 to xplat
Reviewed By: fred2028

Differential Revision: D26524492

fbshipit-source-id: 7381599f3432f762d7790a0cf338d19d0fb05875
2021-02-18 18:54:03 -08:00
Joshua Gross a0d740a04a RN_DEBUG -> REACT_NATIVE_DEBUG
Summary:
Use REACT_NATIVE_DEBUG for consistent branding and to prevent potential collisions with other codebases.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26517424

fbshipit-source-id: c85740d4e5320cc14023eb6f521bb1a242ae56fe
2021-02-18 14:31:57 -08:00
Joshua Gross 5be2843c1c Use react_native_assert in LayoutAnimations
Summary:
Use react_native_assert in LayoutAnimations to enable asserts to fire on Android.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26517096

fbshipit-source-id: f000c4848f29c8779170625d357f547f2e9e6365
2021-02-18 14:31:57 -08:00
Joshua Gross d93b7c3369 Rename rn_assert to react_native_assert
Summary:
Keep consistent branding of rn -> react_native

Changelog: [Internal]

Reviewed By: fkgozali, mdvacca

Differential Revision: D26517069

fbshipit-source-id: 32fd3e52ee91e7ae72b6022535cb99ffc5b12303
2021-02-18 14:31:57 -08:00
Luna Wei 224757e830 Remove FlowFixMe in VirtualizedSectionList
Summary:
Changelog:
[Internal][Fixed] - Remove FlowFixMe in VirtualizedSectionList

Reviewed By: kacieb

Differential Revision: D26497027

fbshipit-source-id: 57ea417041df643139068b084d69aaa4efb995fd
2021-02-18 13:46:52 -08:00
Valentin Shergin 0bb459b149 Back out "Fabric: Using `SurfaceHandler` on iOS"
Summary:
This is a backout of D24290778 (33d6091cac).
The original diff causes T85097896 and probably T85069775. For now I am going to unland this, and then I will re-land this after the cut with a fix.

Original commit changeset: 62b600c3f1b2
Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D26515027

fbshipit-source-id: 057663b092e6b1d74db83c40d656b2ae142bd622
2021-02-18 12:41:27 -08:00
Paige Sun 10f8c1a1c0 Add ViewConfig for MultilineTextInput
Differential Revision: D26463558

fbshipit-source-id: fe73e60f9a03d865bc9deab59260321072151e22
2021-02-18 09:20:22 -08:00
Kacie Bawiec 28fb41a0ab Add an example showing the prop contentInset in SectionList
Summary:
This prop is iOS only.

Changelog:
[iOS][Added] Add an example showing the prop contentInset in SectionList

Reviewed By: lunaleaps

Differential Revision: D26491787

fbshipit-source-id: 31398388081a22ccd17cc256aa174ffe7764e7a9
2021-02-17 20:40:20 -08:00
Joshua Gross 16cf45ac3d Migrate Differentiator and RawPropsParser to rn_assert
Summary:
This will allow these asserts to crash on Android debug builds.

We will migrate more sites as we confirm this is stable through testing.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26409354

fbshipit-source-id: fb35cd8de29890f7c2b761435eaa02de377bdd1e
2021-02-17 18:00:47 -08:00
Joshua Gross ec4833f06d Introduce RN_DEBUG flag and rn_assert for Cxx
Summary:
BUCK always defines NDEBUG on Android builds. This is a longstanding issue and it's tricky to work around.

Previous attempts to fix this within React Native were difficult because disabling NDEBUG caused lots of issues that were difficult to track down.

Instead, I am (1) introducing a new RN_DEBUG flag that can be used cross-platform, (2) whenever NDEBUG is *not* enabled, RN_DEBUG will automatically be defined, (3) enables debug-only code to be compiled on Android, (4) enables us to selectively, slowly migrate `assert` to `rn_assert` in a way that doesn't impact non-Android platforms, but allows us to maintain stability of Android debug builds.

Actually enabling the RN_DEBUG flag in debug builds is done in FB-internal code. I assume the NDEBUG issue is not a problem when compiling in open-source without BUCK.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26409355

fbshipit-source-id: 285b8073bba3756834925727bfa28d3c6bc06335
2021-02-17 18:00:47 -08:00
Joshua Gross fb1833eede Consolidate various debug-only flags into flags.h (#30988)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/30988

We have a bunch of flags scattered throughout the codebase with poor hygiene and commenting. Consolidate.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26392518

fbshipit-source-id: 2823de123a5009d6b8c358e8a3f451b9fa0e05b7
2021-02-17 18:00:47 -08:00
David Vacca 528d51e583 MapBuffer C++ unit tests
Summary:
Unit tests for MapBuffer

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D26364356

fbshipit-source-id: a4b08c978c05e6b709329d553e0c44ede1a92cbf
2021-02-17 15:47:08 -08:00
David Vacca 022936bcf5 Initial implementation of MapBuffer
Summary:
This diff defines an initial implementation of MapBuffer class. This is an unfinished implementation and the API and internals is going to change considerably in the next days.

The purpose of this stack is to experiment with ByteBuffers moving data from C++ into Java and learn about what're the performance implications of this model.

The format of serialization is going to change in the next few days. I'm going to follow a format similar to https://fb.quip.com/3ENaA782rkkC

I'm expecting to iterate on this API as we expand the development of the new JNI system, PLEASE read all the TODOs as you are reviewing the code.

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D26364354

fbshipit-source-id: 94e434f699a4250dd240342386eddeaa6acd3ba2
2021-02-17 15:47:07 -08:00
Kacie Bawiec aaede1029d Remove UNSAFE_componentWillReceiveProps
Summary:
This diff removes `UNSAFE_componentWillReceiveProps` and adds the changes to `componentDidUpdate` instead.

Why use `componentDidUpdate`? When reading through the [React docs on removing UNSAFE_componentWillReceiveProps](https://reactjs.org/docs/react-component.html#unsafe_componentwillreceiveprops), it says:
> If you need to perform a side effect (for example, data fetching or an animation) in response to a change in props, use componentDidUpdate lifecycle instead.

The original usage of `UNSAFE_componentWillReceiveProps` updates the content inset when `props.contentInset` changes. However, we don't always want it to update if the content inset hasn't changed, as calling `setValue` will reset the animated value unnecessarily, and kill any current animations (which we don't want to do). [React Native doc on setValue for reference](https://reactnative.dev/docs/animatedvalue#setvalue).

Changelog:
[General] Use componentDidUpdate instead of UNSAFE_componentwillReceiveProps in ScrollView

Reviewed By: lunaleaps

Differential Revision: D26487276

fbshipit-source-id: 77419deacf5db676cd721b58f34932bd6ca2399f
2021-02-17 15:00:07 -08:00
Tim Yung 3af0c84aa5 RN: Simplify `RCTDeviceEventEmitter`
Summary:
Simplifies `RCTDeviceEventEmitter` to simply be an `EventEmitter`.

The only thing special about it is that all native events are emitted on it and that `NativeEventEmitter` composes it.

Changelog:
[General][Removed] - Removed `RCTDeviceEventEmitter.sharedSubscribers`.

Reviewed By: RSNara

Differential Revision: D26163660

fbshipit-source-id: aedff8323d86947220fc293a74a19a3981fd875a
2021-02-17 12:20:26 -08:00
David Vacca 34d3efe2ef TextInlineImage view configs
Summary:
Migrate RCTTextInlineImage to use NativeComponentRegistry

changelog: [internal] internal

Reviewed By: PeteTheHeat

Differential Revision: D26427141

fbshipit-source-id: 56c120f19493e17c9be4e467032e0a4f2244c0a9
2021-02-17 10:46:20 -08:00
David Vacca 769136ca3c Fix rendering of Text and TextInlineViews in Fabric + StaticViewConfigs enabled
Summary:
This diff fixes the render of Text and TextInlineViews when using Fabric + StaticViewConfigs enabled

Similar to Bridgeless mode, we want TextNativeComponent to render "createReactNativeComponentClass('RCTVirtualText..." instead of NativeText.

https://www.internalfb.com/intern/diffusion/FBS/browsefile/master/xplat/js/react-native-github/Libraries/Text/TextNativeComponent.js?commit=f044696a1a273dec1fac227898f5603682d4b19d&lines=59

UIManager.hasViewManagerConfig returns false for all components when using StaticViewConfigs enabled.
I'm changing this method to return true when the component is supported by static view configs:

https://www.internalfb.com/intern/diffusion/FBS/browsefile/master/xplat/js/RKJSModules/EntryPoints/Fb4aBundle.js?commit=4661488cc6aab5078dc6b2afcbb0624e887346d5&lines=81-94

This is correct because hasViewManagerConfig is a new method that's used ONLY in two callsites:

https://www.internalfb.com/intern/diffusion/FBS/browsefile/master/xplat/js/react-native-github/Libraries/Text/TextNativeComponent.js?lines=59

https://www.internalfb.com/intern/diffusion/FBS/browsefile/master/xplat/js/react-native-github/Libraries/Utilities/deprecatedPropType.js?lines=24

Although, this can fail if "hasViewManagerConfig" is started to be used as "feature detection" (see next diffs of the stack)

I'm open to other suggestions (please comment in the diff

My current plan is:

- Land this diff (or similar) to unblock static view configs experiment next week
- Include all codeGenNativeComponents into the list of static view configs
- Migrate callsites of getViewManagerConfig() -> hasNativeConfig() (only for components that have static view configs)
- Think/Discuss/Plan long term plan about feature detection

changelog: [internal] internal

Reviewed By: yungsters

Differential Revision: D26427140

fbshipit-source-id: ce8bf00d6c9793ad17bdc65eb8476aaab63db066
2021-02-17 10:46:19 -08:00
Joshua Gross 84778d7cfd LayoutAnimation: ensure onCompleteCallback is called in Fabric and non-Fabric
Summary:
Previously this branch of code only ran on Fabric+iOS. It is also needed for non-Fabric+Android in case `setLayoutAnimationEnabledExperimental` is not called on Android and an animation is queued up.

Changelog: [Internal]

Reviewed By: ShikaSD

Differential Revision: D26466482

fbshipit-source-id: 11c50bf94daa287a619f2b623785b60675eb6cf0
2021-02-17 10:33:58 -08:00
Kacie Bawiec 1641d46529 Replace UNSAFE_componentWillMount with componentDidMount
Summary:
Changelog:
[General] Replace UNSAFE_componentWillMount with componentDidMount in ScrollView

Reviewed By: nadiia

Differential Revision: D26375818

fbshipit-source-id: 1a33a7fddcf78c05cc1e4f04bd85b48a59290560
2021-02-17 09:58:10 -08:00
Valentin Shergin 95116dbe6d Fabric: Correct implementation of RCTUITextContentTypeFromString for <TextInput contentType>
Summary:
Previous implementation was now correct because it assumed that all the constant values are aligned between RN and UIKit.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: JoshuaGross

Differential Revision: D26476566

fbshipit-source-id: 07bbe14d887d446bae34f448f5e62c3075fb0979
2021-02-17 09:53:37 -08:00
generatedunixname89002005325676 c498c055a2 Daily `arc lint --take CLANGFORMAT`
Reviewed By: zertosh

Differential Revision: D26480949

fbshipit-source-id: 5a8f706daaea276865e6eb8602cc3b50c484bf6f
2021-02-17 04:24:39 -08:00
Joshua Gross e810291790 Subtle stopSurface lifecycle change
Summary:
Change lifecycle of stopSurface in a subtle way: mark the surface as stopped in Java first, then in Cxx (currently it happens in Cxx, then Java).

This will cause us / allow us to ignore the final mounting instructions for the Surface, which are all irrelevant since they just have to do with View removal.
We can rely on GC and `unmountReactApplication` to do all of this for us, and save some CPU cycles on stopSurface.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D26469741

fbshipit-source-id: a7f81d44c3cb2138f0ab31feb38852910410c638
2021-02-16 14:48:28 -08:00