Commit Graph

193 Commits

Author SHA1 Message Date
Ben Henning
3ae422a566 feat: Add interfaces for focus management.
Introduces the necessary base interfaces for representing different
focusable contexts within Blockly. The actual logic for utilizing and
implementing these interfaces will come in later PRs.
2025-02-19 23:03:21 +00:00
Aaron Dodson
e6e57ddc01 fix: Fix bug that caused blocks dragged from non-primary flyouts to be misplaced. (#8753)
* fix: Fix bug that caused blocks dragged from non-primary flyouts to be misplaced.

* chore: Fix docstring.
2025-02-04 15:23:03 -08:00
Aaron Dodson
75efba92e3 fix: Fix bug that prevented keyboard navigation in flyouts. (#8687)
* fix: Fix bug that prevented keyboard navigation in flyouts.

* refactor: Add an `isFocusable()` method to FlyoutItem.
2025-01-09 14:31:51 -08:00
Aaron Dodson
eeef2edf34 chore!: Fix warnings when generating docs. (#8660) 2025-01-06 10:53:45 -08:00
Aaron Dodson
389dd1a1cb chore: Post-merge fixits. 2024-12-04 12:15:19 -08:00
Aaron Dodson
9fcd5a3037 release: Merge branch 'rc/v11.2.0' into rc/v12.0.0 2024-12-04 12:06:12 -08:00
Aaron Dodson
5870c66cf0 chore: Migrate ESLint configuration file to new flat format. (#8675)
* chore: rename .eslintrc.js to eslint.config.js

* chore: Rename eslint.config.js to eslint.config.mjs.

* refactor: Migrate ESLint config to new flat format.

* chore: Remove old per-directory and global ignore ESLint config files.

* fix: Allowlist JSDoc tag aliases.

* fix: Don't require @license in tests/*.

* fix: Add NodeJS globals to several files that run under Node.

* chore: Remove now-unneeded ESLint directives in core.

* chore: Remove invalid/unneeded ESLint directives.

* fix: Fix invalid use of `await` outside of an `async` function.

* fix: Improve screenshot error message.

* fix: Update ESLint config file to not warn on existing violations.

* chore: Remove suppressions of rules that weren't triggering.

* chore: Fix package-lock.json.
2024-12-03 12:40:48 -08:00
Aaron Dodson
af5905a3e6 refactor!: Add setSelectedItem() to IToolbox. (#8650) 2024-11-12 11:45:20 -08:00
Aaron Dodson
6ec1bc5ba5 feat: Add the IFlyoutInflater interface. (#8581)
* feat: Add the IFlyoutInflater interface.

* fix: Add a return type for IFlyoutInflater.disposeElement().

* refactor: Add the gapForElement method.
2024-09-25 10:23:25 -07:00
Christopher Allen
ce22f42868 chore: Organise imports (#8527)
* chore(deps): Add pretter-plugin-organize-imports

* chore: Remove insignificant blank lines in import sections

  Since prettier-plugin-organize-imports sorts imports within
  sections separated by blank lines, but preserves the section
  divisions, remove any blank lines that are not dividing imports
  into meaningful sections.

  Do not remove blank lines separating side-effect-only imports
  from main imports.

* chore: Remove unneded eslint-disable directives

* chore: Organise imports
2024-08-15 03:16:14 +01:00
dependabot[bot]
f57ef73aaf chore(deps): bump @typescript-eslint/eslint-plugin from 7.17.0 to 8.0.1 (#8479)
* chore(deps): bump @typescript-eslint/eslint-plugin from 7.17.0 to 8.0.1

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.17.0 to 8.0.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.0.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: lint plugin versions

* chore: fix linting

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Beka Westberg <bwestberg@google.com>
2024-08-14 09:10:34 -07:00
Aaron Dodson
294ef74d1b refactor: Use IVariableModel instead of VariableModel. (#8400)
* refactor: Use IVariableModel methods instead of directly accessing properties.

* refactor: replace references to VariableModel with IVariableModel.
2024-07-19 14:58:04 -07:00
Aaron Dodson
32f8e24337 refactor: update the variable interfaces. (#8388) 2024-07-18 11:01:22 -07:00
Aaron Dodson
aecfe34c38 feat: add the IVariableMap and IVariableModel interfaces. (#8369)
* feat: add the IVariableMap and IVariableModel interfaces.

* chore: add license headers.
2024-07-15 15:29:19 -07:00
Aaron Dodson
989c91f626 feat!: Add support for preserving block comment locations. (#8231)
* feat: Add support for preserving block comment locations.

* chore: format the tests.
2024-06-27 11:11:45 -07:00
Maribeth Moffatt
0255c580f7 Merge branch 'develop' into merge-v11 2024-05-13 11:20:39 -07:00
Maribeth Bottorff
54eeb85d89 fix!: add getContents to IFlyout (#8064) 2024-05-08 11:44:00 -07:00
Beka Westberg
7277a2350f chore: delete old dragging infrastructure (#7995) 2024-04-05 09:13:02 -07:00
Beka Westberg
ed403d0b77 feat!: change gestures to look at selected when dragging (#7991)
* feat: change gestures to look at selected when dragging

* chore: fix tests

* chore: format

* chore: PR comments
2024-04-04 08:52:43 -07:00
Beka Westberg
2fa6f5b954 fix: comment icon interface re serialization (#7964)
* fix: comment icon interface re serialization

* chore: fix test
2024-04-01 14:34:48 -07:00
Beka Westberg
abfbbbc299 fix!: various drag-adjacent interfaces (#7975)
* fix: ISelectable and IDeletable interfaces

* fix: switch everything over to use new draggable interface

* fix: exports
2024-03-29 21:00:56 +00:00
Beka Westberg
59f589c32a feat!: migrate bubble dragging to use new API (#7974) 2024-03-29 11:02:47 -07:00
Beka Westberg
da79a120f2 fix: remove parameter from wouldDelete (#7968) 2024-03-28 15:39:48 -07:00
Beka Westberg
6fe080bc6e fix: draggable interface and concrete dragger (#7967)
* fix: interface to match design

* fix: dragger implementation

* fix: rename moveToStart to revertDrag

* fixup
2024-03-28 15:11:30 -07:00
Christopher Allen
11c219c537 feat(dragging): Create (new) IDragger and IDraggable interfaces (#7953)
* chore(dragging): Rename core/interfaces/i_draggable.ts

  Rename core/interfaces/i_draggable.ts to
  core/interfaces/i_draggable.old.ts to make room for new
  IDraggable.  Do not rename actual interface as it's not yet
  clear that it will be necessary for both to coexist as
  imports in the same file.


* feat(dragging): Introduce new IDraggable interface

* feat(dragging): Introduce new IDragger interface

---------

Co-authored-by: Beka Westberg <bwestberg@google.com>
2024-03-22 16:21:14 +00:00
Beka Westberg
8821c83cc9 feat: allow overriding comment icons (#7937)
* feat: add comment icon interface

* feat: have blocks construct comment icons from registry

* chore: add tests for setCommentText

* fix: typeguard
2024-03-15 18:20:08 +00:00
Beka Westberg
b2b12f42fd merge develop into rc/v11.0.0 2024-02-02 22:14:46 +00:00
Beka Westberg
461dfac05a feat: connection highlighting in geras and thrasos (#7698)
* chore: move connection highlighting into the geras renderer

* chore: remove IConnectionHighlighter interface

* chore: format

* chore: fixup

* chore: format

* fix: PR comments
2024-02-02 11:55:14 -08:00
Beka Westberg
2c95c4202c feat: connection highlighter interface (#7638)
* feat: add connection highlighter interface

* fix: remove unnecessary method from the path object interface
2024-02-02 11:55:14 -08:00
Beka Westberg
dc9aa1befb feat: add connection previewer interface (#7637)
* feat: add connection previewer interface

* chore: PR comments
2024-02-02 11:55:14 -08:00
Beka Westberg
b1ef6ae601 feat!: modify icons to use the rendering queue (#7743) 2024-01-23 08:48:08 -08:00
Beka Westberg
0ad0adfb75 feat!: add serialization hooks to procedure models (#7740)
* feat!: add serialization hooks to procedure models

* chore: fix tests

* chore: remove internal functions

* fix: add state interfaces back
2024-01-23 08:48:08 -08:00
Maribeth Bottorff
a3053955d3 feat: make fields and icons optionally clickable in flyouts (#7672)
* feat: add ability to click fields in flyouts

* feat: control if icons are clickable in flyouts

* fix: make default icons not clickable in flyout

* fix: use booleans like a real programmer
2023-12-06 19:02:45 +00:00
Beka Westberg
02cd1c6a1b fix: blocks being dragged behind toolbox (#7619)
* fix: add layer manager to fix dragging

* chore: fix block animations

* chore: add tests

* chore: format
2023-11-08 15:25:45 -08:00
Christopher Allen
b0a7c004a9 refactor(build): Delete Closure Library (#7415)
* fix(build): Restore erroneously-deleted filter function

  This was deleted in PR #7406 as it was mainly being used to
  filter core/ vs. test/mocha/ deps into separate deps files -
  but it turns out also to be used for filtering error
  messages too.  Oops.

* refactor(tests): Migrate advanced compilation test to ES Modules

* refactor(build): Migrate main.js to TypeScript

  This turns out to be pretty straight forward, even if it would
  cause crashing if one actually tried to import this module
  instead of just feeding it to Closure Compiler.

* chore(build): Remove goog.declareModuleId calls

  Replace goog.declareModuleId calls with a comment recording the
  former module ID for posterity (or at least until we decide
  how to reformat the renamings file.

* chore(tests): Delete closure/goog/*

  For the moment we still need something to serve as base.js for
  the benefit of closure-make-deps, so we keep a vestigial
  base.js around, containing only the @provideGoog declaration.

* refactor(build): Remove vestigial base.js

  By changing slightly the command line arguments to
  closure-make-deps and closure-calculate-chunks the need to have
  any base.js is eliminated.

* chore: Typo fix for PR #7415
2023-08-31 00:24:47 +01:00
Beka Westberg
001d9ff2c9 feat: make ICopyable generic and update clipboard APIs (#7348)
* chore: rename module-local variables to not conflict

* feat: make ICopyable generic and update clipboard APIs

* chore: switch over more things to use generic ICopyables

* chore: fix shortcut items using copy paste

* chore: add test for interface between clipboard and pasters

* chore: export isCopyable

* chore: format

* chore: fixup PR comments

* chore: add deprecation tags
2023-08-03 15:33:58 -07:00
Beka Westberg
ce1678e8a7 fix: refactor CopyData interface to have the correct structure (#7344)
* chore: rename CopyData to ICopyData

* fix: ICopyable data structures

* fix: switch clipboard over to use new copy data interfaces

* chore: rename saveInfo to somthing more descriptive
2023-08-01 11:51:21 -07:00
Beka Westberg
68a8a5ff19 feat: add basic pasters (#7331)
* feat: implement basic IPaster interface

* feat: add pasters for blocks and workspace comments
2023-07-31 09:22:24 -07:00
dependabot[bot]
2546b01d70 chore(deps): Bump prettier from 2.8.8 to 3.0.0 (#7322)
* chore(deps): Bump prettier from 2.8.8 to 3.0.0

Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: Reformat using Prettier v3.0 defaults

The main change is to add trailing commas to the last line of
block-formatted function calls.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Christopher Allen <cpcallen+git@google.com>
2023-07-25 14:56:10 +00:00
Beka Westberg
0cfd388a5d feat: add types for accessing icons. (#7132)
* feat: add types for accessing icons.

* chore: PR comments
2023-06-13 14:39:36 -07:00
Beka Westberg
50d9474db5 fix!: refactor comment icon (#7128)
* fix: add basic comment icon

* fix: add using comment icon

* chore: delete old comment icon

* chore: add docs to the comment icon

* chore: move Comment to icons.CommentIcon

* chore: mode properties to module level

* chore: properly override and call super

* chore: remove .comment and .commentIcon_

* chore: cleanup test

* chore: deprecate getCommentIcon and getCommentText

* chore: change imports to import type

* chore: refactor code for paren peace

* chore: fix lint and make it error

* chore: remove change to block JS file

* chore: fix css

* chore: add renamings

* chore: format
2023-06-02 09:53:05 -07:00
Beka Westberg
42b8c6e3ab fix: return annotations (#7118)
* chore: remove suppress annotations

* chore: remove fileoverview annotation

* chore: remove other unused annotations

* chore: change return to returns

* chore: enable tag linting
2023-05-24 13:01:33 -07:00
Beka Westberg
6e3d052100 fix: collapsing blocks with children with icons (#7111)
* fix: collapsing blocks with icons

* chore: add tests for hiding icons of collapsed children
2023-05-22 13:53:34 -07:00
Beka Westberg
4dc2869778 fix: work on calling icon hooks (#7100)
* fix: work on calling icon hooks

* chore: PR comments

* chore: format
2023-05-19 15:36:44 -07:00
Beka Westberg
794c045691 feat: bubble ownership (#7071)
* chore: rename bubble to old bubble

* chore: work on new bubble class

* chore: basic bubble implementation

* chore: add positioning code

* chore: add positioning code

* chore: more layouting code

* chore: implement IBubble thingies in new bubble

* chore: add docs

* chore: PR comments

* chore: fixup positioning bugs

* chore: fix lint

* chore: change height and width to get methods
2023-05-12 16:28:09 +00:00
Beka Westberg
455c1957b8 fix!: re-remove block and workspace drag surfaces (#7070)
* refactor: Remove BlockDragSurface.

* refactor: Remove WorkspaceDragSurfaceSvg.

* chore: Remove drag surface-related CSS.

* chore: Removed unused variable in block_dragger.ts.

* chore: Remove references to drag surfaces in comments.

* refactor: Only track icons with visible bubbles for position updates during a drag.

* fix: Remove rendundant condition.

* chore: fixup parameter from rebase

---------

Co-authored-by: Aaron Dodson <adodson@google.com>
2023-05-11 16:51:46 -07:00
Maribeth Bottorff
88ff901a72 chore: use prettier instead of clang-format (#7014)
* chore: add and configure prettier

* chore: remove clang-format

* chore: remove clang-format config

* chore: lint additional ts files

* chore: fix lint errors in blocks

* chore: add prettier-ignore where needed

* chore: ignore js blocks when formatting

* chore: fix playground html syntax

* chore: fix yaml spacing from merge

* chore: convert text blocks to use arrow functions

* chore: format everything with prettier

* chore: fix lint unused imports in blocks
2023-05-10 16:01:39 -07:00
Beka Westberg
07db0c27d1 feat: add IIcon interface, and related interfaces (#7054)
* feat: add IIcon interface

* feat: add ISerializable interface

* feat: add IHasBubble interface

* feat: add type guards for icon interfaces

* chore: PR comments
2023-05-09 10:13:44 -07:00
Neil Fraser
64aa3e7df4 feat: Add 'reason' field to move event (#6996)
* feat: Add 'reason' field to move event

There are many types of move.  This addition allows one to detect what the reason for each move is.

* Clang formatting.

And unsaved editor tabs.

* Change reason string to array.
2023-04-26 00:22:10 +02:00
Beka Westberg
ed531ec313 chore: remove all namespace comments (#6903)
* chore: remove all namespace comments

* chore: fix lint
2023-03-20 09:43:58 -07:00