{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/147857435","pull_request_review_id":73012958,"id":147857435,"diff_hunk":"@@ -18,29 +18,46 @@ import { getPostTotalCommentsCount } from 'state/comments/selectors';\n \n class CommentButton extends Component {\n \tstatic propTypes = {\n-\t\tonClick: PropTypes.func,\n-\t\ttagName: PropTypes.string,\n \t\tcommentCount: PropTypes.number,\n+\t\tlink: PropTypes.string,\n+\t\tonClick: PropTypes.func,\n \t\tshowLabel: PropTypes.bool,\n+\t\ttagName: PropTypes.string,\n+\t\ttarget: PropTypes.string,\n \t};\n \n \tstatic defaultProps = {\n-\t\tonClick: noop,\n-\t\ttagName: 'li',\n-\t\tsize: 24,\n \t\tcommentCount: 0,\n+\t\tlink: null,\n+\t\tonClick: noop,\n \t\tshowLabel: true,\n+\t\tsize: 24,\n+\t\ttagName: 'li',\n+\t\ttarget: null,\n \t};\n \n \trender() {\n-\t\tconst { translate, commentCount, onClick, showLabel, tagName: containerTag } = this.props;\n+\t\tconst {\n+\t\t\tcommentCount,\n+\t\t\tlink,\n+\t\t\tonClick,\n+\t\t\tshowLabel,\n+\t\t\ttagName: containerTag,\n+\t\t\ttarget,\n+\t\t\ttranslate,\n+\t\t} = this.props;\n \n \t\treturn React.createElement(\n \t\t\tcontainerTag,","path":"client/blocks/comment-button/index.jsx","position":49,"original_position":49,"commit_id":"f58450568b4542de91d6aad80680796d807f56b2","original_commit_id":"f58450568b4542de91d6aad80680796d807f56b2","user":{"login":"kwight","id":349751,"avatar_url":"https://avatars2.githubusercontent.com/u/349751?v=4","gravatar_id":"","url":"https://api.github.com/users/kwight","html_url":"https://github.com/kwight","followers_url":"https://api.github.com/users/kwight/followers","following_url":"https://api.github.com/users/kwight/following{/other_user}","gists_url":"https://api.github.com/users/kwight/gists{/gist_id}","starred_url":"https://api.github.com/users/kwight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwight/subscriptions","organizations_url":"https://api.github.com/users/kwight/orgs","repos_url":"https://api.github.com/users/kwight/repos","events_url":"https://api.github.com/users/kwight/events{/privacy}","received_events_url":"https://api.github.com/users/kwight/received_events","type":"User","site_admin":false},"body":"I've seen `li`, `div`, and `a`.","created_at":"2017-10-30T22:57:17Z","updated_at":"2017-10-30T22:57:17Z","html_url":"https://github.com/Automattic/wp-calypso/pull/19239#discussion_r147857435","pull_request_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/19239","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/147857435"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/19239#discussion_r147857435"},"pull_request":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/19239"}},"in_reply_to_id":147536733},"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/19239","id":149256931,"html_url":"https://github.com/Automattic/wp-calypso/pull/19239","diff_url":"https://github.com/Automattic/wp-calypso/pull/19239.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/19239.patch","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/19239","number":19239,"state":"open","locked":false,"title":"Update the CommentButton block to be able to accept a link and target.","user":{"login":"kwight","id":349751,"avatar_url":"https://avatars2.githubusercontent.com/u/349751?v=4","gravatar_id":"","url":"https://api.github.com/users/kwight","html_url":"https://github.com/kwight","followers_url":"https://api.github.com/users/kwight/followers","following_url":"https://api.github.com/users/kwight/following{/other_user}","gists_url":"https://api.github.com/users/kwight/gists{/gist_id}","starred_url":"https://api.github.com/users/kwight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwight/subscriptions","organizations_url":"https://api.github.com/users/kwight/orgs","repos_url":"https://api.github.com/users/kwight/repos","events_url":"https://api.github.com/users/kwight/events{/privacy}","received_events_url":"https://api.github.com/users/kwight/received_events","type":"User","site_admin":false},"body":"This PR updates the `CommentButton` block to accept `link` and `target` props, allowing the component to better use anchor (`a`) elements as a link to elsewhere.\r\n\r\n<img width=\"1174\" alt=\"screen shot 2017-10-24 at 5 04 36 pm\" src=\"https://user-images.githubusercontent.com/349751/32118960-85d5bfd8-bb08-11e7-89f3-43018b085615.png\">\r\n\r\nWith this change, we can then point the Post card's `CommentButton` at `/posts/:site` to the upcoming post-specific view of comments (`/comments/:status/:site/:post-id`).\r\n\r\nSee: https://github.com/Automattic/wp-calypso/issues/18332\r\n\r\n**Testing**\r\n* Load this branch, and go to Blog Posts in the sidebar. Verify that the comments icon indicated in the screenshot above displays the post's comments properly, with no errors.\r\n* In `/client/blocks/post-actions/index.jsx` at L76, change the `tagName` to an anchor and add a `link` and `target` to test with:\r\n```\r\ntagName=\"a\"\r\nlink=\"http://google.com\"\r\ntarget=\"_blank\"\r\n```","created_at":"2017-10-27T18:32:23Z","updated_at":"2017-10-30T22:57:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f661b09033b7a52a7c8c792a4b5c127d9193af5","assignee":{"login":"kwight","id":349751,"avatar_url":"https://avatars2.githubusercontent.com/u/349751?v=4","gravatar_id":"","url":"https://api.github.com/users/kwight","html_url":"https://github.com/kwight","followers_url":"https://api.github.com/users/kwight/followers","following_url":"https://api.github.com/users/kwight/following{/other_user}","gists_url":"https://api.github.com/users/kwight/gists{/gist_id}","starred_url":"https://api.github.com/users/kwight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwight/subscriptions","organizations_url":"https://api.github.com/users/kwight/orgs","repos_url":"https://api.github.com/users/kwight/repos","events_url":"https://api.github.com/users/kwight/events{/privacy}","received_events_url":"https://api.github.com/users/kwight/received_events","type":"User","site_admin":false},"assignees":[{"login":"kwight","id":349751,"avatar_url":"https://avatars2.githubusercontent.com/u/349751?v=4","gravatar_id":"","url":"https://api.github.com/users/kwight","html_url":"https://github.com/kwight","followers_url":"https://api.github.com/users/kwight/followers","following_url":"https://api.github.com/users/kwight/following{/other_user}","gists_url":"https://api.github.com/users/kwight/gists{/gist_id}","starred_url":"https://api.github.com/users/kwight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwight/subscriptions","organizations_url":"https://api.github.com/users/kwight/orgs","repos_url":"https://api.github.com/users/kwight/repos","events_url":"https://api.github.com/users/kwight/events{/privacy}","received_events_url":"https://api.github.com/users/kwight/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"samouri","id":4656974,"avatar_url":"https://avatars1.githubusercontent.com/u/4656974?v=4","gravatar_id":"","url":"https://api.github.com/users/samouri","html_url":"https://github.com/samouri","followers_url":"https://api.github.com/users/samouri/followers","following_url":"https://api.github.com/users/samouri/following{/other_user}","gists_url":"https://api.github.com/users/samouri/gists{/gist_id}","starred_url":"https://api.github.com/users/samouri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samouri/subscriptions","organizations_url":"https://api.github.com/users/samouri/orgs","repos_url":"https://api.github.com/users/samouri/repos","events_url":"https://api.github.com/users/samouri/events{/privacy}","received_events_url":"https://api.github.com/users/samouri/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/19239/commits","review_comments_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/19239/comments","review_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/19239/comments","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/f58450568b4542de91d6aad80680796d807f56b2","head":{"label":"Automattic:add/comment-button-links","ref":"add/comment-button-links","sha":"f58450568b4542de91d6aad80680796d807f56b2","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The new JavaScript- and API-powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2017-10-30T13:51:17Z","pushed_at":"2017-10-30T22:54:20Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":76719,"stargazers_count":9370,"watchers_count":9370,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1283,"mirror_url":null,"archived":false,"open_issues_count":2300,"forks":1283,"open_issues":2300,"watchers":9370,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"8d9b3797df1162196090275ae9f6dae1cbcaf1d1","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The new JavaScript- and API-powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2017-10-30T13:51:17Z","pushed_at":"2017-10-30T22:54:20Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":76719,"stargazers_count":9370,"watchers_count":9370,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1283,"mirror_url":null,"archived":false,"open_issues_count":2300,"forks":1283,"open_issues":2300,"watchers":9370,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/19239"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/19239"},"issue":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/19239"},"comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/19239/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/19239/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/19239/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/wp-calypso/statuses/f58450568b4542de91d6aad80680796d807f56b2"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"kwight"}}