From 068ec72fe2cc5edd33a8042a3de94651f6856615 Mon Sep 17 00:00:00 2001 From: Grovy311 Date: Fri, 7 Aug 2026 17:49:08 +0200 Subject: [PATCH] cable-sizing: fix trigger column and add visible affordance The trigger was wired to the cableCrossSection column, which is not in the default visible column set - the actually visible "Kabel" column is cableSummary (a computed cableType/cableCrossSection/cableLength join). Editing cableSummary already maps to the remark field rather than the underlying cable data (see buildCircuitEditPatch), so this column was effectively a read-only display already; retargeting the trigger there loses no existing manual-edit capability. Also adds .cell-cable-sizing-trigger styling (mirrors .cell-protection-trigger) so the trigger is visually discoverable, which the initial version was missing entirely. --- src/app/globals.css | 24 +++++++++++++++++++ .../components/circuit-tree-editor.tsx | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/app/globals.css b/src/app/globals.css index 22da5df..5aa8f85 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -1209,6 +1209,30 @@ a.kpi:hover { box-shadow: inset 0 0 0 1px var(--color-signal); } +.tree-grid .cell-cable-sizing-trigger { + color: var(--color-primary); + cursor: pointer; + font-weight: 600; + transition: + background-color 0.12s ease, + box-shadow 0.12s ease; +} + +:root[data-bs-theme="dark"] .tree-grid .cell-cable-sizing-trigger { + color: var(--color-accent-pale); +} + +.tree-grid .cell-cable-sizing-trigger:hover { + background: rgba(63, 130, 166, 0.15); + box-shadow: inset 0 0 0 1px var(--color-primary); +} + +.tree-grid .cell-cable-sizing-trigger::after { + content: " ⚡"; + font-size: 0.8em; + opacity: 0.7; +} + .tree-grid .device-drag-handle { cursor: grab; } diff --git a/src/frontend/components/circuit-tree-editor.tsx b/src/frontend/components/circuit-tree-editor.tsx index 49200cf..3e934c7 100644 --- a/src/frontend/components/circuit-tree-editor.tsx +++ b/src/frontend/components/circuit-tree-editor.tsx @@ -4277,7 +4277,7 @@ export function CircuitTreeEditor(props: { projectId: string; circuitListId: str row.rowType !== "deviceRow" ); const isCableSizingTrigger = Boolean( - column.key === "cableCrossSection" && + column.key === "cableSummary" && row.circuit && row.rowType !== "deviceRow" );