Skip to content

fix: Fix creation of variables in the main workspace when opening flyout#2686

Merged
gonfunko merged 1 commit intoRaspberryPiFoundation:mainfrom
LappiLappland:fix/shareable-procedures-flyout-variables
Apr 17, 2026
Merged

fix: Fix creation of variables in the main workspace when opening flyout#2686
gonfunko merged 1 commit intoRaspberryPiFoundation:mainfrom
LappiLappland:fix/shareable-procedures-flyout-variables

Conversation

@LappiLappland
Copy link
Copy Markdown
Contributor

The basics

The details

Resolves

Fixes #2685

Proposed Changes

Replaced createBackingVariable manual get/set calls for variables with Blockly's helper function getOrCreateVariablePackage . It handles resolution of variable map correctly (using potentialVariableMap when in flyouts)

Reason for Changes

Blockly flyouts have VariableMap pointing to target workspace's VariableMap. Flyouts store their own VariableMap inside potentialVariableMap. Method createBackingVariable is making createVariable calls which creates variables directly on the main workspace

Test Coverage

N/A

Documentation

N/A

Additional Information

N/A

@LappiLappland LappiLappland requested a review from a team as a code owner April 15, 2026 17:16
@LappiLappland LappiLappland requested review from gonfunko and removed request for a team April 15, 2026 17:16
@gonfunko
Copy link
Copy Markdown
Contributor

Thanks for reporting and fixing this, we really appreciate it!

@gonfunko gonfunko merged commit d7dba88 into RaspberryPiFoundation:main Apr 17, 2026
7 checks passed
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.

Shareable procedures blocks create variables on the main workspace when inside flyout

2 participants