Remove YogaKit Integration (#4830)
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/4830 YogaKit is a library which allows integrating Yoga layouts directly with UIKit. It is not used by higher level libraries like ComponentKit or React Native, but is used by a smattering of surfaces and shared components in Origami Studio and Instagram. See the following search for `YogaKit/UIView+Yoga.h`. {F1026467213} It is not really being developed anymore, and doesn't have much of a future, so I am deprecating it in OSS, to remove after the next OSS Yoga release. This means Flipper in OSS will not be able to rely on it. Instead of special-casing for OSS vs not, this change removes the current YogaKit integration with the layout plugin, since it sounds like we are building a new layout plugin anyway, and I'm not aware of any new surfaces being built on top of YogaKit. Removing Yoga as a dependency from Flipper should also allow us to fixup the current OSS Flipper build, along with a whole bunch of hacks RN's open source build currently does to produce a Yoga pod compatible with both RN and Flipper. There are probably some OSS related lockfiles that can be updated after this, for things like the FlipperKit sample app. I did not do that as part of this change, since I don't know how healthy all of that infra is or how it integrates with the offline mirror used. Reviewed By: passy Differential Revision: D46664918 fbshipit-source-id: 9d4dd56aa4c7f55e97ac643aa6e4deb9375e582c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ce4768116f
commit
6c43d39c20
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#define APPLY_ENUM_TO_YOGA_PROPERTY(varName, enumName) \
|
||||
^(NSString * newValue) { \
|
||||
NSNumber* varName = \
|
||||
[[enumName##EnumMap allKeysForObject:newValue] lastObject]; \
|
||||
if (varName == nil) { \
|
||||
return; \
|
||||
} \
|
||||
node.yoga.varName = (enumName)[varName unsignedIntegerValue]; \
|
||||
}
|
||||
|
||||
#define APPLY_VALUE_TO_YGVALUE(varName) \
|
||||
^(NSNumber * value) { \
|
||||
YGValue newValue = node.yoga.varName; \
|
||||
newValue.value = [value floatValue]; \
|
||||
node.yoga.varName = newValue; \
|
||||
}
|
||||
|
||||
#define APPLY_UNIT_TO_YGVALUE(varName, enumName) \
|
||||
^(NSString * value) { \
|
||||
NSNumber* varName = \
|
||||
[[enumName##EnumMap allKeysForObject:value] lastObject]; \
|
||||
if (varName == nil) { \
|
||||
return; \
|
||||
} \
|
||||
YGValue newValue = node.yoga.varName; \
|
||||
newValue.unit = (enumName)[varName unsignedIntegerValue]; \
|
||||
node.yoga.varName = newValue; \
|
||||
}
|
||||
Reference in New Issue
Block a user