I have deployed an early tech preview server for the next Blockly update. Blockly is the library that drives the App Inventor block editor, and we last updated our copy of Blockly back in 2017! Since then, the Blockly team has made a number of architectural changes to Blockly, including the creation of themes and a plugin system. The theme mechanism will eventually tie into the new UI change to allow for dark theme support. For plugins, we have incorporated a selection of plugins that should hopefully improve the development environment:
Multiselect: Using the shift key, or the checkbox button above the zoom controls, select more than one block for simultaneous editing/moving of blocks in the workspace
Scroll options: Dragging a block to the edge of the workspace will automatically scroll the viewport
Autoextending blocks: This one is still a bit buggy, but blocks such as the "make a list block", the "join" block, and others will automatically add empty inputs if you drag a value block into their immediate vicinity. This allows you to extend the block without having to first enter the mutator and additional inputs.
Blockly has also added some other features, such as using the Ctrl key (Windows/Linux) or Alt key (macOS) to drag blocks from the middle of a stack without disturbing the flow of the remaining blocks. By default, dragging a statement block will drag all of the following blocks as well (the current behavior of App Inventor). Holding the corresponding key allows one to "extract" a statement from within another sequence without disturbing that sequence.
There is also a new rendering engine in Blockly. We'd like to hear your experiences with this, especially when it comes to workspaces with a large number of blocks.
When I multiselected blocks 1 and 3 of a block sequence, and lifted them, I was unable to dock or release them
(edit attempt failed on too large video)
More on the procedure name list dropdown behavior:
That Oops procedure just also happens the top of the Elements list for procedure names.
In the second video, notice how the procedure argument name starts out wrong, and chases after the procedure name. Adjoining call blocks improve on their own, as if they are catching the attention of some roving display cleanup process running way behind schedule.
There is a delay effect when changing the procedure names in the calls:
(Not shown here: The internal name is right, as evidenced by proper operation of the Highlight Procedure right click option. That takes you to the right procedure definition, and not to that Oops (first on the list) procedure.)
This is just a demo of the new, barely visible check box that toggles between drag mode and multiselect mode:
(It took me a while to figure out, and the toggled and not toggled states are barely distinguishable, at the same level of salience as the mouse over highlights.)
P.S. I wonder how much worse this will look in dark mode?
This is my drag and drop blooper reel, where I had hoped to show off the effect of the Ctrl key on drag scope.
Instead, I lost my ability to replace the dragged out blocks into the same place they were before, eventually having to drag them offscreen to reach the STOP button on my screen recording app.
P.S. This does, however, show off the new socket addition feature on that neighboring Add Items To List block.
I wonder if that feature was causing my inability to dock under that block?
It's great to learn that we will finally have multiselect integrated into App Inventor! Thank you @ABG for providing so much feedback! some comments from me about the multi-select:
When I multiselected blocks 1 and 3 of a block sequence, and lifted them, I was unable to dock or release them
(edit attempt failed on too large video)
That sounds like a bug in the gesture handling at Blockly core's side, I received similar reports occasionally, but they are typically hard to reproduce. If it shows that it's directly related to the plugin, it would be greatly appreciated if you could send the related stack trace in the console to Sign in to GitHub · GitHub, next time you encounter that again.
This is just a demo of the new, barely visible check box that toggles between drag mode and multiselect mode:
(It took me a while to figure out, and the toggled and not toggled states are barely distinguishable, at the same level of salience as the mouse over highlights.)
P.S. I wonder how much worse this will look in dark mode?
I just fine-tuned the parameters (CSS opacity changes, as well as the color of the SVG) a little bit to make this more distinguishable and also to fit the dark mode, so that now we are up to the standard of what we have in official Blockly workspace-backpack plugin: blockly-samples/plugins/workspace-backpack/src/backpack.ts at 5d699d2b3ccf80adb50a17da4207af2c368764f0 · google/blockly-samples · GitHub
But anyway it would be a better idea to use a better SVG here (I don't have a visual design team stand in the back of me, so I can't help here), those are configurable on the plugin side and I just made the icons configurable at runtime as well to fit possible dark/light theme switch with different icons.
There is a possibility that the variables (local and global) can be of "strong type" example:
Int, Bool, String, etc.
It is to avoid memory attacks by memory leaks, and possible buffer overflow failures/attacks (stack/heap).
I know that appinventor is not designed to be secure, but there are many applications that are made with the platform, as well as it is a good practice (and teaching) to approach security (cyber, computing, data, etc).
I currently teach how to check the data entered (given the lack of strong typing) by means of sync/async functions, dictionaries, etc.
But it would be very nice if that option were available by default.
Here's another video and sample project, off ewpatton's appspot server: chart_drunkards_walk.aia (2.6 KB)
AT first I thought it was a Heisenbug, from window conflicts with the screen recorder, but it is reproducible by trying to drag the mutator bubble by its NorthEast corner.
My gut reaction is that it might be an interaction with the auto-extending blocks since they will try to rebuild the structure of the block and this could somehow detach the mutator since it rebuilds the block entirely. Does it happen with other mutated blocks like the if statement (which doesn't auto-extend)?