From 8bd5f8c195420e6873f805e6de1402179aeed78c Mon Sep 17 00:00:00 2001 From: Eric Allam Date: Mon, 17 Aug 2026 23:03:27 +0100 Subject: [PATCH] polish(webapp): tighten smart-column dialog copy and display popover layout - Trim the Add smart column dialog copy: one-line display-only callout, example-only path hint, drop redundant field helpers, remove an em dash from the sample header. - Move the sample header and run picker outside the box to match the Preview header, and collapse the doubled box into one panel. - Clear the path and label fields when the source changes. - Rework the Display popover smart-column row: labels stay flush-left, the bolt marker sits inline after the label, and the edit/remove/grip controls are a right-aligned group with larger hit targets. --- .../runs/v3/AddSmartColumnDialog.tsx | 87 ++++++++++--------- .../components/runs/v3/RunsDisplayOptions.tsx | 61 +++++++------ .../components/runs/v3/SmartColumnSample.tsx | 2 +- 3 files changed, 80 insertions(+), 70 deletions(-) diff --git a/apps/webapp/app/components/runs/v3/AddSmartColumnDialog.tsx b/apps/webapp/app/components/runs/v3/AddSmartColumnDialog.tsx index cbf9efd23..1415cb9f8 100644 --- a/apps/webapp/app/components/runs/v3/AddSmartColumnDialog.tsx +++ b/apps/webapp/app/components/runs/v3/AddSmartColumnDialog.tsx @@ -94,6 +94,14 @@ export function AddSmartColumnDialog({ setSampleIndex(0); }, [source]); + const handleSourceChange = (next: SmartColumnSource) => { + if (next === source) return; + setSource(next); + setPath(""); + setLabel(""); + setLabelEdited(false); + }; + const effectiveLabel = labelEdited ? label : labelFromPath(path); const sampleLoaded = sample.data !== undefined && sample.state === "idle"; @@ -145,8 +153,7 @@ export function AddSmartColumnDialog({ {editing ? "Edit smart column" : "Add smart column"}
- Display only. A smart column shows you a value from a run, but you can't sort or filter - the list by it. To narrow the list, use tags or the query editor. + Smart columns are display only. You can't sort or filter by them.
@@ -160,7 +167,7 @@ export function AddSmartColumnDialog({ label={card.label} description={card.description} selected={source === card.value} - onSelect={() => setSource(card.value)} + onSelect={() => handleSourceChange(card.value)} /> ))}
@@ -175,10 +182,9 @@ export function AddSmartColumnDialog({ placeholder="$.order.total" spellCheck={false} /> - - Dot and bracket notation, e.g. $.order.total or{" "} - $.items[0].sku. Use .length for an array, string, or - key count. + + e.g. $.order.total, $.items[0].sku,{" "} + $.items.length
@@ -191,9 +197,6 @@ export function AddSmartColumnDialog({ }} placeholder={labelFromPath(path)} /> - - Defaults to the last part of the path. -
@@ -216,16 +219,12 @@ export function AddSmartColumnDialog({ ))} - - Number right-aligns the column and uses tabular figures. Anything that doesn't - parse falls back to text. - -
-
- Sample — {source} +
+
+ Sample {source} {usable.length > 1 && ( )}
- {!sampleLoaded ? ( - - Loading… - - ) : activeSample ? ( - - ) : runCount === 0 ? ( - - No runs to sample. - - ) : anyOffloaded ? ( - - Recent {source}s are offloaded to object storage, too large to sample here. - - ) : ( - - No recent run has a {source} value to sample. - - )} +
+ {!sampleLoaded ? ( + + Loading… + + ) : activeSample ? ( + + ) : runCount === 0 ? ( + + No runs to sample yet. + + ) : anyOffloaded ? ( + + Recent {source}s are too large to sample here. + + ) : ( + + No recent run has a {source} to sample. + + )} +
- Preview +
+ Preview +
@@ -377,7 +380,7 @@ function SmartColumnPreview({ {!loaded ? (
Loading…
) : rows.length === 0 ? ( -
No runs
+
No runs yet
) : ( rows.map((row, index) => { const cell = def.path diff --git a/apps/webapp/app/components/runs/v3/RunsDisplayOptions.tsx b/apps/webapp/app/components/runs/v3/RunsDisplayOptions.tsx index 95b4e2403..0e2dd1062 100644 --- a/apps/webapp/app/components/runs/v3/RunsDisplayOptions.tsx +++ b/apps/webapp/app/components/runs/v3/RunsDisplayOptions.tsx @@ -199,6 +199,7 @@ function ColumnRow({ col, checked, locked, + reserveIcon, dragging, isOver, onToggle, @@ -227,7 +228,7 @@ function ColumnRow({ return (
{isOver &&
} {locked ? : } - {isSmart && } - - {col.def.label} + + + {col.def.label} + + {isSmart && } - {onEdit && ( - - )} - {onRemove && ( - - )} - +
+ {onEdit && ( + + )} + {onRemove && ( + + )} + + + +
); } diff --git a/apps/webapp/app/components/runs/v3/SmartColumnSample.tsx b/apps/webapp/app/components/runs/v3/SmartColumnSample.tsx index 2b88a9665..20084f6e1 100644 --- a/apps/webapp/app/components/runs/v3/SmartColumnSample.tsx +++ b/apps/webapp/app/components/runs/v3/SmartColumnSample.tsx @@ -20,7 +20,7 @@ export function SmartColumnSample({ onSelectPath: (path: string) => void; }) { return ( -
+