scratchfoundation / scratch-gui

Graphical User Interface for creating and running Scratch 3.0 projects.
https://scratchfoundation.github.io/scratch-gui/develop/
BSD 3-Clause "New" or "Revised" License
4.44k stars 3.53k forks source link

Monitor with same name share the right-click menu #5636

Open apple502j opened 4 years ago

apple502j commented 4 years ago

Expected Behavior

Right-click a list monitor, and you shouldn't see "slider".

Actual Behavior

image

Steps to Reproduce

  1. make a list named "my variable"
  2. show "my variable" variable
  3. right-click on list
  4. there's "slider"

or:

  1. show "answer" (sensing)
  2. make a list named "answer"
  3. right-click on sensing answer monitor
  4. there's "import"

this is caused by https://github.com/LLK/scratch-gui/blob/develop/src/components/monitor/monitor.jsx#L62 - they have same label, so same id

Operating System and Browser

any

BryceLTaylor commented 4 years ago

It's also worth mentioning that selecting "Slider" on the variable "my variable" does not change the state of the monitor while there exists a list with the same name.