refactor(GenericNode): change data.type to data.node.display_name to improve semantics and readability

feat(api): add display_name field to APIClassType to provide a human-readable name for the class
This commit is contained in:
anovazzi1 2023-06-23 17:06:58 -03:00
commit 019e2b2bb4
3 changed files with 4 additions and 4 deletions

View file

@ -3444,7 +3444,7 @@
"version": "16.18.12",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.12.tgz",
"integrity": "sha512-vzLe5NaNMjIE3mcddFVGlAXN1LEWueUsMsOJWaT6wWMJGyljHAWHznqfnKUQWGzu7TLPrGvWdNAsvQYW+C0xtw==",
"dev": true
"devOptional": true
},
"node_modules/@types/parse-json": {
"version": "4.0.0",
@ -5504,7 +5504,6 @@
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"hasInstallScript": true,
"optional": true,
"os": [

View file

@ -88,8 +88,8 @@ export default function GenericNode({
}}
/>
<div className="ml-2 truncate">
<ShadTooltip delayDuration={1500} content={data.type}>
<div className="ml-2 truncate text-gray-800">{data.type}</div>
<ShadTooltip delayDuration={1500} content={data.node.display_name}>
<div className="ml-2 truncate text-gray-800">{data.node.display_name}</div>
</ShadTooltip>
</div>
</div>

View file

@ -11,6 +11,7 @@ export type APIClassType = {
base_classes: Array<string>;
description: string;
template: APITemplateType;
display_name: string;
[key: string]: Array<string> | string | APITemplateType;
};
export type TemplateVariableType = {