Skip to content

Update to Blockly 11#3588

Merged
ewpatton merged 72 commits intomit-cml:masterfrom
mjgallag:update-to-blockly-11
Mar 12, 2026
Merged

Update to Blockly 11#3588
ewpatton merged 72 commits intomit-cml:masterfrom
mjgallag:update-to-blockly-11

Conversation

@mjgallag
Copy link
Copy Markdown
Contributor

@mjgallag mjgallag commented Sep 5, 2025

General items:

If your code changes how something works on the device (i.e., it affects the companion):

  • I branched from ucr
  • My pull request has ucr as the base

Further, if you've changed the blocks language or another user-facing designer/blocks API (added a SimpleProperty, etc.):

  • I have updated the corresponding version number in appinventor/components/src/.../common/YaVersion.java
  • I have updated the corresponding upgrader in appinventor/appengine/src/.../client/youngandroid/YoungAndroidFormUpgrader.java (components only)
  • I have updated the corresponding entries in appinventor/blocklyeditor/src/versioning.js

For all other changes:

  • I branched from master
  • My pull request has master as the base

What does this PR accomplish?

Resolves #3434, Resolves #3529, Resolves #3530, Resolves #3531, Resolves #3532

@mjgallag
Copy link
Copy Markdown
Contributor Author

mjgallag commented Sep 5, 2025

I just found a bug that I'll work on next. While delete count is correct (includes children too) when selecting multiple blocks only the block (and its children, if any) you right click on is deleted.

@ewpatton
Copy link
Copy Markdown
Member

ewpatton commented Sep 5, 2025 via email

@mjgallag
Copy link
Copy Markdown
Contributor Author

mjgallag commented Sep 5, 2025

@ewpatton it works in master so I either messed up the merge mit-cml/workspace-multiselect@main...mjgallag:workspace-multiselect:update-to-blockly-11 or its a Blockly 11 issue with the plugin.

@mjgallag
Copy link
Copy Markdown
Contributor Author

mjgallag commented Sep 6, 2025

@ewpatton its reproducible on main branch of multiselect plugin but works if I try commit before it was upgraded to Blockly 11.

@mjgallag
Copy link
Copy Markdown
Contributor Author

mjgallag commented Sep 6, 2025

@ewpatton ha ... now i'm not so sure about any of my statements regarding this bug ... tbd

@mjgallag
Copy link
Copy Markdown
Contributor Author

mjgallag commented Sep 6, 2025

Ah ha, it's a subtle bug that was introduced when the multiselect plugin was upgraded to Blockly 11. If you keep the shift key pressed when you right click the yellow borders of multiple select are lost and even though context menu has correct multiple counts it only acts on block you right clicked. If you let go of shift key after making your selections and before right clicking it works as expected. Will look into this but will get test instance up first so people can play with it in parallel with my bug fixing.

@mjgallag
Copy link
Copy Markdown
Contributor Author

mjgallag commented Sep 6, 2025

@mjgallag
Copy link
Copy Markdown
Contributor Author

mjgallag commented Sep 8, 2025

https://arched-branch-471517-f9.uc.r.appspot.com/ here is an appspot instance for playing around with this

@mjgallag mjgallag force-pushed the update-to-blockly-11 branch from 8eb92fc to 785162b Compare September 11, 2025 14:57
@mjgallag mjgallag force-pushed the update-to-blockly-11 branch 2 times, most recently from aba67f3 to ca30347 Compare September 14, 2025 21:59
@mjgallag mjgallag marked this pull request as ready for review September 14, 2025 22:33
@mjgallag
Copy link
Copy Markdown
Contributor Author

mjgallag commented Sep 14, 2025

OK that bug is fixed and https://arched-branch-471517-f9.uc.r.appspot.com/ has been updated. Also there is no more fork for multiselect. I have marked this ready for review. I expect more bugs will probably be found but I think it's ready for more eyes.

@mjgallag mjgallag requested a review from a team September 16, 2025 15:00
@mjgallag
Copy link
Copy Markdown
Contributor Author

I just noticed with https://appinventor.mit.edu/explore/tips/typeblocking the blocks are landing on top of each other in this branch instead of staggered like on master. @josmas I think I am going to try to integrate your plugin https://github.com/josmas/blockly-plugins/tree/feat/typeblocking as part of this Blockly 11 branch.
Screenshot 2025-09-16 at 12 58 53 PM
Screenshot 2025-09-16 at 12 59 30 PM

