Open cycomachead opened 5 years ago
I would prefer not to make this a special case (although I'd settle for that, I guess), but instead have minimum/default/maximum number of slots settable for variadic inputs.
If we do make a special case for optional inputs, of course users shouldn't see a blockspec, but should instead see another radio button below the variadic one saying "optional input (be sure to provide default value above)."
that reminds me of my MultiMorph and CustomMultiMorph project where I was tring to create a mod that would create input groups using %(
variadic inputs however getting it to function properly for the CustomMultiMorph had difficulties working properly.
when I came back to use snap! I remembered that I had been trying to create a user interface type-of thing :)
Here's the MultiMorph project that I completed: https://github.com/jmoenig/Snap/issues/1919
I probably learned the majority of what I know about js from trying to do this.
Are you finally going to add input groups!?
Before we get to input groups, which would be amazing, a more simple start would be to allow users to specify text in an block spec, such as
$optional
, which would render the triangle and default to everything after the triangle being collapsed.