Add size prop to layout inspector

Summary: Size is passed as a prop to every `CKComponent` and `CKFlexboxChild`. It is useful to see where it was set exactly

Reviewed By: kevin0571

Differential Revision: D16688496

fbshipit-source-id: 5f8dc39a967ab2d7d89d6a37a8152aa6b59db220
This commit is contained in:
Oleksii Dykan
2019-08-07 10:19:56 -07:00
committed by Facebook Github Bot
parent d0a3cb5f74
commit dbf0e3db43
4 changed files with 15 additions and 0 deletions

View File

@@ -27,6 +27,7 @@
#import "CKInsetComponent+Sonar.h"
#import "CKStatelessComponent+Sonar.h"
#import "FKDataStorageForLiveEditing.h"
#import "Utils.h"
/** This protocol isn't actually adopted anywhere, it just lets us use the SEL below */
@protocol SonarKitLayoutComponentKitOverrideInformalProtocol
@@ -138,6 +139,7 @@ static CK::StaticMutex _mutex = CK_MUTEX_INITIALIZER;
withValue: @{
@"frame": SKObject(self.viewContext.frame),
@"controller": SKObject(NSStringFromClass([self.controller class])),
@"size": SKObject(ckcomponentSize([self size])),
}]];
auto const canBeReusedCounter = self.flipper_canBeReusedCounter;