Skip to content

Commit

Permalink
Fabric: Codemod: All <fabric/... includes were renamed to <react/...
Browse files Browse the repository at this point in the history
Summary: We are moving to more stable APIs removing all mentiones of the effort name from the codebase.

Reviewed By: mdvacca

Differential Revision: D12912894

fbshipit-source-id: 4a0c6b9e7454b8b14e62d419e9e9311dc0c56e7a
  • Loading branch information
shergin authored and facebook-github-bot committed Nov 10, 2018
1 parent 9f9390d commit 94d49e5
Show file tree
Hide file tree
Showing 191 changed files with 528 additions and 524 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#import "RCTActivityIndicatorViewComponentView.h"

#import <fabric/components/activityindicator/ActivityIndicatorViewProps.h>
#import <react/components/activityindicator/ActivityIndicatorViewProps.h>

using namespace facebook::react;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

#import "RCTImageComponentView.h"

#import <fabric/components/image/ImageEventEmitter.h>
#import <fabric/components/image/ImageLocalData.h>
#import <fabric/components/image/ImageProps.h>
#import <fabric/imagemanager/ImageRequest.h>
#import <fabric/imagemanager/ImageResponse.h>
#import <fabric/imagemanager/RCTImagePrimitivesConversions.h>
#import <react/components/image/ImageEventEmitter.h>
#import <react/components/image/ImageLocalData.h>
#import <react/components/image/ImageProps.h>
#import <react/imagemanager/ImageRequest.h>
#import <react/imagemanager/ImageResponse.h>
#import <react/imagemanager/RCTImagePrimitivesConversions.h>

#import "RCTConversions.h"
#import "MainQueueExecutor.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#import "RCTRootComponentView.h"

#import <fabric/components/root/RootProps.h>
#import <react/components/root/RootProps.h>

using namespace facebook::react;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
#import "RCTScrollViewComponentView.h"

#import <React/RCTAssert.h>
#import <fabric/components/scrollview/ScrollViewLocalData.h>
#import <fabric/components/scrollview/ScrollViewProps.h>
#import <fabric/components/scrollview/ScrollViewEventEmitter.h>
#import <fabric/graphics/Geometry.h>
#import <react/components/scrollview/ScrollViewLocalData.h>
#import <react/components/scrollview/ScrollViewProps.h>
#import <react/components/scrollview/ScrollViewEventEmitter.h>
#import <react/graphics/Geometry.h>

#import "RCTConversions.h"
#import "RCTEnhancedScrollView.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#import "RCTSwitchComponentView.h"

#import <fabric/components/switch/SwitchEventEmitter.h>
#import <fabric/components/switch/SwitchProps.h>
#import <react/components/switch/SwitchEventEmitter.h>
#import <react/components/switch/SwitchProps.h>

using namespace facebook::react;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

#import "RCTParagraphComponentView.h"

#import <fabric/components/text/ParagraphLocalData.h>
#import <fabric/components/text/ParagraphProps.h>
#import <fabric/core/LocalData.h>
#import <fabric/graphics/Geometry.h>
#import <fabric/textlayoutmanager/TextLayoutManager.h>
#import <fabric/textlayoutmanager/RCTTextLayoutManager.h>
#import <react/components/text/ParagraphLocalData.h>
#import <react/components/text/ParagraphProps.h>
#import <react/core/LocalData.h>
#import <react/graphics/Geometry.h>
#import <react/textlayoutmanager/TextLayoutManager.h>
#import <react/textlayoutmanager/RCTTextLayoutManager.h>
#import "RCTConversions.h"

using namespace facebook::react;
Expand Down
10 changes: 5 additions & 5 deletions React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

#import <React/RCTComponentViewProtocol.h>
#import <React/UIView+ComponentViewProtocol.h>
#import <fabric/core/LayoutMetrics.h>
#import <fabric/core/Props.h>
#import <fabric/components/view/ViewEventEmitter.h>
#import <fabric/components/view/ViewProps.h>
#import <fabric/events/EventEmitter.h>
#import <react/core/LayoutMetrics.h>
#import <react/core/Props.h>
#import <react/components/view/ViewEventEmitter.h>
#import <react/components/view/ViewProps.h>
#import <react/events/EventEmitter.h>
#import <React/RCTTouchableComponentViewProtocol.h>

