Our files are up to a decade old, and have churned so much, that the initial author of the file no longer has much meaning.
Furthermore, this will encourage developers to post to the developer group, rather than emailing Googlers (usually me) directly.
* Add getSelected/setSelected to core/common.js
* Migrate core to use Blockly.common.getSelected/setSelected instead of Blockly.selected
* Migrate demos to use Blockly.common.getSelected/setSelected instead of Blockly.selected
* Remove Blockly.selected
* Use variable instead of calling common.getSelected() multiple times
* Add accessor for selected on Blockly
* Add renaming record for Blockly.selected -> Blockly.common.getSelected/setSelected
* Add hideChaff() to core/workspace_svg.js
* Mark Blockly.hideChaff as deprecated
* Update uses of Blockly.hideChaff() to WorkspaceSvg.hideChaff() in core
* Update uses of Blockly.hideChaff() to WorkspaceSvg.hideChaff() in demos
* Style and formatting fixes
* Switch from accessor to stub wrapper for Blockly.hideChaff
Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
* Move hueToHex to core/utils/colour.js
* Mark Blockly.hueToHex as deprecated and pass calls through to Blockly.utils.colour.hueToHex
* Migrate core to use Blockly.utils.colour.hueToHex
* Migrate demos to use Blockly.utils.colour.hueToHex
* Migrate prompt/alert/confirm to dedicated module
* Update core/blockly.js to pass through calls to prompt/alert/confirm to core/dialog.js
* Update calls to Blockly.prompt/alert/confirm to dialog.prompt/alert/confirm
* Fix typo and errant redeclaration of Blockly.prompt
* Clarify JSDoc on customizing Blockly.dialog.alert/confirm/prompt
* Migrate core/widgetdiv.js to ES6 const/let
* Migrate core/widgetdiv.js to goog.module
* Migrate core/widgetdiv.js to named requires
* clang-format core/widgetdiv.js
* Mark WidgetDiv.DIV as deprecated and refactor callers to use setters/getters
* Fix deprecation date
* Refactor tests to make setDiv() in core/widgetdiv.js test-only
* Fix type annotations for WidgetDiv.DIV and move test cleanup into sharedTestTeardown
* Fix double execution in Code demo
PR #5037 fixed double execution of the run button on mobile. But the link button and other events still suffer from double execution. This PR moves the fix from the run button to the central bind function so that it applies universally.
* Pass the event to the user function
Not used but good to have.
A {} has a bunch of names already defined on it (like ‘toString’). When using an object as a map with arbitrary keys, it should not inherit from Object.prototype.
There is significant confusion in names and comments with regards to variables and procedures. `Blockly.Generator.prototype.variableDB_` is a Blockly.Names database, not a variable map. This rename introduces a getter and setter so deprecated references still work. This commit also fixes some comments which are either outright wrong or misleading regarding variable and procedure names.