diff --git a/ReactCommon/fabric/textlayoutmanager/RCTTextLayoutManager.mm b/ReactCommon/fabric/textlayoutmanager/RCTTextLayoutManager.mm index f729c9c81..33a2fdb70 100644 --- a/ReactCommon/fabric/textlayoutmanager/RCTTextLayoutManager.mm +++ b/ReactCommon/fabric/textlayoutmanager/RCTTextLayoutManager.mm @@ -63,7 +63,6 @@ static NSLineBreakMode RCTNSLineBreakModeFromWritingDirection(EllipsizeMode elli [layoutManager drawGlyphsForGlyphRange:glyphRange atPoint:frame.origin]; } - - (NSTextStorage *)_textStorageAndLayoutManagerWithAttributesString:(NSAttributedString *)attributedString paragraphAttributes:(ParagraphAttributes)paragraphAttributes size:(CGSize)size diff --git a/ReactCommon/fabric/uimanager/BUCK b/ReactCommon/fabric/uimanager/BUCK index 4a3eeae2b..39004b1e1 100644 --- a/ReactCommon/fabric/uimanager/BUCK +++ b/ReactCommon/fabric/uimanager/BUCK @@ -52,6 +52,7 @@ rn_xplat_cxx_library( "xplat//third-party/glog:glog", react_native_xplat_target("fabric/core:core"), react_native_xplat_target("fabric/debug:debug"), + react_native_xplat_target("fabric/text:text"), react_native_xplat_target("fabric/view:view"), ], ) diff --git a/ReactCommon/fabric/uimanager/FabricUIManager.cpp b/ReactCommon/fabric/uimanager/FabricUIManager.cpp index 3b8786b29..b9a5cd57f 100644 --- a/ReactCommon/fabric/uimanager/FabricUIManager.cpp +++ b/ReactCommon/fabric/uimanager/FabricUIManager.cpp @@ -39,12 +39,33 @@ static const RawProps rawPropsFromDynamic(const folly::dynamic object) { } static const std::string componentNameByReactViewName(std::string viewName) { + // We need this function only for the transition period; + // eventually, all names will be unified. + std::string rctPrefix("RCT"); if (std::mismatch(rctPrefix.begin(), rctPrefix.end(), viewName.begin()).first == rctPrefix.end()) { // If `viewName` has "RCT" prefix, remove it. viewName.erase(0, 3); } + // Fabric uses slightly new names for Text components because of differences + // in semantic. + if (viewName == "Text") { + return "Paragraph"; + } + if (viewName == "VirtualText") { + return "Text"; + } + + // We need this temporarly for testing purposes until we have proper + // implementation of component. + if ( + viewName == "ScrollContentView" || + viewName == "ScrollView" + ) { + return "View"; + } + return viewName; } diff --git a/ReactCommon/fabric/uimanager/Scheduler.cpp b/ReactCommon/fabric/uimanager/Scheduler.cpp index b2571ebf6..8b5038c31 100644 --- a/ReactCommon/fabric/uimanager/Scheduler.cpp +++ b/ReactCommon/fabric/uimanager/Scheduler.cpp @@ -5,6 +5,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -16,8 +19,11 @@ namespace react { Scheduler::Scheduler() { auto componentDescriptorRegistry = std::make_shared(); - SharedComponentDescriptor viewComponentDescriptor = std::make_shared(); - componentDescriptorRegistry->registerComponentDescriptor(viewComponentDescriptor); + + componentDescriptorRegistry->registerComponentDescriptor(std::make_shared()); + componentDescriptorRegistry->registerComponentDescriptor(std::make_shared()); + componentDescriptorRegistry->registerComponentDescriptor(std::make_shared()); + componentDescriptorRegistry->registerComponentDescriptor(std::make_shared()); uiManager_ = std::make_shared(componentDescriptorRegistry); uiManager_->setDelegate(this);