mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Integrate UnimplementedView into RNTester OSS
Summary: This diff integrates and render UnimplementedView into RNTester OSS changelog: [internal] internal Reviewed By: fkgozali Differential Revision: D23170052 fbshipit-source-id: 9306311d114c280fdeeb20d545ef244369040e96
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d6ef2598bc
commit
19695ed6a9
@@ -42,5 +42,8 @@ rn_xplat_cxx_library(
|
||||
"//xplat/jsi:jsi",
|
||||
"//xplat/third-party/linker_lib:atomic",
|
||||
FBJNI_TARGET,
|
||||
# TODO T71316899: Extract CoreComponentsRegistry out of this module
|
||||
# The following dependencies are required by CoreComponentsRegistry
|
||||
"//xplat/js/react-native-github:generated_components-rncore",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <fbjni/fbjni.h>
|
||||
|
||||
#include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
|
||||
#include <react/renderer/components/rncore/ComponentDescriptors.h>
|
||||
#include <react/renderer/components/view/ViewComponentDescriptor.h>
|
||||
|
||||
namespace facebook {
|
||||
@@ -29,6 +30,7 @@ CoreComponentsRegistry::sharedProviderRegistry() {
|
||||
|
||||
providerRegistry->add(
|
||||
concreteComponentDescriptorProvider<ViewComponentDescriptor>());
|
||||
|
||||
return providerRegistry;
|
||||
}();
|
||||
|
||||
@@ -41,6 +43,8 @@ CoreComponentsRegistry::initHybrid(
|
||||
ComponentFactory *delegate) {
|
||||
auto instance = makeCxxInstance(delegate);
|
||||
|
||||
// TODO T69453179: Codegen this file
|
||||
|
||||
auto buildRegistryFunction =
|
||||
[](EventDispatcher::Weak const &eventDispatcher,
|
||||
ContextContainer::Shared const &contextContainer)
|
||||
@@ -48,6 +52,14 @@ CoreComponentsRegistry::initHybrid(
|
||||
auto registry = CoreComponentsRegistry::sharedProviderRegistry()
|
||||
->createComponentDescriptorRegistry(
|
||||
{eventDispatcher, contextContainer});
|
||||
|
||||
auto mutableRegistry =
|
||||
std::const_pointer_cast<ComponentDescriptorRegistry>(registry);
|
||||
mutableRegistry->setFallbackComponentDescriptor(
|
||||
std::make_shared<UnimplementedNativeViewComponentDescriptor>(
|
||||
ComponentDescriptorParameters{
|
||||
eventDispatcher, contextContainer, nullptr}));
|
||||
|
||||
return registry;
|
||||
};
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ rn_android_library(
|
||||
react_native_target("java/com/facebook/react/views/text:text"),
|
||||
react_native_target("java/com/facebook/react/views/text/frescosupport:frescosupport"),
|
||||
react_native_target("java/com/facebook/react/views/textinput:textinput"),
|
||||
react_native_target("java/com/facebook/react/views/unimplementedview:unimplementedview"),
|
||||
react_native_target("java/com/facebook/react/views/view:view"),
|
||||
react_native_target("java/com/facebook/react/module/annotations:annotations"),
|
||||
react_native_target("res:shell"),
|
||||
|
||||
@@ -57,6 +57,7 @@ import com.facebook.react.views.text.ReactTextViewManager;
|
||||
import com.facebook.react.views.text.ReactVirtualTextViewManager;
|
||||
import com.facebook.react.views.text.frescosupport.FrescoBasedReactTextInlineImageViewManager;
|
||||
import com.facebook.react.views.textinput.ReactTextInputManager;
|
||||
import com.facebook.react.views.unimplementedview.ReactUnimplementedViewManager;
|
||||
import com.facebook.react.views.view.ReactViewManager;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -180,6 +181,8 @@ public class MainReactPackage extends TurboReactPackage {
|
||||
viewManagers.add(new ReactViewManager());
|
||||
viewManagers.add(new ReactVirtualTextViewManager());
|
||||
|
||||
viewManagers.add(new ReactUnimplementedViewManager());
|
||||
|
||||
return viewManagers;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user