StatifierBlocks.Editor.Drawer (StatifierBlocks v0.3.0)

Copy Markdown View Source

The full-width drawer row (ADR-0005, the 2026-08-29 shell amendment, rulings 1A and 2A).

1A says what belongs here and the test is two words: tabular and document-level. Content that is a grid of rows about the whole document goes in the drawer; content about one block does not, whatever its shape. Truth tables ship first; fixture runs and the datamodel view have reserved places and are not drafted here.

The measurable reason the drawer exists at all: a truth table for a branch in a credit-card processing document is one row per case and one column per bound input plus the verdicts, and at the inspector's width it either scrolls sideways or inverts its column order to keep the answers on screen. The spike did the second and filed the inversion as a readability defect. A drawer is as wide as the editor is, which is the axis the table needs.

Never open-or-gone

2A: collapsed, the drawer is a strip carrying a title and a count - "Truth tables (3)" - and that is what makes the content discoverable from any state rather than only from the affordance that opens it. Opening it with no table on the selected block shows the index page: the blocks that do own one, each of them a jump. That is the whole of the spike's cold-start gap, closed.

The count is the document's, not the selection's. A strip reading (0) because nothing happens to be selected would tell an author something false about their document.

The resize is a command, not a hook

Decision 7 ships exactly one JavaScript hook and this section adds none. The resize is a native range control inside a phx-change form: the new height crosses as an ordinary event, StatifierBlocks.Shell.clamp_height/1 bounds it, and the host stores it - one round trip, and the state that matters lives where state already lives. 2A is explicit that the height is remembered per viewer and that the package has no viewer, so nothing here persists anything.

Summary

Functions

The drawer row: a strip when collapsed, tabs and a table when open.

Functions

drawer(assigns)

The drawer row: a strip when collapsed, tabs and a table when open.

Attributes