fix(GenericNode): update the name prop of IconComponent to conditionally display "Ungroup" if data.node.flow is truthy

fix(reactflowUtils): update the display_name value to "group Component" in the generateNodeFromFlow function

The changes were made to improve the semantics and provide more descriptive names for better understanding and maintainability.
This commit is contained in:
anovazzi1 2023-10-05 20:09:52 -03:00
commit 3d301a683c
2 changed files with 2 additions and 2 deletions

View file

@ -105,7 +105,7 @@ export default function GenericNode({
<div className="generic-node-div-title">
<div className="generic-node-title-arrangement">
<IconComponent
name={name}
name={data.node?.flow?"Ungroup":name}
className="generic-node-icon"
iconColor={`${nodeColors[types[data.type]]}`}
/>

View file

@ -673,7 +673,7 @@ export function generateNodeFromFlow(flow: FlowType,getNodeId:(type:string)=>str
type: outputNode?.data.type!,
node: {
output_types: outputNode!.data.node!.output_types,
display_name: "group Node",
display_name: "group Component",
documentation: "",
base_classes: outputNode!.data.node!.base_classes,
description: "double click to edit description",