Skip to content

Conversation

@riknoll
Copy link
Member

@riknoll riknoll commented May 14, 2025

fixes microsoft/pxt-microbit#6201
fixes microsoft/pxt-microbit#6206

this pr reverts #10566 and fixes the same bug in a different, equally hacky way that should be less error prone. now we skip the variable deleting logic by tricking blockly's Block.getVarModels() function which is used when blockly tries to gather all the usages of a particular variable in the workspace.

this makes it so that the variable field returns a fake variable id when in the flyout, which should be safe to do AFAIK since our flyouts never get serialized and none of the variable fields can be interacted with.

@riknoll riknoll requested a review from a team May 14, 2025 21:56
@riknoll riknoll merged commit 5ecc2f7 into master May 14, 2025
20 checks passed
@riknoll riknoll deleted the dev/riknoll/different-toolbox-fix branch May 14, 2025 22:47
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.

Clap Light: Step 4, the variable originally named lightOn appears incorrectly as Blockly-u in the Variables category Variable name bug

3 participants