Skip to content

Widens the Map for a same-column timer - #717

Merged
johnnyt merged 1 commit into
mainfrom
sb-eidj-map-timers-captions
Oct 11, 2026
Merged

johnnyt merged 1 commit into
mainfrom
sb-eidj-map-timers-captions

Conversation

@johnnyt

@johnnyt johnnyt commented Oct 11, 2026

Copy link
Copy Markdown
Member

What this changes

Three of the four parts of the Map's timer bead. The caption wording part is held (below).

  • The SVG holds a same-column timer edge. A timer edge between two steps of one column runs out past their right sides, with its delay beside that run. The hook now holds the SVG wide enough for the run and the delay whether or not a key stands beside the drawing (drawnRight in assets/js/statifier_blocks_map.js, used by renderSvg and keyOf). Before, only the key widened the SVG for it. Pinned by a Node layout test over the vendored elkjs that lays out a send and the await hearing it in one column with the graph's legend removed.
  • Parity with Describe.outline/3 for a parentless send. A delayed send that is the document's root has no parent: Describe draws no timer edge from it, and neither does StatifierBlocks.Map.graph/2, though the send carries the clock mark. A test in map_test.exs holds the two equal for that case.
  • Info.elements/6 finds a timer edge's sentence by its edge. The private timer/2 in StatifierBlocks.Map.Info now renders the outline's nodes with the one edge it describes and takes that edge's line (defp edge_line/2), instead of taking the line at the edge's position in the whole render. The sentence it answers is unchanged. A test with two delayed sends, each heard by its own wait, pins each edge's own sentence.

A Changed fragment, changelog.d/sb-eidj.md, carries the SVG width. The other two parts change no answer and get no fragment.

Held: the caption wording

The ruling (ruled by the operator, 2026-10-10): a group caption is the whole first sentence of the type's explanation, wrapped to the band and never cut mid-word, and the rules column is captioned "Rules: watch the steps while they run". This PR does not change the captions. Today a group's caption is drawn on its rules column, and the column carries one caption string. Drawing both the ruled column caption and the group's whole sentence, wrapped, there needs a new field on the graph. Drawing only the ruled caption there takes the group's explanation off the map, and the accepted ADR-0017 (decision 4) says a structural container carries its explanation as a caption. The bead's acceptance makes any change to graph/2's answer beyond the wording a stop, so the placement goes back for a ruling. No caption string changes here.

Sabotage

Each new test was run red against a mutation of the code it covers, then the file was restored from a copy and checked byte-equal:

  • renderSvg took the laid-out width alone when there is no key: the layout test went red on the delay's right edge.
  • core.send added to @timer_targets, so a send could hear its own event: the parentless-send test went red.
  • edge_line/2 rendered every edge and took the first timer line: the two-reminder test went red on the second edge.

Gate

Full mix quality green on this commit's tree, rebased on the drafts drawer change: format, compile with warnings as errors, doc links, dependencies, ADR cites, docs, Credo, Dialyzer, and the suite (4,007 of 4,007 passed, 95.4% coverage). Doctor, Gettext and Sobelow are not installed in this project and skipped.

Rebased over "Draws the drafts shelf as a drawer", which also edits map.ex, the hook and map_test.exs; the rebase merged without a conflict and the gate above ran on the rebased tree.

The hook holds the SVG wide enough for a timer edge between two steps
of one column, its run and its delay, with or without a key beside the
drawing. A timer edge's description is found by its own edge rather
than by its position in the outline's rendered lines. A test holds the
Map's timer edges equal to Describe's for a delayed send at the root.
@johnnyt
johnnyt force-pushed the sb-eidj-map-timers-captions branch from 3b66e55 to ecd71d6 Compare October 11, 2026 03:58
@johnnyt
johnnyt merged commit 7c31fac into main Oct 11, 2026
2 checks passed
@johnnyt
johnnyt deleted the sb-eidj-map-timers-captions branch October 11, 2026 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant