Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional pins, incremental node growth #22

Open
nkrkv opened this issue Nov 8, 2018 · 0 comments
Open

Optional pins, incremental node growth #22

nkrkv opened this issue Nov 8, 2018 · 0 comments

Comments

@nkrkv
Copy link
Member

nkrkv commented Nov 8, 2018

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
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

No branches or pull requests

1 participant