Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Google Blockly] Bump to 6.20210701.0 #42490

Merged
merged 3 commits into from
Sep 16, 2021
Merged

[Google Blockly] Bump to 6.20210701.0 #42490

merged 3 commits into from
Sep 16, 2021

Conversation

ajpal
Copy link
Contributor

@ajpal ajpal commented Sep 15, 2021

Release: https://github.com/google/blockly/releases/tag/6.20210701.0

This bump went pretty smoothly, there were just a couple tweaks needed for the trashcan:

  • some methods got renamed in BlockDragger
  • Use registry.register for our BlockDragger override
  • verticalSpacing_ instance variable was removed from Trashcan, so we need to use initialized_ instead

I tested several Flappy levels on Mac / Chrome + Safari + Firefox, but it'd be great if people could test other OS/Browser combos if possible

@ajpal ajpal requested a review from a team September 15, 2021 20:18
Comment on lines 52 to 56
if (this.draggedConnectionManager_.wouldDeleteBlock()) {
this.workspace_.trashcan.setLidOpen(true);
} else {
this.workspace_.trashcan.setLidOpen(false);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this could be simplified to

const wouldDelete = this.draggedConnectionManager_.wouldDeleteBlock();
this.workspace_.trashcan.setLidOpen(wouldDelete);

@@ -27,13 +27,6 @@ export default class WorkspaceSvg extends GoogleBlockly.WorkspaceSvg {
this.trashcan = new Blockly.Trashcan(this);
var svgTrashcan = this.trashcan.createDom();
this.flyout_.svgGroup_.appendChild(svgTrashcan);
this.pluginManager_.addPlugin({
Copy link
Contributor

Choose a reason for hiding this comment

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

checking my understanding -- we don't need to add the trashcan plugin anymore because we're registering CdoBlockDragger, which now controls the trashcan (basically, disabling and opening/closing the lid)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A lot of things have changed in Blockly internal logic (this is a major version bump), so I'm not 100% sure on the details here, but I think the key things are:

Copy link
Contributor

Choose a reason for hiding this comment

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

ahhhh, okay, that makes more sense. thank you!

@ajpal ajpal merged commit 1d7c2a9 into staging Sep 16, 2021
@ajpal ajpal deleted the sep15-blockly-bump branch September 16, 2021 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants