WORK-063
ID:WORK-063Status:done

Density Dimension

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

Criteria completion

Criteria completion: 6 of 6 (100%) checked; history from Mar 24 to Mar 240%25%50%75%100%Mar 24Mar 24
Branches 3
History 5
  1. e900a90
    Created (done)by bjornolofandersson
  2. f262d7b
    Content editedby Claude
  3. 9f4dfdd
    • ☑ `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
    by Claude
  4. a129a9e
    Content editedby Claude
  5. a333007
    Created (ready)by Claude
    Add work items for SPEC-024 (Metadata) and SPEC-025 (Universal Theming)

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

  • SPEC-025 (Universal Theming Dimensions — Density, Table 4: Default Density)