Skip to content

Commit f1591b5

Browse files
authored
Improve css for selecting a node in the graph (#48415)
1 parent bc38120 commit f1591b5

File tree

1 file changed

+7
-7
lines changed
  • airflow-core/src/airflow/ui/src/components/Graph

1 file changed

+7
-7
lines changed

airflow-core/src/airflow/ui/src/components/Graph/TaskNode.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const TaskNode = ({
3333
data: {
3434
childCount,
3535
depth,
36-
height,
36+
height = 0,
3737
isGroup,
3838
isMapped,
3939
isOpen,
@@ -42,7 +42,7 @@ export const TaskNode = ({
4242
operator,
4343
setupTeardownType,
4444
taskInstance,
45-
width,
45+
width = 0,
4646
},
4747
id,
4848
}: NodeProps<NodeType<CustomNodeProps, "task">>) => {
@@ -71,11 +71,11 @@ export const TaskNode = ({
7171
}
7272
borderRadius={5}
7373
borderWidth={isSelected ? 6 : 2}
74-
height={`${height}px`}
74+
height={`${height + (isSelected ? 4 : 0)}px`}
7575
justifyContent="space-between"
76-
px={3}
76+
px={isSelected ? 1 : 2}
7777
py={isSelected ? 0 : 1}
78-
width={`${width}px`}
78+
width={`${width + (isSelected ? 4 : 0)}px`}
7979
>
8080
<Box>
8181
<TaskLink
@@ -127,7 +127,7 @@ export const TaskNode = ({
127127
borderLeftWidth={1}
128128
borderRightWidth={1}
129129
height={1}
130-
width={`${(width ?? 0) - 10}px`}
130+
width={`${width - 10}px`}
131131
/>
132132
<Box
133133
bg="bg.subtle"
@@ -138,7 +138,7 @@ export const TaskNode = ({
138138
borderLeftWidth={1}
139139
borderRightWidth={1}
140140
height={1}
141-
width={`${(width ?? 0) - 20}px`}
141+
width={`${width - 20}px`}
142142
/>
143143
</>
144144
) : undefined}

0 commit comments

Comments
 (0)