{"action":"created","comment":{"url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/comments/64488654","id":64488654,"diff_hunk":"@@ -431,3 +433,32 @@ exports.ellipsify = function (inputText, maxLength) {\n   }\n   return inputText || '';\n };\n+\n+/**\n+ * Returns deep merge of two objects, concatenating rather than overwriting\n+ * array properites. Does not mutate either object.\n+ *\n+ * Note: new properties in overrides are always added to end, not in-order.\n+ *\n+ * Note: may become default behavior of mergeDeep in future immutable versions.\n+ *   @see https://github.com/facebook/immutable-js/issues/406\n+ *\n+ * @param {Object} baseObject\n+ * @param {Object} overrides\n+ * @returns {Object} original object (now modified in-place)\n+ */\n+exports.deepMergeConcatArrays = (baseObject, overrides) => {\n+  function deepConcatMerger(a, b) {\n+    const isList = Immutable.List.isList;\n+    if (isList(a) && isList(b)) {\n+      return a.concat(b);\n+    }\n+    if (a && a.mergeWith) {\n+      return a.mergeWith(deepConcatMerger, b);\n+    }\n+    return b;\n+  }\n+\n+  var baseImmutable = Immutable.fromJS(baseObject);\n+  return baseImmutable.mergeWith(deepConcatMerger, overrides).toJS();","path":"apps/src/utils.js","position":40,"original_position":40,"commit_id":"448a29418bc710e9644f1cb5aa38d14a03ca2112","original_commit_id":"448a29418bc710e9644f1cb5aa38d14a03ca2112","user":{"login":"bcjordan","id":206973,"avatar_url":"https://avatars.githubusercontent.com/u/206973?v=3","gravatar_id":"","url":"https://api.github.com/users/bcjordan","html_url":"https://github.com/bcjordan","followers_url":"https://api.github.com/users/bcjordan/followers","following_url":"https://api.github.com/users/bcjordan/following{/other_user}","gists_url":"https://api.github.com/users/bcjordan/gists{/gist_id}","starred_url":"https://api.github.com/users/bcjordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcjordan/subscriptions","organizations_url":"https://api.github.com/users/bcjordan/orgs","repos_url":"https://api.github.com/users/bcjordan/repos","events_url":"https://api.github.com/users/bcjordan/events{/privacy}","received_events_url":"https://api.github.com/users/bcjordan/received_events","type":"User","site_admin":false},"body":"To get `_.mergeWith` we'll need lodash > 4.x. With that, getting incompatible version warning for current versions of `grunt-config-watch`, `grunt-config-uglify`, and a dependency of `grunt-cli`.\r\n\r\nUpgrading lodash and upgrading those 3 packages leaves 39 unit test fails. Would likely want to use something like https://www.npmjs.com/package/lodash-migrate to scan for potential incompatibilities in the code base, but since not everything is unit test covered it will probably warrant a more careful look at existing usages & UI test run.\r\n\r\nSince this is a live site issue and hoping to get this out quickly, & we don't yet have another use case for a full lodash 4.x upgrade, and I'm really doing this just to extend one object and one array, I might lean towards (1) just doing this object merge & extend manually for this case, (2) using immutable as in current PR, or (3) introducing something standalone like [deepmerge](https://github.com/KyleAMathews/deepmerge), though it has issues with mutability of nested properties, is looking for a new owner & isn't super widely used.\r\n\r\nLeaning towards #1 or #2, any preference?","created_at":"2016-05-24T22:47:39Z","updated_at":"2016-05-24T22:47:39Z","html_url":"https://github.com/code-dot-org/code-dot-org/pull/8563#discussion_r64488654","pull_request_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/8563","_links":{"self":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/comments/64488654"},"html":{"href":"https://github.com/code-dot-org/code-dot-org/pull/8563#discussion_r64488654"},"pull_request":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/8563"}}},"pull_request":{"url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/8563","id":71142614,"html_url":"https://github.com/code-dot-org/code-dot-org/pull/8563","diff_url":"https://github.com/code-dot-org/code-dot-org/pull/8563.diff","patch_url":"https://github.com/code-dot-org/code-dot-org/pull/8563.patch","issue_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/8563","number":8563,"state":"open","locked":false,"title":"Pull Maker APIs dropletConfig portion out of App Lab. Use object dropdowns for pixel/led blocks. ","user":{"login":"bcjordan","id":206973,"avatar_url":"https://avatars.githubusercontent.com/u/206973?v=3","gravatar_id":"","url":"https://api.github.com/users/bcjordan","html_url":"https://github.com/bcjordan","followers_url":"https://api.github.com/users/bcjordan/followers","following_url":"https://api.github.com/users/bcjordan/following{/other_user}","gists_url":"https://api.github.com/users/bcjordan/gists{/gist_id}","starred_url":"https://api.github.com/users/bcjordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcjordan/subscriptions","organizations_url":"https://api.github.com/users/bcjordan/orgs","repos_url":"https://api.github.com/users/bcjordan/repos","events_url":"https://api.github.com/users/bcjordan/events{/privacy}","received_events_url":"https://api.github.com/users/bcjordan/received_events","type":"User","site_admin":false},"body":"I noticed that blocks like `led.on`, while not included in the default App Lab template list of blocks, were still being included in autocomplete (but are not yet functional without `makerlabEnabled`). This PR changes Maker API blocks to only get folded in when makerlab is enabled.\r\n\r\n- Pull Maker APIs dropletConfig portion out of App Lab.\r\n- Use object dropdowns for `pixel`/`led` blocks. \r\n- Introduces dependency on [immutable-js](https://facebook.github.io/immutable-js)\r\n- Adds `util.deepMergeConcatArrays` utility (may become simpler in future version of immutable-js per https://github.com/facebook/immutable-js/issues/406)\r\n\r\n## Before\r\n\r\n### /p/applab\r\n\r\n![image](https://cloud.githubusercontent.com/assets/206973/15488728/1edb266e-210e-11e6-9fbe-ed0b8807f70c.png)\r\n\r\n### /p/makerlab\r\n\r\n![image](https://cloud.githubusercontent.com/assets/206973/15488704/d6c7727e-210d-11e6-9d9a-79a1fb8cf232.png)\r\n\r\n## After\r\n\r\n### /p/applab\r\n\r\n![image](https://cloud.githubusercontent.com/assets/206973/15488736/3a27c7ce-210e-11e6-8ec0-fa8783843a7d.png)\r\n\r\n\r\n### /p/makerlab\r\n\r\n![image](https://cloud.githubusercontent.com/assets/206973/15488701/d0d31846-210d-11e6-9994-c91631188557.png)\r\n\r\n","created_at":"2016-05-24T00:46:08Z","updated_at":"2016-05-24T22:47:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb501e06cfb1299538a92f9421b9674828bd8302","assignee":{"login":"Bjvanminnen","id":1767466,"avatar_url":"https://avatars.githubusercontent.com/u/1767466?v=3","gravatar_id":"","url":"https://api.github.com/users/Bjvanminnen","html_url":"https://github.com/Bjvanminnen","followers_url":"https://api.github.com/users/Bjvanminnen/followers","following_url":"https://api.github.com/users/Bjvanminnen/following{/other_user}","gists_url":"https://api.github.com/users/Bjvanminnen/gists{/gist_id}","starred_url":"https://api.github.com/users/Bjvanminnen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bjvanminnen/subscriptions","organizations_url":"https://api.github.com/users/Bjvanminnen/orgs","repos_url":"https://api.github.com/users/Bjvanminnen/repos","events_url":"https://api.github.com/users/Bjvanminnen/events{/privacy}","received_events_url":"https://api.github.com/users/Bjvanminnen/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/8563/commits","review_comments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/8563/comments","review_comment_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/8563/comments","statuses_url":"https://api.github.com/repos/code-dot-org/code-dot-org/statuses/448a29418bc710e9644f1cb5aa38d14a03ca2112","head":{"label":"code-dot-org:no-maker-apis-applab","ref":"no-maker-apis-applab","sha":"448a29418bc710e9644f1cb5aa38d14a03ca2112","user":{"login":"code-dot-org","id":5124627,"avatar_url":"https://avatars.githubusercontent.com/u/5124627?v=3","gravatar_id":"","url":"https://api.github.com/users/code-dot-org","html_url":"https://github.com/code-dot-org","followers_url":"https://api.github.com/users/code-dot-org/followers","following_url":"https://api.github.com/users/code-dot-org/following{/other_user}","gists_url":"https://api.github.com/users/code-dot-org/gists{/gist_id}","starred_url":"https://api.github.com/users/code-dot-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-dot-org/subscriptions","organizations_url":"https://api.github.com/users/code-dot-org/orgs","repos_url":"https://api.github.com/users/code-dot-org/repos","events_url":"https://api.github.com/users/code-dot-org/events{/privacy}","received_events_url":"https://api.github.com/users/code-dot-org/received_events","type":"Organization","site_admin":false},"repo":{"id":24250009,"name":"code-dot-org","full_name":"code-dot-org/code-dot-org","owner":{"login":"code-dot-org","id":5124627,"avatar_url":"https://avatars.githubusercontent.com/u/5124627?v=3","gravatar_id":"","url":"https://api.github.com/users/code-dot-org","html_url":"https://github.com/code-dot-org","followers_url":"https://api.github.com/users/code-dot-org/followers","following_url":"https://api.github.com/users/code-dot-org/following{/other_user}","gists_url":"https://api.github.com/users/code-dot-org/gists{/gist_id}","starred_url":"https://api.github.com/users/code-dot-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-dot-org/subscriptions","organizations_url":"https://api.github.com/users/code-dot-org/orgs","repos_url":"https://api.github.com/users/code-dot-org/repos","events_url":"https://api.github.com/users/code-dot-org/events{/privacy}","received_events_url":"https://api.github.com/users/code-dot-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-dot-org/code-dot-org","description":"The code powering code.org and studio.code.org","fork":false,"url":"https://api.github.com/repos/code-dot-org/code-dot-org","forks_url":"https://api.github.com/repos/code-dot-org/code-dot-org/forks","keys_url":"https://api.github.com/repos/code-dot-org/code-dot-org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-dot-org/code-dot-org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-dot-org/code-dot-org/teams","hooks_url":"https://api.github.com/repos/code-dot-org/code-dot-org/hooks","issue_events_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/events{/number}","events_url":"https://api.github.com/repos/code-dot-org/code-dot-org/events","assignees_url":"https://api.github.com/repos/code-dot-org/code-dot-org/assignees{/user}","branches_url":"https://api.github.com/repos/code-dot-org/code-dot-org/branches{/branch}","tags_url":"https://api.github.com/repos/code-dot-org/code-dot-org/tags","blobs_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-dot-org/code-dot-org/statuses/{sha}","languages_url":"https://api.github.com/repos/code-dot-org/code-dot-org/languages","stargazers_url":"https://api.github.com/repos/code-dot-org/code-dot-org/stargazers","contributors_url":"https://api.github.com/repos/code-dot-org/code-dot-org/contributors","subscribers_url":"https://api.github.com/repos/code-dot-org/code-dot-org/subscribers","subscription_url":"https://api.github.com/repos/code-dot-org/code-dot-org/subscription","commits_url":"https://api.github.com/repos/code-dot-org/code-dot-org/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-dot-org/code-dot-org/contents/{+path}","compare_url":"https://api.github.com/repos/code-dot-org/code-dot-org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-dot-org/code-dot-org/merges","archive_url":"https://api.github.com/repos/code-dot-org/code-dot-org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-dot-org/code-dot-org/downloads","issues_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues{/number}","pulls_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls{/number}","milestones_url":"https://api.github.com/repos/code-dot-org/code-dot-org/milestones{/number}","notifications_url":"https://api.github.com/repos/code-dot-org/code-dot-org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-dot-org/code-dot-org/labels{/name}","releases_url":"https://api.github.com/repos/code-dot-org/code-dot-org/releases{/id}","deployments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/deployments","created_at":"2014-09-20T00:46:11Z","updated_at":"2016-05-24T18:28:39Z","pushed_at":"2016-05-24T22:34:20Z","git_url":"git://github.com/code-dot-org/code-dot-org.git","ssh_url":"git@github.com:code-dot-org/code-dot-org.git","clone_url":"https://github.com/code-dot-org/code-dot-org.git","svn_url":"https://github.com/code-dot-org/code-dot-org","homepage":"http://code.org","size":4668184,"stargazers_count":117,"watchers_count":117,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":70,"mirror_url":null,"open_issues_count":51,"forks":70,"open_issues":51,"watchers":117,"default_branch":"staging"}},"base":{"label":"code-dot-org:staging","ref":"staging","sha":"7edf740db9f7807bf01292b142cf30604bd63ca8","user":{"login":"code-dot-org","id":5124627,"avatar_url":"https://avatars.githubusercontent.com/u/5124627?v=3","gravatar_id":"","url":"https://api.github.com/users/code-dot-org","html_url":"https://github.com/code-dot-org","followers_url":"https://api.github.com/users/code-dot-org/followers","following_url":"https://api.github.com/users/code-dot-org/following{/other_user}","gists_url":"https://api.github.com/users/code-dot-org/gists{/gist_id}","starred_url":"https://api.github.com/users/code-dot-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-dot-org/subscriptions","organizations_url":"https://api.github.com/users/code-dot-org/orgs","repos_url":"https://api.github.com/users/code-dot-org/repos","events_url":"https://api.github.com/users/code-dot-org/events{/privacy}","received_events_url":"https://api.github.com/users/code-dot-org/received_events","type":"Organization","site_admin":false},"repo":{"id":24250009,"name":"code-dot-org","full_name":"code-dot-org/code-dot-org","owner":{"login":"code-dot-org","id":5124627,"avatar_url":"https://avatars.githubusercontent.com/u/5124627?v=3","gravatar_id":"","url":"https://api.github.com/users/code-dot-org","html_url":"https://github.com/code-dot-org","followers_url":"https://api.github.com/users/code-dot-org/followers","following_url":"https://api.github.com/users/code-dot-org/following{/other_user}","gists_url":"https://api.github.com/users/code-dot-org/gists{/gist_id}","starred_url":"https://api.github.com/users/code-dot-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-dot-org/subscriptions","organizations_url":"https://api.github.com/users/code-dot-org/orgs","repos_url":"https://api.github.com/users/code-dot-org/repos","events_url":"https://api.github.com/users/code-dot-org/events{/privacy}","received_events_url":"https://api.github.com/users/code-dot-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-dot-org/code-dot-org","description":"The code powering code.org and studio.code.org","fork":false,"url":"https://api.github.com/repos/code-dot-org/code-dot-org","forks_url":"https://api.github.com/repos/code-dot-org/code-dot-org/forks","keys_url":"https://api.github.com/repos/code-dot-org/code-dot-org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-dot-org/code-dot-org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-dot-org/code-dot-org/teams","hooks_url":"https://api.github.com/repos/code-dot-org/code-dot-org/hooks","issue_events_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/events{/number}","events_url":"https://api.github.com/repos/code-dot-org/code-dot-org/events","assignees_url":"https://api.github.com/repos/code-dot-org/code-dot-org/assignees{/user}","branches_url":"https://api.github.com/repos/code-dot-org/code-dot-org/branches{/branch}","tags_url":"https://api.github.com/repos/code-dot-org/code-dot-org/tags","blobs_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-dot-org/code-dot-org/statuses/{sha}","languages_url":"https://api.github.com/repos/code-dot-org/code-dot-org/languages","stargazers_url":"https://api.github.com/repos/code-dot-org/code-dot-org/stargazers","contributors_url":"https://api.github.com/repos/code-dot-org/code-dot-org/contributors","subscribers_url":"https://api.github.com/repos/code-dot-org/code-dot-org/subscribers","subscription_url":"https://api.github.com/repos/code-dot-org/code-dot-org/subscription","commits_url":"https://api.github.com/repos/code-dot-org/code-dot-org/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-dot-org/code-dot-org/contents/{+path}","compare_url":"https://api.github.com/repos/code-dot-org/code-dot-org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-dot-org/code-dot-org/merges","archive_url":"https://api.github.com/repos/code-dot-org/code-dot-org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-dot-org/code-dot-org/downloads","issues_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues{/number}","pulls_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls{/number}","milestones_url":"https://api.github.com/repos/code-dot-org/code-dot-org/milestones{/number}","notifications_url":"https://api.github.com/repos/code-dot-org/code-dot-org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-dot-org/code-dot-org/labels{/name}","releases_url":"https://api.github.com/repos/code-dot-org/code-dot-org/releases{/id}","deployments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/deployments","created_at":"2014-09-20T00:46:11Z","updated_at":"2016-05-24T18:28:39Z","pushed_at":"2016-05-24T22:34:20Z","git_url":"git://github.com/code-dot-org/code-dot-org.git","ssh_url":"git@github.com:code-dot-org/code-dot-org.git","clone_url":"https://github.com/code-dot-org/code-dot-org.git","svn_url":"https://github.com/code-dot-org/code-dot-org","homepage":"http://code.org","size":4668184,"stargazers_count":117,"watchers_count":117,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":70,"mirror_url":null,"open_issues_count":51,"forks":70,"open_issues":51,"watchers":117,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/8563"},"html":{"href":"https://github.com/code-dot-org/code-dot-org/pull/8563"},"issue":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/8563"},"comments":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/8563/comments"},"review_comments":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/8563/comments"},"review_comment":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/8563/commits"},"statuses":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/statuses/448a29418bc710e9644f1cb5aa38d14a03ca2112"}}}}
{"actor":{"display_login":"bcjordan"}}