RIR: an unlogged RIR stays unlogged, and the header lines up
A set that never had an RIR could still end up carrying one: NumberField mapped an empty field to 0 and the − button clamped to 0, so one stray tap stamped '(RIR 0)' — went to failure — on the set for good, in history and in backups, with no way back. An optional field now clears to null (the key is dropped), and stepping down from empty leaves it empty. A typed 0 still logs a real 0. The row's three-stepper sizing also has to reach the header, or the labels sit up to 5px off the columns they name.
This commit is contained in:
1 parent
c5172d0633
commit
c08381e558
4 files changed
+40
-16
No files matched your search
@@ -69,6 +69,12 @@ describe('setLabel', () => {
|
||||
expect(setLabel(LIFT, { w: 60, r: 10, rir: 1.5 })).toBe('60×10 (RIR 1.5)')
|
||||
expect(setLabel(LIFT, { w: 60, r: 10, rir: 0 })).toBe('60×10 (RIR 0)')
|
||||
})
|
||||
|
||||
it('says nothing about RIR on a set that never logged one', () => {
|
||||
expect(setLabel(LIFT, { w: 60, r: 10 })).toBe('60×10')
|
||||
// cleared in the UI: the key is dropped, but a null must read the same as absent
|
||||
expect(setLabel(LIFT, { w: 60, r: 10, rir: null })).toBe('60×10')
|
||||
})
|
||||
})
|
||||
|
||||
describe('defaultConfig', () => {
|
||||
|
||||
Reference in new issue
Block a user