Commit Graph

23 Commits

Author SHA1 Message Date
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) 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 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 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