Microsoft MakeCode

Toolbox icons in PXT-Blockly

Hi all,

Updated to use the latest PXT-Blockly version and notice that the icons have disappeared in the toolbox (I was using v2.1.14 before). I see they’re also no longer in the playground. Has something been removed? What do i need to do differently?

Thanks,
Josh

image

@shakao

Yep, the icons being removed from the playground is intentional, if you look at the “test” category in the official Blockly playground (https://blockly-demo.appspot.com/static/tests/playground.html?dir=ltr&toolbox=test-blocks&side=start&renderer=geras) you can see they only show the icons for toolbox drawers with subcategories.

Thanks for the info!

Is there any way to add the icons back to how they used to be? Below is how they are before the update. I’m using “BlocklyTreeIconCustom” to do this .image

Unfortunately MakeCode has a completely separate toolbox component–we don’t use Blockly’s implementation at all, so we don’t have any custom code to handle icons inside pxt-blockly. You might be able to add some CSS to bring back your icons, you just need the Semantic UI library (https://semantic-ui.com/elements/icon.html) in your codebase to access the icon images.