NS_ASSUME_NONNULL_BEGIN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#import "RCTViewComponentView.h"

#import <fabric/components/view/ViewProps.h>
#import <fabric/components/view/ViewEventEmitter.h>
#import <react/components/view/ViewProps.h>
#import <react/components/view/ViewEventEmitter.h>
#import <objc/runtime.h>
#import <React/RCTAssert.h>
#import <React/RCTBorderDrawing.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#import <React/RCTMountItemProtocol.h>
#import <React/RCTPrimitives.h>
#import <fabric/events/EventEmitter.h>
#import <react/events/EventEmitter.h>

NS_ASSUME_NONNULL_BEGIN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#import <React/RCTMountItemProtocol.h>
#import <React/RCTPrimitives.h>
#import <fabric/core/LayoutMetrics.h>
#import <react/core/LayoutMetrics.h>

NS_ASSUME_NONNULL_BEGIN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#import <React/RCTMountItemProtocol.h>
#import <React/RCTPrimitives.h>
#import <fabric/core/LocalData.h>
#import <react/core/LocalData.h>

NS_ASSUME_NONNULL_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion React/Fabric/Mounting/MountItems/RCTUpdatePropsMountItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#import <React/RCTMountItemProtocol.h>
#import <React/RCTPrimitives.h>
#import <fabric/core/Props.h>
#import <react/core/Props.h>

NS_ASSUME_NONNULL_BEGIN

Expand Down
8 changes: 4 additions & 4 deletions React/Fabric/Mounting/RCTComponentViewProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

#import <UIKit/UIKit.h>

#import <fabric/core/LocalData.h>
#import <fabric/core/Props.h>
#import <fabric/core/LayoutMetrics.h>
#import <fabric/events/EventEmitter.h>
#import <react/core/LocalData.h>
#import <react/core/Props.h>
#import <react/core/LayoutMetrics.h>
#import <react/events/EventEmitter.h>
#import <React/RCTPrimitives.h>

NS_ASSUME_NONNULL_BEGIN
Expand Down
4 changes: 2 additions & 2 deletions React/Fabric/Mounting/RCTMountingManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#import <UIKit/UIKit.h>

#import <fabric/uimanager/ShadowView.h>
#import <fabric/uimanager/ShadowViewMutation.h>
#import <react/uimanager/ShadowView.h>
#import <react/uimanager/ShadowViewMutation.h>
#import <React/RCTPrimitives.h>
#import <React/RCTMountingManagerDelegate.h>

Expand Down
2 changes: 1 addition & 1 deletion React/Fabric/Mounting/RCTMountingManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#import "RCTMountingManager.h"

#import <fabric/core/LayoutableShadowNode.h>
#import <react/core/LayoutableShadowNode.h>
#import <React/RCTAssert.h>
#import <React/RCTUtils.h>

Expand Down
8 changes: 4 additions & 4 deletions React/Fabric/RCTConversions.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

#import <UIKit/UIKit.h>

#import <fabric/components/view/primitives.h>
#import <fabric/components/view/AccessibilityPrimitives.h>
#import <fabric/graphics/Color.h>
#import <fabric/graphics/Geometry.h>
#import <react/components/view/primitives.h>
#import <react/components/view/AccessibilityPrimitives.h>
#import <react/graphics/Color.h>
#import <react/graphics/Geometry.h>

NS_ASSUME_NONNULL_BEGIN

Expand Down
6 changes: 3 additions & 3 deletions React/Fabric/RCTScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#import <memory>

#import <React/RCTPrimitives.h>
#import <fabric/core/LayoutConstraints.h>
#import <fabric/core/LayoutContext.h>
#import <fabric/uimanager/ShadowViewMutation.h>
#import <react/core/LayoutConstraints.h>
#import <react/core/LayoutContext.h>
#import <react/uimanager/ShadowViewMutation.h>

