Add stateless component info in Flipper
Summary: This diff updates layout plugin in Flipper to show the name of the Stateless component C function Reviewed By: adamjernst Differential Revision: D9907068 fbshipit-source-id: d10b43171383f11aca3c140bbb450db817576052
This commit is contained in:
committed by
Facebook Github Bot
parent
ba7b43a547
commit
c0982ea1db
@@ -17,6 +17,8 @@
|
||||
#import <FlipperKitLayoutPlugin/SKNamed.h>
|
||||
#import <FlipperKitLayoutPlugin/SKObject.h>
|
||||
|
||||
#import "CKStatelessComponent+Sonar.h"
|
||||
|
||||
/** This protocol isn't actually adopted anywhere, it just lets us use the SEL below */
|
||||
@protocol SonarKitLayoutComponentKitOverrideInformalProtocol
|
||||
- (NSString *)sonar_componentNameOverride;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2018-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*
|
||||
*/
|
||||
#import <ComponentKit/CKStatelessComponent.h>
|
||||
#import <FlipperKit/SKMacros.h>
|
||||
|
||||
FB_LINK_REQUIRE(CKStatelessComponent_Sonar)
|
||||
@interface CKStatelessComponent (Sonar)
|
||||
|
||||
- (NSString *)sonar_componentNameOverride;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2018-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*
|
||||
*/
|
||||
#if FB_SONARKIT_ENABLED
|
||||
|
||||
#import "CKStatelessComponent+Sonar.h"
|
||||
|
||||
#import <FlipperKitLayoutPlugin/SKNamed.h>
|
||||
#import <FlipperKitLayoutPlugin/SKObject.h>
|
||||
|
||||
#import "CKComponent+Sonar.h"
|
||||
|
||||
FB_LINKABLE(CKStatelessComponent_Sonar)
|
||||
@implementation CKStatelessComponent (Sonar)
|
||||
|
||||
- (NSString *)sonar_componentNameOverride
|
||||
{
|
||||
return [self description];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user