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

[Google Blockly] Register custom procedure blocks in old labs #58425

Merged
merged 1 commit into from
May 6, 2024

Conversation

mikeharv
Copy link
Contributor

@mikeharv mikeharv commented May 6, 2024

To support the Sprite Lab migration, we implemented custom versions of the new shareable procedures. When we were ready to migrate Minecraft later, we simply needed to register the blocks. (https://github.com/code-dot-org/code-dot-org/pull/55993/files#diff-972ff80c7f8bd964897bbfa702b7e753dd5e99a06b72a5664a259dd6a6be33a7)

Now we can do the same for Maze, Artist (aka Turtle), and Play Lab (aka Studio) to help prepare them for migration. I tested these changes with a variety of Maze levels and saw the expected improvements, detailed below. I didn't specifically test Artist or Play Lab yet, but registerCustomProcedureBlocks doesn't do anything if we're in the CDO Blockly Wrapper, so there's really no risk with this change.

As a review, here are some ways you can tell that we're using our custom blocks:

  • Modal function editor should work
  • Call blocks have "edit" buttons if the modal editor is enabled
  • Definition blocks have an SVG frame if they're on the primary student workspace
  • Definition blocks should not have a "gear" UI in the corner
  • Definition blocks never turn gray
Block type CDO Blockly - baseline Google Blockly - Staging Google Blockly - this branch
Call blocks with edit buttons - modal
Course 4.16.2
image image image
Definition block - modal
Course 4.16.2
image N/Aimage image
Definition block - no modal
Course E.14.3
image image image
Definition block - no modal - undeletable "stone" blocks
Course E.14.4
image image image

Links

Jira -https://codedotorg.atlassian.net/browse/CT-558

Follow-up work

Support functions with parameters. :(

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@mikeharv mikeharv requested a review from a team May 6, 2024 20:48
@mikeharv mikeharv merged commit e892947 into staging May 6, 2024
2 checks passed
@mikeharv mikeharv deleted the mike/maze-shareable-procedures branch May 6, 2024 22:55
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.

None yet

2 participants