web: clearer workflow graph labels, routes and kinds
- Gaps between stages are sized from the widest straight-route label, so a chip never reaches into either box; a source's forward routes fan across its side instead of sharing a 20px band. - A label prefers the widest horizontal run that can hold it; when only a stub exists the chip moves onto the edge's longest run and sits beside a vertical one, keeping clear of both the box and the neighbouring label. - Hovering a wire or its chip highlights the route and dims the rest. - System-added routes (the parser's implicit error fallback) draw dotted with a legend entry, distinct from declared routes and executed state. - Lanes are 34px apart, so a dense definition no longer doubles the canvas height. - The graph opens expanded by default and remembers a collapse (graphPrefs.js).
This commit is contained in:
@@ -24,6 +24,7 @@ import {
|
||||
versionRow,
|
||||
} from "../pipelines.js";
|
||||
import { PIPELINE_GRAPH_EMPTY, mount as mountGraph } from "../graph.js";
|
||||
import { writeGraphExpanded } from "../graphPrefs.js";
|
||||
|
||||
export function createPipelinesView(rt) {
|
||||
const { state, repo } = rt;
|
||||
@@ -303,6 +304,7 @@ function renderPipelineDetail() {
|
||||
},
|
||||
onExpandedChange: (value) => {
|
||||
state.pipelineGraphExpanded = value;
|
||||
writeGraphExpanded(value);
|
||||
},
|
||||
});
|
||||
return pane;
|
||||
|
||||
@@ -9,6 +9,7 @@ import { liveBadgeState } from "../connection.js";
|
||||
import { resolveArtifactUrl } from "../serverUrl.js";
|
||||
import { runStateOf } from "../runs.js";
|
||||
import { PIPELINE_GRAPH_EMPTY, RUN_GRAPH_MISSING, mount as mountGraph } from "../graph.js";
|
||||
import { writeGraphExpanded } from "../graphPrefs.js";
|
||||
import {
|
||||
RENDERED_RUN_TABS,
|
||||
EMPTY_INPUT_MESSAGE,
|
||||
@@ -174,7 +175,12 @@ function renderRunGraphTab(d) {
|
||||
wrap.append(host);
|
||||
state.runGraph = mountGraph(host, d.graph, {
|
||||
runState: runGraphState(d),
|
||||
expanded: state.runGraphExpanded,
|
||||
onStageTap: (key) => openStagePane(key, latestVisitIndex(d, key)),
|
||||
onExpandedChange: (value) => {
|
||||
state.runGraphExpanded = value;
|
||||
writeGraphExpanded(value);
|
||||
},
|
||||
});
|
||||
return wrap;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user