Apple HIG pass: liquid-glass chrome + iOS SegmentedControl + ThresholdMeter
Deploy to route.crispygoat.com / deploy (push) Successful in 4m22s
Deploy to route.crispygoat.com / deploy (push) Successful in 4m22s
Water log mobile field experience (PIN → Headgates → Log → Success): * Brand rename: "Tuxedo Ditch Co." → "Tuxedo Corn" everywhere it was a stale reference (page metadata + admin Today tab caption). Constants already say Tuxedo Corn; this just aligns the stragglers. * Tab bar (Headgates | Time): pill pair → real UISegmentedControl. MiniSegmented lives next to TabBar in MobileWaterApp.tsx and uses the same ResizeObserver-measure + spring-timing pattern as the existing SegmentedControl — feels like one widget at two sizes (this one at 32pt, the unit selector at 44pt). * Liquid-glass chrome (recipe applied 5×, mirrored on the bottom submit bar): linear-gradient background + blur(24px) + saturate(180%) + inset top highlight + inset bottom hairline. TabBar, HeadgateList top nav, LogForm top nav, LogForm sticky submit bar, FieldPinScreen + SuccessScreen brand strips. * ThresholdMeter (new component, mobile/ThresholdMeter.tsx): the screen's signature. A live "blip" indicator under the 44pt measurement input that ties the form to its real domain (a worker reading a real gauge) instead of being a decorative gauge trophy. Track + optional colored zones (red·green·red) + thumb that slides on Apple's spring curve + color-coded zone label. Mirrors Apple's Volume Limit / Screen Time sliders. * i18n: 9 new zone labels per language (zoneBelowNormal, zoneAboveAlert, zoneInRange, zoneBelowAlert, zoneAboveMin, zoneReading, zoneTypeToLog, meterNormalRange + ES twins). Legacy normalRange/alertAbove/alertBelow signatures widened to accept pre-formatted strings so integer units render clean. * Updated water-log-i18n unit test for the wider signatures. All 27 tests pass; tsc + eslint clean.
This commit is contained in:
@@ -252,21 +252,21 @@ describe("Mobile label helpers (interpolation)", () => {
|
||||
});
|
||||
|
||||
it("log.normalRange interpolates the bounds + unit", () => {
|
||||
expect(LABELS.en.log.normalRange(2, 8, "CFS")).toBe(
|
||||
expect(LABELS.en.log.normalRange("2", "8", "CFS")).toBe(
|
||||
"Normal range: 2 – 8 CFS",
|
||||
);
|
||||
expect(LABELS.es.log.normalRange(2, 8, "CFS")).toBe(
|
||||
expect(LABELS.es.log.normalRange("2", "8", "CFS")).toBe(
|
||||
"Rango normal: 2 – 8 CFS",
|
||||
);
|
||||
});
|
||||
|
||||
it("log.alertAbove / alertBelow interpolate single bound + unit", () => {
|
||||
expect(LABELS.en.log.alertAbove(10, "CFS")).toBe("Alert above 10 CFS");
|
||||
expect(LABELS.es.log.alertAbove(10, "CFS")).toBe(
|
||||
expect(LABELS.en.log.alertAbove("10", "CFS")).toBe("Alert above 10 CFS");
|
||||
expect(LABELS.es.log.alertAbove("10", "CFS")).toBe(
|
||||
"Alerta arriba de 10 CFS",
|
||||
);
|
||||
expect(LABELS.en.log.alertBelow(1, "CFS")).toBe("Alert below 1 CFS");
|
||||
expect(LABELS.es.log.alertBelow(1, "CFS")).toBe("Alerta abajo de 1 CFS");
|
||||
expect(LABELS.en.log.alertBelow("1", "CFS")).toBe("Alert below 1 CFS");
|
||||
expect(LABELS.es.log.alertBelow("1", "CFS")).toBe("Alerta abajo de 1 CFS");
|
||||
});
|
||||
|
||||
it("success.loggedBy interpolates the irrigator name", () => {
|
||||
|
||||
Reference in New Issue
Block a user