{"action":"created","comment":{"url":"https://api.github.com/repos/coralproject/talk/pulls/comments/138140398","pull_request_review_id":61897964,"id":138140398,"diff_hunk":"@@ -1,14 +1,72 @@\n+import React from 'react';\n+import {bindActionCreators} from 'redux';\n import {gql, compose} from 'react-apollo';\n+import {openTooltip, closeTooltip} from '../actions';\n import {can} from 'plugin-api/beta/client/services';\n+import {getShallowChanges} from 'plugin-api/beta/client/utils';\n import ModerationActions from '../components/ModerationActions';\n import {connect, excludeIf, withFragments} from 'plugin-api/beta/client/hocs';\n \n-const mapStateToProps = ({auth}) => ({\n-  user: auth.user\n+class ModerationActionsContainer extends React.Component {\n+\n+  shouldComponentUpdate(nextProps) {\n+    \n+    // Specifically handle `showTooltipForComment` if it is the only change.\n+    const changes = getShallowChanges(this.props, nextProps);\n+    if (changes.length === 1 && changes[0] === 'showTooltipForComment') {\n+      const commentId = this.props.comment.id;\n+      if (\n+        commentId !== this.props.showTooltipForComment &&\n+        commentId !== nextProps.showTooltipForComment\n+      ) {\n+        return false;\n+      }\n+    }\n+    \n+    // Prevent Slot from rerendering when no props has shallowly changed.\n+    return changes.length !== 0;\n+  }\n+\n+  toogleTooltip = () => {\n+    if (this.props.showTooltipForComment === this.props.comment.id) {","path":"plugins/talk-plugin-moderation-actions/client/containers/ModerationActions.js","position":33,"original_position":33,"commit_id":"06c45faeb03ebdebbdcf2f29e22b14021a521284","original_commit_id":"06c45faeb03ebdebbdcf2f29e22b14021a521284","user":{"login":"cvle","id":14221600,"avatar_url":"https://avatars2.githubusercontent.com/u/14221600?v=4","gravatar_id":"","url":"https://api.github.com/users/cvle","html_url":"https://github.com/cvle","followers_url":"https://api.github.com/users/cvle/followers","following_url":"https://api.github.com/users/cvle/following{/other_user}","gists_url":"https://api.github.com/users/cvle/gists{/gist_id}","starred_url":"https://api.github.com/users/cvle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cvle/subscriptions","organizations_url":"https://api.github.com/users/cvle/orgs","repos_url":"https://api.github.com/users/cvle/repos","events_url":"https://api.github.com/users/cvle/events{/privacy}","received_events_url":"https://api.github.com/users/cvle/received_events","type":"User","site_admin":false},"body":"Following my other comments this should rather be sth like `isMenuVisibile`","created_at":"2017-09-11T17:41:06Z","updated_at":"2017-09-11T17:41:06Z","html_url":"https://github.com/coralproject/talk/pull/942#discussion_r138140398","pull_request_url":"https://api.github.com/repos/coralproject/talk/pulls/942","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/coralproject/talk/pulls/comments/138140398"},"html":{"href":"https://github.com/coralproject/talk/pull/942#discussion_r138140398"},"pull_request":{"href":"https://api.github.com/repos/coralproject/talk/pulls/942"}},"in_reply_to_id":138135938},"pull_request":{"url":"https://api.github.com/repos/coralproject/talk/pulls/942","id":140388021,"html_url":"https://github.com/coralproject/talk/pull/942","diff_url":"https://github.com/coralproject/talk/pull/942.diff","patch_url":"https://github.com/coralproject/talk/pull/942.patch","issue_url":"https://api.github.com/repos/coralproject/talk/issues/942","number":942,"state":"open","locked":false,"title":"In-Stream Moderation Updates","user":{"login":"okbel","id":1401559,"avatar_url":"https://avatars2.githubusercontent.com/u/1401559?v=4","gravatar_id":"","url":"https://api.github.com/users/okbel","html_url":"https://github.com/okbel","followers_url":"https://api.github.com/users/okbel/followers","following_url":"https://api.github.com/users/okbel/following{/other_user}","gists_url":"https://api.github.com/users/okbel/gists{/gist_id}","starred_url":"https://api.github.com/users/okbel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okbel/subscriptions","organizations_url":"https://api.github.com/users/okbel/orgs","repos_url":"https://api.github.com/users/okbel/repos","events_url":"https://api.github.com/users/okbel/events{/privacy}","received_events_url":"https://api.github.com/users/okbel/received_events","type":"User","site_admin":false},"body":"## In-Stream Moderation Updates\r\n\r\n## What does this PR do?\r\n- Adds modifications to In-Stream Moderation such as:\r\n  - Naming conventions\r\n  - Updating the cache\r\n  - Adding a reducer for the Moderation Tooltip\r\n","created_at":"2017-09-11T17:09:33Z","updated_at":"2017-09-11T17:41:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54a663273877edd6ffc5feb163990b8d22903f02","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/coralproject/talk/pulls/942/commits","review_comments_url":"https://api.github.com/repos/coralproject/talk/pulls/942/comments","review_comment_url":"https://api.github.com/repos/coralproject/talk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coralproject/talk/issues/942/comments","statuses_url":"https://api.github.com/repos/coralproject/talk/statuses/06c45faeb03ebdebbdcf2f29e22b14021a521284","head":{"label":"coralproject:instream-updates","ref":"instream-updates","sha":"06c45faeb03ebdebbdcf2f29e22b14021a521284","user":{"login":"coralproject","id":9255912,"avatar_url":"https://avatars2.githubusercontent.com/u/9255912?v=4","gravatar_id":"","url":"https://api.github.com/users/coralproject","html_url":"https://github.com/coralproject","followers_url":"https://api.github.com/users/coralproject/followers","following_url":"https://api.github.com/users/coralproject/following{/other_user}","gists_url":"https://api.github.com/users/coralproject/gists{/gist_id}","starred_url":"https://api.github.com/users/coralproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coralproject/subscriptions","organizations_url":"https://api.github.com/users/coralproject/orgs","repos_url":"https://api.github.com/users/coralproject/repos","events_url":"https://api.github.com/users/coralproject/events{/privacy}","received_events_url":"https://api.github.com/users/coralproject/received_events","type":"Organization","site_admin":false},"repo":{"id":72454242,"name":"talk","full_name":"coralproject/talk","owner":{"login":"coralproject","id":9255912,"avatar_url":"https://avatars2.githubusercontent.com/u/9255912?v=4","gravatar_id":"","url":"https://api.github.com/users/coralproject","html_url":"https://github.com/coralproject","followers_url":"https://api.github.com/users/coralproject/followers","following_url":"https://api.github.com/users/coralproject/following{/other_user}","gists_url":"https://api.github.com/users/coralproject/gists{/gist_id}","starred_url":"https://api.github.com/users/coralproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coralproject/subscriptions","organizations_url":"https://api.github.com/users/coralproject/orgs","repos_url":"https://api.github.com/users/coralproject/repos","events_url":"https://api.github.com/users/coralproject/events{/privacy}","received_events_url":"https://api.github.com/users/coralproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coralproject/talk","description":"A better commenting experience from Mozilla, The New York Times, and The Washington Post.","fork":false,"url":"https://api.github.com/repos/coralproject/talk","forks_url":"https://api.github.com/repos/coralproject/talk/forks","keys_url":"https://api.github.com/repos/coralproject/talk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coralproject/talk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coralproject/talk/teams","hooks_url":"https://api.github.com/repos/coralproject/talk/hooks","issue_events_url":"https://api.github.com/repos/coralproject/talk/issues/events{/number}","events_url":"https://api.github.com/repos/coralproject/talk/events","assignees_url":"https://api.github.com/repos/coralproject/talk/assignees{/user}","branches_url":"https://api.github.com/repos/coralproject/talk/branches{/branch}","tags_url":"https://api.github.com/repos/coralproject/talk/tags","blobs_url":"https://api.github.com/repos/coralproject/talk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coralproject/talk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coralproject/talk/git/refs{/sha}","trees_url":"https://api.github.com/repos/coralproject/talk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coralproject/talk/statuses/{sha}","languages_url":"https://api.github.com/repos/coralproject/talk/languages","stargazers_url":"https://api.github.com/repos/coralproject/talk/stargazers","contributors_url":"https://api.github.com/repos/coralproject/talk/contributors","subscribers_url":"https://api.github.com/repos/coralproject/talk/subscribers","subscription_url":"https://api.github.com/repos/coralproject/talk/subscription","commits_url":"https://api.github.com/repos/coralproject/talk/commits{/sha}","git_commits_url":"https://api.github.com/repos/coralproject/talk/git/commits{/sha}","comments_url":"https://api.github.com/repos/coralproject/talk/comments{/number}","issue_comment_url":"https://api.github.com/repos/coralproject/talk/issues/comments{/number}","contents_url":"https://api.github.com/repos/coralproject/talk/contents/{+path}","compare_url":"https://api.github.com/repos/coralproject/talk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coralproject/talk/merges","archive_url":"https://api.github.com/repos/coralproject/talk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coralproject/talk/downloads","issues_url":"https://api.github.com/repos/coralproject/talk/issues{/number}","pulls_url":"https://api.github.com/repos/coralproject/talk/pulls{/number}","milestones_url":"https://api.github.com/repos/coralproject/talk/milestones{/number}","notifications_url":"https://api.github.com/repos/coralproject/talk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coralproject/talk/labels{/name}","releases_url":"https://api.github.com/repos/coralproject/talk/releases{/id}","deployments_url":"https://api.github.com/repos/coralproject/talk/deployments","created_at":"2016-10-31T16:14:05Z","updated_at":"2017-09-11T14:06:58Z","pushed_at":"2017-09-11T17:10:12Z","git_url":"git://github.com/coralproject/talk.git","ssh_url":"git@github.com:coralproject/talk.git","clone_url":"https://github.com/coralproject/talk.git","svn_url":"https://github.com/coralproject/talk","homepage":"https://coralproject.net/","size":9404,"stargazers_count":239,"watchers_count":239,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":44,"mirror_url":null,"open_issues_count":8,"forks":44,"open_issues":8,"watchers":239,"default_branch":"master"}},"base":{"label":"coralproject:master","ref":"master","sha":"ab1f1dee3e1110e276724c103bf681054b78b7e2","user":{"login":"coralproject","id":9255912,"avatar_url":"https://avatars2.githubusercontent.com/u/9255912?v=4","gravatar_id":"","url":"https://api.github.com/users/coralproject","html_url":"https://github.com/coralproject","followers_url":"https://api.github.com/users/coralproject/followers","following_url":"https://api.github.com/users/coralproject/following{/other_user}","gists_url":"https://api.github.com/users/coralproject/gists{/gist_id}","starred_url":"https://api.github.com/users/coralproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coralproject/subscriptions","organizations_url":"https://api.github.com/users/coralproject/orgs","repos_url":"https://api.github.com/users/coralproject/repos","events_url":"https://api.github.com/users/coralproject/events{/privacy}","received_events_url":"https://api.github.com/users/coralproject/received_events","type":"Organization","site_admin":false},"repo":{"id":72454242,"name":"talk","full_name":"coralproject/talk","owner":{"login":"coralproject","id":9255912,"avatar_url":"https://avatars2.githubusercontent.com/u/9255912?v=4","gravatar_id":"","url":"https://api.github.com/users/coralproject","html_url":"https://github.com/coralproject","followers_url":"https://api.github.com/users/coralproject/followers","following_url":"https://api.github.com/users/coralproject/following{/other_user}","gists_url":"https://api.github.com/users/coralproject/gists{/gist_id}","starred_url":"https://api.github.com/users/coralproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coralproject/subscriptions","organizations_url":"https://api.github.com/users/coralproject/orgs","repos_url":"https://api.github.com/users/coralproject/repos","events_url":"https://api.github.com/users/coralproject/events{/privacy}","received_events_url":"https://api.github.com/users/coralproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coralproject/talk","description":"A better commenting experience from Mozilla, The New York Times, and The Washington Post.","fork":false,"url":"https://api.github.com/repos/coralproject/talk","forks_url":"https://api.github.com/repos/coralproject/talk/forks","keys_url":"https://api.github.com/repos/coralproject/talk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coralproject/talk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coralproject/talk/teams","hooks_url":"https://api.github.com/repos/coralproject/talk/hooks","issue_events_url":"https://api.github.com/repos/coralproject/talk/issues/events{/number}","events_url":"https://api.github.com/repos/coralproject/talk/events","assignees_url":"https://api.github.com/repos/coralproject/talk/assignees{/user}","branches_url":"https://api.github.com/repos/coralproject/talk/branches{/branch}","tags_url":"https://api.github.com/repos/coralproject/talk/tags","blobs_url":"https://api.github.com/repos/coralproject/talk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coralproject/talk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coralproject/talk/git/refs{/sha}","trees_url":"https://api.github.com/repos/coralproject/talk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coralproject/talk/statuses/{sha}","languages_url":"https://api.github.com/repos/coralproject/talk/languages","stargazers_url":"https://api.github.com/repos/coralproject/talk/stargazers","contributors_url":"https://api.github.com/repos/coralproject/talk/contributors","subscribers_url":"https://api.github.com/repos/coralproject/talk/subscribers","subscription_url":"https://api.github.com/repos/coralproject/talk/subscription","commits_url":"https://api.github.com/repos/coralproject/talk/commits{/sha}","git_commits_url":"https://api.github.com/repos/coralproject/talk/git/commits{/sha}","comments_url":"https://api.github.com/repos/coralproject/talk/comments{/number}","issue_comment_url":"https://api.github.com/repos/coralproject/talk/issues/comments{/number}","contents_url":"https://api.github.com/repos/coralproject/talk/contents/{+path}","compare_url":"https://api.github.com/repos/coralproject/talk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coralproject/talk/merges","archive_url":"https://api.github.com/repos/coralproject/talk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coralproject/talk/downloads","issues_url":"https://api.github.com/repos/coralproject/talk/issues{/number}","pulls_url":"https://api.github.com/repos/coralproject/talk/pulls{/number}","milestones_url":"https://api.github.com/repos/coralproject/talk/milestones{/number}","notifications_url":"https://api.github.com/repos/coralproject/talk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coralproject/talk/labels{/name}","releases_url":"https://api.github.com/repos/coralproject/talk/releases{/id}","deployments_url":"https://api.github.com/repos/coralproject/talk/deployments","created_at":"2016-10-31T16:14:05Z","updated_at":"2017-09-11T14:06:58Z","pushed_at":"2017-09-11T17:10:12Z","git_url":"git://github.com/coralproject/talk.git","ssh_url":"git@github.com:coralproject/talk.git","clone_url":"https://github.com/coralproject/talk.git","svn_url":"https://github.com/coralproject/talk","homepage":"https://coralproject.net/","size":9404,"stargazers_count":239,"watchers_count":239,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":44,"mirror_url":null,"open_issues_count":8,"forks":44,"open_issues":8,"watchers":239,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coralproject/talk/pulls/942"},"html":{"href":"https://github.com/coralproject/talk/pull/942"},"issue":{"href":"https://api.github.com/repos/coralproject/talk/issues/942"},"comments":{"href":"https://api.github.com/repos/coralproject/talk/issues/942/comments"},"review_comments":{"href":"https://api.github.com/repos/coralproject/talk/pulls/942/comments"},"review_comment":{"href":"https://api.github.com/repos/coralproject/talk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coralproject/talk/pulls/942/commits"},"statuses":{"href":"https://api.github.com/repos/coralproject/talk/statuses/06c45faeb03ebdebbdcf2f29e22b14021a521284"}},"author_association":"OWNER"}}
{"actor":{"display_login":"cvle"}}