diff --git a/ui/src/components/OperationPanel.jsx b/ui/src/components/OperationPanel.jsx index a498961..f616267 100644 --- a/ui/src/components/OperationPanel.jsx +++ b/ui/src/components/OperationPanel.jsx @@ -237,6 +237,15 @@ const FIELDS = [ ['pct', '% change'], ] +// Exactly one box per measure is live -- scaleInputs is keyed by measure, so +// focusing another row hands that measure's edit over rather than adding a +// second one. The other two are the same number said differently, so they are +// drawn as output: no border, no ground, muted. They are still editable, and a +// border on hover is what says so. +// +// Both states used to be full input boxes differing by a border colour, which +// made three typed figures out of one typed figure and two calculations. +// // given the active edit for a measure, what do the three rows read? // dp is the measure's own precision, so the editable rows read the same way as // the lines above them -- whole dollars against whole dollars, five places @@ -328,11 +337,16 @@ function LedgerInput({ value, active, onChange, onFocus, suffix }) { onChange(el.value.replace(/,/g, '')) }} onFocus={onFocus} placeholder="—" + title={active ? undefined : 'Derived — click to enter the number this way instead'} className={`border rounded py-0.5 text-xs w-24 text-right font-mono tabular-nums + transition-colors ${suffix ? 'pl-2 pr-5' : 'px-2'} - ${active ? 'border-blue-400 bg-blue-50/40 text-gray-800' : 'border-gray-200 bg-white text-gray-700'}`} /> + ${active + ? 'border-blue-400 bg-blue-50/40 text-gray-900 font-medium' + : 'border-transparent bg-transparent text-gray-400 hover:border-gray-300 hover:bg-white'}`} /> {suffix && ( - {suffix} )}