Skip to content
New issue

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

refactor!: Update and modernize the continuous toolbox plugin. #2468

Open
wants to merge 36 commits into
base: rc/v12.0.0
Choose a base branch
from

Conversation

gonfunko
Copy link
Contributor

@gonfunko gonfunko commented Nov 8, 2024

The basics

The details

Resolves

Proposed Changes

This PR updates the continuous toolbox plugin for compatibility with the revised flyout APIs introduced in Blockly v12. It also converts the plugin to Typescript.

Additionally, it fixes several existing issues:

  • Importing the plugin is free of side effects; the plugin must be registered and injected to take effect. Previously, the CSS and some classes were unconditionally registered.
  • The continuous flyout now supports autoclosing; users can simply call Blockly.getMainWorkspace().getFlyout().setAutoClose(true) to enable this behavior.
  • Mutations to procedure blocks in the main workspace will be immediately reflected in the flyout.
  • Extremely poor performance when adding/deleting large numbers of blocks to the workspace has been resolved by debouncing toolbox refreshes in response to block add/create/change events.
  • The implementation has been slightly adjusted to make it more extensible in response to shortcomings identified by the Scratch modernization effort.

This PR should not be merged until Blockly v12 is released, as it depends upon APIs added in that version.

@gonfunko gonfunko requested a review from a team as a code owner November 8, 2024 21:43
@gonfunko gonfunko requested review from cpcallen and removed request for a team November 8, 2024 21:43
@cpcallen
Copy link
Contributor

This PR should not be merged until Blockly v12 is released, as it depends upon APIs added in that version.

Might it be worth creating a v12 branch in this repo (if there is not already one) and retargeting this PR to it?

@gonfunko gonfunko changed the base branch from master to rc/v12.0.0 November 12, 2024 21:54
@gonfunko
Copy link
Contributor Author

This PR should not be merged until Blockly v12 is released, as it depends upon APIs added in that version.

Might it be worth creating a v12 branch in this repo (if there is not already one) and retargeting this PR to it?

Done!

@gonfunko
Copy link
Contributor Author

gonfunko commented Dec 5, 2024

This also fixes #2471.

@gonfunko
Copy link
Contributor Author

gonfunko commented Dec 5, 2024

And also fixes google/blockly#8543

@cwillisf
Copy link

Hello! Any chance this could be built into a beta release or something like that? I'm attempting to use [email protected] but there's no corresponding compatible [email protected]. I can work around that for local dev, but I'm not sure I want to introduce npm link into our CI/CD pipeline even for staging :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants