Skip to content

Commit 92d72e3

Browse files
authored
Small improvements to branch labels (#387)
1 parent 80d165a commit 92d72e3

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/main/frontend/pipeline-graph-view/pipeline-graph/main/support/labels.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,22 @@ export function SequentialContainerLabel({
173173
const y = details.y;
174174
const x = details.x - Math.floor(nodeRadius * 2); // Because label X is a "node center"-relative position
175175

176-
const containerStyle: any = {
176+
const lineHeight = 1.35;
177+
178+
const containerStyle = {
177179
top: y,
178180
left: x,
179-
marginTop: "-0.5em",
180-
position: "absolute",
181+
lineHeight,
182+
marginTop: `-${lineHeight / 2}em`,
183+
position: "absolute" as const,
181184
maxWidth: sequentialStagesLabelOffset,
182185
overflow: "hidden",
183186
textOverflow: "ellipsis",
184187
background: "var(--background, white)",
185-
padding: "0 7px",
186-
lineHeight: "1",
187-
whiteSpace: "nowrap",
188+
padding: "0 3px",
189+
whiteSpace: "nowrap" as const,
190+
outline: "1px solid var(--graph-connector-grey, gray)",
191+
borderRadius: "3px",
188192
};
189193

190194
return (

src/main/frontend/pipeline-graph-view/pipeline-graph/styles/main.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
}
1313

1414
.PWGx-PipelineGraph {
15+
--graph-connector-grey: #{$graph-connector-grey};
16+
1517
margin-left: auto;
1618
margin-right: auto;
1719
}

0 commit comments

Comments
 (0)