Releases: google/blockly
v9.3.2
v9.3.1
What's Changed
Other changes
- fix: allow splicing into shadow block stacks by @maribethb in #6939
Full Changelog: blockly-v9.3.0...blockly-v9.3.1
v9.3.0
Overview
Greetings, Block Builders! This release brings some exciting new features and important bug fixes.
- New procedure blocks that enable sharing procedures between workspaces. The new blocks are being published as a plugin, so the old procedure blocks will continue to work as expected. Learn more here and check out the plugin here.
- The JSON serializer now serializes movable, editable, and deletable properties. If you were previously relying on the serialize-disabled-interactions plugin to do so, see the README for next steps.
- Performance improvements during rendering and collapsing blocks
- Fixes problem with dropdowns on mobile devices (if you're on v9.2.0, this is an important fix!)
What's Changed
Deprecating changes 🚧
These are not breaking changes yet, but deprecate something that will be removed in the next major release
Blockly.Xml.textToDom
has been renamed toBlockly.utils.xml.textToDom
in #6818
New features ✨
- feat: Support for the new shareable procedure blocks plugin
- feat: Add support for centering on a block itself vs its stack. by @gonfunko in #6810
- feat: added
tests/typescript
to test supported TS examples by @btw17 in #6775 - feat: updated flyout button to set border radius via static variable by @btw17 in #6838
- feat(build): Run
tsc
onblocks/
andgenerators/
by @cpcallen in #6836 - feat: add basic render queueing by @BeksOmega in #6851
- feat: make renderer methods public or protected by @maribethb in #6887
Bug fixes 🐛
- fix: undoing and redoing parameter events by @BeksOmega in #6721
- fix: undoing and redoing deleting procedures by @BeksOmega in #6722
- fix: change assertFieldValue in test helpers to use deepEqual by @Samridhi-98 in #6739
- fix: correct docs for flyout metrics by @maribethb in #6751
- fix: replace 'AnyDuringMigration' for
core/field.ts
value functions by @btw17 in #6639 - fix: export Abstract event class directly by @maribethb in #6752
- fix: undoing pasting procedure callers that create defs by @BeksOmega in #6750
- fix: proc json serialization by @BeksOmega in #6746
- fix: CI exits properly after failure by @maribethb in #6763
- fix: copying and pasting procedure definitions by @BeksOmega in #6747
- fix(deps): Don't use global variables for jsdom injection in
scripts/package/node/core.js
andcore/utils/xml.ts
by @cpcallen in #6764 - fix(tests): Have
npm start
run a full build by @cpcallen in #6770 - fix: Increase generator test timeout by @maribethb in #6776
- fix: Make metadata tests more resilient. by @gonfunko in #6771
- fix(build): Fix event tests, improve
buildDeps
by @cpcallen in #6773 - fix: don't splice into unmovable stacks by @maribethb in #6800
- fix(tests): Use
build/msg/en.js
instead ofmsg/messages.js
by @cpcallen in #6825 - fix: Fire deletion events when clearing variables. by @NeilFraser in #6827
- fix: move deprecation warning to correct fromJson by @NeilFraser in #6831
- fix: serializing disabled interactions by @BeksOmega in #6847
- fix: variable events not deserializing properly by @BeksOmega in #6832
- fix: updating connections in the db multiple times by @BeksOmega in #6859
- fix: Don't repeatedly recreate the last marker block during a drag. by @gonfunko in #6875
- fix: export Field-related types from Blockly by @btw17 in #6877
- fix: improve collapse / uncollapse performance by @BeksOmega in #6860
- fix: creating duplicate params via renaming vars by @BeksOmega in #6885
- fix: improve performance of modifying block shape by @BeksOmega in #6884
- fix: empty procedure arrays in serialization by @BeksOmega in #6872
- fix: toString performance by @BeksOmega in #6896
- fix: improve performance of connecting blocks by @BeksOmega in #6876
- fix: dispose performance by @BeksOmega in #6894
- fix: Don't clobber event group when renaming vars by @NeilFraser in #6829
- fix: Fix scrolling of menus on mobile. by @gonfunko in #6911
- fix: scrolling dropdown items into view by @BeksOmega in #6912
- fix: flyouts resizing for blocks by @BeksOmega in #6914
- fix: overwriting flyout def with dynamic categories by @BeksOmega in #6913
- fix(fields): Make
Field.SKIP_SETUP
aSymbol
; removeclass Sentinel
by @cpcallen in #6919 - fix: connection locations not updating by @BeksOmega in #6921
- fix: Make Escape cancel changes in text fields. by @gonfunko in #6923
- fix: mutator not resizing for flyout by @BeksOmega in #6917
Cleanup ♻️
- refactor: Don't use skew_ and translate_ attributes on SVGs to animate blocks. by @gonfunko in #6782
- refactor: Use the field registry to instantiate fields in block definitions. by @gonfunko in #6811
- refactor: Use input type=number for field_number.ts by @gonfunko in #6845
- refactor: Remove more uses of AnyDuringMigration by @gonfunko in #6863
- docs: Fix a few typos by @timgates42 in #6878
- refactor(blocks): Migrate
blocks/colour.js
to TypeScript by @cpcallen in #6901 - refactor(blocks): Migrate
blocks/math.js
to TypeScript by @cpcallen in #6900
New Contributors 👋
- @Samridhi-98 made their first contribution in #6739
Full Changelog: blockly-v9.2.1...blockly-v9.3.0
v9.2.1
What's Changed
Bug fixes 🐛
- fix(deps): Don't use global variables for jsdom injection in scripts/package/node/core.js and core/utils/xml.ts in #6764
Full Changelog: blockly-v9.2.0...blockly-v9.2.1
v9.2.0
What's Changed
New features ✨
- feat: add firing of procedure events. by @BeksOmega in #6604
- feat: refactor event serialization to use static fromJson method by @BeksOmega in #6614
- feat(test): Miscellaneous improvements to
test_tasks.js
by @cpcallen in #6615 - feat: add option to disable modal inputs on mobile by @maribethb in #6625
- feat: add running procedure events by @BeksOmega in #6650
- feat: make
getWorkspace
,getFlyout
, andgetToolbox
public by @NeilFraser in #6666 - feat: make the variable map return early for noops by @BeksOmega in #6674
- feat: add destroy lifecycle hook to blocks by @BeksOmega in #6678
- feat: procedure event serialization by @BeksOmega in #6669
- feat: Display a 'wait' cursor when opening trashcan by @NeilFraser in #6699
Bug fixes 🐛
- fix(renamings): Small correction to renaming of
Blockly.utils.global
by @cpcallen in #6599 - fix: Rename
Mutator#workspace
back toworkspace_
for compatibility with library blocks by @rachel-fenichel in #6634 - fix: Add redirects to old demos. by @NeilFraser in #6657
- fix: Fix the compiler test, and check if it worked. by @NeilFraser in #6638
- fix(deps): update json schema validation by @BeksOmega in #6637
- fix(appengine): Restore build products to previous location by @cpcallen in #6687
- fix: set default field to any and fix validator function return type by @btw17 in #6690
- fix: don't reopen dropdownDiv if it was already open by @maribethb in #6688
- fix: Don't spellcheck number fields. by @NeilFraser in #6698
- fix(tests): Fix bootstrapping of generators in compressed mode by @cpcallen in #6703
- fix: not being able to set field values to empty by @BeksOmega in #6702
Cleanup ♻️
- refactor: Migrate to PointerEvents by @gonfunko in #6598
- docs(messages): Add a msg/json/README.md by @cpcallen in #6635
- docs: Add notice to use unpkg instead of demos. by @NeilFraser in #6667
Other changes
- ci: clang format version bump by @piwysocki in #6640
- release: v9.2.0 by @cpcallen in #6711
New Contributors
- @piwysocki made their first contribution in #6640
Full Changelog: blockly-v9.1.1...blockly-v9.2.0
v9.1.1
What's Changed
Bug fixes
- fix: Rename
Mutator#workspace
back toworkspace_
for compatibility with library blocks (#6634)
Full Changelog: blockly-v9.1.0...blockly-v9.1.1
v9.1.0
What's Changed
New Features
- feat: add interface definitions for procedure stuff by @BeksOmega in #6488
- feat: add basic observable implementations of procedure interfaces by @BeksOmega in #6489
- test: add shared procedures playground by @BeksOmega in #6485
- feat: trigger updates to IProcedureBlock blocks by @BeksOmega in #6570
- feat: add serialization of procedure models by @BeksOmega in #6582
- feat: export serializers by @BeksOmega in #6586
Bug fixes
- Fix:
//
isn't a legal comment in CSS by @NeilFraser in #6467 - fix: update a moved function in developer tools so it loads by @maribethb in #6500
- fix: remove deprecated use of objectUtils from generators by @maribethb in #6499
- fix: Connections can be highlighted multiple times by @koenvanwijk in #6502
- fix: move Theme to use a Partial type for BlockStyle by @BeksOmega in #6532
- fix: fix block factory in manual mode by @maribethb in #6533
- fix: parent blocks not bumping neighbours by @BeksOmega in #6538
- fix: fix pinch to zoom by @maribethb in #6544
- fix: Don't quote fromJson property. by @NeilFraser in #6545
- fix: make getSourceBlock nullable again by @BeksOmega in #6542
- fix: Don't warn if field is acually 0 width by @NeilFraser in #6558
- fix: feedback on procedure model implementations by @BeksOmega in #6560
- fix: refactors concrete implementations of the procedure data models by @BeksOmega in #6575
- fix(build): build/test on windows by @yamadayutaka in #6431
- fix: Rename Generator to CodeGenerator by @NeilFraser in #6585
- fix(tests): generator tests on linux by @rachel-fenichel in #6588
Cleanup ♻️
- chore: rearrange serialization export to make APIExtractor happy by @BeksOmega in #6480
- test: add skipped tests for the procedure map by @BeksOmega in #6486
- chore: clean up some underscores by @rachel-fenichel in #6492
- chore: add auto labeling workflow by @maribethb in #6504
- chore(deps): force update @blockly deps by @BeksOmega in #6509
- chore: remove underscores from private properties in workspace.ts by @rachel-fenichel in #6536
- chore: Remove blockly factory use of utils.dom.add/removeClass by @NeilFraser in #6534
- chore: remove underscores from some private properties and methods by @rachel-fenichel in #6537
- chore: clean up code in field_angle.ts by @rachel-fenichel in #6551
- chore: fix mutator blocks jumping by @BeksOmega in #6559
- chore: update procedure map tests to match the refactored API by @BeksOmega in #6562
- chore: added type information to
core/field_dropdown.ts
by @btw17 in #6550 - chore: remove underscores from menuitem and menu by @rachel-fenichel in #6567
- chore: update procedure map tests to match the refactored API by @BeksOmega in #6569
- chore: add tests for procedure serialization by @BeksOmega in #6574
- chore: Merge branch 'master' back into develop after v9.0.1 release by @cpcallen in #6581
- chore: start command uses tsc watch by @maribethb in #6577
- chore(release): delete release-please configuration by @rachel-fenichel in #6546
- Revert "chore: update procedure map tests to match the refactored API" by @BeksOmega in #6568
- chore: remove underscores and clean up scrollbar.ts by @rachel-fenichel in #6584
- chore: remove some underscores in icon-related classes by @rachel-fenichel in #6583
- chore(build): Remove build products from the Blockly repository by @cpcallen in #6475
- chore: add command to generate reference docs by @maribethb in #6506
- test: add tests for the insertion marker manager by @rachel-fenichel in #6596
- test: firing procedure events by @BeksOmega in #6593
- chore: disable serialization of procedure data for point release by @BeksOmega in #6610
- chore: add 'fixes' to PR template by @BeksOmega in #6616
Other Changes
New Contributors
- @koenvanwijk made their first contribution in #6502
Full Changelog: blockly-v9.0.1...blockly-v9.1.0
Q3 2022 Patch 1
What's Changed
Bug fixes
- fix: fix pinch to zoom by @maribethb in #6544
- fix: make getSourceBlock nullable again by @BeksOmega in #6542
- chore: fix mutator blocks jumping by @BeksOmega in #6559
Cleanup ♻️
- chore: fix typo in renamings database by @BeksOmega in #6498
Other Changes
Full Changelog: blockly-v9.0.0...blockly-v9.0.1
Q3 2022 Release (v9.0.0)
Highlights
- Blockly core is now in TypeScript! If you use TypeScript, you should notice better type declarations for Blockly. There may still be some rough edges; please tell us about them or submit a fix.
- Blockly is transpiled to ES2015, no longer ES5. ES2015 is supported by all major browsers.
- Blockly is no longer guaranteed to be compatible with Internet Explorer, and some IE workarounds have been removed.
- If you're using modules, the way you import generators has changed. See the generators documentation for more information.
Migration
To help deal with breaking changes from this release:
- Run
npx @blockly/migrate rename --from <your version> <./path/to/my/files*>
- Run
npx @blockly/migrate fix-imports --from <your version> <./path/to/my/files*>
These commands will automatically modify your files so that they are compatible with version 9. The first command will automatically rename properties that have been renamed. And the second command will add/fix imports for blocks/generators that have been moved.
Some problems may still exist after running the migration scripts, but the majority of them should be fixed!
What's Changed
⚠ BREAKING CHANGES
Most are removing deprecated, unused, or outdated APIs. Each of the PRs listed below has information about what to do if you are affected by the change.
- Update deprecations for the new release. (#6470)
- remove unused functions in style.ts (#6386)
- Removed backwards compatibility for getDeveloperVars(). (#6385)
- remove checks for IE and EdgeHTML in core (#6336)
- allow blocks to receive their own delete events (#6337)
- build: compile to ES2015 instead of ES5 (#6335)
- Move backwards-compatibility hacks to main.js (#6260)
- Remove remaining use of
goog.module.declareLegacyNamespace
. (#6254) - properly add the removal of utils.global to the renamings file. (#6204)
- fix or silence type errors (#6105)
- Correctly handle multiple highlighted RenderedConnections (#6416)
Deprecating Changes
These are changes which deprecate an API but do not remove it. APIs in this category will be removed at a future time. Each of the following PRs should provide guidance on an alternative.
- Fix blocks with mutators (#6440)
- stop using
is3dSupported
(#6400) - remove some IE-specific code in dom and style (#6396)
- deprecate functions in object.ts (#6387)
- remove AnyDuringMigration from the block drag surface (#6302)
Features
- Add margin around zoomToFit (#6042) (a202558)
- allow blocks to receive their own delete events (#6337) (e9920a5)
- build: Support TypeScript in
core/
(#6220) (4070ffc) - creates a new way to add shortcut key mappings (#6122) (adb5ad1)
- make isMutator public (#6316) (8f4b49a)
- return element from menu.render (#6426) (e3fa43d)
- updates accessors for getMainWorkspace and getSelected (#6313) (fd127f6)
Bug Fixes
- add compose and decompose to block (#6102) (619ee66)
- add timeouts to delay expensive mutation operations (#6149) (91b570a)
- adding and removing css classes that contained spaces (#6455) (8530e6d)
- build: Fix sourcemaps (#6352) (e10bf99)
- build: Have prepare task signal async completion (#6356) (079699b)
- Check for empty array in thrasos.RenderInfo.addElemSpacing_ (#6211) (16b5ccd)
- component id should be on the prototype (#6104) (172a8ce)
- context menu not working (#6399) (79051a6)
- Deep copy options used by dropdown fields (#6425) (05b221b)
- deprecate functions in object.ts (#6387) (9775b51)
- disposing of a workspace that has overwritten shadows (#6424) (f2e408b)
- dragging fails for collapsed blocks with Icons, which have been … (#6081) (5240301)
- field defaults not being defined correctly (#6453) (eb1b786)
- Fix blocks with mutators. (#6440) (ab03c65)
- Fix compilation errors under Closure's strict mode (#6073) (edc2a5c)
- fix message loading from script tags (#6060) (44edbb8)
- fix or silence type errors (#6105) (daf78af)
- generator type declarations (#6412) (b2fa356)
- improve types in touch code (#6099) (7c7cfbe)
- Increases the speed of deleting blocks (#6128) (71e8356)
- inject function options dictionary has wrong type definition (#6231) (233cce8)
- JSON deserialization fails (bug #6091) (collapsed procedure call… (#6103) (45c36f8)
- json hooks for lists blocks not needing extra state (#6177) (8b69b61)
- json serialize lists_getIndex with json extraState (#6136) (#6170) (0afff23)
- loading messages from script tags. (#6184) (2a7d6b0)
- Made workspace non-nullable. (#6300) (83a3e74)
- make eventUtils throw if event type not registered (#6381) (60bc01a)
- Make generator types and BlockDefinition less restrictive (#6185) (2ff4f88)
- Make message files work in unpackaged mode, and rebuild msg files (4b1bb8c)
- message types being incorrect ([#641...
Q1 2022 Patch 5
This patch fixes additional message loading problems. Message loading now works as expected in these scenarios:
- Loading Blockly and messages with a module loader
- Loading the wrapped message files via a script tag (e.g. the message files published on npm and unpkg)
- Loading the unwrapped message files via a script tag (e.g. the message files present in Blockly's GitHub repo without additional processing). Note that this approach is not recommended going forward, but this patch does allow this scenario to work as expected.
Included in this release: