diff --git a/packages/dmn-editor/src/diagram/nodes/Nodes.tsx b/packages/dmn-editor/src/diagram/nodes/Nodes.tsx index fbe0e0ff2cb..9d35cfec116 100644 --- a/packages/dmn-editor/src/diagram/nodes/Nodes.tsx +++ b/packages/dmn-editor/src/diagram/nodes/Nodes.tsx @@ -279,6 +279,7 @@ export const InputDataNode = React.memo( nodeType={type as typeof NODE_TYPES.inputData} snapGrid={snapGrid} nodeId={id} + nodeName={inputData["@_label"] ?? inputData["@_name"]} nodeShapeIndex={shape.index} isAlternativeInputDataShape={isAlternativeInputDataShape} /> @@ -466,6 +467,7 @@ export const DecisionNode = React.memo( nodeType={type as typeof NODE_TYPES.decision} snapGrid={snapGrid} nodeId={id} + nodeName={decision["@_label"] ?? decision["@_name"] ?? ""} nodeShapeIndex={shape.index} /> )} @@ -604,6 +606,7 @@ export const BkmNode = React.memo( nodeType={type as typeof NODE_TYPES.bkm} snapGrid={snapGrid} nodeId={id} + nodeName={bkm["@_label"] ?? bkm["@_name"] ?? ""} nodeShapeIndex={shape.index} /> )} @@ -730,6 +733,7 @@ export const KnowledgeSourceNode = React.memo( nodeType={type as typeof NODE_TYPES.knowledgeSource} snapGrid={snapGrid} nodeId={id} + nodeName={knowledgeSource["@_label"] ?? knowledgeSource["@_name"] ?? ""} nodeShapeIndex={shape.index} /> )} @@ -846,6 +850,7 @@ export const TextAnnotationNode = React.memo( nodeType={type as typeof NODE_TYPES.textAnnotation} snapGrid={snapGrid} nodeId={id} + nodeName={textAnnotation["@_label"] ?? textAnnotation.text?.__$$text ?? ""} nodeShapeIndex={shape.index} /> )} @@ -1042,6 +1047,7 @@ export const DecisionServiceNode = React.memo( nodeType={type as typeof NODE_TYPES.decisionService} snapGrid={snapGrid} nodeId={id} + nodeName={decisionService["@_label"] ?? decisionService["@_name"] ?? ""} nodeShapeIndex={shape.index} /> )} @@ -1187,6 +1193,7 @@ export const GroupNode = React.memo( nodeType={type as typeof NODE_TYPES.group} snapGrid={snapGrid} nodeId={id} + nodeName={group["@_label"] ?? group["@_name"] ?? ""} nodeShapeIndex={shape.index} /> )} @@ -1263,6 +1270,7 @@ export const UnknownNode = React.memo( nodeType={type as typeof NODE_TYPES.unknown} snapGrid={snapGrid} nodeId={id} + nodeName={"unknown"} nodeShapeIndex={shape.index} /> )} @@ -1293,6 +1301,7 @@ const resizerControlStyle = { type NodeResizeHandleProps = { snapGrid: SnapGrid; nodeId: string; + nodeName: string; nodeShapeIndex: number; } & ( | { nodeType: Extract; isAlternativeInputDataShape: boolean } @@ -1312,6 +1321,7 @@ export function NodeResizerHandle(props: NodeResizeHandleProps) { return (
; icon?: React.ReactNode; colorDisplay?: React.ReactNode; + name: string; }) { const inputRef = useRef(null); @@ -56,7 +57,9 @@ export function ColorPicker(props: { } } }} - aria-label={"Font color"} + name={props.name} + data-testid={`color-picker-${props.name}`} + aria-label={"Color picker"} type={"color"} disabled={false} value={props.color} diff --git a/packages/dmn-editor/src/propertiesPanel/DiagramPropertiesPanel.tsx b/packages/dmn-editor/src/propertiesPanel/DiagramPropertiesPanel.tsx index 2a6992c4302..1ee4a23206c 100644 --- a/packages/dmn-editor/src/propertiesPanel/DiagramPropertiesPanel.tsx +++ b/packages/dmn-editor/src/propertiesPanel/DiagramPropertiesPanel.tsx @@ -35,6 +35,7 @@ export function DiagramPropertiesPanel() { return ( colorPickerRef.current?.click()} text={ A

} colorPickerRef={colorPickerRef} color={fontColor} @@ -374,22 +374,24 @@ export function FontOptions({ startExpanded, nodeIds }: { startExpanded: boolean

- +
+ +
)} diff --git a/packages/dmn-editor/src/propertiesPanel/GlobalDiagramProperties.tsx b/packages/dmn-editor/src/propertiesPanel/GlobalDiagramProperties.tsx index 0e3b7249508..58225f595d2 100644 --- a/packages/dmn-editor/src/propertiesPanel/GlobalDiagramProperties.tsx +++ b/packages/dmn-editor/src/propertiesPanel/GlobalDiagramProperties.tsx @@ -151,6 +151,7 @@ export function GlobalDiagramProperties() {