diff --git a/docs/IRIS_TODO.md b/docs/IRIS_TODO.md index 6a2c03f..044ef3f 100644 --- a/docs/IRIS_TODO.md +++ b/docs/IRIS_TODO.md @@ -385,3 +385,24 @@ do not duplicate it there. redundant. Decide after the layout change lands, by writing a button both ways and keeping the one that is shorter to explain; delete the other rather than keeping two ways. + +## Build (asked for by Iris, 2026-09-06): a density-independent length unit + +- [ ] **A third length kind beside relative and pixels, so display scales + "just work".** Iris's words: "another length type similar to absolute & + relative, so instead there would be relative, pixels, and another unit + like em or whatever is standard. That way different display scales + should just work." Today a length is either a fraction of the parent + (`rest`/relative) or physical pixels, and the phone drew 16 px text at + roughly a third of its intended size until the P0 fixes applied the + display's scale factor globally. That global scale is a stopgap for the + benchmark; the real shape is a unit resolved against the display's + density at layout time — Android's `dp` / CSS's reference pixel is the + standard (1 unit = 1/160 in), with `em` as the text-relative option — + so a widget author writes `16.dp()` once and never sees the scale. + Done when: `Length` (or whatever the enum is called) has the third + variant; every place that resolves a length takes the density; the + examples and `transcript-ui` use the new unit for text sizes, padding + and control sizes; the emulator at two densities and the phone draw the + same layout at the same physical size. After the bench setup is + finished, before P1 draws any new screen.