scratchfoundation / scratchfoundation/scratch-blocks
Loading duplicate variables - what should happen?
Open
@paulkaplan is already working on this.
Since Oct 27, 2017.
question
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 1.6k
- Avg merge
- 4h 51m
- Merged PRs (30d)
- 12
Description
What should happen when a variable exists in the toolbox then gets loaded into the workspace via xml?
The current code path tries to call create on the variable and errors out, dumping an error to the console.
To reproduce:
- Open up the vertical playground
- create a new variable "asdf"
- drag it into the workspace
- Export workspace xml
- Refresh the playground
- create "asdf" via the button again
- import from xml
Is this the behavior we want? In discussing https://github.com/LLK/scratch-blocks/pull/1166, we realized that we weren't sure whether the current behavior was intentional or not.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.