WORK-063
ID:WORK-063Status:done

Density Dimension

Priority:highComplexity:moderateMilestone:v0.9.0Source:SPEC-025
changeset-release/main View source

Criteria completion

No incremental history — criteria tracking started on Apr 19.

Branches 3
History 5
  1. 59ded4a
    Content editedby Claude
    Implement SPEC-037 plan package hardening: all 7 work items
  2. f262d7b
    Content editedby Claude
    Backfill source attributes on all 123 work items
  3. 9f4dfdd
    Content editedby Claude
    feat(transform): add density dimension to rune configs and engine (WORK-
  4. a129a9e
    Content editedby Claude
    Assign all new work items (WORK-051–068) to v0.9.0 milestone
  5. a333007
    Created (done)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)