The scratch-gui package patches/overrides a number of block definitions in src/lib/blocks.js, generally when they need dynamic state depending on the state of the VM. We should likely do one of the following:
Remove the body of the block definitions in scratch-blocks, since they're being overwritten
Move the dynamic bits out of scratch-gui and into scratch-blocks
In core Blockly, the Duplicate contextual menu just makes a copy of a block offset slightly from the original. In Scratch, the menu attaches the copied block to the cursor as if it were mid-drag, and it follows the cursor until clicked to place it.
When right clicking on a stack of blocks, a "Delete N Blocks" menu item is shown, with N corresponding to the number of blocks in the stack. In Scratch proper, this is shown as "Delete Block", regardless of the number of blocks in the stack. The code for handling procedure deletion also looks for the "Delete Block" string literal to patch the implementation to scour the workspace for references to the procedure and warn about them, which is currently broken as a result.
Comments in msg/scratch_msgs.js indicate that it is automatically generated, but it's unclear what tooling is responsible for this. Since its format has changed somewhat, that infrastructure may need to be updated accordingly.
Currently, flyout checkboxes are added in the call to addBlockListeners_. Once core Blockly has better APIs for adding bits and baubles to flyouts, we should use those instead.
Our angle picker lacks the background color in the dropdown, extra padding, and arrow icon from Scratch. It also continuously follows the mouse, whereas the Scratch implementation requires clicking and dragging the arrow icon to change the angle.
Adding most of these CSS attributes involved monkey-patching things in Blockly, which is not happy =(
We need to figure out:
Whether we need to continue supporting these CSS attributes. (Ask a scratch person)
If so, what the attributes actually are. Which is going to be kinda tricky given that bugs won't show up in actual scratch. They'll only show up if you're using a given addon that references an attribute.
If we want to pull those into core Blockly or figure out a way to add them in a non-monkey-patch-y way to scratch-blocks.
Scratch injects a great deal of CSS, some of which may be redundant/obsolete/etc. We should look through this (ideally in an automated way?) and clean up anything unnecessary.
The rendering of dropdowns differs between us and Scratch:
Scratch renders both the dropdown field and the menu with a slightly lighter background color, uses bold text in the menu, and does not display a darkened selection indicator behind the selected item when the menu is first opened.