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

fix: update all usages of generators in script tags for blockly v10 #1734

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

maribethb
Copy link
Contributor

@maribethb maribethb commented Jun 22, 2023

Updated the usage of generators in all examples and codelabs that load Blockly from script tags, except graph demo (done in #1732) and the devsite demo page (which does something slightly different involving dropdowns so I want to test separately).

Generally,
Blockly.JavaScript -> javascript.javascriptGenerator
Blockly.JavaScript['block_name'] -> javascript.javascriptGenerator.forBlock['block_name']
Blockly.JavaScript.ORDER_FOO -> javascript.Order.FOO

I tested each of the example pages, and loaded the codelabs complete code page (after locally updating to point to blockly@beta)

Also updated the README of the hsv-colour-sliders plugin which still used old style generator names with import statements, which definitely doesn't work anymore.

N.B. I don't think this change should have been strictly required, because Blockly.JavaScript is supposed to remain backwards-compatible but deprecated for Blockly v10. I think the wrong name is used in google/blockly#7169 and I'm following up with that.

@maribethb maribethb requested a review from a team as a code owner June 22, 2023 19:09
@maribethb maribethb requested review from cpcallen and removed request for a team June 22, 2023 19:09
Comment on lines +16 to +27
'type': 'wait_seconds',
'message0': ' wait %1 seconds',
'args0': [{
'type': 'field_number',
'name': 'SECONDS',
'min': 0,
'max': 600,
'value': 1,
}],
"previousStatement": null,
"nextStatement": null,
"colour": "%{BKY_LOOPS_HUE}",
'previousStatement': null,
'nextStatement': null,
'colour': '%{BKY_LOOPS_HUE}',
Copy link
Contributor

@cpcallen cpcallen Jun 26, 2023

Choose a reason for hiding this comment

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

Unless this file gets passed through Closure Compiler in ADVANCED_OPTIMIZATIONS mode the quotes on the keys here are not required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We quote tons of stuff that doesn't need to be, all over the place :/ these were only updated to single quotes because i format my files on save

Copy link
Contributor

@cpcallen cpcallen left a comment

Choose a reason for hiding this comment

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

I think the wrong name is used in google/blockly#7169 and I'm following up with that.

Indeed the wrong name was used in that PR; thanks for catching that!

@maribethb maribethb merged commit 19faf29 into google:q3-2023 Jun 28, 2023
maribethb added a commit that referenced this pull request Jun 28, 2023
* chore: update all plugins and examples to [email protected] (#1722)

* chore: update all plugins and examples to [email protected]

* chore: update angular packagelock

* chore: migrate textToDom rename

* chore: fix modal

* chore: fix keyboard nav test

* chore: fix variable modal

* chore: fix shareable procedure blocks

* fix: procedure blocks build

* fix more build stuff

* fix: renaming build problems

* chore: fix lint

* chore: fix return annotations

* chore: maybe actually fix lint

* fix: update graph demo for blockly v10 (#1732)

* chore: add color, angle, multiline fields to demo page (#1728)

* fix!: make scroll options work without drag surfaces (#1666)

* fix!: make scroll options work without drag surfaces

* chore: PR comments

* chore: unprivate backpack plugin (#1738)

* fix: continuous flyout calling wrong private method (#1725)

* fix: continuous flyout calling wrong private method

* fix: use better API

* fix: don't duplicate logic

* chore: remove serializable demo (#1737)

* fix: update demo fields for blockly v10 and remove closure modules (#1735)

* fix: update devsite demo for blockly v10 (#1736)

* fix: update all usages of generators in script tags for blockly v10 (#1734)

* feat!: update all plugins to use blockly-v10.0.0 (#1744)

---------

Co-authored-by: Beka Westberg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants