Releases: google/blockly
blockly-v12.0.0
v12.0.0
Blockly v12.0.0 is here, and it's a big one! The team first started working on this release almost a year ago, so it's packed with new features and improvements. Our main goal with this release is to improve the accessibility of Blockly, in conjunction with our brand new keyboard-navigation plugin. Read more below!
Highlights
- Revamped focus and handling selected items to be compatible with browser focus and enable keyboard navigation. This is most likely to require your attention if you have custom elements that should be keyboard navigable or if you ever set tabstops manually on Blockly components
- Added many new css classes (and changed a few pre-existing ones) to make styling of various Blockly components easier without having to use themes
- Added support for arbitrary flyout contents with custom
FlyoutInflater
s - Removed the
ASTNode
class and some other pieces related to keyboard navigation. Check out the new experience in the keyboard-navigation experiment instead - Added ability to register context menu items on basically any Blockly component that is selectable. Read more in our docs
- Added support for
HTMLElement
s inFieldDropdown
options. You can now create options that use both images and text, for example
Accessibility Improvements
Blockly v12 enables a new keyboard-accessible experience when coupled with our new keyboard-navigation plugin. The plugin is currently in beta in the blockly-keyboard-experimentation repo, and will be released as @blockly/keyboard-navigation v1.0.0 in a few weeks. We'll post an update on the blockly-announce group when it's released!
This also marks a major stepping stone toward screenreader-compatibility, which the team will continue working towards through Q2-Q3 of this year. Learn more about our accessibility roadmap
Blockly Samples
Our plugins have also been updated to be compatible with Blockly v12. As a reminder, all plugins also get a new major version when we update their minimum required version of Blockly. Be sure to update any plugins you use at the same time you update Blockly.
Feedback
If you find any problems with this release, please open an issue. If you try out the new keyboard-navigation experience and have feedback, consider joining our blockly-accessibility group to discuss. As always, we welcome PR contributions as well, especially on issues marked help wanted
!
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
- refactor!: Use JSON instead of XML for defining dynamic toolbox categories. by @gonfunko in #8658
- fix!: Don't add padding around zero-width fields. by @gonfunko in #8738
- fix: Fixes #8764 by moving the event grouping calls up to dragger.ts by @RoboErikG in #8781
- feat!: Added support for separators in menus. by @gonfunko in #8767
- refactor!: Remove old cursor and tab support. by @gonfunko in #8803
- fix!: Tighten and correct typings on ASTNode by @gonfunko in #8835
- refactor!: Backport LineCursor to core. by @gonfunko in #8834
- fix!: change css class for disabled block pattern by @maribethb in #8864
- feat!: deprecate scopeType and include focusedNode in context menu options by @maribethb in #8882
- refactor!: Finish refactor of
WorkspaceSvg
VariableMap
methods by @cpcallen in #8946 - feat!: add scope to keyboard shortcuts and use it by @maribethb in #8917
- fix!: Remove alt+key commands by @RoboErikG in #8961
- refactor!: Use navigation rulesets instead of ASTNode to control keyboard navigation. by @gonfunko in #8992
- fix!: remove MarkerSvg and uses by @rachel-fenichel in #8991
- fix!: delete marker move event and tests by @rachel-fenichel in #9013
- fix!: delete ASTNode and references by @rachel-fenichel in #9014
- fix!: delete IASTNodeLocation and friends by @rachel-fenichel in #9015
- feat!: Make everything ISelectable focusable by @BenHenning in #9004
- fix!: remove deprecated setEnabled and backwards event filtering by @maribethb in #9039
- fix!: deepMerge for arrays, shortcut keycodes returned as array by @maribethb in #9047
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 @sur...
blockly-v12.0.0-beta.7
What's Changed
New features โจ
- feat: Allow conditioned ephemeral access for drop-down & widget divs by @BenHenning in #9051
Bug fixes ๐
- fix: Fix bug when referencing HTMLElement in non-browser environments. by @gonfunko in #9050
- fix: Remove un-typesafe cast. by @gonfunko in #9052
Other changes
- release: update version number to 12.0.0-beta.7 by @rachel-fenichel in #9053
Full Changelog: blockly-v12.0.0-beta.6...blockly-v12.0.0-beta.7
blockly-v12.0.0-beta.6
What's Changed
Breaking changes ๐
- fix!: delete marker move event and tests by @rachel-fenichel in #9013
- fix!: delete ASTNode and references by @rachel-fenichel in #9014
- fix!: delete IASTNodeLocation and friends by @rachel-fenichel in #9015
- feat!: Make everything ISelectable focusable by @BenHenning in #9004
- fix!: remove deprecated setEnabled and backwards event filtering by @maribethb in #9039
- fix!: deepMerge for arrays, shortcut keycodes returned as array by @maribethb in #9047
Bug fixes ๐
- fix: Don't fire events for changes to potential variables by @RoboErikG in #9025
- fix: Improve robustness of
IFocusableNode
uses by @BenHenning in #9031 - fix: don't visit connections with the cursor. by @gonfunko in #9030
- fix: Fix regressions in
Field
. by @gonfunko in #9011 - fix: Ensure selection stays when dragging blocks, comments, and bubbles by @BenHenning in #9034
- fix: Ensure BlockSvg is uniquely focusable on the page by @BenHenning in #9045
- fix: Ensure cursor syncs with more than just focused blocks by @BenHenning in #9032
- fix: Reenable support for tabbing between fields. by @gonfunko in #9049
- fix: fieldDropdown.getText works in node by @maribethb in #9048
Cleanup โป๏ธ
- refactor: Make INavigable extend IFocusableNode. by @gonfunko in #9033
- refactor: Remove INavigable in favor of IFocusableNode. by @gonfunko in #9037
Full Changelog: blockly-v12.0.0-beta.5...blockly-v12.0.0-beta.6
blockly-v12.0.0-beta.5
What's Changed
Breaking changes ๐
- feat!: deprecate scopeType and include focusedNode in context menu options by @maribethb in #8882
- refactor!: Finish refactor of
WorkspaceSvg
VariableMap
methods by @cpcallen in #8946 - feat!: add scope to keyboard shortcuts and use it by @maribethb in #8917
- fix!: Remove alt+key commands by @RoboErikG in #8961
- refactor!: Use navigation rulesets instead of ASTNode to control keyboard navigation. by @gonfunko in #8992
- fix!: remove MarkerSvg and uses by @rachel-fenichel in #8991
New features โจ
- feat: Add a method for creating flyout options by @RoboErikG in #8829
- feat: Allow for HTML elements in dropdown field menus. by @gonfunko in #8889
- feat: show context menu for connections by @maribethb in #8895
- Feature: Add a dropdown options setter by @RoboErikG in #8833
- feat: Add support for displaying toast-style notifications. by @gonfunko in #8896
- feat!: Introduce new focus tree/node functions. by @BenHenning in #8909
- feat: Make WorkspaceSvg and BlockSvg focusable by @BenHenning in #8916
- feat: Make toolbox and flyout focusable by @BenHenning in #8920
- feat: Make WorkspaceSvg and BlockSvg focusable (roll forward) by @BenHenning in #8938
- feat: Make toolbox and flyout focusable (roll forward) by @BenHenning in #8939
- feat: Make fields focusable by @BenHenning in #8923
- feat: Make connections focusable by @BenHenning in #8928
- feat: Update line cursor to use focus manager by @BenHenning in #8941
- feat(WorkspaceSvg): Add support for tracking keyboard moves by @cpcallen in #8959
- feat(WorkspaceSvg): Ignore gestures when keyboard move in progress by @cpcallen in #8963
Bug fixes ๐
- fix: fix bug that modalInputs option is not working in toolbox area by @zhiyan in #8817
- fix: Fix bug that allowed some invisible fields/inputs to be navigated to. by @gonfunko in #8899
- fix: Fix bug that caused flyout items under the mouse to be selected without movement. by @gonfunko in #8900
- fix: Recreate the dropdowndiv when clearing it. by @gonfunko in #8903
- fix: Add some missing message strings. by @gonfunko in #8908
- Fix: Remove the collapsed block warning when expanding a block by @RoboErikG in #8854
- fix: LineCursor can loop forward, but not back by @microbit-grace in #8926
- fix: Support RTL in WorkspaceSvg.scrollIntoBounds by @RoboErikG in #8936
- fix: Fix bug in
BlockSvg.prototype.setParent
by @cpcallen in #8934 - fix: remove black outline on focused items by @rachel-fenichel in #8951
- fix: Fix conventional auto labeling by @BenHenning in #8956
- fix: Address remaining invisible input positions by @microbit-robert in #8948
- fix: Ensure flyout remains open after creating a variable with mouse by @BenHenning in #8982
- fix: Synchronize gestures and focus by @BenHenning in #8981
- fix: focus for autohideable flyouts by @maribethb in #8990
- fix: Replace explicit calls to refreshToolboxSelection with a workspace listener by @RoboErikG in #8980
- fix: Add private to variableChangeCallback by @RoboErikG in #8995
- fix: use copyable interface for cut action, add tests by @maribethb in #8993
- fix: Improve missing node resiliency by @BenHenning in #8997
Other changes
- release: v11.2.2 by @gonfunko in #8812
- Fix: Revert focus prs by @RoboErikG in #8933
New Contributors
- @zhiyan made their first contribution in #8817
- @microbit-grace made their first contribution in #8926
- @microbit-robert made their first contribution in #8948
Full Changelog: blockly-v12.0.0-beta.4...blockly-v12.0.0-beta.5
blockly-v12.0.0-beta.4
What's Changed
New features โจ
- feat: make block and workspace implement IContextMenu by @maribethb in #8876
- feat: support menuOpenEvent, menuSelectEvent, location for context menu items by @maribethb in #8877
- feat: add loopback in cursor navigation, and add tests by @rachel-fenichel in #8883
- feat: menuOpenEvent, menuSelectEvent, and location for context menu items by @maribethb in #8891
- feat: Add support for retrieving blocks' drag strategies. by @gonfunko in #8893
Bug fixes ๐
- fix: update dependencies so adv compilation works by @maribethb in #8890
- fix: Don't visit invisible inputs with the cursor. by @gonfunko in #8892
- fix: Fix keyboard-driven menu scrolling. by @gonfunko in #8881
Other changes
- feat: add getFirstNode and getLastNode to cursor with tests by @rachel-fenichel in #8878
Full Changelog: blockly-v12.0.0-beta.3...blockly-v12.0.0-beta.4
blockly-v12.0.0-beta.3
These changes occurred since beta.2
What's Changed
Breaking changes ๐
- refactor!: Remove old cursor and tab support. by @gonfunko in #8803
- fix!: Tighten and correct typings on ASTNode by @gonfunko in #8835
- fix!: change css class for disabled block pattern by @maribethb in #8864
New features โจ
- feat: make getNextNode and getPreviousNode public by @rachel-fenichel in #8859
- feat: add shouldHealStack method by @rachel-fenichel in #8872
- feat: add getSearchRadius to BlockDragStrategy by @rachel-fenichel in #8871
Bug fixes ๐
- fix: check potential variables for flyout variable fields by @maribethb in #8873
Other changes
- refactor!: Backport LineCursor to core. by @gonfunko in #8834
- feat: Introduce FocusManager implementation by @BenHenning in #8814
Full Changelog: blockly-v12.0.0-beta.2...blockly-v12.0.0-beta.3
blockly-v11.2.2
What's Changed
New features โจ
Bug fixes ๐
- fix: treat media files as binary while packaging them by @jfedor2 in #8706
- fix: Fix serialization of the lists_split block. by @gonfunko in #8702
- fix: Paste blocks copied from a mutator into the mutator. by @gonfunko in #8719
- fix: Disallow adding comments to mutator workspaces. by @gonfunko in #8720
- fix: Reposition the trashcan's flyout in response to workspace changes. by @gonfunko in #8721
- fix: Fix bug that preventing scrolling menu items into view. by @gonfunko in #8726
- fix: Listen for keyboard shortcuts when the widget or dropdown divs have focus. by @gonfunko in #8731
- fix: Fix display of multiline RTL strings in bubbles on Webkit. by @gonfunko in #8733
- fix: Fix the browser tests. by @gonfunko in #8735
- fix: Actually fix the browser tests. by @gonfunko in #8736
- fix: Improve the robustness of workspace SVG tests. by @BenHenning in #8689
- fix: Fix flaky connection checker test. by @gonfunko in #8754
- fix: Improve menu mouse/keyboard selection interaction. by @gonfunko in #8749
- fix: Fix menu scrolling. by @gonfunko in #8765
- fix: Allow dragging blocks from the far lower right corner. by @gonfunko in #8766
- fix: Fix bug that prevented editing workspace comments on Firefox. by @gonfunko in #8779
- fix: Fix bug in IF block generators. by @michaela-mm in #8780
- fix: Fix a bug where selection outlines could be cut off when connecting blocks. by @gonfunko in #8789
- fix: Fix dropdown text color in Zelos by @clementcontet in #8741
- fix: #8194 by using a stepped animation for the wiggle by @RoboErikG in #8743
New Contributors
- @jfedor2 made their first contribution in #8706
- @michaela-mm made their first contribution in #8780
Full Changelog: blockly-v11.2.1...blockly-v11.2.2
blockly-v12.0.0-beta.2
What's Changed
Breaking changes ๐
- fix!: Don't add padding around zero-width fields. by @gonfunko in #8738
- feat!: Added support for separators in menus. by @gonfunko in #8767
New features โจ
- feat: Add support for toggling readonly mode. by @gonfunko in #8750
- feat: Add interfaces for focus management by @BenHenning in #8774
Bug fixes ๐
- fix: Listen for keyboard shortcuts when the widget or dropdown divs have focus. by @gonfunko in #8731
- fix: Fix display of multiline RTL strings in bubbles on Webkit. by @gonfunko in #8733
- fix: Fix the browser tests. by @gonfunko in #8735
- fix: Actually fix the browser tests. by @gonfunko in #8736
- fix: Improve the robustness of workspace SVG tests. by @BenHenning in #8689
- fix: Fix flaky connection checker test. by @gonfunko in #8754
- fix: Fix bug that caused blocks dragged from non-primary flyouts to be misplaced. by @gonfunko in #8753
- fix: Improve menu mouse/keyboard selection interaction. by @gonfunko in #8749
- fix: Fix menu scrolling. by @gonfunko in #8765
- fix: Allow dragging blocks from the far lower right corner. by @gonfunko in #8766
- fix: Fixes #8764 by moving the event grouping calls up to dragger.ts by @RoboErikG in #8781
- fix: Fix bug that prevented editing workspace comments on Firefox. by @gonfunko in #8779
- fix: Fix bug in IF block generators. by @michaela-mm in #8780
- fix: Disallow and ignore x and y attributes for blocks in toolbox definitions. by @gonfunko in #8785
- fix: Fix a bug where selection outlines could be cut off when connecting blocks. by @gonfunko in #8789
- fix: Allow the marker's current node to be null. by @gonfunko in #8802
Cleanup โป๏ธ
Other changes
- release: v11.2.1 by @gonfunko in #8734
- Fix: Fix dropdown text color in Zelos by @clementcontet in #8741
- Fix: #8194 by using a stepped animation for the wiggle by @RoboErikG in #8743
- Revert "fix!: Remove the blocklyMenuItemHighlight CSS class and use the hover" by @gonfunko in #8800
- chore: Merge develop into rc/v12.0.0 by @gonfunko in #8798
New Contributors
- @michaela-mm made their first contribution in #8780
Full Changelog: blockly-v12.0.0-beta.1...blockly-v12.0.0-beta.2
blockly-v11.2.1
What's Changed
Bug fixes ๐
- fix: treat media files as binary while packaging them by @jfedor2 in #8706
- fix: Fix bug that preventing scrolling menu items into view. by @gonfunko in #8726
- fix: Listen for keyboard shortcuts when the widget or dropdown divs have focus. by @gonfunko in #8731
- fix: Fix the browser tests. by @gonfunko in #8735
Other changes
Full Changelog: blockly-v11.2.0...blockly-v11.2.1
blockly-v12.0.0-beta.1
What's Changed
Breaking changes ๐
New features โจ
- feat: Warn if a variable category is loaded without variable blocks. by @gonfunko in #8704
- feat: Add a generator for all fields on a block. by @gonfunko in #8667
- feat: Add a BlockSvg.getStyle() method. by @gonfunko in #8722
Bug fixes ๐
- fix: treat media files as binary while packaging them by @jfedor2 in #8706
- fix: Fix unsafe cast in Input.setVisible(). by @gonfunko in #8695
- fix: Fix serialization of the lists_split block. by @gonfunko in #8702
- fix: Paste blocks copied from a mutator into the mutator. by @gonfunko in #8719
- fix: Disallow adding comments to mutator workspaces. by @gonfunko in #8720
- fix: Reposition the trashcan's flyout in response to workspace changes. by @gonfunko in #8721
- fix: Don't create intermediate variables when renaming a procedure argument. by @gonfunko in #8723
- fix: Fix bug that prevented keyboard navigation in flyouts. by @gonfunko in #8687
- fix: Fix bug that preventing scrolling menu items into view. by @gonfunko in #8726
Cleanup โป๏ธ
- refactor: Reenable workspace resizing after reflowing flyouts. by @gonfunko in #8683
- refactor: Convert renderer typecheck methods to typeguards. by @gonfunko in #8656
Other changes
New Contributors
Full Changelog: blockly-v12.0.0-beta.0...blockly-v12.0.0-beta.1