Custom Block Input Grouping

Input Groups

An input group represents a set of inputs (which may be of different types: raw text, C-shaped, inline...) that are grouped together for the purpose of "multiple inputs" or "optional input", resulting in a matrix with a known number of columns and a variable number of rows.

Usage and Examples

The main use of these kinds of blocks would be for control logic or other types of mappings. A clear example would be the if - else if* - else? structure. (where * indicates any amount, including 0, and ? indicates at most 1).

The structure of this case would be as follows:

    if < condition > [if_action] alts: (else if < cond# > [alt_action#] )* else_block: (else [else_action])?
  • if < condition > [ run (action); report ]
  • for each (row) in (alts) [ if < (item 1 of row) > [ run (item 2 of row); report ]
  • if < not < (else_block) is empty > > [ run (item 0 of else_action) ]

This could be further extended to mechanisms akin to the switch block in many programming languages or a kind of zip literal. Of course, much thought would have to be put in the way this is graphically represented. Allowing for things like disabling inline expansions and intuitively showing how extendible a field is. This aims to be more of a conceptual design rather than being oriented towards the UI and UX aspects.

Yeah, we want this too, but (as you say) we want to be careful about designing the UI. We'll get there eventually.

Meanwhile, check out the "Multi-branched conditional" library (File>Libraries).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.