You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(views): ListView resolves density from the spec-canonical rowHeight (#2890) (#2933)
Second rename in the ListView vocabulary migration: `densityMode` → `rowHeight`,
folded in the same `normalizeListViewSchema` step 1 introduced.
Not a pure alias — the vocabularies are different sizes. The spec has five row
heights, ListView's toolbar offers three densities. Both directions now live in
one place (`DENSITY_MODE_TO_ROW_HEIGHT` / `ROW_HEIGHT_TO_DENSITY_MODE`, plus the
tolerant `rowHeightToDensityMode` reader), chosen so a fold followed by a read is
a round trip and the lossy narrowing is stated once.
Two behavior fixes fall out:
- Precedence is no longer inverted. ListView read `densityMode` FIRST, so a view
carrying both keys rendered the legacy value — backwards from every other
legacy/canonical pair. The canonical key now wins.
- The toolbar stops re-seeding the legacy key: ObjectView's `onDensityChange`
persisted `densityMode` into stored view metadata on every toggle, so the
legacy vocabulary kept regrowing underneath the migration.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments