Skip to content

Conversation

@gonfunko
Copy link
Contributor

The basics

The details

This PR merges the rc/v12.0.0 branch into master in preparation for releasing new versions of all samples updated for compatibility with Blockly v12.

gonfunko and others added 30 commits January 31, 2025 09:02
* refactor: Update ContinuousFlyout for compatibility with new flyout API.

* chore: Rename ContinuousFlyout.js to ContinuousFlyout.ts.

* chore: Rename ContinuousToolbox.js to ContinuousToolbox.ts.

* chore: Rename ContinuousMetricsFlyout.js to ContinuousMetricsFlyout.ts.

* chore: Rename ContinuousCategory.js to ContinuousCategory.ts.

* chore: Rename ContinuousMetrics.js to ContinuousMetrics.ts.

* chore: Rename index.js to index.ts.

* refactor: Convert ContinuousToolbox to Typescript

* chore: Name RecyclableBlockFlyoutInflater.ts consistently with other files.

* refactor: Add and use a function for registering the continuous toolbox.

* chore: Improve docs.

* feat: Add support for autoclosing continuous toolboxes.

* fix: Fix bug when making configuration changes in the playground.

* refactor: Update visibility on RecyclableBlockFlyoutInflater.

* fix: Use the recycleEligibilityChecker callback if set.

* refactor: Make converting toolbox items to flyout items more extensible.

* chore: Remove debugging.

* fix: Debounce flyout refreshes.

* chore: Remove unused import.

* chore: Fix TSDoc args.

* chore: Add TSDoc for registration function.

* refactor: Clean up implementation of recordScrollPositions.

* chore: Fix TSDoc.

* chore: Remove unneeded underscores in symbol names.

* chore: Suppress unavoidable lint errors.

* fix: Fix alignment when jumping to a category.

* fix: Fix injection options and documentation.

* chore: Fix typo.

* refactor: Make the ContinuousFlyoutMetrics class and file name consistent.

* fix: Update flyout contents in response to procedure mutations.

* refactor: Make the RecyclableBlockFlyoutInflater inert for non-continuous flyouts.

* fix: Fix alignment of toolbox labels.

* chore: Update to use Blockly v12 beta.

* chore: Update plugins for compatibility with Blockly v12.

* fix: Fix tests for v12 compatibility.

* fix: Fix bug that could cause scroll jank when interrupting an animated scroll.

* chore: Revert errant test change.

* refactor: Update continuous-toolbox for latest flyout API changes.

* chore: Update Blockly dependency to 12.0.0-beta.1.

* chore: Clarify comments.

* chore: Make guard clauses single-line.

* refactor: Improve typings for getViewMetrics().

* fix: Fix missing return.

* chore: Add comment clarifying FlyoutButton weirdness.

* chore: Improve formatting.

* refactor: Use direct field access instead of pass-through setters.

* fix: Check for modern mutations when determining block recyclability.

* chore: Add comment clarifying flyout positioning checks.

* fix: Remove explicit public visibility annotations.

* fix: Don't recycle blocks with any mutation-related methods.

* chore: Add some information about block recycling to the README.

* chore: Improve continuous toolbox README.
…#2485)

* fix: Fix bugs when scrolling between categories.

* feat: Readd `getCategoryScrollPosition`.

* chore: Placate the linter.

* chore: Note units in docstring.
* feat!: Improve accessibility of the grid field.

* chore: Fix lint problems.

* chore: Clarify comments.

* refactor: Limit imports.

* refactor: Include `field` in CSS class names.

* refactor: Move grid item population into its own function.

* refactor: Use null instead of undefined for selection callback.
This depends on things that no longer exist in
blockly@v12.0.0-beta.4, like BasicCursor and Cursor, and also
on other things that will cease to exist before 12.0.0, like
ASTNode.

We need to update the samples repository to be able to test
plugins with v12, and this plugin is soon to be replaced by
the new plugin being developed in
google/blockly-keyboard-experimentation, so the most expedient
course of action is just to delete this one to allow upgrading
this repo's blockly devDependency.

BREAKING CHANGE:

