-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Hi all, I have taken quite a liking to Blockly as I’ve been actively using it on my dream project called Graplet, and it has helped in many ways to think bigger since I first stumbled upon it (a long time ago btw). That’s why I would love to return the favour and contribute in some specific parts that have been bugging me for a while now - and I’d really love to see them in Blockly :>
I’d love to implement typings for the JSON Block Definition. It currently is any, passed into defineBlocksWithJsonArray Having clear optional identifiers with their corresponding types would help out a bunch, instead of relying on unpredictable string literal properties.
I’ve also been thinking about built-in stuff, such as variable and procedure blocks, and modifying them is still a bit of a hassle. There are many overrides one has to do, as well as unregistering/reregistering, and that kinda feels off.
Having the option to disable all built-in blocks would make things much easier - for example, to create a custom procedure model (e.g. one where parameters are not global variables, but value blocks that can be dragged out of the procedure definition block as a source, kinda similar to how Scratch’s “Custom Blocks” work).
The slight tradeoff would be that many commonly used blocks, such as math_number, would have to be recreated - but honestly, I think that’s completely worth it. In fact, I’d say it’s worth wiping the built-in stuff entirely for that tradeoff, if the option is disabled (eg. useBuiltIn: false)
The docs on creating custom procedures are also a bit misleading. They have incomplete/false code snippets, and figuring out the actual way to implement ObservableProcedureModel is quite the challenge…
I hope some of those ideas and possible contributions align with Blockly’s ideals. I would really love to work on this and see it live in action :D (and thanks for reading that big message wall up until here lol).