pxt icon indicating copy to clipboard operation
pxt copied to clipboard

Disabling block

Open nevergone opened this issue 1 year ago • 12 comments

It would be useful if blocks could be disabled or deactivated in the block editor. They would not be deleted, they would just appear differently. It would be similar to commenting lines of code in source code.

nevergone avatar Jul 17 '24 16:07 nevergone

I also would be interested in this described feature.

BrightKn1ght avatar Aug 26 '24 13:08 BrightKn1ght

I am also interested!

WueCoding avatar Aug 26 '24 16:08 WueCoding

This is a really good idea, but is there something like this in the parent Google Blockly?

THEb0nny avatar Sep 16 '24 18:09 THEb0nny

This is a really good idea, but is there something like this in the parent Google Blockly?

I quickly checked blockly 10.4.1. When you right click a block there's a "Disable" option in the context menu. So seems there's already something there. The difficulty will be to modify the transpiler to skip that block.

BrightKn1ght avatar Sep 17 '24 07:09 BrightKn1ght

Indeed, I looked, there the blocks are switched off and they become translucent. @riknoll is it difficult to implement now?

THEb0nny avatar Sep 17 '24 09:09 THEb0nny

@THEb0nny we already use the disabled feature; that's what happens to the blocks that are outside of an event handler. we just changed the visuals so that it was a little more visually distinct than just fading the blocks

riknoll avatar Sep 17 '24 16:09 riknoll

@riknoll I'm interested in whether it's possible to disable a block without removing it from the algorithm with other blocks. In Blockly, right-clicking on a block opens a menu with an option to disable the block.

THEb0nny avatar Sep 17 '24 17:09 THEb0nny

@riknoll Could you make this feature available directly?

nevergone avatar Sep 17 '24 17:09 nevergone

Would be a quite useful feature, to be more flexible and do quicker changes to the program.

YourCodeShepherd avatar Jan 27 '25 14:01 YourCodeShepherd

Maybe the comment block proposal will be included in the development plans?

THEb0nny avatar Mar 30 '25 17:03 THEb0nny

And now?

nevergone avatar Jul 15 '25 12:07 nevergone

Hello, how can we help to complete this?

nevergone avatar Aug 09 '25 18:08 nevergone