Skip to content

divide 0.6.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 04:14

divide 0.6.0 draws a Runner Flow as a board you design from the keyboard. Blocks are columns, Steps are cards, and every call and jump is a line between them. You create, connect, rename, reorder and delete Blocks and Steps without writing YAML, and the YAML file stays the Flow.

The Flow Designer

Run > Flow designer on a YAML Flow opens it as a board, in the code's place.

  • Blocks are columns. Each Block is a column from the top of the window to the bottom, side by side in their order. Neighbours alternate between two colours, neither of them the window's. The first column is marked ENTRY. The titles stay in view while the cards scroll.

  • Steps are cards, in the order they run. A card reads in Runner's order of a Step: IF condition(), SET key: value, CALL block.step, DO module:function(), JUMP block.step, PAUSE. Each word has its own colour.

    • Marks on its top edge: !E and !W for diagnostics, RO for a Step shown but not edited.
    • On its bottom edge, ◄2 counts the calls and jumps that lead to it.
  • Calls and jumps are lines, worked out from the YAML each time and never stored:

    • a call is a single line and a jump a double one, so they are told apart without colour;
    • a target the Flow does not have ends in ?;
    • lines never run over a card, and crossings are drawn as crossings.
  • The panel on the right holds:

    • what is going on, such as choosing a target, in reverse video and only while it lasts;
    • the inspector of the selected Block or Step;
    • the Flow's summary;
    • Runner's verdict.

    Under 100 columns it goes under the board.

  • Keyboard first; the mouse is optional.

    Key What it does
    arrows move from card to card and from column to column
    Tab the selected item's connections, one by one
    Enter follow a connection
    Backspace back to where you were
    C / J connect: choose the target on the board and press Enter, never typing block.step
    B / Ins a new Block with its first Step / a new Step
    Enter edit a Step (now including its id) or a Block (its id and description)
    X the Step's context
    Ctrl+arrows reorder Steps and Blocks
    Del delete, or remove a connection
    Ctrl+D the Flow window's tree, at the same item
    Ctrl+T the code; Ctrl+T in the code reopens the last view
    Alt+F9 check the Flow
    Ctrl+F9 run it
    F2 save

See Flow Designer in the help.

Edits that change only what they must

Each operation is one edit of the code's buffer: one Ctrl+Z undoes it, and F2 saves it. divide reads the Flow back after each one and undoes it if anything else changed.

  • Moving swaps two neighbouring Steps or Blocks text for text. Their comments go with them, and the blank lines between them stay.
  • Renaming a Step or a Block also rewrites every call and jump that names it (block.step, .step, block.). Each keeps its quoting and its comment.
  • Deleting says first:
    • which Steps lead to the item, and removes their call or jump in the same edit;
    • how many comments go with it;
    • when the Flow will start elsewhere.
  • Asked before: changing the entry Block, or changing which Step block. leads to.
  • Refused, with the reason, sending you to the code:
    • a reference line with a comment on it;
    • a change that would leave a Step with nothing to do, which Runner rejects;
    • an id that is taken or that Runner does not allow;
    • Steps written in flow style, whose references could not be followed.
  • Broken YAML: the board keeps the last design that parsed, read-only, and never touches your unsaved text.

The context, as a tree or as JSON

X on a card, or Edit context... in the Step dialog, opens a Step's context as data:

  • in the JSON editor's tree, with its item dialog (key, type, value): nested objects and lists, strings, numbers, booleans, null;
  • or as JSON text, in the code editor.

The dialog works on a copy, and only OK writes the result. A context written one key per line keeps its order and comments.

Also

  • examples/runner/flows/fulfil.yml is a Flow with four Blocks, calls between them and a jump that retries a Step.
  • The Spanish interface and the help in English and Spanish cover all of the above.

Known limits

  • The Designer designs; it does not simulate a Flow or play it back. Running is Runner's, through Ctrl+F9.
  • Steps move only within their Block, and a Block is created with its first Step.
  • The layout follows the YAML's order, and nothing about the board is stored.

Install

Ready to run, with nothing else to install:

  • macOS and Linux: brew install divengine/tap/divide
  • Windows: scoop install https://github.com/divengine/divide/releases/latest/download/divide.json, or the .msi below
  • Linux: the .deb, .rpm, .apk and Arch packages, the AppImage or the binary alone, below
  • macOS: the archive for Apple silicon or Intel, below

Rendering and checking includes need PHP 8 and Div (composer require divengine/div); Runner Flows need Runner (composer require divengine/runner); the Git menu needs git. divide is free software under the GPL, version 3 or later. The binaries are not signed yet: see Installation.