-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
component: functionsissue: bugDescribes why the code or behaviour is wrongDescribes why the code or behaviour is wrong
Milestone
Description
Describe the bug
Procedure callers are tightly coupled to the mutator UI implementation. So there are some things that are impossible to do with a new mutator UI.
Specifically, you cannot reorder the parameters because the caller relies on blockIds from the mutator.
To Reproduce
Currently I have a branch of the blockly-samples repo that replicates this behavior. You can pull it here if you would like to replicate it.
- Drag out a procedure def and a caller.
- Add two params using the plus button.
- Add number blocks to the param inputs.
- Switch the order of the params using the arrows.
- Observe how the param order switches but the blocks are not moved correctly.

Expected behavior
Caller should be UI-Agnostic.
Additional context
Problems originate in the procedure caller's setProcedureParameters function.
Here is a demo pull request showing one method of fixing it: #3724
It is based on the idea that this can be fixed by having the procedure caller rely on variable ids instead of block ids.
Metadata
Metadata
Assignees
Labels
component: functionsissue: bugDescribes why the code or behaviour is wrongDescribes why the code or behaviour is wrong