Lead the meta line with the unit in the phone measurement list

On a phone a long unit beside the value ('12,5 Atemzüge/min') pushed
the row's controls. The value stands alone and the unit opens the muted
meta line beside the time and source, where meta belongs.
This commit is contained in:
Marc-André Bombeck committed 2026-10-08 19:03:32 +02:00
1 parent 5850036527
commit 7d738c0e49
1 file changed
+22 -17
@@ -1500,23 +1500,14 @@ export function MeasurementList({
their native decimal precision so
"78.4 kg" no longer truncates to "78".
v1.11.5 — sleep rows render TIME ASLEEP. */}
{isSleep ? (
formatDurationMinutes(m.value, t)
) : (
<>
{isGrouped
? fmt.integer(m.value)
: fmt.number(
rowDisplay(m).value,
rawDisplayFractionDigits(m.type),
)}{" "}
{measurementUnitLabel(
m.type,
isGrouped ? m.unit : rowDisplay(m).unit,
t,
)}
</>
)}
{isSleep
? formatDurationMinutes(m.value, t)
: isGrouped
? fmt.integer(m.value)
: fmt.number(
rowDisplay(m).value,
rawDisplayFractionDigits(m.type),
)}
</span>
{isSleep ? (
<SleepNightCaption m={m} />
@@ -1536,6 +1527,20 @@ export function MeasurementList({
site. Relative under 24 h, absolute
older.
*/}
{/* The unit is meta, and on a phone a long
one ("Atemzüge/min") beside the value pushed
the row's controls; it leads the meta line
instead. Sleep reads as a duration. */}
{isSleep ? null : (
<span data-slot="measurement-row-unit">
{measurementUnitLabel(
m.type,
isGrouped ? m.unit : rowDisplay(m).unit,
t,
)}
{" · "}
</span>
)}
{m.dayKey !== undefined ? (
<DayLink date={m.dayKey}>
{formatDateOrRelative(m.measuredAt, t)}