{"action":"created","comment":{"url":"https://api.github.com/repos/LLK/scratch-gui/pulls/comments/136150079","pull_request_review_id":59642138,"id":136150079,"diff_hunk":"@@ -167,6 +191,12 @@ class Blocks extends React.Component {\n             this.workspace.resize();\n         }\n     }\n+    onExtensionWasAdded (blocksInfo) {\n+        this.ScratchBlocks.defineBlocksWithJsonArray(blocksInfo.map(blockInfo => blockInfo.json));\n+        const dynamicBlocksXML = this.props.vm.runtime.getBlocksXML();\n+        const toolboxXML = makeToolboxXML(dynamicBlocksXML);\n+        this.props.sendToolboxUpdate(toolboxXML);","path":"src/containers/blocks.jsx","position":85,"original_position":85,"commit_id":"e198fd8ba14b8bfebd6759c375f73036653d43b1","original_commit_id":"e198fd8ba14b8bfebd6759c375f73036653d43b1","user":{"login":"rschamp","id":1512021,"avatar_url":"https://avatars2.githubusercontent.com/u/1512021?v=4","gravatar_id":"","url":"https://api.github.com/users/rschamp","html_url":"https://github.com/rschamp","followers_url":"https://api.github.com/users/rschamp/followers","following_url":"https://api.github.com/users/rschamp/following{/other_user}","gists_url":"https://api.github.com/users/rschamp/gists{/gist_id}","starred_url":"https://api.github.com/users/rschamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rschamp/subscriptions","organizations_url":"https://api.github.com/users/rschamp/orgs","repos_url":"https://api.github.com/users/rschamp/repos","events_url":"https://api.github.com/users/rschamp/events{/privacy}","received_events_url":"https://api.github.com/users/rschamp/received_events","type":"User","site_admin":false},"body":"I think we should keep scratch-blocks specific logic to a minimum in the VM, so that the VM isn't concerned with UI.  I also think it's a good design to not bind the blocks to the VM given how much we mutate scratch-blocks currently.","created_at":"2017-08-30T18:18:51Z","updated_at":"2017-08-30T18:40:41Z","html_url":"https://github.com/LLK/scratch-gui/pull/655#discussion_r136150079","pull_request_url":"https://api.github.com/repos/LLK/scratch-gui/pulls/655","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/LLK/scratch-gui/pulls/comments/136150079"},"html":{"href":"https://github.com/LLK/scratch-gui/pull/655#discussion_r136150079"},"pull_request":{"href":"https://api.github.com/repos/LLK/scratch-gui/pulls/655"}},"in_reply_to_id":136066674},"pull_request":{"url":"https://api.github.com/repos/LLK/scratch-gui/pulls/655","id":138306172,"html_url":"https://github.com/LLK/scratch-gui/pull/655","diff_url":"https://github.com/LLK/scratch-gui/pull/655.diff","patch_url":"https://github.com/LLK/scratch-gui/pull/655.patch","issue_url":"https://api.github.com/repos/LLK/scratch-gui/issues/655","number":655,"state":"open","locked":false,"title":"Feature/extensions","user":{"login":"cwillisf","id":7019101,"avatar_url":"https://avatars0.githubusercontent.com/u/7019101?v=4","gravatar_id":"","url":"https://api.github.com/users/cwillisf","html_url":"https://github.com/cwillisf","followers_url":"https://api.github.com/users/cwillisf/followers","following_url":"https://api.github.com/users/cwillisf/following{/other_user}","gists_url":"https://api.github.com/users/cwillisf/gists{/gist_id}","starred_url":"https://api.github.com/users/cwillisf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwillisf/subscriptions","organizations_url":"https://api.github.com/users/cwillisf/orgs","repos_url":"https://api.github.com/users/cwillisf/repos","events_url":"https://api.github.com/users/cwillisf/events{/privacy}","received_events_url":"https://api.github.com/users/cwillisf/received_events","type":"User","site_admin":false},"body":"### Resolves\r\n\r\nThis is progress toward LLK/scratch-vm#643. It isn't useful without the VM portion of the implementation (PR coming soon).\r\n\r\n### Proposed Changes\r\n\r\nAdd an \"Add Extension\" button to the GUI, which calls the VM's `loadExtensionURL` method.\r\nAlso, handle the VM's `EXTENSION_WAS_ADDED` event, registering the new blocks' JSON with `ScratchBlocks` and updating the toolbox to include the new blocks' XML.\r\n\r\n### Reason for Changes\r\n\r\nExtensions are cool, like bow ties.\r\n","created_at":"2017-08-29T23:25:24Z","updated_at":"2017-08-30T18:40:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"282000cc8b1bbb1d6eb986554d80d10a05d7ecfd","assignee":{"login":"paulkaplan","id":654102,"avatar_url":"https://avatars1.githubusercontent.com/u/654102?v=4","gravatar_id":"","url":"https://api.github.com/users/paulkaplan","html_url":"https://github.com/paulkaplan","followers_url":"https://api.github.com/users/paulkaplan/followers","following_url":"https://api.github.com/users/paulkaplan/following{/other_user}","gists_url":"https://api.github.com/users/paulkaplan/gists{/gist_id}","starred_url":"https://api.github.com/users/paulkaplan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulkaplan/subscriptions","organizations_url":"https://api.github.com/users/paulkaplan/orgs","repos_url":"https://api.github.com/users/paulkaplan/repos","events_url":"https://api.github.com/users/paulkaplan/events{/privacy}","received_events_url":"https://api.github.com/users/paulkaplan/received_events","type":"User","site_admin":false},"assignees":[{"login":"paulkaplan","id":654102,"avatar_url":"https://avatars1.githubusercontent.com/u/654102?v=4","gravatar_id":"","url":"https://api.github.com/users/paulkaplan","html_url":"https://github.com/paulkaplan","followers_url":"https://api.github.com/users/paulkaplan/followers","following_url":"https://api.github.com/users/paulkaplan/following{/other_user}","gists_url":"https://api.github.com/users/paulkaplan/gists{/gist_id}","starred_url":"https://api.github.com/users/paulkaplan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulkaplan/subscriptions","organizations_url":"https://api.github.com/users/paulkaplan/orgs","repos_url":"https://api.github.com/users/paulkaplan/repos","events_url":"https://api.github.com/users/paulkaplan/events{/privacy}","received_events_url":"https://api.github.com/users/paulkaplan/received_events","type":"User","site_admin":false},{"login":"rschamp","id":1512021,"avatar_url":"https://avatars2.githubusercontent.com/u/1512021?v=4","gravatar_id":"","url":"https://api.github.com/users/rschamp","html_url":"https://github.com/rschamp","followers_url":"https://api.github.com/users/rschamp/followers","following_url":"https://api.github.com/users/rschamp/following{/other_user}","gists_url":"https://api.github.com/users/rschamp/gists{/gist_id}","starred_url":"https://api.github.com/users/rschamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rschamp/subscriptions","organizations_url":"https://api.github.com/users/rschamp/orgs","repos_url":"https://api.github.com/users/rschamp/repos","events_url":"https://api.github.com/users/rschamp/events{/privacy}","received_events_url":"https://api.github.com/users/rschamp/received_events","type":"User","site_admin":false},{"login":"cwillisf","id":7019101,"avatar_url":"https://avatars0.githubusercontent.com/u/7019101?v=4","gravatar_id":"","url":"https://api.github.com/users/cwillisf","html_url":"https://github.com/cwillisf","followers_url":"https://api.github.com/users/cwillisf/followers","following_url":"https://api.github.com/users/cwillisf/following{/other_user}","gists_url":"https://api.github.com/users/cwillisf/gists{/gist_id}","starred_url":"https://api.github.com/users/cwillisf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwillisf/subscriptions","organizations_url":"https://api.github.com/users/cwillisf/orgs","repos_url":"https://api.github.com/users/cwillisf/repos","events_url":"https://api.github.com/users/cwillisf/events{/privacy}","received_events_url":"https://api.github.com/users/cwillisf/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/LLK/scratch-gui/pulls/655/commits","review_comments_url":"https://api.github.com/repos/LLK/scratch-gui/pulls/655/comments","review_comment_url":"https://api.github.com/repos/LLK/scratch-gui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LLK/scratch-gui/issues/655/comments","statuses_url":"https://api.github.com/repos/LLK/scratch-gui/statuses/e198fd8ba14b8bfebd6759c375f73036653d43b1","head":{"label":"cwillisf:feature/extensions","ref":"feature/extensions","sha":"e198fd8ba14b8bfebd6759c375f73036653d43b1","user":{"login":"cwillisf","id":7019101,"avatar_url":"https://avatars0.githubusercontent.com/u/7019101?v=4","gravatar_id":"","url":"https://api.github.com/users/cwillisf","html_url":"https://github.com/cwillisf","followers_url":"https://api.github.com/users/cwillisf/followers","following_url":"https://api.github.com/users/cwillisf/following{/other_user}","gists_url":"https://api.github.com/users/cwillisf/gists{/gist_id}","starred_url":"https://api.github.com/users/cwillisf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwillisf/subscriptions","organizations_url":"https://api.github.com/users/cwillisf/orgs","repos_url":"https://api.github.com/users/cwillisf/repos","events_url":"https://api.github.com/users/cwillisf/events{/privacy}","received_events_url":"https://api.github.com/users/cwillisf/received_events","type":"User","site_admin":false},"repo":{"id":80235132,"name":"scratch-gui","full_name":"cwillisf/scratch-gui","owner":{"login":"cwillisf","id":7019101,"avatar_url":"https://avatars0.githubusercontent.com/u/7019101?v=4","gravatar_id":"","url":"https://api.github.com/users/cwillisf","html_url":"https://github.com/cwillisf","followers_url":"https://api.github.com/users/cwillisf/followers","following_url":"https://api.github.com/users/cwillisf/following{/other_user}","gists_url":"https://api.github.com/users/cwillisf/gists{/gist_id}","starred_url":"https://api.github.com/users/cwillisf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwillisf/subscriptions","organizations_url":"https://api.github.com/users/cwillisf/orgs","repos_url":"https://api.github.com/users/cwillisf/repos","events_url":"https://api.github.com/users/cwillisf/events{/privacy}","received_events_url":"https://api.github.com/users/cwillisf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cwillisf/scratch-gui","description":"GraphicaL User Interface for creating and running Scratch 3.0 projects","fork":true,"url":"https://api.github.com/repos/cwillisf/scratch-gui","forks_url":"https://api.github.com/repos/cwillisf/scratch-gui/forks","keys_url":"https://api.github.com/repos/cwillisf/scratch-gui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cwillisf/scratch-gui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cwillisf/scratch-gui/teams","hooks_url":"https://api.github.com/repos/cwillisf/scratch-gui/hooks","issue_events_url":"https://api.github.com/repos/cwillisf/scratch-gui/issues/events{/number}","events_url":"https://api.github.com/repos/cwillisf/scratch-gui/events","assignees_url":"https://api.github.com/repos/cwillisf/scratch-gui/assignees{/user}","branches_url":"https://api.github.com/repos/cwillisf/scratch-gui/branches{/branch}","tags_url":"https://api.github.com/repos/cwillisf/scratch-gui/tags","blobs_url":"https://api.github.com/repos/cwillisf/scratch-gui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cwillisf/scratch-gui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cwillisf/scratch-gui/git/refs{/sha}","trees_url":"https://api.github.com/repos/cwillisf/scratch-gui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cwillisf/scratch-gui/statuses/{sha}","languages_url":"https://api.github.com/repos/cwillisf/scratch-gui/languages","stargazers_url":"https://api.github.com/repos/cwillisf/scratch-gui/stargazers","contributors_url":"https://api.github.com/repos/cwillisf/scratch-gui/contributors","subscribers_url":"https://api.github.com/repos/cwillisf/scratch-gui/subscribers","subscription_url":"https://api.github.com/repos/cwillisf/scratch-gui/subscription","commits_url":"https://api.github.com/repos/cwillisf/scratch-gui/commits{/sha}","git_commits_url":"https://api.github.com/repos/cwillisf/scratch-gui/git/commits{/sha}","comments_url":"https://api.github.com/repos/cwillisf/scratch-gui/comments{/number}","issue_comment_url":"https://api.github.com/repos/cwillisf/scratch-gui/issues/comments{/number}","contents_url":"https://api.github.com/repos/cwillisf/scratch-gui/contents/{+path}","compare_url":"https://api.github.com/repos/cwillisf/scratch-gui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cwillisf/scratch-gui/merges","archive_url":"https://api.github.com/repos/cwillisf/scratch-gui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cwillisf/scratch-gui/downloads","issues_url":"https://api.github.com/repos/cwillisf/scratch-gui/issues{/number}","pulls_url":"https://api.github.com/repos/cwillisf/scratch-gui/pulls{/number}","milestones_url":"https://api.github.com/repos/cwillisf/scratch-gui/milestones{/number}","notifications_url":"https://api.github.com/repos/cwillisf/scratch-gui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cwillisf/scratch-gui/labels{/name}","releases_url":"https://api.github.com/repos/cwillisf/scratch-gui/releases{/id}","deployments_url":"https://api.github.com/repos/cwillisf/scratch-gui/deployments","created_at":"2017-01-27T18:40:37Z","updated_at":"2017-01-27T18:40:39Z","pushed_at":"2017-08-29T23:19:52Z","git_url":"git://github.com/cwillisf/scratch-gui.git","ssh_url":"git@github.com:cwillisf/scratch-gui.git","clone_url":"https://github.com/cwillisf/scratch-gui.git","svn_url":"https://github.com/cwillisf/scratch-gui","homepage":"http://llk.github.io/scratch-gui","size":5525,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"LLK:develop","ref":"develop","sha":"3e210b5dad27bcff83d160491752bef60e2dc86f","user":{"login":"LLK","id":3420800,"avatar_url":"https://avatars1.githubusercontent.com/u/3420800?v=4","gravatar_id":"","url":"https://api.github.com/users/LLK","html_url":"https://github.com/LLK","followers_url":"https://api.github.com/users/LLK/followers","following_url":"https://api.github.com/users/LLK/following{/other_user}","gists_url":"https://api.github.com/users/LLK/gists{/gist_id}","starred_url":"https://api.github.com/users/LLK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LLK/subscriptions","organizations_url":"https://api.github.com/users/LLK/orgs","repos_url":"https://api.github.com/users/LLK/repos","events_url":"https://api.github.com/users/LLK/events{/privacy}","received_events_url":"https://api.github.com/users/LLK/received_events","type":"Organization","site_admin":false},"repo":{"id":68243930,"name":"scratch-gui","full_name":"LLK/scratch-gui","owner":{"login":"LLK","id":3420800,"avatar_url":"https://avatars1.githubusercontent.com/u/3420800?v=4","gravatar_id":"","url":"https://api.github.com/users/LLK","html_url":"https://github.com/LLK","followers_url":"https://api.github.com/users/LLK/followers","following_url":"https://api.github.com/users/LLK/following{/other_user}","gists_url":"https://api.github.com/users/LLK/gists{/gist_id}","starred_url":"https://api.github.com/users/LLK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LLK/subscriptions","organizations_url":"https://api.github.com/users/LLK/orgs","repos_url":"https://api.github.com/users/LLK/repos","events_url":"https://api.github.com/users/LLK/events{/privacy}","received_events_url":"https://api.github.com/users/LLK/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LLK/scratch-gui","description":"Graphical User Interface for creating and running Scratch 3.0 projects.","fork":false,"url":"https://api.github.com/repos/LLK/scratch-gui","forks_url":"https://api.github.com/repos/LLK/scratch-gui/forks","keys_url":"https://api.github.com/repos/LLK/scratch-gui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LLK/scratch-gui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LLK/scratch-gui/teams","hooks_url":"https://api.github.com/repos/LLK/scratch-gui/hooks","issue_events_url":"https://api.github.com/repos/LLK/scratch-gui/issues/events{/number}","events_url":"https://api.github.com/repos/LLK/scratch-gui/events","assignees_url":"https://api.github.com/repos/LLK/scratch-gui/assignees{/user}","branches_url":"https://api.github.com/repos/LLK/scratch-gui/branches{/branch}","tags_url":"https://api.github.com/repos/LLK/scratch-gui/tags","blobs_url":"https://api.github.com/repos/LLK/scratch-gui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LLK/scratch-gui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LLK/scratch-gui/git/refs{/sha}","trees_url":"https://api.github.com/repos/LLK/scratch-gui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LLK/scratch-gui/statuses/{sha}","languages_url":"https://api.github.com/repos/LLK/scratch-gui/languages","stargazers_url":"https://api.github.com/repos/LLK/scratch-gui/stargazers","contributors_url":"https://api.github.com/repos/LLK/scratch-gui/contributors","subscribers_url":"https://api.github.com/repos/LLK/scratch-gui/subscribers","subscription_url":"https://api.github.com/repos/LLK/scratch-gui/subscription","commits_url":"https://api.github.com/repos/LLK/scratch-gui/commits{/sha}","git_commits_url":"https://api.github.com/repos/LLK/scratch-gui/git/commits{/sha}","comments_url":"https://api.github.com/repos/LLK/scratch-gui/comments{/number}","issue_comment_url":"https://api.github.com/repos/LLK/scratch-gui/issues/comments{/number}","contents_url":"https://api.github.com/repos/LLK/scratch-gui/contents/{+path}","compare_url":"https://api.github.com/repos/LLK/scratch-gui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LLK/scratch-gui/merges","archive_url":"https://api.github.com/repos/LLK/scratch-gui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LLK/scratch-gui/downloads","issues_url":"https://api.github.com/repos/LLK/scratch-gui/issues{/number}","pulls_url":"https://api.github.com/repos/LLK/scratch-gui/pulls{/number}","milestones_url":"https://api.github.com/repos/LLK/scratch-gui/milestones{/number}","notifications_url":"https://api.github.com/repos/LLK/scratch-gui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LLK/scratch-gui/labels{/name}","releases_url":"https://api.github.com/repos/LLK/scratch-gui/releases{/id}","deployments_url":"https://api.github.com/repos/LLK/scratch-gui/deployments","created_at":"2016-09-14T21:14:10Z","updated_at":"2017-08-30T15:27:57Z","pushed_at":"2017-08-30T17:13:03Z","git_url":"git://github.com/LLK/scratch-gui.git","ssh_url":"git@github.com:LLK/scratch-gui.git","clone_url":"https://github.com/LLK/scratch-gui.git","svn_url":"https://github.com/LLK/scratch-gui","homepage":"http://llk.github.io/scratch-gui","size":90104,"stargazers_count":131,"watchers_count":131,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":92,"mirror_url":null,"open_issues_count":112,"forks":92,"open_issues":112,"watchers":131,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/LLK/scratch-gui/pulls/655"},"html":{"href":"https://github.com/LLK/scratch-gui/pull/655"},"issue":{"href":"https://api.github.com/repos/LLK/scratch-gui/issues/655"},"comments":{"href":"https://api.github.com/repos/LLK/scratch-gui/issues/655/comments"},"review_comments":{"href":"https://api.github.com/repos/LLK/scratch-gui/pulls/655/comments"},"review_comment":{"href":"https://api.github.com/repos/LLK/scratch-gui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LLK/scratch-gui/pulls/655/commits"},"statuses":{"href":"https://api.github.com/repos/LLK/scratch-gui/statuses/e198fd8ba14b8bfebd6759c375f73036653d43b1"}},"author_association":"OWNER"}}
{"actor":{"display_login":"rschamp"}}