Removes the keyboard-experimentation plugin, obviously.
…4` (#2504)

* fix: Fix clean:node script

This was inadvertently broken by a mistranscription in PR #2453.

* chore(deps): Update blockly to v12.0.0-beta.4

* fix(FieldColour): Fix type of FieldColour.prototype.isFullBlockField

Method on superclass became public in v12.0.0.

* fix(FieldMultilineInput): Use string literal instead of Field.NBSP

Workaround for removal of that constant in RaspberryPiFoundation/blockly#8738.

* fix(FieldGridDropdown): Fix type error caused by separators
This depends on things that no longer exist in
blockly@v12.0.0-beta.4, like BasicCursor and Cursor, and also
on other things that will cease to exist before 12.0.0, like
ASTNode.

We need to update the samples repository to be able to test
plugins with v12, and this plugin is soon to be replaced by
the new plugin being developed in
google/blockly-keyboard-experimentation, so the most expedient
course of action is just to delete this one to allow upgrading
this repo's blockly devDependency.

BREAKING CHANGE:

Removes the keyboard-experimentation plugin, obviously.

Conflicts:
	plugins/keyboard-navigation/CHANGELOG.md
	plugins/keyboard-navigation/package-lock.json
	plugins/keyboard-navigation/package.json
	plugins/keyboard-navigation/src/navigation.js
	plugins/keyboard-navigation/src/navigation_controller.js
	plugins/keyboard-navigation/test/navigation_test.mocha.js
chore: Merge branch `master` into `rc/v12.0.0`

Note that this includes a cherry-pick of #2508 to resolve conflicts found in #2503. Note that a separate branch is needed here to pull in the cherry-picked changes (in order to address the branch conflicts).
fix: Fix multi-line text color by using the correct class
fix: Wait for an animation frame before showing the date picker
This was inadvertently broken by a mistranscription in PR #2453.
Method on superclass became public in v12.0.0.
maribethb and others added 7 commits May 14, 2025 16:53
chore: update to v12 beta 6
## The basics

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

## The details
### Resolves

Fixes #2514
Fixes #2515

### Proposed Changes

This updates the custom field implementations for `field-sldier` and `field-angle` to use new functionality introduced in RaspberryPiFoundation/blockly#9051.

### Reason for Changes

The regressions reported in #2514 and #2515 were introduced due to the custom fields introducing a scenario where _both_ widget and drop-down divs attempted to take ephemeral focus. This isn't allowed currently as core's `FocusManager` has no tie breaking functionality for ephemeral focus, so the second attempt to request it throws a runtime failure.

The functionality introduced in RaspberryPiFoundation/blockly#9051 allows the custom fields to, through `FieldInput`, disable the automatic ephemeral focus management for `FieldInput`'s inline editor (which uses widget div) so that the custom fields' drop-down div editors can properly take focus, instead.

### Test Coverage

This has been manually tested locally.

Automated tests are, unfortunately, non-trivial here since verifying focus-related behavior (at least through user interactions) requires a working DOM and is very tricky to make work with Node.js. These are tests that would likely be better suited via webdriver, instead. #2527 has been filed to track this work.

### Documentation

No additional documentation is needed here.

### Additional Information

This requires RaspberryPiFoundation/blockly#9051 in order to work.
## The basics

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

## The details
### Resolves

Fixes #2525

### Proposed Changes

This re-enables the shadow block converter test disabled in #2524.

### Reason for Changes

It's preferable to not keep tests disabled as it's easy to forget about them (and having them disabled increases the risk of discovering regressions being delayed or never noticed).

This particular fix is discussed in #2528. It's a bit complicated exactly how the global namespace is managed via `jsdom-global`, but essentially `SVGElement` (made available to Node.js via `jsdom`) is not being automatically bound to the global namespace and this works around the issue.

### Test Coverage

N/A -- This is a test-only change.

### Documentation

No documentation changes are needed.

### Additional Information

This is a slightly ugly workaround, but it seems viable for the medium-term while #2528 is considered.
@gonfunko gonfunko requested a review from a team as a code owner May 15, 2025 20:49
@gonfunko gonfunko requested review from rachel-fenichel and removed request for a team May 15, 2025 20:49
@gonfunko gonfunko merged commit 85233d1 into master May 15, 2025
12 checks passed
@gonfunko gonfunko deleted the rc/v12.0.0 branch May 15, 2025 22:55
@maribethb maribethb restored the rc/v12.0.0 branch May 16, 2025 17:26
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.

7 participants