StatifierBlocks.Editor.SaveStepTray (StatifierBlocks v0.26.0)

Copy Markdown View Source

The marking step of the "Save as a step" gesture (ADR-0005 part (iii), amended 2026-09-07, clause 18E).

18E says the proposed params are the values the author marks, and every value differing from its field's default where they mark none. So the gesture cannot be a single button - there is a choice in it - and it does not need to be more than a list: one checkbox per config field in the selected subtree, a Save, and a Cancel.

What it deliberately does not draw is a name field or a preview. Naming the type is the host's act (15E), and a package that drew a name field would be drawing a decision it cannot make.

It is a presentation module in the sense every other file beside it is: it renders what it is handed and decides nothing. Which rows exist, which boxes are ticked, and what Save does are StatifierBlocks.Editor's.

Summary

Functions

The tray, or nothing at all when no gesture is open.

Functions

save_step_tray(assigns)

@spec save_step_tray(map()) :: Phoenix.LiveView.Rendered.t()

The tray, or nothing at all when no gesture is open.

Attributes

  • rows (:list) (required) - One entry per block in the selected subtree - %{block_id:, label:, fields: [%{key:, label:, marked?:}]} - built by the editor from the palette's own config_schema/1, so the fields the author sees here are the fields their form draws.

  • target (:any) (required)