Displaying identifier for root views
Summary: Adding the new "Identity" section to CK root views' description. Reviewed By: cuva Differential Revision: D19948784 fbshipit-source-id: f5e7fe51afd387a476f6500db32b8b5149594007
This commit is contained in:
committed by
Facebook Github Bot
parent
233b6d6a4e
commit
adce24d343
@@ -17,6 +17,7 @@
|
||||
#import <ComponentKit/CKComponentRootViewInternal.h>
|
||||
|
||||
#import <FlipperKitLayoutPlugin/SKDescriptorMapper.h>
|
||||
#import <FlipperKitLayoutPlugin/SKObject.h>
|
||||
|
||||
#import "SKComponentLayoutWrapper.h"
|
||||
|
||||
@@ -39,6 +40,15 @@
|
||||
stringWithFormat:@"%d.", attachState.scopeIdentifier]];
|
||||
}
|
||||
|
||||
- (NSArray<SKNamed<NSDictionary*>*>*)dataForNode:(CKComponentRootView*)node {
|
||||
auto const attachState = CKGetAttachStateForView(node);
|
||||
return @[ [SKNamed
|
||||
newWithName:@"Identity"
|
||||
withValue:@{
|
||||
@"scopeRootIdentifier" : SKObject{@(attachState.scopeIdentifier)}
|
||||
}] ];
|
||||
}
|
||||
|
||||
- (void)setHighlighted:(BOOL)highlighted forNode:(CKComponentRootView*)node {
|
||||
SKNodeDescriptor* viewDescriptor = [self descriptorForClass:[UIView class]];
|
||||
[viewDescriptor setHighlighted:highlighted forNode:node];
|
||||
|
||||
Reference in New Issue
Block a user