Skip to content

Conversation

@riknoll
Copy link
Member

@riknoll riknoll commented May 7, 2025

fixes microsoft/pxt-microbit#6181

for a detailed explanation of the behavior in blockly that necessitates this change, see RaspberryPiFoundation/blockly#9007

Copy link
Contributor

@thsparks thsparks left a comment

Choose a reason for hiding this comment

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

One nit, okay to ignore if you want

const allBlocks = [block].concat(block.getChildren(false));

// loop over all child variable fields
for (const block of allBlocks) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could we rename this to childBlock or something, so it doesn't conflict with the block passed into the recycleBlock function?

@riknoll riknoll merged commit d79a3b4 into master May 8, 2025
19 checks passed
@riknoll riknoll deleted the dev/riknoll/block-variable-cache branch May 8, 2025 17:31
riknoll added a commit that referenced this pull request May 14, 2025
riknoll added a commit that referenced this pull request May 14, 2025
* Revert "workaround blockly flyout variable clearing behavior (#10566)"

This reverts commit d79a3b4.

* change variable field to return fake variable id when in flyout

* add explanatory comment
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.

Beta: Missing default variables

4 participants