scratchfoundation / scratchfoundation/scratch-blocks

Loading duplicate variables - what should happen?

Open
#1,176 1 comment 0 reactions 3 assignees View on GitHub

@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:

  1. Open up the vertical playground
  2. create a new variable "asdf"
  3. drag it into the workspace
  4. Export workspace xml
  5. Refresh the playground
  6. create "asdf" via the button again
  7. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.