From 69cea7f3d957a59d44c025e545dabe932ea3c8bd Mon Sep 17 00:00:00 2001 From: Diego Imbert Date: Wed, 30 Sep 2026 12:28:17 +0200 Subject: [PATCH] feat: label the pipeline + buttons: add data source, add downstream step on hover Co-Authored-By: Claude Opus 5.5 (1M context) --- .../assets/AssetGraph/AddNode.svelte | 13 +++++--- .../assets/AssetGraph/AssetGraphCanvas.svelte | 11 +------ .../assets/AssetGraph/AssetNode.svelte | 31 +++++++------------ 3 files changed, 21 insertions(+), 34 deletions(-) diff --git a/frontend/src/lib/components/assets/AssetGraph/AddNode.svelte b/frontend/src/lib/components/assets/AssetGraph/AddNode.svelte index c9fd8111db..a3f32a995b 100644 --- a/frontend/src/lib/components/assets/AssetGraph/AddNode.svelte +++ b/frontend/src/lib/components/assets/AssetGraph/AddNode.svelte @@ -16,6 +16,7 @@ import type { ScriptLang } from '$lib/gen' import type { NativeTriggerKind } from './types' import { PIPELINE_LANGUAGES } from './pipelineLanguages' + import { NODE } from '$lib/components/graph/util' import type { PipelineOutputKind } from './pipelineTemplates' // Each left-column kind is just "pipeline script triggered by + +
+ accent pill would outweigh every real node on the canvas. --> {/snippet} +
diff --git a/frontend/src/lib/components/assets/AssetGraph/AssetGraphCanvas.svelte b/frontend/src/lib/components/assets/AssetGraph/AssetGraphCanvas.svelte index cb77d16c69..fb8c2e499e 100644 --- a/frontend/src/lib/components/assets/AssetGraph/AssetGraphCanvas.svelte +++ b/frontend/src/lib/components/assets/AssetGraph/AssetGraphCanvas.svelte @@ -31,12 +31,6 @@ import type { AssetKind } from '$lib/gen' import { NODE } from '$lib/components/graph/util' - // Width of the + node's rendered DOM element. Sugiyama allocates a full - // NODE.width slot for every node, so the small round button ends up - // left-aligned in its slot. We compensate by shifting the + node right - // by half the difference so its visual center matches the slot center. - const ADD_NODE_WIDTH = 40 - interface Props { graph: AssetGraphResponse selection?: AssetGraphSelection | undefined @@ -967,9 +961,6 @@ const xCenter = paneWidth / 2 - bboxWidth / 2 return model.nodes.map((n) => { const p = layoutPositions.get(n.id) ?? { x: 0, y: 0 } - // Compensate for the + node being narrower than its layout slot - // so it visually centers over the node(s) below. - const xShift = n.id === ADD_NODE_ID ? (NODE.width - ADD_NODE_WIDTH) / 2 : 0 // Activity-panel emphasis (purely visual rings, kept off `selected` // which swaps the details pane). Hover wins over pin so the cursor // always tracks. @@ -1001,7 +992,7 @@ return { id: n.id, type: n.type, - position: { x: p.x + xCenter + xShift, y: p.y + 40 }, + position: { x: p.x + xCenter, y: p.y + 40 }, data: n.data, class: boundClass ?? dbtClass ?? runClass ?? assetClass, selected: n.id === selectedId, diff --git a/frontend/src/lib/components/assets/AssetGraph/AssetNode.svelte b/frontend/src/lib/components/assets/AssetGraph/AssetNode.svelte index ec468d53dc..1a1da8cbf4 100644 --- a/frontend/src/lib/components/assets/AssetGraph/AssetNode.svelte +++ b/frontend/src/lib/components/assets/AssetGraph/AssetNode.svelte @@ -425,30 +425,21 @@ onPick={handlePick} > {#snippet trigger()} - + {/snippet}