code-dot-org/blockly — pull request #797 by Bjvanminnen (2014-08-08 18:01:07+00:00)
Title: [Finishes #76465926] Handle required blocks with undeletable blocks

Had a case where we had a undeletable but editable block.

![image](https://cloud.githubusercontent.com/assets/1767466/3860557/8516e450-1f25-11e4-9cce-0ae7233657f4.png)

We want the user to change the degrees to 30. If they don't, we want to show them the block with value of 30.

The problem was that (a) we weren't looking at deletable blocks when comparing to required blocks and (b) we weren't considering the blocks identical, because the required block was not deletable.

Fix is to look at whether a block is editable instead of deletable when deciding whether to compare it to required blocks. This does mean they will get lines of code counted when they didn't before.

Second part is to ignore certain attributes when comparing blocks. Another possibility would be to just make the required block also be undeletable (which would also have the benefit of showing the user a block of the same color). This might actually be a better solution now that I consider it. Thoughts?