Add unknown type support in visualiser
Summary: ^ In this case, the unknown value, which is a text will be displayed as sent by the client. Reviewed By: antonk52 Differential Revision: D41494094 fbshipit-source-id: 9295e3f7e055a8ce9b430137600108a4cdf32c90
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7ec09b4f95
commit
ae5eeb137d
@@ -153,6 +153,12 @@ function create(
|
|||||||
<SpaceBoxInspector value={inspectable.value} />
|
<SpaceBoxInspector value={inspectable.value} />
|
||||||
</NamedAttributeInspector>
|
</NamedAttributeInspector>
|
||||||
);
|
);
|
||||||
|
case 'unknown':
|
||||||
|
return (
|
||||||
|
<NamedAttributeInspector name={displayableName(name)}>
|
||||||
|
<TextValue>{inspectable.value}</TextValue>
|
||||||
|
</NamedAttributeInspector>
|
||||||
|
);
|
||||||
case 'object':
|
case 'object':
|
||||||
return (
|
return (
|
||||||
<ObjectAttributeInspector
|
<ObjectAttributeInspector
|
||||||
|
|||||||
@@ -137,7 +137,8 @@ export type Inspectable =
|
|||||||
| InspectableCoordinate3D
|
| InspectableCoordinate3D
|
||||||
| InspectableSize
|
| InspectableSize
|
||||||
| InspectableBounds
|
| InspectableBounds
|
||||||
| InspectableSpaceBox;
|
| InspectableSpaceBox
|
||||||
|
| InspectableUnknown;
|
||||||
|
|
||||||
export type InspectableText = {
|
export type InspectableText = {
|
||||||
type: 'text';
|
type: 'text';
|
||||||
@@ -193,3 +194,8 @@ export type InspectableObject = {
|
|||||||
type: 'object';
|
type: 'object';
|
||||||
fields: Record<MetadataId, Inspectable>;
|
fields: Record<MetadataId, Inspectable>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type InspectableUnknown = {
|
||||||
|
type: 'unknown';
|
||||||
|
value: string;
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user