Skip to content

Conversation

@gonfunko
Copy link
Contributor

This PR merges develop into the translatewiki branch in order to bring the localizable messages up to date.

This should be submitted as a MERGE COMMIT.

BenHenning and others added 30 commits January 16, 2025 14:18
…obustness

fix: Improve the robustness of workspace SVG tests.
Bumps [globals](https://github.com/sindresorhus/globals) from 15.12.0 to 15.14.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](sindresorhus/globals@v15.12.0...v15.14.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: Add methods for toggling and inspecting the readonly state of a workspace.

* refactor: Use the new readonly setters/getters in place of checking the injection options.

* fix: Fix bug that allowed dragging blocks from a flyout onto a readonly workspace.

* feat: Toggle a `blocklyReadOnly` class when readonly status is changed.

* chore: Placate the linter.

* chore: Placate the compiler.
…8757)

Bumps [@microsoft/api-documenter](https://github.com/microsoft/rushstack/tree/HEAD/apps/api-documenter) from 7.25.14 to 7.26.7.
- [Changelog](https://github.com/microsoft/rushstack/blob/main/apps/api-documenter/CHANGELOG.md)
- [Commits](https://github.com/microsoft/rushstack/commits/@microsoft/api-documenter_v7.26.7/apps/api-documenter)

---
updated-dependencies:
- dependency-name: "@microsoft/api-documenter"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…e misplaced. (#8753)

* fix: Fix bug that caused blocks dragged from non-primary flyouts to be misplaced.

* chore: Fix docstring.
* chore: Use "pointer" instead of "mouse" in menu.ts.

* fix: Only highlight menu items on hover if the pointer has moved.

* fix: Don't blur menus on pointerleave.
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.16.0 to 8.23.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.23.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Revert "fix: Fix bug that preventing scrolling menu items into view. (#8726)"

This reverts commit f166b67.

* fix: Fix menu scrolling.
* Fix #8194 by using animation steps for the wiggle

* Formatting cleanup
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.
They didn't trigger automatically after a force push.
…faces

feat: Add interfaces for focus management
…8779)

* fix: Fix bug that prevented editing workspace comments on Firefox.

* chore: Add a docstring for getTextArea().

* refactor: Use isTargetInput() instead of comparing to comment textarea.
…initions. (#8785)

* fix: Disallow and ignore x and y attributes for blocks in toolbox definitions.

* chore: Clarify comment in BlockFlyoutInflater.
* feat!: Added support for separators in menus.

* chore: Do English gooder.

* fix: Remove menu separators from the DOM during dispose.
Bumps [google-github-actions/deploy-appengine](https://github.com/google-github-actions/deploy-appengine) from 2.1.4 to 2.1.5.
- [Release notes](https://github.com/google-github-actions/deploy-appengine/releases)
- [Changelog](https://github.com/google-github-actions/deploy-appengine/blob/main/CHANGELOG.md)
- [Commits](google-github-actions/deploy-appengine@v2.1.4...v2.1.5)

---
updated-dependencies:
- dependency-name: google-github-actions/deploy-appengine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@hyperjump/json-schema](https://github.com/hyperjump-io/json-schema) from 1.9.8 to 1.11.0.
- [Commits](hyperjump-io/json-schema@v1.9.8...v1.11.0)

---
updated-dependencies:
- dependency-name: "@hyperjump/json-schema"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.2.1 to 5.2.3.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](prettier/eslint-plugin-prettier@v5.2.1...v5.2.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [glob](https://github.com/isaacs/node-glob) from 10.4.1 to 11.0.1.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](isaacs/node-glob@v10.4.1...v11.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
chore: Merge develop into rc/v12.0.0
@gonfunko gonfunko requested a review from a team as a code owner June 23, 2025 16:16
Comment on lines +16 to +37
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
// Note that pull requests are considered issues and "shared"
// actions for both features, like manipulating labels and
// milestones are provided within the issues API.
await github.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
// 2021 q3 release milestone.
// https://github.com/google/blockly/milestone/18
milestone: 18
})
await github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['type: cleanup']
})

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
/**
* RegExp that globally matches path.sep (i.e., "/" or "\").
*/
const pathSepRegExp = new RegExp(path.sep.replace(/\\/, '\\\\'), 'g');

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding High

This replaces only the first occurrence of /\/.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha hah, this is true but fortunately path.sep contains at most one occurrence of /!

RoboErikG and others added 4 commits June 23, 2025 09:28
…globals-16.2.0

chore(deps): bump globals from 16.1.0 to 16.2.0
…prettier-3.6.0

chore(deps): bump prettier from 3.3.3 to 3.6.0
## The basics

- [x] I [validated my changes](https://developers.google.com/blockly/guides/contribute/core#making_and_verifying_a_change)

## The details
### Resolves

N/A (no tracking issue)

### Proposed Changes

Introduces a GitHub actions CI workflow to run the webdriver IO tests from https://github.com/google/blockly-keyboard-experimentation as part of core Blockly's CI.

### Reason for Changes

Since development on the plugin is going to continue for many months yet, this ensures that behavioral changes in core Blockly don't inadvertently break the plugin.

Note that this shouldn't be made a blocking workflow since there may be cases where it's necessary to break the plugin before a change to the plugin itself can be introduced to then fix it (as this has happened many times in the past). However, the CI check is forced signal to both author and reviewer as to whether their change affects the plugin without having to manually check the test suite.

### Test Coverage

N/A -- Verifying that the CI workflow runs is sufficient.

### Documentation

No documentation changes are needed here.

### Additional Information

Nothing.
Bumps [mocha](https://github.com/mochajs/mocha) from 11.3.0 to 11.7.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md)
- [Commits](mochajs/mocha@v11.3.0...v11.7.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-version: 11.7.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@cpcallen
Copy link
Collaborator

Looks like this needs conflict resolution, and I'm not sure it makes sense to review it before doing that.

maribethb and others added 2 commits June 24, 2025 12:40
…9154)

* feat: make comment editor separately focusable from comment itself

* feat: improve design and add styling

* chore: fix lint

* fix: add event listeners to focus parent comment

* fix: export CommentEditor

* fix: export CommentEditor

* fix: extract comment identifier to constant
* refactor(interfaces): Use typeof ... === 'function' to test for methods

  Testing for

      'name' in object

  or

      obj.name !== undefined

  only checks for the existence of the property (and in the latter
  case that the property is not set to undefined).  That's fine if
  the interface specifies a property of indeterminate type, but in
  the usual case that the interface member is a method we can do
  one better and check to make sure the property's value is
  callable.

* refactor(interfaces): Always check obj is not null/undefined

  Since most type predicates take an argument of type any but then
  check for the existence of certain properties, explicitly check
  that the argument is not null or undefined (or check implicitly
  by calling another type predicate that does so first, which
  necessitates adding a few casts because tsc infers the type of
  the argument too narrowly).

* fix(interfaces): Add missing check to hasBubble type predicate

  This appears to have inadvertently been omitted in PR #9004.

* fix(interfaces): Fix misplaced typeof

* fix: Fix typos in JSDocs

* fix(tests): Make Mocks conform to corresponding interfaces

  Introduce a new MockFocusable, and add methods to MockIcon,
  MockBubbleIcon and MockComment, so that they fulfil the
  IFocusableNode, IIcon, IHasBubble and ICommentIcon interfaces
  respectively.

* chore(tests): Add assertions verifying mocks conform to predicates

  Add (test) runtime assertions that:

  - isFocusableNode(MockFocusable) returns true
  - isIcon(MockIcon) returns true
  - hasBubble(MockBubbleIcon) returns true
  - isCommentIcon(MockCommentIcon) returns true

  (The latter is currently failing because Blockly is undefined when
  isCommentIcon calls the MockCommentIcon's getType method.)

* fix(tests): Don't rely on Blockly being set in Mock methods

  For some reason the global Blockly binding is not visible at the
  time when isCommentIcon calls MockCommentIcon's getType method,
  and presumably this problem would apply to getBubbleSize too,
  so directly import the required items.

* refactor(tests): Make MockCommentIcon a MockBubbleIcon

  This slightly simplifies it and makes it less likely to accidentally
  stop conforming to IHasBubble.

* fix(interfaces): Fix incorrect check in isSelectable

  Fix an error which caused ISelectable instances to fail
  isSelectable() checks, one of the results of which is that
  Blockly.common.getSelected() would generally return null.

  Whoops!
@cpcallen cpcallen assigned gonfunko and unassigned cpcallen Jun 26, 2025
microbit-matt-hillsdon and others added 10 commits June 26, 2025 11:41
The order of the modifiers is not significant to Blockly but it's conventional
to say e.g. Cmd+Shift+Z. Following that order here means that UI like the
keyboard navigation shortcut dialog gets the correct order without having to
sort.
Bumps [eslint](https://github.com/eslint/eslint) from 9.26.0 to 9.30.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v9.26.0...v9.30.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.30.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 50.7.1 to 51.3.1.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](gajus/eslint-plugin-jsdoc@v50.7.1...v51.3.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-version: 51.3.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* refactor(build): Rename "package" gulp task (but not npm script) to "pack"

  This is to avoid an issue due to "package" being a reserved word
  in JavaScript, and therefore not a valid export identifier.

* refactor(build): Convert gulpfile.js from CJS to ESM.

* refactor(build): Convert scripts/gulpfiles/*.js from CJS to ESM

* fix(build): Fix eslint warning for @license tag in gulpfile.mjs

* chore(build): Remove unused imports

* fix(build): Fix incorrect import of gulp-gzip

* fix(build): Fix incorrect sourcemaps import reference
Bumps [glob](https://github.com/isaacs/node-glob) from 11.0.2 to 11.0.3.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](isaacs/node-glob@v11.0.2...v11.0.3)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 11.0.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
updated-dependencies:
- dependency-name: "@blockly/block-test"
  dependency-version: 7.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
updated-dependencies:
- dependency-name: mocha
  dependency-version: 11.7.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [gulp](https://github.com/gulpjs/gulp) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/gulpjs/gulp/releases)
- [Changelog](https://github.com/gulpjs/gulp/blob/master/CHANGELOG.md)
- [Commits](gulpjs/gulp@v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: gulp
  dependency-version: 5.0.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@BenHenning
Copy link
Collaborator

Looks like this needs conflict resolution, and I'm not sure it makes sense to review it before doing that.

I'm actually surprised about this @cpcallen @gonfunko @maribethb. Isn't it the case that we routinely merge translatewiki into develop? If so, I wouldn't expect there to be conflicts here.

@maribethb
Copy link
Contributor

No, we don't. We just copy over the versions of msg/json/* files from translatewiki into develop, not do a true merge. Excerpt from our release docs:

git switch -C translatewiki-updates develop && \
git restore --source="$UPSTREAM"/translatewiki -- msg/json/*.json

The conflicts are all in the msg/js directory, which we no longer check into the repo, as of #6475. So likely the conflicts can just be resolved by confirming that the files should in fact be deleted as they are in develop.

BenHenning and others added 2 commits July 1, 2025 14:07
## The basics

- [x] I [validated my changes](https://developers.google.com/blockly/guides/contribute/core#making_and_verifying_a_change)

## The details
### Resolves

Fixes #9155

### Proposed Changes

In cases when an ID is missing for an element passed to `FocusableTreeTraverser.findFocusableNodeFor()`, always return `null`.

Additionally, the new short-circuit logic exposed that `Toolbox` actually wasn't being set up correctly (that is, its root element was not being configured with a valid ID). This has been fixed.

### Reason for Changes

These are cases when a valid node should never be matched (and it's technically possible to incorrectly match if an `IFocusableNode` is set up incorrectly and is providing a focusable element with an unset ID). This avoids the extra computation time of potentially calling deep into `WorkspaceSvg` and exploring all possible nodes for an ID that should never match.

Note that there is a weird quirk with `null` IDs actually being the string `"null"`. This is a side effect of how `setAttribute` and attributes in general work with HTML elements. There's nothing really that can be done here, so it's now considered invalid to also have an ID of string `"null"` just to ensure the `null` case is properly short-circuited.

Finally, the issue with toolbox being configured incorrectly was discovered with the introducing of a new hard failure in `FocusManager.registerTree()` when a tree with an invalid root element is registered. From testing there are no other such trees that need to be updated.

A new warning was also added if `focusNode()` is used on a node with an element that has an invalid ID. This isn't a hard failure to follow the convention of other invalid `focusNode()` situations. It's much more fragile for `focusNode()` to throw than `registerTree()` since the former generally happens much earlier in a page lifecycle, and is less prone to dynamic behaviors.

### Test Coverage

New tests were added to validate the various empty ID cases for `FocusableTreeTraverser.findFocusableNodeFor()`, and to validate the new error check for `FocusManager.registerTree()`.

### Documentation

No new documentation should be needed.

### Additional Information

Nothing to add.
…9182)

* feat: Enhance the Rect API.

* feat: Add support for sorting IBoundedElements in general.

* fix: Improve typings of getTopElement/Comment methods.

* feat: Add classes to represent comment icons.

* refactor: Use comment icons in comment view.

* feat: Update navigation policies to support workspace comments.

* feat: Make the navigator and workspace handle workspace comments.

* feat: Visit workspace comments when navigating with the up/down arrows.

* chore: Make the linter happy.

* chore: Rename comment icons to bar buttons.

* refactor: Rename CommentIcons to CommentBarButtons.

* chore: Improve docstrings.

* chore: Clarify unit type.

* refactor: Remove workspace argument from `navigateStacks()`.

* fix: Fix errant find and replace in CSS.

* fix: Fix issue that could cause delete button to become misaligned.
@gonfunko gonfunko closed this Jul 1, 2025
@BenHenning BenHenning reopened this Jul 1, 2025
@BenHenning BenHenning closed this Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.