What should I make my custom block look like?

So I want to have a block with simple optional parameters
PLEASE IGNORE THE ACTUAL BLOCK CODING :slight_smile:

It is just a contrived example to show that one parameter is required but the others are optional :slight_smile:

I've come up with a few ways of signalling that the empty slots are optional

image

What do people think looks the best?

Have you got other ideas on the styling?

Here is my feedback. I like the most the one with [ ], then with { }, then with "options", then with ( ), and I liked the least the one without any clue.

Maybe make the options an input that can be extended with an arrow, and have "options" before the multiple input.

See here about variadic options - this thread is all about just using plain ones and which one looks the best :slight_smile:

With four optional inputs, people will forget which is which. So I think labelling them is more important than bracketing them:

make sprite move () [ direction: () turn: () dummy1: () dummy2: () ]

Alternatively, consider a keyword input design, in which the user indicates which input they are supplying:

make sprite move (100) options (list (turn) (45) (dummy2) (87))

Someday we'll have variadic input groups (real soon now™) and then you can do the really right thing, which is to have a pulldown menu with the option names followed by a slot for the value.

I can't tell if that's an exaggeration.

I suspect anything that has a trademark sign (™) is exaggerated ;~)

Real Soon Now

Without deviating into "I wouldn't do it that way I'd do it this way instead :slight_smile: - I'd really appreciate feedback on the best (or least objectionable) of the offerings :slight_smile:

Thanks in advance :slight_smile:

Parentheses look too much like a function call, and brackets too much like an array. So I'd go with braces or "option," leaning toward the latter.

I can't resist one more deviation: If you don't like any of the other ideas, make the option names be the default values for the optional inputs, then instead of checking if (foo ≠ ()) you could check if (foo ≠ (foo)).

P.S. IIRC they use braces for optional inputs in Unix man pages.

So here are the most "popular" :slight_smile: options and I've added some variations on those

Also, shown the help screen that goes with them to explain the empty slots to Snappers

Is dropping the options to 2nd line a good idea?
What about the slight greying out of the { } or options label?

@bh - see previous thread over using variable slots and issues with using them

This thread is all about not using them :slight_smile:

you forgot these:
image
image

I'm liking that suggestion :slight_smile:

image

Link to project in case someone want to play around with styling

I've come up with this as well but even if I could get the slots to line up - I don't think its very good
image

Maybe kids at certain age, that are the target audience for this kind of block, won't mind as much that this block is an unusually tall one as they would mind not being able to tell which slot is for which purpose in a normally tall one.

I like it. Maybe you can even bracket each line individually.

I didn't explain myself well. This is what I mean:
untitled script pic

Users would replace the default input to use an option:
untitled script pic (1)

untitled script pic - 2021-11-21T165340.490
untitled script pic - 2021-11-21T165125.003
untitled script pic - 2021-11-21T165131.935
untitled script pic - 2021-11-21T165135.837

The ... ones aren't bad, but I find the arrowhead ones problematic. The third one is extra bad because it suggests to me that the first input is variadic (I know, that would have arrows both ways, but if I'm a user looking at the block I might not figure that out). The fourth one avoids that trap, but it makes me feel that if I click the arrowhead I'll get more information, like the arrowhead on comments.

ooh - I like that idea (yes I didn't understand the 1st time) - off to have a play with it :slight_smile:

@dardoro
I'm with Brian I think.
The 1st ... one looks nice and simple
Just don't like the visual look of the 2nd
And 3rd/4th too confusing as being variadic

but these look OK me (can't really tell that bottom one is greyed so maybe waste of time)

image

image

They do look nice but nearly at the size of a fully explicit version

image

so probably we've come round in a full circle :slight_smile: