ID:WORK-063Status:donePriority:highComplexity:moderateMilestone:v0.9.0
Density Dimension
Summary
Add a density dimension to rune configs and the identity transform. Runes declare a defaultDensity and the transform emits data-density on the rune's root element. Density controls spacing and detail level: full shows everything, compact truncates descriptions and hides secondary metadata, minimal shows only title and primary metadata.
Density is set automatically by context (dedicated page → full, grid cell → compact, list view → minimal) and can be overridden by the author via a density attribute.
Acceptance Criteria
RuneConfiginpackages/transform/src/types.tsgainsdefaultDensity?: 'full' | 'compact' | 'minimal'- Identity transform emits
data-densityon the rune's root element - Author can override density via
density="compact"attribute on the rune tag - Context-based automatic density: rune inside grid → compact, rune inside list/backlog → minimal
- All ~60 container-level rune configs annotated with
defaultDensityper SPEC-025 Table 4 - Unit tests verify density attribute emission for default, override, and context-based scenarios
Approach
- Add
defaultDensitytoRuneConfiginterface - In the engine, when building the rune's root element attributes, set
data-densityfrom: author attribute override → context-based override → config default →'full' - Context detection: check if the current rune is nested inside a grid/list rune (via parent typeof)
- Annotate all rune configs with defaults from SPEC-025 Table 4
References
- SPEC-025 (Universal Theming Dimensions — Density, Table 4: Default Density)