Skip to content

Commit

Permalink
Fabric: New props treatment in core module
Browse files Browse the repository at this point in the history
Summary:
Same as previous one.
Adopting template-generated `convertRawProp` and `debugStringConvertibleItem` functions in `core` module.
Note, to do so we have to change signatures of some conversions functions to make them more overloading-friendly.

Reviewed By: fkgozali

Differential Revision: D7958243

fbshipit-source-id: 500ee420d9aa562ee3c5810ef625e06541eda8fb
  • Loading branch information
shergin authored and facebook-github-bot committed May 14, 2018
1 parent c19649c commit 120dcec
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "ParagraphAttributes.h"

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

namespace facebook {
Expand Down
4 changes: 3 additions & 1 deletion ReactCommon/fabric/attributedstring/TextAttributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
#include "TextAttributes.h"

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

#include <fabric/debug/debugStringConvertibleUtils.h>

namespace facebook {
namespace react {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
namespace facebook {
namespace react {

inline std::string stringFromLayoutDirection(const LayoutDirection &layoutDirection) {
inline std::string toString(const LayoutDirection &layoutDirection) {
switch (layoutDirection) {
case LayoutDirection::Undefined: return "undefined";
case LayoutDirection::LeftToRight: return "ltr";
case LayoutDirection::RightToLeft: return "rtl";
}
}

inline std::string stringFromDisplayType(const DisplayType &displayType) {
inline std::string toString(const DisplayType &displayType) {
switch (displayType) {
case DisplayType::None: return "none";
case DisplayType::Flex: return "flex";
Expand Down
20 changes: 0 additions & 20 deletions ReactCommon/fabric/core/debugStringConvertibleUtils.h

This file was deleted.

File renamed without changes.

0 comments on commit 120dcec

Please sign in to comment.