Releases: google/blockly
blockly-v12.0.0-beta.0
What's Changed
Breaking changes 🛠
- feat!: Add support for preserving block comment locations. by @gonfunko in #8231
- fix!: rename the blockly icon CSS classes to use camelCase (#8329) by @ga-fleury in #8335
- fix!: Make
IPathObject
styling methods optional by @shashwatpathak98 in #8332 - fix!: Rename
blocklyTreeRow
andblocklyToolboxCategory
CSS classes by @Abhinav-Chdhary in #8357 - fix!: renamed blocklyTreeIcon Css class to blocklyToolboxCategoryIcon #8347 by @krishchvn in #8367
- fix!: Replace Closure UI CSS classes with Blockly CSS classes by @Arun-cn in #8339
- fix!: rename
blocklyToolboxContents
toblocklyToolboxCategoryGroup
by @ruthwikchikoti in #8384 - refactor!: Use IVariableMap instead of VariableMap by @gonfunko in #8401
- fix!: Rename editing CSS class to blocklyEditing (#8287) by @ga-fleury in #8301
- fix!: use
:focus
pseudo class instead ofblocklyFocused
by @Skye967 in #8360 - fix!: Redundant blockly non selectable #8328 by @dakshkanaujia in #8433
- fix!: Rename blocklyTreeIconOpen to
blocklyToolboxCategoryIconOpen
by @UtkershBasnet in #8440 - fix!: Renamed the blocklyTreeSelected CSS class to blocklyToolboxSelected by @omwagh28 in #8459
- fix!: deleted styles without associated classes from css.ts, issue #8285 by @aishwaryavenkatesan in #8465
- feat!: change blocklyEditableText to blocklyEditableField and blocklyNonEditableText to blocklyNonEditableField by @Adityajaiswal03 in #8475
- fix!: Remove the blocklyMenuItemHighlight CSS class and use the hover by @Arun-cn in #8536
- refactor!: Update flyouts to use inflaters. by @gonfunko in #8601
- refactor!: Remove the InsertionMarkerManager. by @gonfunko in #8649
- refactor!: Improve ability to use CSS to style Blockly. by @gonfunko in #8647
- feat!: Use CSS to specify field cursors. by @gonfunko in #8648
- refactor!: Use one map for toolbox contents. by @gonfunko in #8654
- refactor!: Add setSelectedItem() to IToolbox. by @gonfunko in #8650
New features ✨
- feat: Add blocklyField to field's SVG Group by @nullHawk in #8334
- feat: Add a blocklyFieldText CSS class to fields' text elements (#8291) by @ga-fleury in #8302
- feat: Add a
blocklyVariableField
CSS class to variable fields by @shashwatpathak98 in #8359 - feat: add the IVariableMap and IVariableModel interfaces. by @gonfunko in #8369
- feat: Add a blocklyTextBubble CSS class to the text bubble #8331 by @Nirmalkumar6112 in #8333
- feat: Add a blocklyShadow class by @devesh-2002 in #8336
- feat: Added blocklyTrashcanFlyout CSS class by @ChaitanyaYeole02 in #8372
- feat: Add css classes from json block definitions by @ishon19 in #8377
- feat: Add blocklyToolboxFlyout CSS class to the flyout by @nullHawk in #8386
- feat: Add a blocklyCollapsed CSS class to collapsed blocks' root SVG (#8264) by @ga-fleury in #8308
- feat: Add a blocklyBlock CSS class to the block's root SVG by @ChaitanyaYeole02 in #8397
- feat: add
blocklyMiniWorkspaceBubble
css class by @ishon19 in #8390 - feat: Add a blocklyNotEditable CSS class to the block's root SVG by @dianaPrahoveanu-SL in #8391
- feat: Add a VarTypeChange event. by @gonfunko in #8402
- feat: added
blocklyNotDetetable
class to block_svg by @Shreshthaaa in #8406 - feat: add the block's type as a CSS class to the block's root SVG by @CodeMaverick2 in #8428
- feat: add
blocklyLabelField
css class to label field by @surajguduru in #8423 - feat: Add a blocklyNumberField CSS class to number fields by @Apocalypse96 in #8414
- feat: add a method for subclasses of FieldVariable to get the default type. by @gonfunko in #8453
- feat: added block's style as a CSS class to block's root SVG by @Shreshthaaa in #8436
- feat: implement
WorkspaceSvg
class manipulation by @UCYT5040 in #8473 - feat: added
blocklyHighlighted
CSS class to highlighted block's root… by @Shreshthaaa in #8407 - feat: Add the IFlyoutInflater interface. by @gonfunko in #8581
- feat: Add inflaters for flyout labels and buttons. by @gonfunko in #8593
- feat: Add support for inflating flyout separators. by @gonfunko in #8592
- feat: Add a BlockFlyoutInflater class. by @gonfunko in #8591
- feat: Allow specifying the placeholder text of workspace comments. by @gonfunko in #8608
- feat: Allow specifying the default size of comments. by @gonfunko in #8618
- feat: Allow customizing GRID_UNIT for the Zelos renderer. by @gonfunko in #8636
Bug fixes 🐛
- fix: Remove references to getFastTextWidth (#8277) by @ga-fleury in #8307
- fix: improve prompting when deleting variables by @gonfunko in #8529
- fix: display the correct variable reference count when deleting a variable. by @gonfunko in #8549
- fix: improve flyout performance by @gonfunko in #8571
- fix: size text with computed styles even when hidden by @gonfunko in #8572
- fix: include potential variables in variable dropdowns in the flyout by @gonfunko in #8574
- fix: Fix bug that prevented dismissing the widgetdiv in a mutator workspace. by @gonfunko in #8600
- fix: Fix bug that caused fields in the flyout to use the main workspace's scale. by @gonfunko in #8607
- fix: Correctly calculate the bounds of hat blocks. by @gonfunko in #8616
- fix: Take the flyout into account when positioning the workspace after a toolbox change. by @gonfunko in #8617
- fix: Fix exception when disposing of a workspace with a variable block obscuring a shadow block. by @gonfunko in #8619
- fix: improve typings and export additional types by @gonfunko in #8631
- fix: Create CSS vars for SVG patterns. by @johnnesky in #8671
Cleanup ♻️
- refactor: field_checkbox
dom.addClass
params by @ishon19 in #8309 - refactor: Add
addClass
andremoveClass
methods to blockSvg by @ishon19 in #8337 - refactor: make VariableModel implement IVariableModel. by @gonfunko in #8381
- refactor: update the variable interfaces. by @gonfunko in #8388
- refactor: make VariableMap implement IVariableMap. by @gonfunko in #8395
- refactor: Use IVariableModel instead of VariableModel. by @gonfunko in #8400
- refactor: clean up VariableModel. by @gonfunko in #8416
- refactor: deprecate and clean up variable-related methods. by @gonfunko in #8415
- refactor: use getters for flyout width and height. by @gonfunko in #8564
- refactor: remove redundant flyout positioning. by @gonfunko in #8573
Other changes
New Contributors
- @ishon19 made their first contribution in #8309
- @ga-fleury made their first contribution in #8335
- @nullHawk made their first contribution in #8334
- @shashwatpathak98 made their first contribution in #8332
- @Abhinav-Chdhary made their first contribution in #8357
- @Nirmalkumar6112 made their first contribution in #8333
- @devesh-2002 made their first con...
blockly-v11.2.0-beta.2
What's Changed
Bug fixes 🐛
- fix: Fix bug that caused comments to be incorrectly positioned. by @gonfunko in #8668
- fix: Disable newly created function call blocks when the corresponding definition is disabled. by @gonfunko in #8665
- fix: Fix bug that caused text to be selected when long-pressing in the workspace on a touch device. by @gonfunko in #8670
- fix: typo in comment by @winnchen in #8685
- fix: workspace shifts when deleting a block by @mateusslezinsky in #8666
New Contributors
- @winnchen made their first contribution in #8685
- @mateusslezinsky made their first contribution in #8666
Full Changelog: blockly-v11.2.0-beta.1...blockly-v11.2.0-beta.2
blockly-v11.2.0-beta.1
What's Changed
Bug fixes 🐛
- fix: Ensure immovable blocks are considered during workspace tidying by @BenHenning in #8550
- fix: Factor out workspace drag methods into utils. by @johnnesky in #8566
- fix: Simplify list and text WHERE validation by @johnnesky in #8575
- fix: Group field validator changes with field value changes. by @johnnesky in #8589
- fix: Let old block factory overwrite user defined blocks. by @johnnesky in #8605
- fix: bump initiator group in an orthogonal direction from neighboring group by @johnnesky in #8613
- fix: clear touch identifier on comment icon down by @riknoll in #8627
- fix: Use a readonly textarea for non-editable comments. by @gonfunko in #8632
- fix: Fix crash when resizing page while editing a field. by @gonfunko in #8646
Cleanup ♻️
- refactor(shortcuts): Improve shortcut registry documentation & style by @cpcallen in #8598
- refactor: Move functions into FieldDropdown. by @gonfunko in #8634
New Contributors
- @BenHenning made their first contribution in #8550
Full Changelog: blockly-v11.2.0-beta.0...blockly-v11.2.0-beta.1
blockly-v11.2.0-beta.0
What's Changed
New features ✨
- feat(scripts): Create script to help with CJS -> ESM migration by @cpcallen in #8197
- feat: add legacy warning to block factory by @maribethb in #8234
- feat: allow fetching block bounds not including children. by @gonfunko in #8284
- feat: expose
bringToFront()
method by @UCYT5040 in #8472 - feat: mark some marker_svg properties protected instead of private by @rachel-fenichel in #8558
Bug fixes 🐛
- fix: change which element keydown is bound to from document to injection div by @mark-friedman in #8188
- fix: statement input blocks disappearing by @BeksOmega in #8203
- fix(dev-tools): only initSvg on rendered blocks by @maribethb in #8215
- fix: Drag and Resize events for workspace comments by @johnnesky in #8217
- fix: correctly report the pre-resize-drag size to workspace comment size change listeners by @gonfunko in #8240
- fix: export the layer constants. by @gonfunko in #8256
- fix: use the correct with in getBoundingRectangleWithoutChildren(). by @gonfunko in #8298
- fix: added id to rendered ws comments; made getCommentById public; ad… by @changminbark in #8358
- fix: Enable blocks if user can't manually enable them. by @johnnesky in #8354
- fix: drag strategy only clear group id set by us by @HollowMan6 in #8355
- fix: Codify component weights with toolbox in front of flyouts. by @johnnesky in #8432
- fix: comments and bubbles on click by @UCYT5040 in #8451
- fix: Update dev-tools, remove toolbox category tests Colour and Angles by @johnnesky in #8457
- fix(touch): prevent infinite loop on multi-touch drag by @AbhinavKRN in #8470
- fix: Let workspace comment have delete cursor over trash. by @johnnesky in #8477
- fix: Detect if deleting shadow block affects selection highlight by @johnnesky in #8533
- fix(events): Simplify
filter
function, add newenqueueEvent
function by @cpcallen in #8539 - fix(comments): added workspace comments and comment drag strategy isDeadOrDying() checks (for multiselect plugin) by @changminbark in #8532
Cleanup ♻️
- docs(blocks):
block.ts
andblocks/*
JSDoc / formatting / etc. cleanup by @cpcallen in #8431 - refactor(events): introduce
EventType
enum in separate module by @cpcallen in #8530 - refactor(events): Don't filter events before undo by @cpcallen in #8537
- refactor(events): Introduce and use event type predicates by @cpcallen in #8538
- refactor: Use arrow functions when calling
Array.prototype.filter
by @cpcallen in #8557 - refactor: Omit unused exception arguments from
catch
blocks by @cpcallen in #8559
Other changes
- Revert "chore: Pin node.js v22 to v22.4.1 in CI" by @BeksOmega in #8398
New Contributors
- @changminbark made their first contribution in #8358
- @AbhinavKRN made their first contribution in #8470
- @abhinavjha0239 made their first contribution in #8478
Full Changelog: blockly-v11.1.1...blockly-v11.2.0-beta.0
blockly-v11.1.1
What's Changed
Bug Fixes
- fix: statement input blocks disappearing #8203
Full Changelog: blockly-v11.1.0...blockly-v11.1.1
blockly-v11.1.0
What's Changed
New features ✨
- feat: Add a getTargetWorkspace method to flyout_base.ts by @ivalkshfoeif in #7519
- feat: made the method isDragTowardWorkspace non private by @ramyaram2092 in #7529
- feat: Paste block in viewport / near cursor by @bsampada7 in #7521
- feat: Added an API to programmatically scroll the workspace by @SophieNguyen113 in #7532
- feat(tests): Browser test helper to get workspace svg root by @bsampada7 in #8166
Bug fixes 🐛
- fix: update types in 'field_input.ts' file by @aku1310 in #7514
- fix: move delete keyboard shortcut in-progress gesture check to precondition #6274 by @humera811 in #7528
- fix: removed underscore from isLabel_ in flyout_button.ts by @sayalikandarkar in #7533
- fix: Addition of the .gitattributes file to standardize line endings by @sam301100 in #7517
- fix: non-nullable check for block variable and removed ! in layout_ #7522 by @priya-rjb in #7537
- fix: non-nullable check for block variable and removed ! in layout_ by @rashmi29 in #7536
- fix: pasting with nothing selected by @BeksOmega in #7561
- fix: Only hide WidgetDiv if it is associated with the affected workspace. by @johnnesky in #8150
- fix: lang file imports by @BeksOmega in #8179
- fix: dragging and disposing of shadows by @BeksOmega in #8172
- fix: comment body height too short by @BeksOmega in #8182
Reverted changes ⎌
- revert: "chore(deps): update webdriverio to 8.16 and stop using seleni… by @maribethb in #7520
Other changes
- release: v11.1.0 by @BeksOmega in #8185
New Contributors
- @ivalkshfoeif made their first contribution in #7519
- @aku1310 made their first contribution in #7514
- @humera811 made their first contribution in #7528
- @ramyaram2092 made their first contribution in #7529
- @sayalikandarkar made their first contribution in #7533
- @sam301100 made their first contribution in #7517
- @SophieNguyen113 made their first contribution in #7532
- @priya-rjb made their first contribution in #7537
- @rashmi29 made their first contribution in #7536
Full Changelog: blockly-v11.0.0...blockly-v11.1.0
blockly-v11.0.0
Blockly v11 is here and it includes many new features and bug fixes!
For the full list of breaking changes, see the release notes below. You can click on each PR to learn why it's a breaking change, how to tell if you will be affected by it, and what to do if you are. There are a few major changes to be aware of:
- The colour, multiline input, and angle fields and their associated blocks have been removed from core. They are now available as plugins. If you use these blocks or fields, follow the instructions in the plugin READMEs to install them.
- If you install Blockly through npm, we now provide an
exports
clause to explicitly declare what you can import from our package.- Your build tooling may now throw an error if you deep import from our package such as
import 'blockly/core/some/file/name.js'
, which has never been supported by Blockly but may have been made possible by your build tools.
- Your build tooling may now throw an error if you deep import from our package such as
- We now provide Blockly as an esmodule if you use Blockly through
import
statements in JS.import Blockly from 'blockly/core'
has never been supported by Blockly, but your build tool may have "helpfully" made this work previously. Due to this change, your build tooling may no longer behave that way.- You should
import * as Blockly from 'blockly/core'
instead, as described in our documentation. - Note that
<script type="module">
in HTML files is not yet a supported method to load Blockly.
- Calling
statementToCode
orvalueToCode
on inputs that don't exist will now throw an error instead of returning an empty string.- This will make it easier to spot errors due to incorrect input names in block-code generator functions, but may expose previously silent issues with existing code.
This release also comes with many new features and bug fixes! A few notable ones include:
- Custom workspace comment behavior and appearance
- Custom draggable behavior
- More consistent undo/redo behavior for disabled blocks
- Keyboard navigation of flyout buttons
- More accurate Generator type definitions
What's Changed
Breaking changes 🛠
- fix!: have Lua generators use 'nil' instead of 'None' by @BeksOmega in #7837
- fix!: have disposing be true from start of dispose by @BeksOmega in #7891
- feat!: delete angle, colour, and multiline input fields and blocks by @rachel-fenichel in #7932
- fix!: classes on text input bubble to match comment view by @BeksOmega in #7935
- feat(build)!: Introduce
exports
section inpackage.json
by @cpcallen in #7822 - fix!: remove couldConnect parameter from wouldDelete by @BeksOmega in #7968
- feat!: Throw errors on missing inputs by @NeilFraser in #7969
- feat!: migrate bubble dragging to use new dragging API by @BeksOmega in #7974
- fix!: various drag-adjacent interfaces by @BeksOmega in #7975
- feat!: change gestures to look at selected when dragging by @BeksOmega in #7991
- feat!: Add context menu options for workspace comments by @BeksOmega in #8035
- feat!: Invalid Blocks by @johnnesky in #7958
- fix!: Only fire intermediate events when editing input with invalid text. by @johnnesky in #8054
- fix!: add getContents to IFlyout by @maribethb in #8064
- feat(build)!: Introduce ESM entrypoints by @cpcallen in #8091
- chore!: delete deprecations for v11 by @BeksOmega in #7732
New features ✨
- feat: add comment view (for workspace comments, and block comments for partners) by @BeksOmega in #7914
- feat: allow overriding comment icons by @BeksOmega in #7937
- feat: add headless workspace comment class by @BeksOmega in #7916
- feat: rendered workspace comment by @BeksOmega in #7918
- feat: have RenderedWorkspaceComment implement IBoundedElement and IRenderedElement by @BeksOmega in #7919
- feat: add JSON serialization for workspace comments by @BeksOmega in #7927
- feat(dragging): Create (new)
IDragger
andIDraggable
interfaces by @cpcallen in #7953 - feat(dragging): Introduce
Dragger
, implementingIDragger
by @cpcallen in #7956 - feat: add block drag strategy by @BeksOmega in #7970
- feat: have blocks use drag strategy by @BeksOmega in #7971
- feat: have the gesture use a dragger for blocks by @BeksOmega in #7972
- feat: make comment a draggable by @BeksOmega in #7976
- feat: allow duplicate registry values by @maribethb in #7988
- feat: support dragging comments in the gesture by @BeksOmega in #7977
- feat: support keyboard navigation of flyout buttons by @mikeharv in #7852
- feat: comment collapse event by @BeksOmega in #7949
- feat: add toFlyoutData method for compatibility with backpack by @BeksOmega in #8002
- feat: visual comment selection by @BeksOmega in #7996
- feat: add ability to delete workspace comments by @BeksOmega in #8023
- feat: add ability to copy and paste workspace comments by @BeksOmega in #8024
- feat: add block factory export in json by @maribethb in #8051
- feat: Add snapping to workspace comments. by @NeilFraser in #8070
Bug fixes 🐛
- fix!(generators): Fix generator typings by @cpcallen in #7727
- fix(generators): Fix generator type declarations by @cpcallen in #7750
- fix: export save and load procedure by @BeksOmega in #7806
- fix: connection previewer disposing too early by @BeksOmega in #7859
- fix: typo in Click event class docs by @elvisvoer in #7854
- fix: insertion marker drag scaling by @BeksOmega in #7874
- fix: restore respecting snap radius by @BeksOmega in #7873
- fix: libraryBlocks exports by @devilhyt in #7886
- fix: shouldPreventMove not being respected by @BeksOmega in #7894
- fix: connection dancing by @BeksOmega in #7899
- fix: comment min size by @BeksOmega in #7915
- fix: updated field_dropdown to properly infer its Field type with TS 5.3.3 by @btw17 in #7939
- fix(generators): Make
scrub_
public
by @cpcallen in #7940 - fix: Fix block disposal animations by @gonfunko in #7948
- fix: comment have XML save and load new workspace comments classes by @BeksOmega in #7931
- fix(typings): Restore inadvertently-deleted
typings/msg/msg.d.ts
; add TS import test by @cpcallen in #7955 - fix: comment position in RTL by @BeksOmega in #7934
- fix: comment view styling by @BeksOmega in #7965
- fix: draggable interface and concrete dragger by @BeksOmega in #7967
- fix: comment create and delete events by @BeksOmega in #7945
- fix: comment icon interface re serialization by @BeksOmega in #7964
- fix: Assign to containerDiv blockyWidgetDiv if it already exists by @lotusotho in #7980
- fix: prevent default undo by @BeksOmega in #7946
- fix: comment colours when dragging by @BeksOmega in #7978
- fix: comment move and change events by @BeksOmega in #7947
- fix: dragging shadow blocks by @BeksOmega in #7992
- fix: bubbles not being returned to the correct layer after drag by @BeksOmega in #7997
- fix: insertion marker firing move event by @BeksOmega in #8000
- fix: drag cursor by @BeksOmega in #7999
- fix: blocks not being returned to the correct layer if their drag is reverted with no parent by @BeksOmega in #7998
- fix: compatibility with scroll plugin by @BeksOmega in https://github.com/google/blockly/pull...
blockly-v11.0.0-beta.6
This is the fourth fifth in an ongoing series of beta releases for the future v11 of Blockly. See information about the Blockly v11 Beta Program.
Due to errors in the publication process, the contents of the [email protected]
package were not as intended (and did not correspond with the release notes), and that version has been withdrawn. This version, -beta.6, supersedes it.
Highlights in v11.0.0-beta.6 (was beta.5)
This release was created to publish the fix in PR #7955 for issue #7952, which caused errors when importing langfiles (e.g. blockly/msg/en
) in TypeScript modules. Thanks to @clementcontet for reporting this issue in -beta.4 so promptly—and sorry that we didn't catch it despite the extensive testing carried out on the offending PR, #7822!
It also contains unrelated ongoing work on refactoring workspace comments.
What's Changed
New features ✨
- feat: rendered workspace comment by @BeksOmega in #7918
- feat: have RenderedWorkspaceComment implement IBoundedElement and IRenderedElement by @BeksOmega in #7919
- feat: add JSON serialization for workspace comments by @BeksOmega in #7927
Bug fixes 🐛
- fix: comment have XML save and load new workspace comments classes by @BeksOmega in #7931
- fix(typings): Restore inadvertently-deleted
typings/msg/msg.d.ts
; add TS import test by @cpcallen in #7955
Full Changelog: blockly-v11.0.0-beta.4...blockly-v11.0.0.-beta.6
blockly-v11.0.0-beta.4
This is the third in an ongoing series of beta releases for the future v11 of Blockly. See information about the Blockly v11 Beta Program.
Wait, -beta.4? What happened to .2 and .3?
The keen npmjs.com watches amongst you (hi, @dependabot!) will have noted that, since the last publicly-announce beta, v11.0.0-beta.1, there have been two additional betas published to npmjs.com. These were created to facilitate development and testing of work in the blockly-samples repository, and all the changes from those two unpublicised releases are rolled into the changelist below.
Highlights in v11.0.0-beta.4
Valid entrypoints specified by exports
directive in package.json
The most important change in v11.0.0-beta.4 is actually a change to the packaging, rather than the contents of the package.
Specifically, we have added an exports
directive, to the package.json
file, which definitively enumerates the valid entrypoints for the package. The purpose of this change is to prepare for the publication of ES module entrypoints, that will supplement (and ultimately supplant) the existing CommonJS module entrypoints, in future versions of Blockly.
Adding an exports
section:
- Allows us to definitively enumerate the permitted entrypoints for the package, disallowing direct importation of any other files.
- Allows us to change which file each individual entrypoint actually loads without it necessarily being a breaking change.
- Allows us to specify separate ESM entrypoints for subpaths (like
blockly/javascript
); withoutexports
all subpath entrypoints must be either ESM or CJS and it is not possible to provide both.
Aside: module resolution
Module resolution is ultimately at the discretion of each JS runtime or build tool. Browsers, node.js, Webpack, Closure Compiler, etc. each have their own module resolution and loading implementations. The package.json
file was originally for the benefit of npm
in its role of installing packages and their dependencies, but now contains additional information (like the browser
, exports
, main
, umd
, and unpkg
directives) that are honoured to varying degrees by different tools. It is therefore hard to say categorically what file(s) will be loaded by which tools without consulting each tool's documentation (and/or implementation), but amongst tools that have some kind of support for NPM packages, the exports
directive appears to be widely and consistently supported.
Here is some of the relevant documentation for tools we expect Blockly developers are likely to use:
- node.js's package entry points and CJS and ESM module resolution algorithms.
- webpack's
package.json
exports
support and module resolution and loaders. - Closure Compiler's support for modules.
Valid entrypoints and what they provide
BREAKING CHANGE: The introduction of an exports
directive means that correctly-behaved tools (node.js, bundlers like webpack, etc.) will only allow importing of the specified entrypoints. Here is the full list of permitted entrypoints that can be import
ed or require
d:
blockly
blockly/core
blockly/blocks
blockly/dart
blockly/lua
blockly/javascript
blockly/php
blockly/python
blockly/msg/<lang>
, for all supported language codes<lang>
(e.gblockly/msg/en
,blockly/msg/fr
,blockly/msg/de
, etc.)
If you previously imported any other paths from the blockly package you will need to update your imports. Here are the most common paths that may have been used, and their correct replacements:
If you previously imported: | Import instead: |
---|---|
blockly/index.js |
blockly |
blockly/node.js |
blockly |
blockly/browser.js |
blockly |
blockly/blockly.min |
This file should only be loaded as a <script> . |
blockly/core.js |
blockly/core |
blockly/core-browser.js |
blockly/core |
blockly/blockly_compressed.js |
blockly/core |
blockly/blocks.js |
blockly/blocks |
blockly/blocks_compressed.js |
blockly/blocks |
blockly/dart.js |
blockly/dart |
blockly/dart_compressed.js |
blockly/dart |
blockly/lua.js |
blockly/lua |
blockly/lua_compressed.js |
blockly/lua |
blockly/javascript.js |
blockly/javascript |
blockly/javascript_compressed.js |
blockly/javascript |
blockly/php.js |
blockly/php |
blockly/php_compressed.js |
blockly/php |
blockly/python.js |
blockly/python |
blockly/python_compressed.js |
blockly/python |
blockly/msg/en.js |
blockly/msg/en |
If you are loading Blockly as a script you should continue to load the compiled chunks (blockly_compressed.js
, blocks_compressed.js
, javascript_compressed.js
, etc.) directly, or load blockly.min.js
which is just a concatenation of blockly_compressed.js
, msg/en.js
, blocks_compressed.js
, and javascript_generator.js
.
(Prior to v11 there were various entrypoint wrappers provided in the form of UMD modules (e.g. blockly.js
, javascript.js
, etc.) but loading these as as scripts never did anything useful and, as they are no longer needed, they have been deleted.)
BREAKING CHANGE: Prior to v11, importing the main blockly
package would import blockly/core
, blockly/blocks
, blockly/msg/en
and blockly/javascript
—and additionally, in node.js
, also blockly/dart
, blockly/lua
, blockly/php
and blockly/python
.
Now the main blockly
package entrypoint never loads any of the generators.
This change has been made because of changes to generator exports made in blockly v9.0.0 that make necessary to always separately import generator modules in order to use them.
Note that this change does not affect loading the blockly package via <script src="https://unpkg.com/blockly">
; that continues to load to blockly.min.js
, which continues to include javascript_compressed.js
which (when loaded as a script) makes itself available via Blockly.JavaScript
for backwards compatibility.
Field, block and generator changes
BREAKING CHANGE: The angle, colour and multiline input fields (FieldAngle
, FieldColour
and FieldMultilineInput
respectively) have been deleted from Blockly. All three are now provided as plugins. The blocks associated with the colour field and multiline text field have been moved to the field plugins, which now provide documentation on how to install the blocks.
BREAKING CHANGE: Code emitted by the LuaGenerator
now uses nil
instead of None
. This may break some user's downstream block programs if they are assigning to a variable called None
and then initializing lists with empty inputs expecting them to contain the value assigned to None
.
Other changes
There were also breaking changes to block disposal and to certain CSS classes, as well as other changes made for v11 and/or rolled up from v10; see below for the complete list.
What's Changed
Breaking changes 🛠
- fix!: have Lua generators use 'nil' instead of 'None' by @BeksOmega in #7837
- fix!: have disposing be true from start of dispose by @BeksOmega in #7891
- feat!: delete angle, colour, and multiline input fields and blocks by @rachel-fenichel in #7932
- fix!: classes on text input bubble to match comment view by @BeksOmega in #7935
- feat(build)!: Introduce
exports
section inpackage.json
by @cpcallen in #7822
New features ✨
- feat: add muted option by @truongductri01 in #7714
- feat: add connection previewers by @BeksOmega in #7825
- feat: make grid options togglable by @BeksOmega in #7828
- feat: add comment view (for workspace comments, and block comments for partners) by @BeksOmega in #7914
- feat: allow overriding comment icons by @BeksOmega in #7937
- feat: add headless workspace comment class by @BeksOmega in #7916
Bug fixes 🐛
- fix: prevent console logging duplicate deprecation warnings by @ebrahim95 in https://github.com/goog...
blockly-v10.4.3
What's Changed
Other changes
- fix: connection dancing for zelos rendered by @BeksOmega in #7899
Full Changelog: blockly-v10.4.2...blockly-v10.4.3