@mjgallag mjgallag force-pushed the update-to-blockly-11 branch 2 times, most recently from 9e5b36b to 4903e4d Compare September 19, 2025 00:12
@mjgallag
Copy link
Copy Markdown
Contributor Author

mjgallag commented Sep 19, 2025

Nevermind I just fixed the bugs as moving to @josmas typeblocking plugin should be a separate pull. This bug lead me to fix the same bug in a few different places and also lead me to notice paste from backapck was broken, that fix was pretty interesting. In any case https://arched-branch-471517-f9.uc.r.appspot.com/ has been updated. I am off next week and a half. If anyone gets around to testing this please leave bugs in the comments for my return. But as of now I have fixed all I have discovered.

@mjgallag mjgallag force-pushed the update-to-blockly-11 branch from 4903e4d to 679af08 Compare September 19, 2025 02:21
@mjgallag mjgallag moved this to In Review in Blockly v11 Update Oct 10, 2025
@mjgallag mjgallag mentioned this pull request Oct 16, 2025
12 tasks
@mjgallag mjgallag force-pushed the update-to-blockly-11 branch from 679af08 to 1ab15c3 Compare October 16, 2025 23:18
@mjgallag mjgallag mentioned this pull request Oct 21, 2025
12 tasks
@mjgallag mjgallag force-pushed the update-to-blockly-11 branch 2 times, most recently from e80831a to 0499194 Compare October 23, 2025 00:30
@mjgallag mjgallag mentioned this pull request Oct 24, 2025
12 tasks
@mjgallag
Copy link
Copy Markdown
Contributor Author

test server has been updated (https://arched-branch-471517-f9.uc.r.appspot.com/)

@mjgallag mjgallag force-pushed the update-to-blockly-11 branch from 9e80046 to ddcb7b0 Compare January 4, 2026 16:57
Comment thread appinventor/blocklyeditor/src/blocks/components.js
Comment thread appinventor/blocklyeditor/src/blocks/dictionaries.js
Comment thread appinventor/blocklyeditor/src/blocks/lexical-variables.js
Comment thread appinventor/blocklyeditor/src/generators/yail.js Outdated
@mjgallag mjgallag force-pushed the update-to-blockly-11 branch from 7dda2ea to 0c383a1 Compare January 28, 2026 01:32
@jisqyv jisqyv added on ai2-test Code is deployed on ai2-test.appinventor.mit.edu and removed on ai2-test Code is deployed on ai2-test.appinventor.mit.edu labels Feb 13, 2026
@ewpatton ewpatton self-assigned this Mar 11, 2026
'zoom': {'controls': true, 'wheel': true, 'scaleSpeed': 1.1, 'maxScale': 3, 'minScale': 0.1},
plugins: {
blockDragger: MultiselectBlockDragger,
blockDragger: ScrollBlockDragger,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjgallag I'm worried that this changes the semantics of dragging. How do we end up allowing dragging multiple blocks if they are selected?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The multiselect plugin no longer needs a custom block dragger. It was rewritten for Blockly v11 to use the IDraggable interface. MultiselectDraggable wraps selected blocks into a single draggable instead of extending BlockDragger. So ScrollBlockDragger in the dragger slot is just for auto-scrolling during drag, it doesn't touch multi-select which is handled at the draggable level.

There's a Playwright e2e test ("dragging moves selected blocks together") that covers this.

return original(png);
};
});
Blockly.exportBlockAsPng(block);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that at least on my machine, this triggers the PNG to show up in my Downloads folder. We probably don't want a test that leaks files outside of the build directory.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find! #3804

<script src="block.js"></script>
<script src="text.js"></script>
<script src="../../../../../build/javascript/BlocklyEvalTest.js"></script>
<script src="../../../../../build/javascript/xml_serialization_tests.js"></script>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that we should probably also add the other tests here to be able to use mocha in the browser. Also, two tests fail due to the lack of FieldColour.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, had I run the tests in Mocha I would have noticed the blocks download! #3805

Copy link
Copy Markdown
Member

@ewpatton ewpatton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving this so we can move the release forward. Most of my comments are related to the test apparatus, which we can solve in a separate PR.

@ewpatton ewpatton merged commit 07dc794 into mit-cml:master Mar 12, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in Blockly v11 Update Mar 12, 2026
@mjgallag mjgallag mentioned this pull request Mar 13, 2026
12 tasks
@mjgallag mjgallag deleted the update-to-blockly-11 branch March 13, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

for-ai2-test on ai2-test Code is deployed on ai2-test.appinventor.mit.edu

Projects

No open projects

4 participants