8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This PR merges master back into develop now that v12 has been released.
Sorry, something went wrong.
release: Merge branch 'develop' into rc/v12.0.0
652f655
release: Update version number to 12.0.0
0c24701
Merge pull request #8232 from google/develop
b0b7d78
chore: Merge develop into v12
feat!: Add support for preserving block comment locations. (#8231)
989c91f
* feat: Add support for preserving block comment locations. * chore: format the tests.
Merge pull request #8252 from google/develop
f097fc0
chore: merge develop into v12
Merge pull request #8292 from google/develop
d355b56
chore: merge develop into rc/v12
refactor: field_checkbox dom.addClass params (#8309)
dom.addClass
f45270e
bug: Rename the blockly icon CSS classes to use camelCase (#8329) (#8335
9ba791c
)
feat: added blocklyField to field's SVG Group (#8334)
5a32c3f
fix!: Make IPathObject styling methods optional (#8332)
IPathObject
dd18edd
feat: Add a blocklyFieldText CSS class to fields' text elements (#8291)…
9684942
… (#8302) * feat!: Add a blocklyFieldText CSS class to fields' text elements (#8291) * add class instead of replace Co-authored-by: Beka Westberg <bwestberg@google.com> --------- Co-authored-by: Beka Westberg <bwestberg@google.com>
refactor: Add addClass and removeClass methods to blockSvg (#8337)
addClass
removeClass
7c22c46
* refactor: Add `addClass` and `removeClass` methods to blockSvg * fix: lint * fix: jsdoc
feat: Add a blocklyVariableField CSS class to variable fields (#8359)
blocklyVariableField
00d090e
feat: add the IVariableMap and IVariableModel interfaces. (#8369)
aecfe34
* feat: add the IVariableMap and IVariableModel interfaces. * chore: add license headers.
fix!: Rename blocklyTreeRow and blocklyToolboxCategory CSS classes (
blocklyTreeRow
blocklyToolboxCategory
ae2fea4
#8357) * fix!: #8345 rename css class This commit renames the blocklyTreeRow CSS class to blocklyToolboxCategory * Update category.ts * fix: css class conflicts Rename original blocklyToolboxCategory to blocklyToolboxCategoryContainer
feat: Add a blocklyTextBubble CSS class to the text bubble #8331 (#8333)
c553206
refactor: make VariableModel implement IVariableModel. (#8381)
bef8d83
* refactor: make VariableModel implement IVariableModel. * chore: assauge the linter.
feat: Add a blocklyShadow class (#8336)
8cca066
* feat: Add blockShadow class * formatted the file
fix!: renamed blocklyTreeIcon Css class to blocklyToolboxCategoryIcon #…
33b5371
…8347 (#8367) * renamed blocklyTreeIcon Css class to blocklyToolboxCategoryIcon * fix!: renamed blocklyTreeIcon Css class to blocklyToolboxCategoryIcon #8347 * fixed whitespace formatting
fix!: Replace Closure UI CSS classes with Blockly CSS classes (#8339)
ae80adf
* fix!: Replace Closure UI CSS classes with Blockly CSS classes * chore: remove comments about deprecated goog-x class * chore: remove deprecated goog-x classes * fix: correct coding format to pass CI checks
feat: Added blocklyTrashcanFlyout CSS class (#8372)
e298f55
* feat: Add blocklyTrashcanFlyout class * Fixed formatting issues * fix: versioning reverted to original * fix: prettier version resolved * fix: clean installation
feat: Add css classes from json block definitions (#8377)
a2a5749
* fix: override `jsonInit` method to add css classes * fix: lint * refactor: simplify logic
fix!: Renamed the blocklyToolboxContents CSS class to blocklyToolboxC…
e1753ae
…ategoryGroup (#8384)
feat: added blocklyToolboxFlyout CSS class to the flyout (#8386)
0a1524f
chore: fix package-lock
9fa4b2c
refactor: update the variable interfaces. (#8388)
32f8e24
Merge pull request #8394 from google/develop
107403b
chore: develop into V12 to pin node version
refactor: make VariableMap implement IVariableMap. (#8395)
02e64be
* refactor: make VariableMap implement IVariableMap. * chore: remove unused arrayUtils import. * chore: fix comment on variable map backing store. * chore: Added JSDoc to new VariableMap methods. * chore: Improve test descriptions.
refactor: Use IVariableModel instead of VariableModel. (#8400)
294ef74
* refactor: Use IVariableModel methods instead of directly accessing properties. * refactor: replace references to VariableModel with IVariableModel.
refactor!: Use IVariableMap instead of VariableMap (#8401)
21c0a7d
* refactor: use IVariableMap in place of VariableMap. * refactor!: move variable deletion prompting out of VariableMap. * chore: Remove unused imports.
refactor: Make INavigable extend IFocusableNode. (#9033)
a1be83b
fix: Improve robustness of IFocusableNode uses (#9031)
IFocusableNode
e7af75e
## The basics - [x] I [validated my changes](https://developers.google.com/blockly/guides/contribute/core#making_and_verifying_a_change) ## The details ### Resolves Fixes google/blockly-keyboard-experimentation#515 ### Proposed Changes This adds `canBeFocused()` checks to all the places that could currently cause problems if a node were to return `false`. ### Reason for Changes This can't introduce a problem in current Core and, in fact, most of these classes can never return `false` even through subclasses. However, this adds better robustness and fixes the underlying issue by ensuring that `getFocusableElement()` isn't called for a node that has indicated it cannot be focused. ### Test Coverage I've manually tested this through the keyboard navigation plugin. However, there are clearly additional tests that would be nice to add both for the traverser and for `WorkspaceSvg`, both likely as part of resolving #8915. ### Documentation No new documentation changes should be needed here. ### Additional Information This is fixing theoretical issues in Core, but a real issue tracked by the keyboard navigation plugin repository.
Fix: don't visit connections with the cursor. (#9030)
ece662a
chore: add node test for json with a dropdown field (#9019)
6bee1ca
fix: Fix regressions in Field. (#9011)
Field
14e1ef6
fix!: remove deprecated setEnabled and backwards event filtering (#9039)
556ee39
fix: Ensure selection stays when dragging blocks (#9034)
e34a969
## The basics - [x] I [validated my changes](https://developers.google.com/blockly/guides/contribute/core#making_and_verifying_a_change) ## The details ### Resolves Fixes #9027 ### Proposed Changes Ensure that a block being dragged is properly focused mid-drag. ### Reason for Changes Focus seems to be lost due to the block being moved to the drag layer, so re-focusing the block ensures that it remains both actively focused and selected while dragging. The regression was likely caused when block selection was moved to be fully synced based on active focus. ### Test Coverage This has been manually verified in Core's simple playground. At the time of the PR being opened, this couldn't be tested in the test environment for the experimental keyboard navigation plugin since there's a navigation connection issue there that needs to be resolved to test movement. It would be helpful to add a new test case for the underlying problem (i.e. ensuring that the block holds focus mid-drag) as part of resolving #8915. ### Documentation No new documentation should need to be added. ### Additional Information This was found during the development of google/blockly-keyboard-experimentation#511.
refactor: Remove INavigable in favor of IFocusableNode. (#9037)
ae22165
* refactor: Remove INavigable in favor of IFocusableNode. * chore: Fix JSDoc. * chore: Address review feedback.
fix: Use a unique focus ID for BlockSvg. (#9045)
2b9d06a
## The basics - [x] I [validated my changes](https://developers.google.com/blockly/guides/contribute/core#making_and_verifying_a_change) ## The details ### Resolves Fixes #9043 Fixes google/blockly-samples#2512 ### Proposed Changes This replaces using BlockSvg's own ID for focus management since that's not guaranteed to be unique across all workspaces on the page. ### Reason for Changes Both google/blockly-samples#2512 covers the user-facing issue in more detail, but from a technical perspective it's possible for blocks to share IDs across workspaces. One easy demonstration of this is the flyout: the first block created from the flyout to the main workspace will share an ID. The workspace minimap plugin just makes the underlying problem more obvious. The reason this introduces a breakage is due to the inherent ordering that `FocusManager` uses when trying to find a matching tree for a given DOM element that has received focus. These trees are iterated in the order of their registration, so it's quite possible for some cases (like main workspace vs. flyout) to resolve such that the behavior looks correct to users, vs. others (such as the workspace minimap) not behaving as expected. Guaranteeing ID uniqueness across all workspaces fixes the problem entirely. ### Test Coverage This has been manually tested in core Blockly's simple test playground and in Blockly samples' workspace minimap plugin test environment (linked against this change). See the new behavior for the minimap plugin: [Screen recording 2025-05-13 4.31.31 PM.webm](https://github.com/user-attachments/assets/d2ec3621-6e86-4932-ae85-333b0e7015e1) Note that this is a regression to v11 behavior in that the blocks in the minimap now show as selected. This has been verified as working with the latest version of the keyboard navigation plugin (tip-of-tree). Keyboard-based block operations and movement seem to work as expected. For automated testing this is expected to largely be covered by future tests added as part of resolving #8915. ### Documentation No public documentation changes should be needed, though `IFocusableNode`'s documentation has been refined to be clearer on the uniqueness property for focusable element IDs. ### Additional Information There's a separate open design question here about whether `BlockSvg`'s descendants should use the new focus ID vs. the block ID. Here is what I consider to be the trade-off analysis in this decision: | | Pros | Cons | |------------------------|-------------------------------------------------|------------------------------------------------------------------------------| | Use `BlockSvg.id` | Can use fast `WorkspaceSvg.getBlockById`. | `WorkspaceSvg.lookUpFocusableNode` now uses 2 different IDs. | | Use `BlockSvg.focusId` | Consistency in IDs use for block-related focus. | Requires more expensive block look-up in `WorkspaceSvg.lookUpFocusableNode`. |
fix: Ensure cursor syncs with more than just focused blocks (#9032)
e117980
## The basics - [x] I [validated my changes](https://developers.google.com/blockly/guides/contribute/core#making_and_verifying_a_change) ## The details ### Resolves Fixes google/blockly-keyboard-experimentation#499 ### Proposed Changes This ensures that non-blocks which hold active focus correctly update `LineCursor`'s internal state. ### Reason for Changes This is outright a correction in how `LineCursor` has worked up until now, and is now possible after several recent changes (most notably #9004). #9004 updated selection to be more explicitly generic (and based on `IFocusableNode`) which means `LineCursor` should also properly support more than just blocks when synchronizing with focus (in place of selection), particularly since lots of non-block things can be focusable. What's interesting is that this change isn't strictly necessary, even if it is a reasonable correction and improvement in the robustness of `LineCursor`. Essentially everywhere navigation is handled results in a call to `setCurNode` which correctly sets the cursor's internal state (with no specific correction from focus since only blocks were checked and we already ensure that selecting a block correctly focuses it). ### Test Coverage It would be nice to add test coverage specifically for the cursor cases, but it seems largely unnecessary since: 1. The main failure cases are test-specific (as mentioned above). 2. These flows are better left tested as part of broader accessibility testing (per #8915). This has been tested with a cursory playthrough of some basic scenarios (block movement, insertion, deletion, copy & paste, context menus, and interacting with fields). ### Documentation No new documentation should be needed here. ### Additional Information This is expected to only affect keyboard navigation plugin behaviors, particularly plugin tests. It may be worth updating `LineCursor` to completely reflect current focus state rather than holding an internal variable. This, in turn, may end up simplifying solving issues like #8793 (but not necessarily).
fix: Reenable support for tabbing between fields. (#9049)
7a7fad4
* fix: Reenable support for tabbing between fields. * refactor: Reduce code duplication.
fix: fieldDropdown.getText works in node (#9048)
523dca9
* fix: dropdown getText works in node * chore: comment
fix!: deepMerge for arrays, shortcut keycodes returned as array (#9047)
205ef6c
651767b
release: Update version number to 12.0.0-beta.6
cfa625a
fix: Fix bug when referencing HTMLElement in non-browser environments. (
4a2b743
#9050)
feat: Add support for conditional ephemeral focus. (#9051)
083329a
## The basics - [x] I [validated my changes](https://developers.google.com/blockly/guides/contribute/core#making_and_verifying_a_change) ## The details ### Resolves Needed for fixing google/blockly-samples#2514 and google/blockly-samples#2515. ### Proposed Changes Update `FieldInput` along with drop-down and widget divs to support disabling the automatic ephemeral focus functionality. ### Reason for Changes As mentioned in google/blockly-samples#2514 (comment) both google/blockly-samples#2514 and google/blockly-samples#2515 were caused by the custom fields leading to both drop-down and widget divs simultaneously taking ephemeral focus (and that's not currently allowed by `FocusManager`). This change updates both widget and drop-down divs with _optional_ parameters to conditionally disable automatic ephemeral focus so that `FieldInput` can, in turn, be customized with disabling automatic ephemeral focus for its inline editor. Being able to disable ephemeral focus for `FieldInput` allows the custom fields' own drop-down divs to take and manage ephemeral focus, instead, avoiding the duplicate scenario that led to the runtime failure. Note that the drop-down div change in this PR is completely optional, but it's added for consistency and to avoid future scenarios of breakage when trying to use both divs together (as a fix is required in Core without monkeypatching). It's worth noting that there could be a possibility for a more 'proper' fix in `FocusManager` by allowing multiple calls to `takeEphemeralFocus`, but it's unclear exactly how to solve this consistently (which is why it results in a hard failure today). The main issue is that the current focused node can change from underneath the manager (due to DOM focus changes), and the current focused element may also change. It's not clear if the first, last, or some other call to `takeEphemeralFocus` should take precedent or which node to return focus once ephemeral focus ends (in cases with multiple subsequent calls). ### Test Coverage No new tests were added, though common field cases were tested manually in core's simple playground and in the plugin-specific playgrounds (per the original regressions). The keyboard navigation plugin test environment was also verified to ensure that this didn't alter any existing behavior (it should be a no-op except for the two custom field plugins). Automated tests would be nice to add for all three classes, perhaps as part of #8915. ### Documentation The code documentation changes here should be sufficient. ### Additional Information These changes are being done directly to ease solving the above samples issues. See google/blockly-samples#2521 for the follow-up fixes to samples.
fix: Remove un-typesafe cast. (#9052)
215fad8
release: update version number to 12.0.0-beta.7 (#9053)
8c0ee9f
fix: Make clickable but non-editable fields navigable. (#9054)
ad0563d
79ec694
e5de970
release: v12.0.0
852512f
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gonfunko!
a1cbdd9
BenHenning BenHenning approved these changes
BenHenning
Successfully merging this pull request may close these issues.