blockly-samples icon indicating copy to clipboard operation
blockly-samples copied to clipboard

Modularize block-plus-minus

Open mikeharv opened this issue 2 years ago • 3 comments

Check for duplicates

  • [X] I have searched for similar issues before opening a new one.

Component

block-plus-minus

Problem

To use this plugin, we are instructed to simply

import '@blockly/block-plus-minus';

Unfortunately, this gives no control over which custom blocks are loaded. If we want to load some of these custom blocks but not others, there isn't a clear way to do this.

Request

Could the plugin be modularized to allow developers to only install certain custom blocks from the included set?

Alternatives considered

No response

Additional context

We are looking to use the plus-minus blocks to improve the UI of our text_join and if/else blocks. However, at this time are not ready to all use this version for procedures. If I import everything, the plugin attempts to register procedure_def_mutator after it already has been registered.

mikeharv avatar Dec 01 '23 16:12 mikeharv

I think this is a dupe of https://github.com/google/blockly-samples/issues/1803 (slightly different but probably covered? ) @maribethb has had a fix hanging around for a few months, but it just hasn't been merged yet.

BeksOmega avatar Dec 01 '23 16:12 BeksOmega

This is about the block-plus-minus plugin, not block-shareable-procedures.

maribethb avatar Dec 01 '23 17:12 maribethb

We now have guidelines for how block libraries should be published, but we haven't established a timeline for when we'll be able to update already existing plugins. We'll publish these guidelines soon and then perhaps a community member could implement the changes.

maribethb avatar Jan 03 '24 22:01 maribethb