Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add secondary node label as componentId when description is modified #1560

Merged
merged 3 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ exports[`Canvas Catalog button should NOT be present if \`CatalogModalContext\`
<g>
<rect
class="phantom-rect"
height="892.5"
height="902.5"
width="870"
x="-85"
y="12.5"
/>
<foreignobject
class="foreign-object"
data-nodelabel="route-8888"
height="892.5"
height="902.5"
width="870"
x="-85"
y="12.5"
Expand Down Expand Up @@ -153,15 +153,15 @@ exports[`Canvas Catalog button should NOT be present if \`CatalogModalContext\`
<g>
<rect
class="phantom-rect"
height="627.5"
height="637.5"
width="750"
x="-25"
y="72.5"
/>
<foreignobject
class="foreign-object"
data-nodelabel="choice"
height="627.5"
height="637.5"
width="750"
x="-25"
y="72.5"
Expand Down Expand Up @@ -245,15 +245,15 @@ exports[`Canvas Catalog button should NOT be present if \`CatalogModalContext\`
<g>
<rect
class="phantom-rect"
height="195"
height="205"
width="360"
x="305"
y="445"
/>
<foreignobject
class="foreign-object"
data-nodelabel="otherwise"
height="195"
height="205"
width="360"
x="305"
y="445"
Expand Down Expand Up @@ -820,15 +820,15 @@ exports[`Canvas Catalog button should be present if \`CatalogModalContext\` is p
<g>
<rect
class="phantom-rect"
height="892.5"
height="902.5"
width="870"
x="-85"
y="12.5"
/>
<foreignobject
class="foreign-object"
data-nodelabel="route-8888"
height="892.5"
height="902.5"
width="870"
x="-85"
y="12.5"
Expand Down Expand Up @@ -912,15 +912,15 @@ exports[`Canvas Catalog button should be present if \`CatalogModalContext\` is p
<g>
<rect
class="phantom-rect"
height="627.5"
height="637.5"
width="750"
x="-25"
y="72.5"
/>
<foreignobject
class="foreign-object"
data-nodelabel="choice"
height="627.5"
height="637.5"
width="750"
x="-25"
y="72.5"
Expand Down Expand Up @@ -1004,15 +1004,15 @@ exports[`Canvas Catalog button should be present if \`CatalogModalContext\` is p
<g>
<rect
class="phantom-rect"
height="195"
height="205"
width="360"
x="305"
y="445"
/>
<foreignobject
class="foreign-object"
data-nodelabel="otherwise"
height="195"
height="205"
width="360"
x="305"
y="445"
Expand Down Expand Up @@ -2391,15 +2391,15 @@ exports[`Canvas should render correctly 1`] = `
<g>
<rect
class="phantom-rect"
height="892.5"
height="902.5"
width="870"
x="-85"
y="12.5"
/>
<foreignobject
class="foreign-object"
data-nodelabel="route-8888"
height="892.5"
height="902.5"
width="870"
x="-85"
y="12.5"
Expand Down Expand Up @@ -2483,15 +2483,15 @@ exports[`Canvas should render correctly 1`] = `
<g>
<rect
class="phantom-rect"
height="627.5"
height="637.5"
width="750"
x="-25"
y="72.5"
/>
<foreignobject
class="foreign-object"
data-nodelabel="choice"
height="627.5"
height="637.5"
width="750"
x="-25"
y="72.5"
Expand Down Expand Up @@ -2575,15 +2575,15 @@ exports[`Canvas should render correctly 1`] = `
<g>
<rect
class="phantom-rect"
height="195"
height="205"
width="360"
x="305"
y="445"
/>
<foreignobject
class="foreign-object"
data-nodelabel="otherwise"
height="195"
height="205"
width="360"
x="305"
y="445"
Expand Down Expand Up @@ -3150,15 +3150,15 @@ exports[`Canvas should render correctly with more routes 1`] = `
<g>
<rect
class="phantom-rect"
height="892.5"
height="902.5"
width="870"
x="-85"
y="12.5"
/>
<foreignobject
class="foreign-object"
data-nodelabel="route-8888"
height="892.5"
height="902.5"
width="870"
x="-85"
y="12.5"
Expand Down Expand Up @@ -3242,15 +3242,15 @@ exports[`Canvas should render correctly with more routes 1`] = `
<g>
<rect
class="phantom-rect"
height="627.5"
height="637.5"
width="750"
x="-25"
y="72.5"
/>
<foreignobject
class="foreign-object"
data-nodelabel="choice"
height="627.5"
height="637.5"
width="750"
x="-25"
y="72.5"
Expand Down Expand Up @@ -3334,15 +3334,15 @@ exports[`Canvas should render correctly with more routes 1`] = `
<g>
<rect
class="phantom-rect"
height="195"
height="205"
width="360"
x="305"
y="445"
/>
<foreignobject
class="foreign-object"
data-nodelabel="otherwise"
height="195"
height="205"
width="360"
x="305"
y="445"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ export const CustomGroupExpanded: FunctionComponent<CustomGroupExpandedProps> =
x={boxRef.current.x}
y={boxRef.current.y}
width={boxRef.current.width}
height={boxRef.current.height}
height={boxRef.current.height + 10}
/>
<foreignObject
data-nodelabel={label}
className="foreign-object"
x={boxRef.current.x}
y={boxRef.current.y}
width={boxRef.current.width}
height={boxRef.current.height}
height={boxRef.current.height + 10}
>
<div className={className}>
<div className="custom-group__title">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const CustomNode: FunctionComponent<CustomNodeProps> = observer(({ element, ...r
const nodeStatus = !statusDecoratorTooltip || isDisabled ? NodeStatus.default : NodeStatus.warning;
const detailsLevel = element.getGraph().getDetailsLevel();
const [selected] = useSelection();
const id = vizNode?.getTitle();

return (
<DefaultNode
Expand All @@ -51,6 +52,7 @@ const CustomNode: FunctionComponent<CustomNodeProps> = observer(({ element, ...r
statusDecoratorTooltip={statusDecoratorTooltip}
nodeStatus={nodeStatus}
onStatusDecoratorClick={noopFn}
secondaryLabel={id !== label ? id : undefined}
>
<g
className="custom-node"
Expand Down
Loading