How/what is the new group concept in custom blocks

I'm not managing to get my head around the new "group" concept

So, using the new let block as example

mqtt_10_1b script pic

1st off - what does this mean

image
[edit] Probably means 1st slot is of type 12 and 2nd one of type 0 - upvar and any type??

And the expands option just really confuses me
image

???


Icons for the block label are encoded this way.

I know what the $xxx stand for :slight_smile:

I don't understand why the $nl is first and the $arrrowLeft is second

That seems the wrong way around to me

For expands, the first line is before the first input, the second is before the second input, etc. If you expand the slot, the first line is placed after the first group, and before the second group.

In my mind, that would mean the $nl would be applied before the 1st pair of inputs and therefore the block should start off looking like this

mqtt_10_1b script pic (4)

FWIW, I agree with @cymplecy: user documentation is dearly needed.

I replaced the $nl with foo and got this
mqtt_10_1b script pic (5)

So the rule seems to be to ignore the 1st expands separator if only one pair of slots but to then to apply it for each subsequent pairs

Moving onto the expands option - it looks like this
image

but seemingly, the $_ doesn't seem to be needed

image

gives

mqtt_10_1b script pic (6)

$_ is for translations, I think.

Aah - you seem to be right
I changed to French and the thing changed to qqchose with it set to $_thing but when I changed it to thing it stayed as thing.

I think this may be a feature that only applies to an official block as I couldn't reproduce the same behaviour in my own custom block

I think we've managed to work it out for ourselves now :slight_smile:

I just tried creating a test block and it all worked as expected

Sans titre script pic (1)

[edit]Just trying it out in a real block and things not quite working out the same so still experimenting

[edit2]I'm actually getting the behaviour I want in a real block
I want both username and password slots to appear when I expand and they do (with both labels as well)
mqtt_10_1c script pic (3)

so I haven't quite got there yet on what the rules are for when the 1st expands separator text is visible

[edit3]So it seems if you set the initial slots to 0 and min slots to 0, then the 1st separator text is applied when you expand it - UNLESS the 1st separator text is $nl - if it is, it is not applied

I feel at this point we need a flow chart :slight_smile:

Does the translation dictionary extension block work to make custom translations to $_ strings?

All I know is that this happens

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