support icon indicating copy to clipboard operation
support copied to clipboard

[Feature] Prepopulate toolbox with color equality test

Open laurensvalk opened this issue 1 year ago • 11 comments

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.

laurensvalk avatar Mar 19 '24 18:03 laurensvalk

So we could change this:

image

To:

image

After you drag this out, you can still get each of the blocks separately.

laurensvalk avatar Mar 21 '24 08:03 laurensvalk

@ggramlich - would you like to see the separate blocks on there, as well?

laurensvalk avatar Mar 21 '24 08:03 laurensvalk

@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.

ggramlich avatar Mar 21 '24 09:03 ggramlich

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.

BertLindeman avatar Mar 21 '24 09:03 BertLindeman

Like this?

image

laurensvalk avatar Mar 21 '24 09:03 laurensvalk

@laurensvalk That would be fine for me. I am not sure, if @BertLindeman also wanted the color block itself to be available separately.

ggramlich avatar Mar 21 '24 09:03 ggramlich

@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.

BertLindeman avatar Mar 21 '24 09:03 BertLindeman

Thanks both of you for your insights!

laurensvalk avatar Mar 21 '24 09:03 laurensvalk

Probably also need the color block separately as well, see https://github.com/orgs/pybricks/discussions/1563#discussioncomment-8887567

laurensvalk avatar Mar 23 '24 15:03 laurensvalk

Other block brought back too now.

laurensvalk avatar Mar 29 '24 09:03 laurensvalk

When you drag the populated block onto the canvas, it doesn't run the callback that automatically picks an available sensor.

laurensvalk avatar May 08 '24 07:05 laurensvalk