StatifierBlocks.Describe.Node (StatifierBlocks v0.36.1)

Copy Markdown View Source

One block in a StatifierBlocks.Describe outline (ADR-0016 decision 1).

FieldWhat it holds
idthe block's id
typethe block's type name, as the document stores it
parentthe id of the block whose slot holds this one; nil for the root
depthStatifierBlocks.ViewModel.outline/1's depth; the root is 0
kindoutline/1's kind: :step, :arm, :rail or :tray
sentenceStatifierBlocks.ViewModel.sentence/1 of the block's view-model node
outcomesthe outcome names StatifierBlocks.BlockType.outcomes/2 declares for the block's config, in declaration order
summarythe block's summary chips, kept apart from sentence and never joined into it
fan_labelStatifierBlocks.ViewModel.fan_label/1: "one of", "all of" or nil

A block whose type the palette cannot resolve is its placeholder: its type name as its sentence, no chips, and the one "done" outcome a type declaring no outcomes/1 has.

Summary

Types

t()

@type t() :: %StatifierBlocks.Describe.Node{
  depth: non_neg_integer(),
  fan_label: String.t() | nil,
  id: StatifierBlocks.Block.id(),
  kind: StatifierBlocks.ViewModel.kind(),
  outcomes: [String.t()],
  parent: StatifierBlocks.Block.id() | nil,
  sentence: String.t(),
  summary: [String.t()],
  type: StatifierBlocks.Block.type_name()
}