Skip to content

Optional pins, incremental node growth #22

Description

@nkrkv

Many times a mechanism to extend or remove a node’s features is desired. For example, count:

  1. The most basic case suitable for most applications: INC and RST only
  2. Next stage: STEP, INC, RST
  3. Further: STEP, INC, DEC, RST
  4. Yet further few steps (maybe): STEP, INC, DEC, MIN, MAX, SNAP, INIT, RST

A possible UX is to drag a border like for a variadic. But how one would craft such node? In many times a shorter version might have a much more performant C++ implementation by the way.

One possible solution with high backward compatibility:

  • For each “increment” create a new patch node: count(one), count, count(dec), count(slider)
  • Each simpler node is a trivial thin wrapper around one of the more complex nodes; at this point, they are usable on their own as usual
  • Place a new upgradable (name?) marker onto each simpler node

The presence of the marker makes the node’s border draggable. Dragging to the right effectively replaces the current node with the node used for wrapping. For example, count(dec) becomes count(slider).

Dragging to the left is inferred.

Applicable to

  • flip-flop(sr), flip-flop
  • equal, equal(approx)
  • clock(t), clock
  • continuouslyloop, loop(en)
  • debounce, debounce(rst)
  • fade, fade(jump)
  • gate, branch
  • format-number, format-number(dig), format-number(ex)
  • button, button(upd) and all similar

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions