Upgrade Blockly to v13.0.0-beta.5#11321
Draft
microbit-matt-hillsdon wants to merge 1 commit into
Draft
Conversation
Bump from 12.3.1 and drop the @blockly/keyboard-navigation plugin (now built into Blockly core). User-facing changes: - Keyboard navigation and screen-reader support are always enabled. Removed the accessible-blocks preference and its toggle UI. The heavier focus outlines for toolbox/workspace are enabled when using a meaningful keyboard navigation (previously matched setting). - Aligned pxt's cut/copy/paste with copy/cut toasts and the cut audio cue. - Variable creation focuses the new variable in the flyout (v13 behaviour); manual focus restore to the button removed. - Audio cues when keyboard navigation reaches limits and when a block is dropped on the workspace from move mode or drag. - Context menu changes were intentionally not ported from the keyboard navigation plugin. We could consider adding Cut alongside Copy/Paste, Copy/Paste are also not Blockly default. - Mac uses Cmd not Option as the unconstrained movement modifier. - Left and right arrow keys no longer wrap based on screen reader user feedback - Added an "end" position at the end of statement inputs. This can be useful for block insertion but is mainly motivated by helping screen reader users understand hierarchy in a way that's closer to text-based coding and more usable than a full tree structure. API: - Custom drag strategy collapsed from a substantial copy of Blockly's internals thin subclass due as the base is now exported. - Event handler shapes, navigator/focus manager flows, bubble interfaces and widget-div positioning all updated to match v13. - Shortcut formatting is now a tracked port of Blockly's internal helper (not on the public API). Workarounds for regressions in pxt customisations: - Preserve duplicate-shadow-on-drag (e.g. melody). Patched at the gesture and drag-strategy level. Previously this only worked because of an odd behaviour in Blockly where the shadow was briefly focused (you can actually see this in live MakeCode when clicking a block). - Snap dragged blocks back to the pointer at the snap-radius boundary (see RaspberryPiFoundation/blockly#9898). - Re-stack the connection-preview indicator over the highlight path. CSS: - Blockly v13 injects its CSS via adoptedStyleSheets, flipping the cascade. We've generally added body to selectors to address this. - The cascade change is currently under investigation to see if we can do better here in Blockly. - Related, adoptedStyleSheets requires Safari 16, last year we agreed 15, Blockly are up for a fix that's backwards compatible (will help with some iPads that still get 15.x security fixes) and micro:bit are taking a look here. Translation: - New aria labels, move-mode announcements, and screen-reader-mode toggle inherited from Blockly v13. Known regressions vs Blockly 12 + keyboard nav plugin: - Glitch when dragging affecting mouse users - RaspberryPiFoundation/blockly#9898 (Should be easy fix) - Initial block placement isn't intelligent - RaspberryPiFoundation/blockly#9878 (Blockly plan to fix) - Focused inputs not always respected for keyboard block insert - RaspberryPiFoundation/blockly#9899 (Newly raised) Follow ups will be needed for better screen reader integration and to update the keyboard controls help. Closes microsoft/pxt-microbit#6870
Contributor
Author
|
@riknoll FYI, we'll continue to test this and update it with Blockly beta releases. I'm away next week so @microbit-robert will pick up as needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft for visibility.
Demo deployment: https://blockly-v13-upgrade.review-pxt.pages.dev/#editor
Bump from 12.3.1 and drop the @blockly/keyboard-navigation plugin (now built into Blockly core).
User-facing changes:
API:
Workarounds for regressions in pxt customisations:
CSS:
Translation:
Known regressions vs Blockly 12 + keyboard nav plugin:
Follow ups will be needed for better screen reader integration and to update the keyboard controls help.
Closes microsoft/pxt-microbit#6870