{"action":"created","issue":{"url":"https://api.github.com/repos/bbcmicrobit/PythonEditor/issues/43","repository_url":"https://api.github.com/repos/bbcmicrobit/PythonEditor","labels_url":"https://api.github.com/repos/bbcmicrobit/PythonEditor/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/bbcmicrobit/PythonEditor/issues/43/comments","events_url":"https://api.github.com/repos/bbcmicrobit/PythonEditor/issues/43/events","html_url":"https://github.com/bbcmicrobit/PythonEditor/issues/43","id":214383455,"number":43,"title":"blocks: how to handle 'undocked' blocks","user":{"login":"jaustin","id":147113,"avatar_url":"https://avatars2.githubusercontent.com/u/147113?v=3","gravatar_id":"","url":"https://api.github.com/users/jaustin","html_url":"https://github.com/jaustin","followers_url":"https://api.github.com/users/jaustin/followers","following_url":"https://api.github.com/users/jaustin/following{/other_user}","gists_url":"https://api.github.com/users/jaustin/gists{/gist_id}","starred_url":"https://api.github.com/users/jaustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaustin/subscriptions","organizations_url":"https://api.github.com/users/jaustin/orgs","repos_url":"https://api.github.com/users/jaustin/repos","events_url":"https://api.github.com/users/jaustin/events{/privacy}","received_events_url":"https://api.github.com/users/jaustin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-15T13:08:30Z","updated_at":"2017-03-16T11:40:25Z","closed_at":null,"body":"(this is a complex one that I think needs some discussion - opening this issue as a place for that)\r\n\r\nAt the moment in blocks, as far as I can see, any block on the canvas will cause code to be generated and likely run. There aren't 'hats' or 'events', not even an 'on start' one. \r\n\r\nThis can cause a few possible issues.\r\nFor one, it's fundamentally different to scratch\r\n![image](https://cloud.githubusercontent.com/assets/147113/23949163/173bc202-097e-11e7-83be-5256ff6149d7.png)\r\nIn this case, the 'hmm' will never happen. \r\nThe *difference* is not in itself a reason to change, but In the past we've seen kids use 'undocking' blocks as a way to 'comment them out' (IE you build a complex set of blocks and then 'undock' them in order to stop them running. This is one good reason to think about how things work.\r\n\r\n(it's also different from PXT, too)\r\n\r\nSecondly, it can create some confusing things on canvas if your project has grown and then shrunk again.\r\n\r\nFor example, someone who knows how to code will easily spot the issue here:\r\n![image](https://cloud.githubusercontent.com/assets/147113/23949380/e751dbc0-097e-11e7-8773-0b2b5c51fefa.png)\r\n...but for someone who is only focused on the blocks this could be really confusing. This is a slightly artificial example, but I think the problem in general is real, especially given the lack of clear notification that things are not currently visible, etc. (see in part #42 )\r\n\r\nNote that PXT removed 'hats' early on in development and decided to add them back. There's a good discussion about that here: \r\nhttps://github.com/Microsoft/pxt/issues/849\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bbcmicrobit/PythonEditor/issues/comments/287032439","html_url":"https://github.com/bbcmicrobit/PythonEditor/issues/43#issuecomment-287032439","issue_url":"https://api.github.com/repos/bbcmicrobit/PythonEditor/issues/43","id":287032439,"user":{"login":"ntoll","id":37602,"avatar_url":"https://avatars3.githubusercontent.com/u/37602?v=3","gravatar_id":"","url":"https://api.github.com/users/ntoll","html_url":"https://github.com/ntoll","followers_url":"https://api.github.com/users/ntoll/followers","following_url":"https://api.github.com/users/ntoll/following{/other_user}","gists_url":"https://api.github.com/users/ntoll/gists{/gist_id}","starred_url":"https://api.github.com/users/ntoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntoll/subscriptions","organizations_url":"https://api.github.com/users/ntoll/orgs","repos_url":"https://api.github.com/users/ntoll/repos","events_url":"https://api.github.com/users/ntoll/events{/privacy}","received_events_url":"https://api.github.com/users/ntoll/received_events","type":"User","site_admin":false},"created_at":"2017-03-16T11:40:25Z","updated_at":"2017-03-16T11:40:25Z","body":"I can't recreate the situation you have in the second screenie. If I remove the \"reset\" block, the `reset()` code is removed. Furthermore, if I reorder the vertical order of blocks this is reflected in the order of the lines in the Python code.\r\n\r\nHats are a bad idea. Once again, Python is different to PXT, Scratch, we should celebrate such differences and encourage people to explore... yadda yadda yadda. ;-)"}}
{"actor":{"display_login":"ntoll"}}