IRIS_TODO.md: a density-independent length unit, asked for by Iris

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
irisandClaude Fable 5.1 committed 2026-09-05 23:43:16 -04:00
1 parent 5b2ca039f1
commit 184a6c5b33
1 file changed
+21
+21
View File
@@ -385,3 +385,24 @@ do not duplicate it there.
redundant. Decide after the layout change lands, by writing a button redundant. Decide after the layout change lands, by writing a button
both ways and keeping the one that is shorter to explain; delete the both ways and keeping the one that is shorter to explain; delete the
other rather than keeping two ways. 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.