{"action":"created","comment":{"url":"https://api.github.com/repos/iodide-project/iodide/pulls/comments/216810067","pull_request_review_id":154381660,"id":216810067,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjgxMDA2Nw==","diff_hunk":"@@ -0,0 +1,140 @@\n+import React from 'react'\n+import Avatar from '@material-ui/core/Avatar'\n+import ExpandMore from '@material-ui/icons/ExpandMore'\n+\n+import Button from '@material-ui/core/Button'\n+import Menu from '@material-ui/core/Menu'\n+import Tooltip from '@material-ui/core/Tooltip'\n+\n+import MenuItem from '@material-ui/core/MenuItem'\n+import ListItemText from '@material-ui/core/ListItemText'\n+import NotebookMenuDivider from '../components/menu/notebook-menu-divider'\n+\n+export default class UserMenu extends React.Component {\n+  constructor(props) {\n+    super(props)\n+    this.state = {\n+      anchorElement: null,\n+      isLoggedIn: props.isAuthenticated,\n+    }\n+\n+    this.handleClick = this.handleClick.bind(this)\n+    this.goToProfile = this.goToProfile.bind(this)\n+    this.handleMenuClose = this.handleMenuClose.bind(this)\n+    this.login = this.login.bind(this)\n+    this.logout = this.logout.bind(this)\n+  }\n+\n+  handleClick(event) {\n+    this.setState({ anchorElement: event.currentTarget })\n+  }\n+\n+  handleMenuClose() {\n+    this.setState({ anchorElement: null })\n+  }\n+\n+  goToProfile() {\n+    // maybe we should replace this with Link from react-router-dom","path":"src/shared/user-menu.jsx","position":37,"original_position":37,"commit_id":"520c56c491c2bb672dd4c1dc87e6286cc32b307c","original_commit_id":"520c56c491c2bb672dd4c1dc87e6286cc32b307c","user":{"login":"wlach","id":20569,"node_id":"MDQ6VXNlcjIwNTY5","avatar_url":"https://avatars3.githubusercontent.com/u/20569?v=4","gravatar_id":"","url":"https://api.github.com/users/wlach","html_url":"https://github.com/wlach","followers_url":"https://api.github.com/users/wlach/followers","following_url":"https://api.github.com/users/wlach/following{/other_user}","gists_url":"https://api.github.com/users/wlach/gists{/gist_id}","starred_url":"https://api.github.com/users/wlach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlach/subscriptions","organizations_url":"https://api.github.com/users/wlach/orgs","repos_url":"https://api.github.com/users/wlach/repos","events_url":"https://api.github.com/users/wlach/events{/privacy}","received_events_url":"https://api.github.com/users/wlach/received_events","type":"User","site_admin":false},"body":"I think we're not going to be using react router, so may as well remove this comment.","created_at":"2018-09-11T20:26:24Z","updated_at":"2018-09-11T20:31:37Z","html_url":"https://github.com/iodide-project/iodide/pull/854#discussion_r216810067","pull_request_url":"https://api.github.com/repos/iodide-project/iodide/pulls/854","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/iodide-project/iodide/pulls/comments/216810067"},"html":{"href":"https://github.com/iodide-project/iodide/pull/854#discussion_r216810067"},"pull_request":{"href":"https://api.github.com/repos/iodide-project/iodide/pulls/854"}}},"pull_request":{"url":"https://api.github.com/repos/iodide-project/iodide/pulls/854","id":213748663,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNzQ4NjYz","html_url":"https://github.com/iodide-project/iodide/pull/854","diff_url":"https://github.com/iodide-project/iodide/pull/854.diff","patch_url":"https://github.com/iodide-project/iodide/pull/854.patch","issue_url":"https://api.github.com/repos/iodide-project/iodide/issues/854","number":854,"state":"open","locked":false,"title":"replace logout button with new user menu w/ avatar; apply same component to notebook","user":{"login":"hamilton","id":95735,"node_id":"MDQ6VXNlcjk1NzM1","avatar_url":"https://avatars1.githubusercontent.com/u/95735?v=4","gravatar_id":"","url":"https://api.github.com/users/hamilton","html_url":"https://github.com/hamilton","followers_url":"https://api.github.com/users/hamilton/followers","following_url":"https://api.github.com/users/hamilton/following{/other_user}","gists_url":"https://api.github.com/users/hamilton/gists{/gist_id}","starred_url":"https://api.github.com/users/hamilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamilton/subscriptions","organizations_url":"https://api.github.com/users/hamilton/orgs","repos_url":"https://api.github.com/users/hamilton/repos","events_url":"https://api.github.com/users/hamilton/events{/privacy}","received_events_url":"https://api.github.com/users/hamilton/received_events","type":"User","site_admin":false},"body":"\r\n![sep-06-2018 14-41-32](https://user-images.githubusercontent.com/95735/45186665-1d2d4a00-b1e3-11e8-871d-e3ba861ce32a.gif)\r\n\r\nWith an eye toward fixing #745 and #786 together, this PR does a few things:\r\n\r\n1.) implements a new `UserMenu` component, used on all headers, both on the server & in the notebook itself. This now belongs in a `shared` dir in `src`.\r\n2.) Given that logging in / logging out are server-specific endeavors, I removed the need for managing the login / logout state within the notebook itself (that is, removed the tasks / actions / reducer pieces that were managing state before, since this is delivered elsewhere now). This can change if we feel it is disruptive to not have the state in there, but it seems unnecessary.\r\n3.) Some light sanity-maintaining styling on the server page header and `index.html`.\r\n\r\n@wlach @bcolloran this is ready for a first review, I think. I'm not sure if this is the right approach on the whole, so please feel free to chime in with any general thoughts or specific issues.","created_at":"2018-09-06T20:59:25Z","updated_at":"2018-09-11T20:31:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68ea7e3b31e705f3211b11fdac2c637132736267","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/iodide-project/iodide/pulls/854/commits","review_comments_url":"https://api.github.com/repos/iodide-project/iodide/pulls/854/comments","review_comment_url":"https://api.github.com/repos/iodide-project/iodide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iodide-project/iodide/issues/854/comments","statuses_url":"https://api.github.com/repos/iodide-project/iodide/statuses/520c56c491c2bb672dd4c1dc87e6286cc32b307c","head":{"label":"iodide-project:header-user-menu","ref":"header-user-menu","sha":"520c56c491c2bb672dd4c1dc87e6286cc32b307c","user":{"login":"iodide-project","id":36210752,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MjEwNzUy","avatar_url":"https://avatars0.githubusercontent.com/u/36210752?v=4","gravatar_id":"","url":"https://api.github.com/users/iodide-project","html_url":"https://github.com/iodide-project","followers_url":"https://api.github.com/users/iodide-project/followers","following_url":"https://api.github.com/users/iodide-project/following{/other_user}","gists_url":"https://api.github.com/users/iodide-project/gists{/gist_id}","starred_url":"https://api.github.com/users/iodide-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iodide-project/subscriptions","organizations_url":"https://api.github.com/users/iodide-project/orgs","repos_url":"https://api.github.com/users/iodide-project/repos","events_url":"https://api.github.com/users/iodide-project/events{/privacy}","received_events_url":"https://api.github.com/users/iodide-project/received_events","type":"Organization","site_admin":false},"repo":{"id":99938998,"node_id":"MDEwOlJlcG9zaXRvcnk5OTkzODk5OA==","name":"iodide","full_name":"iodide-project/iodide","owner":{"login":"iodide-project","id":36210752,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MjEwNzUy","avatar_url":"https://avatars0.githubusercontent.com/u/36210752?v=4","gravatar_id":"","url":"https://api.github.com/users/iodide-project","html_url":"https://github.com/iodide-project","followers_url":"https://api.github.com/users/iodide-project/followers","following_url":"https://api.github.com/users/iodide-project/following{/other_user}","gists_url":"https://api.github.com/users/iodide-project/gists{/gist_id}","starred_url":"https://api.github.com/users/iodide-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iodide-project/subscriptions","organizations_url":"https://api.github.com/users/iodide-project/orgs","repos_url":"https://api.github.com/users/iodide-project/repos","events_url":"https://api.github.com/users/iodide-project/events{/privacy}","received_events_url":"https://api.github.com/users/iodide-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iodide-project/iodide","description":"A frictionlessly portable interface for literate scientific computing in the browser","fork":false,"url":"https://api.github.com/repos/iodide-project/iodide","forks_url":"https://api.github.com/repos/iodide-project/iodide/forks","keys_url":"https://api.github.com/repos/iodide-project/iodide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iodide-project/iodide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iodide-project/iodide/teams","hooks_url":"https://api.github.com/repos/iodide-project/iodide/hooks","issue_events_url":"https://api.github.com/repos/iodide-project/iodide/issues/events{/number}","events_url":"https://api.github.com/repos/iodide-project/iodide/events","assignees_url":"https://api.github.com/repos/iodide-project/iodide/assignees{/user}","branches_url":"https://api.github.com/repos/iodide-project/iodide/branches{/branch}","tags_url":"https://api.github.com/repos/iodide-project/iodide/tags","blobs_url":"https://api.github.com/repos/iodide-project/iodide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iodide-project/iodide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iodide-project/iodide/git/refs{/sha}","trees_url":"https://api.github.com/repos/iodide-project/iodide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iodide-project/iodide/statuses/{sha}","languages_url":"https://api.github.com/repos/iodide-project/iodide/languages","stargazers_url":"https://api.github.com/repos/iodide-project/iodide/stargazers","contributors_url":"https://api.github.com/repos/iodide-project/iodide/contributors","subscribers_url":"https://api.github.com/repos/iodide-project/iodide/subscribers","subscription_url":"https://api.github.com/repos/iodide-project/iodide/subscription","commits_url":"https://api.github.com/repos/iodide-project/iodide/commits{/sha}","git_commits_url":"https://api.github.com/repos/iodide-project/iodide/git/commits{/sha}","comments_url":"https://api.github.com/repos/iodide-project/iodide/comments{/number}","issue_comment_url":"https://api.github.com/repos/iodide-project/iodide/issues/comments{/number}","contents_url":"https://api.github.com/repos/iodide-project/iodide/contents/{+path}","compare_url":"https://api.github.com/repos/iodide-project/iodide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iodide-project/iodide/merges","archive_url":"https://api.github.com/repos/iodide-project/iodide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iodide-project/iodide/downloads","issues_url":"https://api.github.com/repos/iodide-project/iodide/issues{/number}","pulls_url":"https://api.github.com/repos/iodide-project/iodide/pulls{/number}","milestones_url":"https://api.github.com/repos/iodide-project/iodide/milestones{/number}","notifications_url":"https://api.github.com/repos/iodide-project/iodide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iodide-project/iodide/labels{/name}","releases_url":"https://api.github.com/repos/iodide-project/iodide/releases{/id}","deployments_url":"https://api.github.com/repos/iodide-project/iodide/deployments","created_at":"2017-08-10T15:38:35Z","updated_at":"2018-09-11T16:19:38Z","pushed_at":"2018-09-11T20:21:50Z","git_url":"git://github.com/iodide-project/iodide.git","ssh_url":"git@github.com:iodide-project/iodide.git","clone_url":"https://github.com/iodide-project/iodide.git","svn_url":"https://github.com/iodide-project/iodide","homepage":"","size":17111,"stargazers_count":230,"watchers_count":230,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":41,"mirror_url":null,"archived":false,"open_issues_count":137,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":41,"open_issues":137,"watchers":230,"default_branch":"master"}},"base":{"label":"iodide-project:master","ref":"master","sha":"c7c5bdf3141eb8099e8e29e48d54b00aa00a7653","user":{"login":"iodide-project","id":36210752,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MjEwNzUy","avatar_url":"https://avatars0.githubusercontent.com/u/36210752?v=4","gravatar_id":"","url":"https://api.github.com/users/iodide-project","html_url":"https://github.com/iodide-project","followers_url":"https://api.github.com/users/iodide-project/followers","following_url":"https://api.github.com/users/iodide-project/following{/other_user}","gists_url":"https://api.github.com/users/iodide-project/gists{/gist_id}","starred_url":"https://api.github.com/users/iodide-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iodide-project/subscriptions","organizations_url":"https://api.github.com/users/iodide-project/orgs","repos_url":"https://api.github.com/users/iodide-project/repos","events_url":"https://api.github.com/users/iodide-project/events{/privacy}","received_events_url":"https://api.github.com/users/iodide-project/received_events","type":"Organization","site_admin":false},"repo":{"id":99938998,"node_id":"MDEwOlJlcG9zaXRvcnk5OTkzODk5OA==","name":"iodide","full_name":"iodide-project/iodide","owner":{"login":"iodide-project","id":36210752,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MjEwNzUy","avatar_url":"https://avatars0.githubusercontent.com/u/36210752?v=4","gravatar_id":"","url":"https://api.github.com/users/iodide-project","html_url":"https://github.com/iodide-project","followers_url":"https://api.github.com/users/iodide-project/followers","following_url":"https://api.github.com/users/iodide-project/following{/other_user}","gists_url":"https://api.github.com/users/iodide-project/gists{/gist_id}","starred_url":"https://api.github.com/users/iodide-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iodide-project/subscriptions","organizations_url":"https://api.github.com/users/iodide-project/orgs","repos_url":"https://api.github.com/users/iodide-project/repos","events_url":"https://api.github.com/users/iodide-project/events{/privacy}","received_events_url":"https://api.github.com/users/iodide-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iodide-project/iodide","description":"A frictionlessly portable interface for literate scientific computing in the browser","fork":false,"url":"https://api.github.com/repos/iodide-project/iodide","forks_url":"https://api.github.com/repos/iodide-project/iodide/forks","keys_url":"https://api.github.com/repos/iodide-project/iodide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iodide-project/iodide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iodide-project/iodide/teams","hooks_url":"https://api.github.com/repos/iodide-project/iodide/hooks","issue_events_url":"https://api.github.com/repos/iodide-project/iodide/issues/events{/number}","events_url":"https://api.github.com/repos/iodide-project/iodide/events","assignees_url":"https://api.github.com/repos/iodide-project/iodide/assignees{/user}","branches_url":"https://api.github.com/repos/iodide-project/iodide/branches{/branch}","tags_url":"https://api.github.com/repos/iodide-project/iodide/tags","blobs_url":"https://api.github.com/repos/iodide-project/iodide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iodide-project/iodide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iodide-project/iodide/git/refs{/sha}","trees_url":"https://api.github.com/repos/iodide-project/iodide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iodide-project/iodide/statuses/{sha}","languages_url":"https://api.github.com/repos/iodide-project/iodide/languages","stargazers_url":"https://api.github.com/repos/iodide-project/iodide/stargazers","contributors_url":"https://api.github.com/repos/iodide-project/iodide/contributors","subscribers_url":"https://api.github.com/repos/iodide-project/iodide/subscribers","subscription_url":"https://api.github.com/repos/iodide-project/iodide/subscription","commits_url":"https://api.github.com/repos/iodide-project/iodide/commits{/sha}","git_commits_url":"https://api.github.com/repos/iodide-project/iodide/git/commits{/sha}","comments_url":"https://api.github.com/repos/iodide-project/iodide/comments{/number}","issue_comment_url":"https://api.github.com/repos/iodide-project/iodide/issues/comments{/number}","contents_url":"https://api.github.com/repos/iodide-project/iodide/contents/{+path}","compare_url":"https://api.github.com/repos/iodide-project/iodide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iodide-project/iodide/merges","archive_url":"https://api.github.com/repos/iodide-project/iodide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iodide-project/iodide/downloads","issues_url":"https://api.github.com/repos/iodide-project/iodide/issues{/number}","pulls_url":"https://api.github.com/repos/iodide-project/iodide/pulls{/number}","milestones_url":"https://api.github.com/repos/iodide-project/iodide/milestones{/number}","notifications_url":"https://api.github.com/repos/iodide-project/iodide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iodide-project/iodide/labels{/name}","releases_url":"https://api.github.com/repos/iodide-project/iodide/releases{/id}","deployments_url":"https://api.github.com/repos/iodide-project/iodide/deployments","created_at":"2017-08-10T15:38:35Z","updated_at":"2018-09-11T16:19:38Z","pushed_at":"2018-09-11T20:21:50Z","git_url":"git://github.com/iodide-project/iodide.git","ssh_url":"git@github.com:iodide-project/iodide.git","clone_url":"https://github.com/iodide-project/iodide.git","svn_url":"https://github.com/iodide-project/iodide","homepage":"","size":17111,"stargazers_count":230,"watchers_count":230,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":41,"mirror_url":null,"archived":false,"open_issues_count":137,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":41,"open_issues":137,"watchers":230,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iodide-project/iodide/pulls/854"},"html":{"href":"https://github.com/iodide-project/iodide/pull/854"},"issue":{"href":"https://api.github.com/repos/iodide-project/iodide/issues/854"},"comments":{"href":"https://api.github.com/repos/iodide-project/iodide/issues/854/comments"},"review_comments":{"href":"https://api.github.com/repos/iodide-project/iodide/pulls/854/comments"},"review_comment":{"href":"https://api.github.com/repos/iodide-project/iodide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iodide-project/iodide/pulls/854/commits"},"statuses":{"href":"https://api.github.com/repos/iodide-project/iodide/statuses/520c56c491c2bb672dd4c1dc87e6286cc32b307c"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"wlach"}}