Scratch-blocks: External tools and backpack support

Created on 22 Jun 2016  路  3Comments  路  Source: LLK/scratch-blocks

This has come to mind as something that hasn't even been on our horizon yet. I thought I'd make an issue of it to start raising the questions in our mind.

There are at least three categories of "external-to-Blockly" tools we have yet to consider. Notably, these tools also have an impact on things outside of the blocks (e.g., the stage and sprite panel). So, we can't just build them into the blocks, but probably need to have some kind of interface...

Toolbar tools:
screen shot 2016-06-22 at 9 55 40 am
The cut/delete scissors, duplicate stamp, and help cursor are the ones that have an impact on blocks. If these are something we want to support in Scratch Blocks/Scratch 3.0, we need to dream up a way to do it.

Backpack:
screen shot 2016-06-22 at 9 55 55 am

Relatedly, "drag script to sprite" copies a script to another sprite. I think these two may be as simple as detecting when, where, and what blocks are being dragged outside the workspace, and then importing/exporting blocks...hmm...

Tips window:
screen shot 2016-06-22 at 9 56 09 am
This should be another easy one - just a callback or UI event in the context menu.

feature

Most helpful comment

Note of a quick discussion with @cwillisf and @picklesrus:

For backpack and "drag script to sprite", we could provide a registry in scratch-blocks of (DOMElement, callback). When a block is dropped outside the workspace, we could hide the blocks and then call document.elementFromPoint(mouseX, mouseY). If that element matches a DOM element in the registry, we can call callback with the block ID.

All 3 comments

There seems to be some desire to cut the toolbar tools from Scratch, so maybe we won't have to worry about that.

Note of a quick discussion with @cwillisf and @picklesrus:

For backpack and "drag script to sprite", we could provide a registry in scratch-blocks of (DOMElement, callback). When a block is dropped outside the workspace, we could hide the blocks and then call document.elementFromPoint(mouseX, mouseY). If that element matches a DOM element in the registry, we can call callback with the block ID.

Have there been any recent thoughts on this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

picklesrus picture picklesrus  路  3Comments

tmickel picture tmickel  路  3Comments

bfunc picture bfunc  路  5Comments

Alzter picture Alzter  路  3Comments

towerofnix picture towerofnix  路  4Comments