Commit Graph

9337 Commits

Author SHA1 Message Date
Michael Harvey 3fb96e4ecd feat: aria live region for announcements (#9653)
* feat: aria live region for announcements

* fix: code review and add tests

* fix: better suite name

* chore: remove unused function

* fix: code review changes

* chore: add back ability to remove role
2026-04-01 10:23:45 -04:00
Aaron Dodson 5d304df504 chore: Remove the keyboard-navigation plugin from the advanced playground (#9670) 2026-03-31 12:15:11 -07:00
Michael Harvey 1ad060819e feat: Stop on workspace during constrained move (#9649) 2026-03-27 09:41:39 -04:00
Aaron Dodson 6059d1f5fc feat: Add keyboard shortcut for disconnecting the selected block (#9650) 2026-03-24 08:13:04 -07:00
Mike Harvey 8e6798a094 fix: visit all connection candidates in move mode (#9641)
* fix: visit all connection candidates in move mode

* fix: remove unused parameters from doc

* fix: correct findTraversalCandidate doc

* chore: simplify instance variables

* fix: remove unreachable return
2026-03-20 11:24:58 -04:00
Aaron Dodson c862b5ef0e feat: Beep when attempting constrained move on top-level block (#9635)
* feat: Beep when attempting constrained move on top-level block

* chore: Remove errant `only`

* refactor: Add and use `playErrorBeep()`
2026-03-18 12:45:01 -07:00
Aaron Dodson 83c8caca97 chore: Make JSDom a peer/dev dependency on NodeJS only (#9579)
* chore: Make JSDom a peer/dev dependency on NodeJS only

* chore: Bump closure compiler version
2026-03-17 10:22:27 -07:00
Mike Harvey 3044298f99 feat: Move mode for stacks of blocks (#9630)
* feat: Move mode for stacks of blocks

* lint; add tests

* push to remote in order to switch devices (tests still failing)

* fix tests

* code review test updates
2026-03-16 12:19:59 -04:00
Aaron Dodson 25968ffbdf feat: Add keyboard shortcut to focus the workspace (#9615)
* feat: Add keyboard shortcut to focus the workspace

* test: Added tests for keyboard shortcut to focus workspace

* fix: Disable the focus workspace shortcut while dragging
2026-03-09 13:28:34 -07:00
Aaron Dodson 09d19d8f7b feat!: Allow using Blockly in web components/shadow DOM (#9611)
* feat!: Allow using Blockly in web components/shadow DOM

* test: Fix tests

* chore: Add a playground to exercise web component support

* fix: Remove JSDoc argument

* chore: Format playground

* fix: Hopefully fix tests in CI

* fix: Improve test performance

* fix: Fix test failure

* fix: Allow changing the theme
2026-03-06 12:53:18 -08:00
Aaron Dodson a5a18d3894 refactor!: Move responsibility for block creation out of flyouts (#9610)
* refactor!: Move responsibility for block creation out of flyouts

* chore: Clarify naming and documentation

* fix: Make test less convoluted

* refactor: Use serialization instead of zero-length drag to handle block clicks

* fix: Fix undoing when dragging a block from the flyout

* refactor: Make `getTargetBlock()` always return a value
2026-03-05 12:29:39 -08:00
Aaron Dodson e65ac7f7e2 feat: Add a method to play beep tones (#9612) 2026-03-05 11:04:12 -08:00
Aaron Dodson da1db45dd2 feat!: Allow moving blocks, comments and bubbles using the keyboard (#9593)
* refactor!: Update dragging APIs.

* fix: Fix bug that caused drags to always result in deletion

* refactor: Clean up block drag handling with new API

* chore: Format files

* feat: Add an `isBoundedElement` type predicate

* feat: Make `Bubble` implement `IBoundedElement`

* fix: Fix jumping/scrolling when moving blocks

* feat: Add a `KeyboardMover`

* feat: Update the `BlockDragStrategy` to support constrained movement

* feat: Register keyboard shortcuts to drive movement

* feat: Display a move indicator on items that are being moved

* fix: Reenable move hints

* fix: Fix bugs that caused elements to be mispositioned by keyboard moves at non-default zoom levels

* fix: Fix a bug that caused certain connections to be visited out of order

* fix: Fix a bug that caused blocks to become disconnected during constrained moves

* test: Add tests for keyboard-driven movement

* chore: Add exports

* chore: Run formatter

* chore: Make the linter happy

* chore: Update closure compiler

* fix: Fix test suite on non-macOS

* fix: Don't scroll in response to arrow keys while moving items

* fix: Fix positioning of move indicator in RTL

* refactor: Clarify return types of drag-start related methods

* refactor: Make the `KeyboardMover` a singleton

* fix: Fix import path

* refactor: Remove `WorkspaceSvg.keyboardMoveInProgress`

* fix: Fix tests

* chore: Remove unused import

* chore: Clean up comments and names

* refactor: Make `IDraggable` extend `IBoundedElement` and `ISelectable`

* chore: Rename test blocks file for move mode

* refactor: Make block connection offset a constant

* refactor: Export `KeyboardMover` class with a static instance

* fix: Use Command and Control as modifiers for unconstrained move mode

* fix: Fix test failures in CI

* feat: Support allowlisting keyboard shortcuts for mid-move use
2026-03-03 11:51:07 -08:00
Aaron Dodson 81c2ed6ed1 chore(deps): Update Closure compiler to the latest version (#9607) 2026-03-02 12:28:19 -08:00
Aaron Dodson 43dfe2e61f Merge pull request #9606 from RaspberryPiFoundation/main
chore: Merge `main` into `v13`
2026-03-02 12:11:51 -08:00
Aaron Dodson a16580ae26 feat: Add a keyboard shortcut for displaying the contextual menu (#9602)
* feat: Add support for getting the contextual menu

* feat: Add a keyboard shortcut for opening the contextual menu

* test: Add tests for `ContextMenu.getMenu()`.

* test: Add tests for context menu keyboard shortcut

* fix: Fix tests when not run on their own

* chore: Add type annotation
2026-02-26 13:39:56 -08:00
Aaron Dodson 26d035177c chore!: Update supported Node versions (#9600)
* chore!: Update supported Node versions

* fix: Remove references to not-yet-available Node 26

* chore: Revert formatting change
2026-02-26 13:36:33 -08:00
Aaron Dodson 93c29dbe84 Merge pull request #9592 from RaspberryPiFoundation/rollup
chore: Merge `main` into `v13`
2026-02-26 13:25:27 -08:00
Aaron Dodson 589e05d4d1 fix!: Normalize Zelos connection indicators (#9565)
* fix: Normalize Zelos connection indicators

* feat: Add `IPathObject.updateReplacing()`
2026-02-26 11:27:33 -08:00
Aaron Dodson 3d78491dd9 fix: Focus nearest neighbor when deleting a focused block (#9599)
* fix: Focus the nearest neighbor on block deletion

* test: Add tests

* fix: Use `strictEqual`

* chore: Reduce the number of test blocks

* fix: Explicitly verify that dying blocks are not focused

* fix: Fix exception when disposing of a workspace with a focused block

* chore: Run formatter
2026-02-26 10:45:35 -08:00
Aaron Dodson 3b14950a36 feat: Add dynamic keycode for primary modifier key (#9571)
* feat: Add dynamic keycode for primary modifier key

* fix: Don't duplicate constants.
2026-02-25 08:51:43 -08:00
Aaron Dodson a5bdaf8b28 release: Bump version to 12.4.1 (#9595) 2026-02-18 12:39:21 -05:00
Aaron Dodson 39c4b589ea release: Bump version number to 12.4.0 (#9594) blockly-v12.4.1 2026-02-18 12:24:17 -05:00
Aaron Dodson 5fa493bac1 Merge branch 'main' into v13 2026-02-17 10:44:25 -08:00
Aaron Dodson 10079df705 fix: Fix running browser tests (#9587)
* fix: Fix running browser tests

* chore: Run lint
2026-02-13 12:33:42 -08:00
Aaron Dodson 2ada188f88 chore: Fix typo in getRelativeToSurfaceXY() (#9586) 2026-02-12 10:22:13 -08:00
Aaron Dodson 87afe3e688 fix: Improve flyout behavior (#9576)
* fix: Don't suppress and re-fire events when dragging blocks from the flyout

* fix: Fix bug that could cause blocks to get bumped when dragging from the flyout

* fix: Fix bug that made it more difficult to drag blocks from scrollable flyouts

* chore: Run formatter

* refactor: Clean up `createBlock`

* fix: Hide chaff at the end of block creation
2026-02-06 08:25:13 -08:00
Aaron Dodson 3acdf5e536 fix: Improve zoom animations (#9584) 2026-02-06 06:45:23 -08:00
Aaron Dodson 4657199ba6 feat: Add support for displaying contextual menus on icons (#9581)
* feat: Add support for displaying contextual menus on icons

* test: Add tests for contextual menus on icons

* fix: Designate `Icon` as implementing `IContextMenu`

* fix: Don't write Typescript in a JS file
2026-01-28 08:48:56 +00:00
Aaron Dodson 65bc2b5f18 refactor: Use IContextMenu to dispatch right clicks (#9580) 2026-01-27 08:55:04 +00:00
Aaron Dodson ca16c85395 fix: Fix bug that caused flyout buttons to retain their active appearance on mobile (#9582) 2026-01-27 08:54:13 +00:00
Aaron Dodson 028363edd0 Merge pull request #9583 from RaspberryPiFoundation/get-gesture
feat: Allow calling `WorkspaceSvg.getGesture()` without passing an event
2026-01-27 00:53:47 -08:00
Aaron Dodson 2ee18d4d6f feat: Allow calling WorkspaceSvg.getGesture() without passing an event 2026-01-26 10:08:53 +00:00
Maribeth Moffatt 2debc4b4e9 chore: update commitlint dependency location (#9578) 2026-01-21 13:19:45 -05:00
Aaron Dodson 1cbf1b3703 Merge pull request #9577 from RaspberryPiFoundation/monorepo13
chore: Merge `main` into `v13` post-monorepo
2026-01-21 10:07:47 -08:00
Aaron Dodson 9e04dedb89 Merge branch 'main' into monorepo13 2026-01-20 15:48:27 -08:00
Maribeth Moffatt 6bdfac5493 chore: set up blockly to be a monorepo (#9575)
* chore(monorepo): move all blockly files to packages/blockly

* chore(monorepo): add root package.json and update gitignores

* chore(monorepo): update scripts and github workflows

* chore(monorepo): only try the native release for closure compiler

chore: add debug info to build script

chore: update google-closure-compiler

chore: remove debug info
2026-01-20 16:07:02 -05:00
Aaron Dodson c2cb695a8f fix: Annotate potentially blocking event listeners with passivity (#9555)
* fix: Annotate potentially blocking event listeners with passivity

* fix: Improve typings for `options` arg to `bind()`/`conditionalBind()`
2026-01-20 11:20:12 -08:00
Aaron Dodson 4c79ea186f refactor!: Deprecate Block.getVars() (#9574)
* refactor!: Deprecate `Block.getVars()`

* fix: Fix import path

* fix: Simplify test assertions
2026-01-20 11:19:50 -08:00
Aaron Dodson e4b2f0a746 fix: Make MenuItem methods toggle classes immediately (#9570)
* fix: Make `MenuItem` methods toggle classes immediately

* chore: Add docstring

* fix: Clarify name of `toggleHasCheckbox()`

* fix: Ensure menu items are enabled before highlighting them
2026-01-20 11:19:35 -08:00
Aaron Dodson 7411675a5e fix: Remove references to deprecated variable-related methods (#9572) 2026-01-20 08:16:34 -08:00
Aaron Dodson 2678f5845f fix: Use SVG icon assets (#9569) 2026-01-20 08:15:01 -08:00
Aaron Dodson 8e9b95f2fc fix: Add class to shadow blocks in Geras (#9564)
* fix: Add class to shadow blocks in Geras

* chore: Remove errant logging
2026-01-20 08:14:44 -08:00
Aaron Dodson 01dc838ebb chore(deps): Bump rimraf to v6 (#9557) 2026-01-20 08:14:02 -08:00
Aaron Dodson 43af9ab704 feat!: Use box-sizing: border-box by default (#9556) 2026-01-20 08:13:42 -08:00
Aaron Dodson eb4288219e fix: Fix bug that prevented redoing adding empty block comments (#9568)
* fix: Fix bug that prevented redoing adding empty block comments

* test: Add tests for undoing/redoing adding comments

* test: Add tests for un/redoing adding non-empty comments
2026-01-13 14:52:19 -08:00
Aaron Dodson 43ea4161c0 fix: Don't select shadow blocks on click (#9538)
* fix: Don't select shadow blocks on click

* test: Verify that clicked shadow blocks do not become selected

* chore: Run formatter
2026-01-13 14:23:08 -08:00
joey a4d97c2f18 fix: collapsed warning propagation across siblings (#9566) (#9567) 2026-01-13 08:26:45 -08:00
Aaron Dodson c79273a351 fix: Modernize audio playback (#9560)
* fix: Modernize audio playback

* fix: Fix loading on headless/Node
2026-01-13 08:05:51 -08:00
Aaron Dodson 52d935c815 fix: Fix bug that prevented deleting a variable referenced by two connected blocks (#9563)
* fix: Fix bug that prevented deleting a variable referenced by two connected blocks

* fix: Remove inadvertent .only
2026-01-12 15:57:00 -08:00