-
Notifications
You must be signed in to change notification settings - Fork 625
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
Conversation
'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}', |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this 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!
* 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]>
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.