From 6b2ecbbcd6095b709132b573c8ba65e5bfd61fb4 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 25 Sep 2026 13:09:24 -0400 Subject: [PATCH] Mark the ledger row the edit is measured from Forecast and Total selected differed only in weight, and the Total line's running figure was bold either way, so neither read as the target. The basis row is now tinted and tagged, and clicking either row selects it. Co-Authored-By: Claude Opus 5.5 (1M context) --- ui/src/components/OperationPanel.jsx | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/ui/src/components/OperationPanel.jsx b/ui/src/components/OperationPanel.jsx index c854cf6..8353e15 100644 --- a/ui/src/components/OperationPanel.jsx +++ b/ui/src/components/OperationPanel.jsx @@ -886,6 +886,17 @@ function ScaleLedger({ currentTotals, scaleInputs, setScaleInputs, scalePlug, se const numCell = 'text-right font-mono tabular-nums whitespace-nowrap px-2' const rule =
+ // The line the edit rows are measured from. It used to be marked by weight + // alone, and the Total line's running figure was bold whichever basis was + // chosen, so either way one of the two rows had bold in it and neither read + // as the target. Tinted, tagged, and clickable -- the Target toggle sits in + // the other column, away from the rows it chooses between. + const basisRow = (hot) => (hot + ? 'bg-blue-50 text-blue-700 font-semibold' + : 'text-gray-500') + (hasExcl ? ' cursor-pointer' : '') + const targetTag = ( + target + ) return (
@@ -982,9 +993,12 @@ function ScaleLedger({ currentTotals, scaleInputs, setScaleInputs, scalePlug, se {rule}{measures.map(m =>
)}{showRunning &&
} - + setTargetBasis('adjustable') : undefined} + title={hasExcl ? 'Type your number as the forecast alone' : undefined}> {hasExcl ? 'Forecast' : 'Current'}{perSlice ? ' (all)' : ''} + {hasExcl && !onTotal && targetTag} {measures.map(m => ( {fmtNum(m.current, m.dp)} @@ -994,8 +1008,10 @@ function ScaleLedger({ currentTotals, scaleInputs, setScaleInputs, scalePlug, se {hasExcl && ( - - Total selected + setTargetBasis('selected')} + title="Type your number as everything selected"> + Total selected{onTotal && targetTag} {measures.map(m => ( {m.key === 'price' @@ -1004,7 +1020,7 @@ function ScaleLedger({ currentTotals, scaleInputs, setScaleInputs, scalePlug, se ))} {showRunning && ( - {fmtNum(grand.value, 0)} + {fmtNum(grand.value, 0)} )} )}