diff --git a/ui/src/components/OperationPanel.jsx b/ui/src/components/OperationPanel.jsx
index a38c837..4e158ee 100644
--- a/ui/src/components/OperationPanel.jsx
+++ b/ui/src/components/OperationPanel.jsx
@@ -78,10 +78,10 @@ function TextButton({ onClick, children, title, danger }) {
function Button({ onClick, active, children, title, disabled }) {
return (
+ : (active ? 'bg-blue-600 text-white' : 'bg-white text-gray-700 hover:bg-gray-100')}`}>
{children}
)
@@ -119,9 +119,9 @@ function Field({ label, children, hint, stack }) {
// Same 10px uppercase as the ledger table headers, so the groupings read as part
// of the same family rather than as a second style.
-function SectionLabel({ children }) {
+function SectionLabel({ children, className = '' }) {
return (
-
+
{children}
)
@@ -132,8 +132,8 @@ function SectionLabel({ children }) {
// says the choice has been made elsewhere.
function Segmented({ options, value, onChange, disabled }) {
return (
-
+
{options.map(([val, label, title]) => (
onChange(val)} active={value === val}
title={title} disabled={disabled}>{label}
@@ -145,7 +145,7 @@ function Segmented({ options, value, onChange, disabled }) {
function Submit({ onClick, children, disabled, busy }) {
return (
{busy && (
@@ -254,7 +254,7 @@ function IterBreakdown({ currentTotals }) {
return (
setOpen(o => !o)}>
- {open ? '▾' : '▸'} breakdown by iter
+ {open ? '▾' : '▸'} Breakdown by iter
{open && (
@@ -496,7 +496,7 @@ function TagInput({ value, onChange, tags = [], className }) {
)
}
-function ScaleLedger({ currentTotals, scaleInputs, setScaleInputs, scalePlug, setScalePlug, targetBasis, setTargetBasis, logMeta = {}, multi, applyMode }) {
+function ScaleLedger({ currentTotals, scaleInputs, setScaleInputs, scalePlug, setScalePlug, targetBasis, setTargetBasis, logMeta = {}, multi, applyMode, settingsExtra }) {
const valueCol = currentTotals?.valueCol
const unitsCol = currentTotals?.unitsCol
const total = currentTotals?.total || { value: 0, units: 0 }
@@ -884,7 +884,7 @@ function ScaleLedger({ currentTotals, scaleInputs, setScaleInputs, scalePlug, se
{showAllLines && adjLines.length > MAX_ADJ_LINES + 1 && (
- setShowAllLines(false)}>▾ collapse the smaller changes
+ setShowAllLines(false)}>▾ Collapse the smaller changes
)}
@@ -1013,11 +1013,17 @@ function ScaleLedger({ currentTotals, scaleInputs, setScaleInputs, scalePlug, se
They used to hand-roll their own label row and hint, with two
different type sizes and no shared label width, so the two stacked
into a paragraph of loose words rather than reading as two settings. */}
- {(plugState || hasExcl || perSlice) && (
-
+ {(plugState || hasExcl || perSlice || settingsExtra) && (
+ // Side by side, not stacked: three one-line settings in a column cost
+ // three rows of a dock that is 260px tall to begin with, and they are
+ // read together anyway -- what absorbs the change, what it is measured
+ // against, and whether it applies once or per slice.
+
+
settings
+ {settingsExtra}
{plugState && (
-
+
@@ -1058,7 +1064,7 @@ function ScaleLedger({ currentTotals, scaleInputs, setScaleInputs, scalePlug, se
)}
{perSlice && (
-
+
figures above are combined totals
)}
@@ -1272,7 +1278,7 @@ function RequestPreview({ payload, op, versionId }) {
Request
{line}
- {copied ? 'copied' : 'copy'}
+ {copied ? 'Copied' : 'Copy'}
setOpen(false)}
className="text-gray-600 hover:text-gray-800 text-lg leading-none">×
@@ -1332,6 +1338,15 @@ export default function OperationPanel({
// operation is named by the tabs beside it.
const POST = 'Post', POSTING = 'Posting…'
+ // Sits with the ledger's own settings rather than under the operation tabs:
+ // it is one line, they are one line, and stacked they cost three rows of a
+ // dock that is 260px tall to begin with.
+ const applyField = multi ? (
+
+
+
+ ) : null
+
const ledger = (
<>
{activeOp === 'scale' && (
@@ -1342,6 +1357,7 @@ export default function OperationPanel({
targetBasis={targetBasis} setTargetBasis={setTargetBasis}
logMeta={logMeta}
multi={multi} applyMode={applyMode}
+ settingsExtra={applyField}
/>
)}
{activeOp === 'recode' && (
@@ -1367,7 +1383,7 @@ export default function OperationPanel({
reference ones operations are normally kept away from,
which is the point: a period with no baseline borrows its
shape from prior year or plan. */}
-
setCloneFrom(e.target.value)}
className={`${TEXT} w-48`}>
@@ -1382,7 +1398,7 @@ export default function OperationPanel({
changes
-
@@ -1398,7 +1414,7 @@ export default function OperationPanel({
-
+
setCloneScale(e.target.value)}
className={`${INPUT} w-28`} />
@@ -1417,6 +1433,12 @@ export default function OperationPanel({
} />
)}
+ {activeOp !== 'scale' && applyField && (
+
+ settings
+ {applyField}
+
+ )}
>
)
@@ -1425,7 +1447,7 @@ export default function OperationPanel({
{/* Tag first: it is the field that gives an adjustment meaning later,
in the ledger and in the bridge. Completes from initiatives already
used on this source; free text is still accepted. */}
-
+
{opTag.trim() && (
@@ -1441,7 +1463,7 @@ export default function OperationPanel({
border. The same tags complete from the input's datalist, which
costs no space and is not capped at six. */}
-
+
setNote(e.target.value)}
placeholder="optional" className={`${TEXT} w-full`} />
@@ -1472,34 +1494,23 @@ export default function OperationPanel({
The operation used to be a row of tabs buried in the middle column
with no heading over it, so the panel never said what it was about
to do until you read the button. */}
-
-
-
-
- {['scale', 'recode', 'clone'].map(op => (
- setActiveOp(op)} active={activeOp === op}>
- {op}
-
- ))}
-
-
+
+
+
+ {['scale', 'recode', 'clone'].map(op => (
+ setActiveOp(op)} active={activeOp === op}>
+ {op}
+
+ ))}
+
+
- {hasSlice && (
-
- setPeek(o => !o)}>
- {peek ? '▾' : '▸'} {slices.length} {slices.length === 1 ? 'slice' : 'slices'}
-
-
- )}
-
-
- {/* Under the operation it qualifies, on the same label column as every
- other button row -- it used to sit loose in the middle of the strip,
- where it read as a peer of the operation rather than a setting on it. */}
- {hasSlice && multi && (
-
-
-
+ {hasSlice && (
+
+ setPeek(o => !o)}>
+ {peek ? '▾' : '▸'} {slices.length} {slices.length === 1 ? 'slice' : 'slices'}
+
+
)}
@@ -1535,7 +1546,8 @@ export default function OperationPanel({
style={horizontal
? { display: 'grid', gridTemplateColumns: 'minmax(0, 1fr) minmax(15rem, 20rem)', alignItems: 'start' }
: undefined}>
-
{ledger}
+
{ledger}
{labelZone}
)}