{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/31784240","id":31784240,"diff_hunk":"@@ -1,5 +1,6 @@\n % if len(nodes):\n     <ul class=\"list-group ${'sortable' if sortable and 'write' in user['permissions'] else ''}\">\n+      <span id=\"componentScope\">","path":"website/templates/util/render_nodes.mako","position":null,"original_position":3,"commit_id":"b9e2f2f7565e7ae312115c36ee6dd29ee5c87d4f","original_commit_id":"78d5cba9545995fb5fad6def7c9e973477432464","user":{"login":"leb2dg","id":7131985,"avatar_url":"https://avatars.githubusercontent.com/u/7131985?v=3","gravatar_id":"","url":"https://api.github.com/users/leb2dg","html_url":"https://github.com/leb2dg","followers_url":"https://api.github.com/users/leb2dg/followers","following_url":"https://api.github.com/users/leb2dg/following{/other_user}","gists_url":"https://api.github.com/users/leb2dg/gists{/gist_id}","starred_url":"https://api.github.com/users/leb2dg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leb2dg/subscriptions","organizations_url":"https://api.github.com/users/leb2dg/orgs","repos_url":"https://api.github.com/users/leb2dg/repos","events_url":"https://api.github.com/users/leb2dg/events{/privacy}","received_events_url":"https://api.github.com/users/leb2dg/received_events","type":"User","site_admin":false},"body":"I added this, thank for the tip!","created_at":"2015-06-05T02:44:28Z","updated_at":"2015-06-05T02:44:28Z","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/2953#discussion_r31784240","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/2953","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/31784240"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/2953#discussion_r31784240"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/2953"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/2953","id":36862529,"html_url":"https://github.com/CenterForOpenScience/osf.io/pull/2953","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/2953.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/2953.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/2953","number":2953,"state":"open","locked":false,"title":"[Feature] Add component icons to project dashboard","user":{"login":"leb2dg","id":7131985,"avatar_url":"https://avatars.githubusercontent.com/u/7131985?v=3","gravatar_id":"","url":"https://api.github.com/users/leb2dg","html_url":"https://github.com/leb2dg","followers_url":"https://api.github.com/users/leb2dg/followers","following_url":"https://api.github.com/users/leb2dg/following{/other_user}","gists_url":"https://api.github.com/users/leb2dg/gists{/gist_id}","starred_url":"https://api.github.com/users/leb2dg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leb2dg/subscriptions","organizations_url":"https://api.github.com/users/leb2dg/orgs","repos_url":"https://api.github.com/users/leb2dg/repos","events_url":"https://api.github.com/users/leb2dg/events{/privacy}","received_events_url":"https://api.github.com/users/leb2dg/received_events","type":"User","site_admin":false},"body":"# Purpose\r\n\r\nThis resolves issue #2678. There are no component icons that are displayed in the component widget on the project dashboard page.\r\n\r\n# Changes\r\n\r\nThere is now a custom binding called *getIcon* defined in osfHelpers.js that takes an element and a component category and then adds the proper icon from the icon map as a class to the element that is was called upon. Another binding called *stopBinding* is required to allow knockout to bind in the proper location. Due to modularity of the project dashboard page, the scope needed for *getIcon* enveloped another binding in render_node.js. Using *stopBinding*, the scope can be temporarily dissolved so that the inner binding can function properly. Unfortunately, the only other way I found to get around this issue was to restructure the scopes which is not practical. *getIcon* is bound on the *project-dashboard-page.js* and is only bound if the project has components.\r\n\r\n# Side effects\r\n\r\nIn the component widget of the project dashboard page, the icon is displayed next to the title of the component. If the component is private then it displays the icon to the right of the lock icon. This effects the top project page and if the components of the project also have components.\r\n\r\nFix:\r\n![screen shot 2015-06-03 at 2 00 38 pm](https://cloud.githubusercontent.com/assets/7131985/7968107/a9c4b1de-09fc-11e5-9b95-23e9f0a0ceaf.png)\r\n\r\n\r\n","created_at":"2015-06-03T18:27:56Z","updated_at":"2015-06-05T02:44:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fecc90989064b09f4ebb12f920d522b934232bc3","assignee":{"login":"samanehsan","id":6414394,"avatar_url":"https://avatars.githubusercontent.com/u/6414394?v=3","gravatar_id":"","url":"https://api.github.com/users/samanehsan","html_url":"https://github.com/samanehsan","followers_url":"https://api.github.com/users/samanehsan/followers","following_url":"https://api.github.com/users/samanehsan/following{/other_user}","gists_url":"https://api.github.com/users/samanehsan/gists{/gist_id}","starred_url":"https://api.github.com/users/samanehsan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samanehsan/subscriptions","organizations_url":"https://api.github.com/users/samanehsan/orgs","repos_url":"https://api.github.com/users/samanehsan/repos","events_url":"https://api.github.com/users/samanehsan/events{/privacy}","received_events_url":"https://api.github.com/users/samanehsan/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/2953/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/2953/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/2953/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/b9e2f2f7565e7ae312115c36ee6dd29ee5c87d4f","head":{"label":"leb2dg:add_component_icons","ref":"add_component_icons","sha":"b9e2f2f7565e7ae312115c36ee6dd29ee5c87d4f","user":{"login":"leb2dg","id":7131985,"avatar_url":"https://avatars.githubusercontent.com/u/7131985?v=3","gravatar_id":"","url":"https://api.github.com/users/leb2dg","html_url":"https://github.com/leb2dg","followers_url":"https://api.github.com/users/leb2dg/followers","following_url":"https://api.github.com/users/leb2dg/following{/other_user}","gists_url":"https://api.github.com/users/leb2dg/gists{/gist_id}","starred_url":"https://api.github.com/users/leb2dg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leb2dg/subscriptions","organizations_url":"https://api.github.com/users/leb2dg/orgs","repos_url":"https://api.github.com/users/leb2dg/repos","events_url":"https://api.github.com/users/leb2dg/events{/privacy}","received_events_url":"https://api.github.com/users/leb2dg/received_events","type":"User","site_admin":false},"repo":{"id":36022297,"name":"osf.io","full_name":"leb2dg/osf.io","owner":{"login":"leb2dg","id":7131985,"avatar_url":"https://avatars.githubusercontent.com/u/7131985?v=3","gravatar_id":"","url":"https://api.github.com/users/leb2dg","html_url":"https://github.com/leb2dg","followers_url":"https://api.github.com/users/leb2dg/followers","following_url":"https://api.github.com/users/leb2dg/following{/other_user}","gists_url":"https://api.github.com/users/leb2dg/gists{/gist_id}","starred_url":"https://api.github.com/users/leb2dg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leb2dg/subscriptions","organizations_url":"https://api.github.com/users/leb2dg/orgs","repos_url":"https://api.github.com/users/leb2dg/repos","events_url":"https://api.github.com/users/leb2dg/events{/privacy}","received_events_url":"https://api.github.com/users/leb2dg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/leb2dg/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/leb2dg/osf.io","forks_url":"https://api.github.com/repos/leb2dg/osf.io/forks","keys_url":"https://api.github.com/repos/leb2dg/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leb2dg/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leb2dg/osf.io/teams","hooks_url":"https://api.github.com/repos/leb2dg/osf.io/hooks","issue_events_url":"https://api.github.com/repos/leb2dg/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/leb2dg/osf.io/events","assignees_url":"https://api.github.com/repos/leb2dg/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/leb2dg/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/leb2dg/osf.io/tags","blobs_url":"https://api.github.com/repos/leb2dg/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leb2dg/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leb2dg/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/leb2dg/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leb2dg/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/leb2dg/osf.io/languages","stargazers_url":"https://api.github.com/repos/leb2dg/osf.io/stargazers","contributors_url":"https://api.github.com/repos/leb2dg/osf.io/contributors","subscribers_url":"https://api.github.com/repos/leb2dg/osf.io/subscribers","subscription_url":"https://api.github.com/repos/leb2dg/osf.io/subscription","commits_url":"https://api.github.com/repos/leb2dg/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/leb2dg/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/leb2dg/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/leb2dg/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/leb2dg/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/leb2dg/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leb2dg/osf.io/merges","archive_url":"https://api.github.com/repos/leb2dg/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leb2dg/osf.io/downloads","issues_url":"https://api.github.com/repos/leb2dg/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/leb2dg/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/leb2dg/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/leb2dg/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leb2dg/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/leb2dg/osf.io/releases{/id}","created_at":"2015-05-21T15:51:35Z","updated_at":"2015-05-21T15:51:38Z","pushed_at":"2015-06-05T02:43:37Z","git_url":"git://github.com/leb2dg/osf.io.git","ssh_url":"git@github.com:leb2dg/osf.io.git","clone_url":"https://github.com/leb2dg/osf.io.git","svn_url":"https://github.com/leb2dg/osf.io","homepage":"http://osf.io","size":88091,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"CenterForOpenScience:develop","ref":"develop","sha":"a68a53a266e198cd92b12f3fef7a0f8ddaa98a69","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":10199599,"name":"osf.io","full_name":"CenterForOpenScience/osf.io","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/osf.io","description":"Facilitating Open Science","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/osf.io","forks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/releases{/id}","created_at":"2013-05-21T15:53:37Z","updated_at":"2015-06-04T09:27:14Z","pushed_at":"2015-06-05T02:43:38Z","git_url":"git://github.com/CenterForOpenScience/osf.io.git","ssh_url":"git@github.com:CenterForOpenScience/osf.io.git","clone_url":"https://github.com/CenterForOpenScience/osf.io.git","svn_url":"https://github.com/CenterForOpenScience/osf.io","homepage":"http://osf.io","size":214531,"stargazers_count":108,"watchers_count":108,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":96,"mirror_url":null,"open_issues_count":434,"forks":96,"open_issues":434,"watchers":108,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/2953"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/2953"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/2953"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/2953/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/2953/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/2953/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/b9e2f2f7565e7ae312115c36ee6dd29ee5c87d4f"}}}}