Skip to content

v0.5.0 — the widget set

Choose a tag to compare

@thatsme thatsme released this 27 Jul 11:59

v0.5.0 — the widget set

Closes the milestone on menu, select, tree and the undo helper. These were
deferred out of v0.4 so they could be built as native consumers of the R2
routing contract rather than against the manual-dispatch idiom it replaced.

The whole set added one routed message. {:harlock_toggle, …} is the only
addition to the vocabulary and only tree needed it; menu and select reuse
{:harlock_select, …} and {:harlock_submit, …}.

Added:

  • menu/1 — vertical menu. Arrows move the highlight, Enter commits, and those
    are separate events so an app can preview on movement and act on Enter.
  • select/1 — dropdown that flips rather than clips: above the control near
    the bottom margin, shifted left near the right one. A dropdown on the last row
    of an 80x24 terminal opens upward instead of off-screen.
  • tree/1 — collapsible tree. The renderer never recurses: Harlock.Tree
    projects to the flat list of visible rows, carrying each row's ancestor chain
    so the // guides are correct. Expansion is keyed by node id, never by
    index. Children may be :unloaded / :loading, so a tree over a filesystem
    or a remote node expands through a Cmd.
  • Harlock.UndoStack — bounded undo/redo the app holds in its model. Coalescing
    is contract, not tuning: a run of insertions is one step, and it breaks on a
    newline, a cursor jump, or a delete after an insert.
  • examples/explorer.exs — all three widgets in one app, with the lazy path as
    the default rather than a footnote.

Fixed:

  • The NIF Makefile confused build host with build target, so cross-compiling
    from macOS to ARM Linux appended Mach-O linker flags to a Linux link.

Full notes in CHANGELOG.md.