{"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppia/pulls/comments/42215781","id":42215781,"diff_hunk":"@@ -0,0 +1,21 @@\n+oppia.directive('profileLinkText', [function() {\n+  return {\n+    restrict: 'E',\n+    scope: {\n+      linkedName: '@'\n+    },\n+    templateUrl: 'components/profileLinkText',\n+  };\n+}]);\n+\n+oppia.directive('profileLinkImage', [function() { \n+  return {\n+    restrict: 'E',\n+    transclude: true,\n+    scope: {\n+      linkedName: '@',\n+      linkedImage: '@'","path":"core/templates/dev/head/components/profileLink.js","position":17,"original_position":17,"commit_id":"1ae7ea78d4cd3a746bf1e72a7031bae5c31bd653","original_commit_id":"1ae7ea78d4cd3a746bf1e72a7031bae5c31bd653","user":{"login":"seanlip","id":10575562,"avatar_url":"https://avatars.githubusercontent.com/u/10575562?v=3","gravatar_id":"","url":"https://api.github.com/users/seanlip","html_url":"https://github.com/seanlip","followers_url":"https://api.github.com/users/seanlip/followers","following_url":"https://api.github.com/users/seanlip/following{/other_user}","gists_url":"https://api.github.com/users/seanlip/gists{/gist_id}","starred_url":"https://api.github.com/users/seanlip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanlip/subscriptions","organizations_url":"https://api.github.com/users/seanlip/orgs","repos_url":"https://api.github.com/users/seanlip/repos","events_url":"https://api.github.com/users/seanlip/events{/privacy}","received_events_url":"https://api.github.com/users/seanlip/received_events","type":"User","site_admin":false},"body":"I wouldn't transclude. Couldn't you build the image url based on the linkedName that's passed in? Grepping the backend, I see a ProfilePictureHandler, and looking in main.py it looks like it's accessible via /preferenceshandler/profile_picture. You could make a $http call for this.","created_at":"2015-10-16T07:33:52Z","updated_at":"2015-10-16T07:33:52Z","html_url":"https://github.com/oppia/oppia/pull/1036#discussion_r42215781","pull_request_url":"https://api.github.com/repos/oppia/oppia/pulls/1036","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments/42215781"},"html":{"href":"https://github.com/oppia/oppia/pull/1036#discussion_r42215781"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1036"}}},"pull_request":{"url":"https://api.github.com/repos/oppia/oppia/pulls/1036","id":47876785,"html_url":"https://github.com/oppia/oppia/pull/1036","diff_url":"https://github.com/oppia/oppia/pull/1036.diff","patch_url":"https://github.com/oppia/oppia/pull/1036.patch","issue_url":"https://api.github.com/repos/oppia/oppia/issues/1036","number":1036,"state":"open","locked":false,"title":"Make profiles discoverable","user":{"login":"rainehoover","id":6319025,"avatar_url":"https://avatars.githubusercontent.com/u/6319025?v=3","gravatar_id":"","url":"https://api.github.com/users/rainehoover","html_url":"https://github.com/rainehoover","followers_url":"https://api.github.com/users/rainehoover/followers","following_url":"https://api.github.com/users/rainehoover/following{/other_user}","gists_url":"https://api.github.com/users/rainehoover/gists{/gist_id}","starred_url":"https://api.github.com/users/rainehoover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainehoover/subscriptions","organizations_url":"https://api.github.com/users/rainehoover/orgs","repos_url":"https://api.github.com/users/rainehoover/repos","events_url":"https://api.github.com/users/rainehoover/events{/privacy}","received_events_url":"https://api.github.com/users/rainehoover/received_events","type":"User","site_admin":false},"body":"Made profile pages discoverable through text links on the exploration editor's history and feedback pages, and through profile pictures on the InformationCard modal in the play view and in the main navbar.\r\n\r\nQuestions for reviewers:\r\n\r\n- I use transclude in my image linking, so that I don't have to worry about all the different cases/classes/alternate links that might need to be passed in to recreate the original HTML that my link is replacing. I remember something about transclude being dangerous in my earlier Angular readings, and I didn't find it used much elsewhere in the code base. Is this the right approach?\r\n\r\n- In the text links, I made a first attempt at dealing with the edge case for admin and OppiaMigrationBot (neither have profile pages). In chatting with @seanlip, we talked about how down the line we change the comparisons to an \"in someAppropriateListName\" where someAppropriateListName = [\"OppiaMigrationBot\", \"admin\"]. Where is the best place to put said list?\r\n\r\nThanks in advance! Looking forward to feedback.","created_at":"2015-10-16T06:59:21Z","updated_at":"2015-10-16T07:33:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"020d1ec848bb0a3744bb6675c0404ce1c3c7198d","assignee":{"login":"seanlip","id":10575562,"avatar_url":"https://avatars.githubusercontent.com/u/10575562?v=3","gravatar_id":"","url":"https://api.github.com/users/seanlip","html_url":"https://github.com/seanlip","followers_url":"https://api.github.com/users/seanlip/followers","following_url":"https://api.github.com/users/seanlip/following{/other_user}","gists_url":"https://api.github.com/users/seanlip/gists{/gist_id}","starred_url":"https://api.github.com/users/seanlip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanlip/subscriptions","organizations_url":"https://api.github.com/users/seanlip/orgs","repos_url":"https://api.github.com/users/seanlip/repos","events_url":"https://api.github.com/users/seanlip/events{/privacy}","received_events_url":"https://api.github.com/users/seanlip/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/oppia/oppia/pulls/1036/commits","review_comments_url":"https://api.github.com/repos/oppia/oppia/pulls/1036/comments","review_comment_url":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/1036/comments","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/1ae7ea78d4cd3a746bf1e72a7031bae5c31bd653","head":{"label":"rainehoover:raine_profiles_discoverable","ref":"raine_profiles_discoverable","sha":"1ae7ea78d4cd3a746bf1e72a7031bae5c31bd653","user":{"login":"rainehoover","id":6319025,"avatar_url":"https://avatars.githubusercontent.com/u/6319025?v=3","gravatar_id":"","url":"https://api.github.com/users/rainehoover","html_url":"https://github.com/rainehoover","followers_url":"https://api.github.com/users/rainehoover/followers","following_url":"https://api.github.com/users/rainehoover/following{/other_user}","gists_url":"https://api.github.com/users/rainehoover/gists{/gist_id}","starred_url":"https://api.github.com/users/rainehoover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainehoover/subscriptions","organizations_url":"https://api.github.com/users/rainehoover/orgs","repos_url":"https://api.github.com/users/rainehoover/repos","events_url":"https://api.github.com/users/rainehoover/events{/privacy}","received_events_url":"https://api.github.com/users/rainehoover/received_events","type":"User","site_admin":false},"repo":{"id":43920200,"name":"oppia","full_name":"rainehoover/oppia","owner":{"login":"rainehoover","id":6319025,"avatar_url":"https://avatars.githubusercontent.com/u/6319025?v=3","gravatar_id":"","url":"https://api.github.com/users/rainehoover","html_url":"https://github.com/rainehoover","followers_url":"https://api.github.com/users/rainehoover/followers","following_url":"https://api.github.com/users/rainehoover/following{/other_user}","gists_url":"https://api.github.com/users/rainehoover/gists{/gist_id}","starred_url":"https://api.github.com/users/rainehoover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainehoover/subscriptions","organizations_url":"https://api.github.com/users/rainehoover/orgs","repos_url":"https://api.github.com/users/rainehoover/repos","events_url":"https://api.github.com/users/rainehoover/events{/privacy}","received_events_url":"https://api.github.com/users/rainehoover/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rainehoover/oppia","description":"Tool for collaboratively building interactive tutors.","fork":true,"url":"https://api.github.com/repos/rainehoover/oppia","forks_url":"https://api.github.com/repos/rainehoover/oppia/forks","keys_url":"https://api.github.com/repos/rainehoover/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rainehoover/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rainehoover/oppia/teams","hooks_url":"https://api.github.com/repos/rainehoover/oppia/hooks","issue_events_url":"https://api.github.com/repos/rainehoover/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/rainehoover/oppia/events","assignees_url":"https://api.github.com/repos/rainehoover/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/rainehoover/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/rainehoover/oppia/tags","blobs_url":"https://api.github.com/repos/rainehoover/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rainehoover/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rainehoover/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/rainehoover/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rainehoover/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/rainehoover/oppia/languages","stargazers_url":"https://api.github.com/repos/rainehoover/oppia/stargazers","contributors_url":"https://api.github.com/repos/rainehoover/oppia/contributors","subscribers_url":"https://api.github.com/repos/rainehoover/oppia/subscribers","subscription_url":"https://api.github.com/repos/rainehoover/oppia/subscription","commits_url":"https://api.github.com/repos/rainehoover/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/rainehoover/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/rainehoover/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/rainehoover/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/rainehoover/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/rainehoover/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rainehoover/oppia/merges","archive_url":"https://api.github.com/repos/rainehoover/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rainehoover/oppia/downloads","issues_url":"https://api.github.com/repos/rainehoover/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/rainehoover/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/rainehoover/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/rainehoover/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rainehoover/oppia/labels{/name}","releases_url":"https://api.github.com/repos/rainehoover/oppia/releases{/id}","created_at":"2015-10-08T22:44:41Z","updated_at":"2015-10-08T22:44:45Z","pushed_at":"2015-10-16T06:52:34Z","git_url":"git://github.com/rainehoover/oppia.git","ssh_url":"git@github.com:rainehoover/oppia.git","clone_url":"https://github.com/rainehoover/oppia.git","svn_url":"https://github.com/rainehoover/oppia","homepage":"https://www.oppia.org","size":37585,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"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":"oppia:develop","ref":"develop","sha":"e0f6f3a9c1cbbfe674320f36c4a9213f35e72959","user":{"login":"oppia","id":11620230,"avatar_url":"https://avatars.githubusercontent.com/u/11620230?v=3","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"repo":{"id":40687563,"name":"oppia","full_name":"oppia/oppia","owner":{"login":"oppia","id":11620230,"avatar_url":"https://avatars.githubusercontent.com/u/11620230?v=3","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oppia/oppia","description":"Tool for collaboratively building interactive tutors.","fork":false,"url":"https://api.github.com/repos/oppia/oppia","forks_url":"https://api.github.com/repos/oppia/oppia/forks","keys_url":"https://api.github.com/repos/oppia/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oppia/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oppia/oppia/teams","hooks_url":"https://api.github.com/repos/oppia/oppia/hooks","issue_events_url":"https://api.github.com/repos/oppia/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/oppia/oppia/events","assignees_url":"https://api.github.com/repos/oppia/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/oppia/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/oppia/oppia/tags","blobs_url":"https://api.github.com/repos/oppia/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oppia/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oppia/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/oppia/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/oppia/oppia/languages","stargazers_url":"https://api.github.com/repos/oppia/oppia/stargazers","contributors_url":"https://api.github.com/repos/oppia/oppia/contributors","subscribers_url":"https://api.github.com/repos/oppia/oppia/subscribers","subscription_url":"https://api.github.com/repos/oppia/oppia/subscription","commits_url":"https://api.github.com/repos/oppia/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/oppia/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/oppia/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/oppia/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/oppia/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/oppia/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oppia/oppia/merges","archive_url":"https://api.github.com/repos/oppia/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oppia/oppia/downloads","issues_url":"https://api.github.com/repos/oppia/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/oppia/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/oppia/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/oppia/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oppia/oppia/labels{/name}","releases_url":"https://api.github.com/repos/oppia/oppia/releases{/id}","created_at":"2015-08-14T00:16:14Z","updated_at":"2015-10-15T04:59:05Z","pushed_at":"2015-10-16T06:59:21Z","git_url":"git://github.com/oppia/oppia.git","ssh_url":"git@github.com:oppia/oppia.git","clone_url":"https://github.com/oppia/oppia.git","svn_url":"https://github.com/oppia/oppia","homepage":"https://www.oppia.org","size":44306,"stargazers_count":45,"watchers_count":45,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":60,"mirror_url":null,"open_issues_count":178,"forks":60,"open_issues":178,"watchers":45,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1036"},"html":{"href":"https://github.com/oppia/oppia/pull/1036"},"issue":{"href":"https://api.github.com/repos/oppia/oppia/issues/1036"},"comments":{"href":"https://api.github.com/repos/oppia/oppia/issues/1036/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1036/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1036/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppia/statuses/1ae7ea78d4cd3a746bf1e72a7031bae5c31bd653"}}}}