NS_ASSUME_NONNULL_BEGIN

Expand Down
6 changes: 3 additions & 3 deletions React/Fabric/RCTScheduler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

#import "RCTScheduler.h"

#import <fabric/uimanager/ContextContainer.h>
#import <fabric/uimanager/Scheduler.h>
#import <fabric/uimanager/SchedulerDelegate.h>
#import <react/uimanager/ContextContainer.h>
#import <react/uimanager/Scheduler.h>
#import <react/uimanager/SchedulerDelegate.h>

#import <React/RCTFollyConvert.h>

Expand Down
8 changes: 4 additions & 4 deletions React/Fabric/RCTSurfacePresenter.mm
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
#import <React/RCTSurfaceView.h>
#import <React/RCTSurfaceView+Internal.h>
#import <React/RCTUtils.h>
#import <fabric/core/LayoutContext.h>
#import <fabric/core/LayoutConstraints.h>
#import <fabric/imagemanager/ImageManager.h>
#import <fabric/uimanager/ContextContainer.h>
#import <react/core/LayoutContext.h>
#import <react/core/LayoutConstraints.h>
#import <react/imagemanager/ImageManager.h>
#import <react/uimanager/ContextContainer.h>

#import "MainRunLoopEventBeat.h"
#import "RuntimeEventBeat.h"
Expand Down
2 changes: 1 addition & 1 deletion React/Fabric/RCTTouchableComponentViewProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

#import <UIKit/UIKit.h>
#import <fabric/components/view/TouchEventEmitter.h>
#import <react/components/view/TouchEventEmitter.h>

@protocol RCTTouchableComponentViewProtocol <NSObject>
- (facebook::react::SharedTouchEventEmitter)touchEventEmitterAtPoint:(CGPoint)point;
Expand Down
4 changes: 2 additions & 2 deletions React/Fabric/Utils/MainRunLoopEventBeat.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#include <CoreFoundation/CoreFoundation.h>
#include <CoreFoundation/CFRunLoop.h>
#include <fabric/uimanager/primitives.h>
#include <fabric/events/EventBeat.h>
#include <react/uimanager/primitives.h>
#include <react/events/EventBeat.h>

