[Feature] Prepopulate toolbox with color equality test
Is your feature request related to a problem? Please describe. We currently have a read color block and a color literal instead of a boolean "is this color block".
This provides for a lot of flexibility, but it can be tricky for new users. Instead of making a new block, we can make the union of that commonly used combination of blocks directly on the toolbox.
So we could change this:
To:
After you drag this out, you can still get each of the blocks separately.
@ggramlich - would you like to see the separate blocks on there, as well?
@laurensvalk Keeping the (sensor color/hsv) block in the toolbox would be nice. For the (red...) color block - I don't think that you actually need it as a separate block, if you can drag it out of the comparison block.
Laurens, this example above showed me how to do the color test.
If I would only want to print the color, I would need to pull a color-comparison block, pluck it apart and then place the color-block into a print. Not really beginner-friendly, I think.
I would prefer the separate color block as well in the input box.
Like this?
@laurensvalk That would be fine for me. I am not sure, if @BertLindeman also wanted the color block itself to be available separately.
@laurensvalk That would be fine for me. I am not sure, if @BertLindeman also wanted the color block itself to be available separately.
I would the color block for beginners sake separately, but I am not fanatic about it. Children learn so quick.
Thanks both of you for your insights!
Probably also need the color block separately as well, see https://github.com/orgs/pybricks/discussions/1563#discussioncomment-8887567
Other block brought back too now.
When you drag the populated block onto the canvas, it doesn't run the callback that automatically picks an available sensor.