WORK-063
ID:WORK-063Status:done

Density Dimension

Priority:highComplexity:moderateMilestone:v0.9.0Source:SPEC-025

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

  • RuneConfig in packages/transform/src/types.ts gains defaultDensity?: 'full' | 'compact' | 'minimal'
  • Identity transform emits data-density on 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 defaultDensity per SPEC-025 Table 4
  • Unit tests verify density attribute emission for default, override, and context-based scenarios

Approach

  1. Add defaultDensity to RuneConfig interface
  2. In the engine, when building the rune's root element attributes, set data-density from: author attribute override → context-based override → config default → 'full'
  3. Context detection: check if the current rune is nested inside a grid/list rune (via parent typeof)
  4. Annotate all rune configs with defaults from SPEC-025 Table 4

References

History

  1. 59ded4a
    Content edited
  2. f262d7b
    source+SPEC-025
  3. 9f4dfdd
    statusreadydone
    • ☑ `RuneConfig` in `packages/transform/src/types.ts` gains `defaultDensity?: 'full' | 'compact' | 'minimal'`
    • ☑ Identity transform emits `data-density` on the rune's root element
    • ☑ Author can override density via `density="compact"` attribute on the rune tag
    • +3 more criteria
  4. a129a9e
    milestone+v0.9.0
  5. a333007
    Created (ready, high, moderate, transform, themes, dimensions)