"List" variable persists when covered with another block

In previous versions of Makecode Arcade, when a user dragged out the “For element value of list” block, if you placed another block on top of “list” the list variable would disappear. For example, you could replace it with “Array of all (blank tile) locations.”

Currently, if you do this the “list” variable will show up on top again. Users can take the list variable and throw it in the trash and this will fix the problem, but this is a confusing extra step since other variables don’t work that way. My students tend to get hung up on this if I am not around to tell them how to fix it.

Screenshots
Current behavior:

Expected behavior:

2 Likes

I think that’s just an assumption the computer makes. The same thing happens when you put the “absolute value” block on a variable. Because there was a variable under it and there’s only one spot where that variable could’ve gone (the tile slot), it was put there; kind of like autocorrect.

I’m not sure there’s a way to turn it off.

Hope this was helpful!

This is what I also expected, because I was so confused whenever it did that.

this behavior has always annoyed me, but i’ve never “fixed” it because it’s actually intentional on the part of the blocks library we use (Blockly). still, so many people have reported this to me over the years that i’ve finally opened a PR to patch it out:

see that PR for a more in depth explanation of why this exists in the first place, but i’ll try to push this out in a hotfix sometime soon (assuming i didn’t break something else with this change)