namespace facebook {
namespace react {
Expand Down
4 changes: 2 additions & 2 deletions React/Fabric/Utils/RuntimeEventBeat.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#include <CoreFoundation/CoreFoundation.h>
#include <CoreFoundation/CFRunLoop.h>
#include <fabric/uimanager/primitives.h>
#include <fabric/events/EventBeat.h>
#include <react/uimanager/primitives.h>
#include <react/events/EventBeat.h>

namespace facebook {
namespace react {
Expand Down
2 changes: 1 addition & 1 deletion ReactCommon/fabric/attributedstring/AttributedString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "AttributedString.h"

#include <fabric/debug/DebugStringConvertibleItem.h>
#include <react/debug/DebugStringConvertibleItem.h>

namespace facebook {
namespace react {
Expand Down
8 changes: 4 additions & 4 deletions ReactCommon/fabric/attributedstring/AttributedString.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#include <functional>
#include <memory>

#include <fabric/attributedstring/TextAttributes.h>
#include <fabric/core/Sealable.h>
#include <fabric/core/ShadowNode.h>
#include <fabric/debug/DebugStringConvertible.h>
#include <folly/Optional.h>
#include <react/attributedstring/TextAttributes.h>
#include <react/core/Sealable.h>
#include <react/core/ShadowNode.h>
#include <react/debug/DebugStringConvertible.h>

namespace facebook {
namespace react {
Expand Down
2 changes: 1 addition & 1 deletion ReactCommon/fabric/attributedstring/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ rn_xplat_cxx_library(
[
("", "*.h"),
],
prefix = "fabric/attributedstring",
prefix = "react/attributedstring",
),
compiler_flags = [
"-fexceptions",
Expand Down
6 changes: 3 additions & 3 deletions ReactCommon/fabric/attributedstring/ParagraphAttributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

#include "ParagraphAttributes.h"

#include <fabric/attributedstring/conversions.h>
#include <fabric/debug/debugStringConvertibleUtils.h>
#include <fabric/graphics/conversions.h>
#include <react/attributedstring/conversions.h>
#include <react/debug/debugStringConvertibleUtils.h>
#include <react/graphics/conversions.h>

namespace facebook {
namespace react {
Expand Down
6 changes: 3 additions & 3 deletions ReactCommon/fabric/attributedstring/ParagraphAttributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

#include <limits>

#include <fabric/attributedstring/primitives.h>
#include <fabric/debug/DebugStringConvertible.h>
#include <fabric/graphics/Geometry.h>
#include <react/attributedstring/primitives.h>
#include <react/debug/DebugStringConvertible.h>
#include <react/graphics/Geometry.h>

namespace facebook {
namespace react {
Expand Down
25 changes: 14 additions & 11 deletions ReactCommon/fabric/attributedstring/TextAttributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@

#include "TextAttributes.h"

#include <fabric/attributedstring/conversions.h>
#include <fabric/core/conversions.h>
#include <fabric/graphics/conversions.h>
#include <react/attributedstring/conversions.h>
#include <react/core/conversions.h>
#include <react/graphics/conversions.h>
#include <cmath>

#include <fabric/debug/debugStringConvertibleUtils.h>
#include <react/debug/debugStringConvertibleUtils.h>

namespace facebook {
namespace react {
Expand All @@ -24,14 +25,15 @@ void TextAttributes::apply(TextAttributes textAttributes) {
backgroundColor = textAttributes.backgroundColor
? textAttributes.backgroundColor
: backgroundColor;
opacity = !isnan(textAttributes.opacity) ? textAttributes.opacity : opacity;
opacity =
!std::isnan(textAttributes.opacity) ? textAttributes.opacity : opacity;

// Font
fontFamily = !textAttributes.fontFamily.empty() ? textAttributes.fontFamily
: fontFamily;
fontSize =
!isnan(textAttributes.fontSize) ? textAttributes.fontSize : fontSize;
fontSizeMultiplier = !isnan(textAttributes.fontSizeMultiplier)
!std::isnan(textAttributes.fontSize) ? textAttributes.fontSize : fontSize;
fontSizeMultiplier = !std::isnan(textAttributes.fontSizeMultiplier)
? textAttributes.fontSizeMultiplier
: fontSizeMultiplier;
fontWeight = textAttributes.fontWeight.hasValue() ? textAttributes.fontWeight
Expand All @@ -44,13 +46,14 @@ void TextAttributes::apply(TextAttributes textAttributes) {
allowFontScaling = textAttributes.allowFontScaling.hasValue()
? textAttributes.allowFontScaling
: allowFontScaling;
letterSpacing = !isnan(textAttributes.letterSpacing)
letterSpacing = !std::isnan(textAttributes.letterSpacing)
? textAttributes.letterSpacing
: letterSpacing;

// Paragraph Styles
lineHeight = !isnan(textAttributes.lineHeight) ? textAttributes.lineHeight
: lineHeight;
lineHeight = !std::isnan(textAttributes.lineHeight)
? textAttributes.lineHeight
: lineHeight;
alignment = textAttributes.alignment.hasValue() ? textAttributes.alignment
: alignment;
baseWritingDirection = textAttributes.baseWritingDirection.hasValue()
Expand All @@ -76,7 +79,7 @@ void TextAttributes::apply(TextAttributes textAttributes) {
textShadowOffset = textAttributes.textShadowOffset.hasValue()
? textAttributes.textShadowOffset.value()
: textShadowOffset;
textShadowRadius = !isnan(textAttributes.textShadowRadius)
textShadowRadius = !std::isnan(textAttributes.textShadowRadius)
? textAttributes.textShadowRadius
: textShadowRadius;
textShadowColor = textAttributes.textShadowColor
Expand Down
Loading

0 comments on commit 94d49e5

Please sign in to comment.