{"action":"created","comment":{"url":"https://api.github.com/repos/PolymerLabs/todo-list/pulls/comments/41037208","id":41037208,"diff_hunk":"@@ -214,6 +214,10 @@\n         if (drawerPanel.narrow) {\n           drawerPanel.closeDrawer();\n         }\n+      },\n+\n+      signOut: function() {\n+        document.querySelector(\"todo-data\").signOut();","path":"app/elements/todo-view/todo-view.html","position":7,"original_position":7,"commit_id":"51459349994da3a98c9381f945ae46c7d62ccf62","original_commit_id":"51459349994da3a98c9381f945ae46c7d62ccf62","user":{"login":"robdodson","id":1066253,"avatar_url":"https://avatars.githubusercontent.com/u/1066253?v=3","gravatar_id":"","url":"https://api.github.com/users/robdodson","html_url":"https://github.com/robdodson","followers_url":"https://api.github.com/users/robdodson/followers","following_url":"https://api.github.com/users/robdodson/following{/other_user}","gists_url":"https://api.github.com/users/robdodson/gists{/gist_id}","starred_url":"https://api.github.com/users/robdodson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robdodson/subscriptions","organizations_url":"https://api.github.com/users/robdodson/orgs","repos_url":"https://api.github.com/users/robdodson/repos","events_url":"https://api.github.com/users/robdodson/events{/privacy}","received_events_url":"https://api.github.com/users/robdodson/received_events","type":"User","site_admin":false},"body":"You wouldn't want todo-view to reach outside of itself and affect another element. It shouldn't know what its data provider is, otherwise they're tightly coupled.\r\n\r\nI implemented basic sign out here: https://github.com/PolymerLabs/todo-list/commit/1d2a90f232b0e6f9cea560c0b8a38967bad355f9  When someone clicks the button in todo-view it fires an event which gets handled by the common parent of todo-view and todo-data. That parent acts as a mediator and decides to call a method on todo-data based on that event.","created_at":"2015-10-02T15:58:59Z","updated_at":"2015-10-02T15:58:59Z","html_url":"https://github.com/PolymerLabs/todo-list/pull/5#discussion_r41037208","pull_request_url":"https://api.github.com/repos/PolymerLabs/todo-list/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/PolymerLabs/todo-list/pulls/comments/41037208"},"html":{"href":"https://github.com/PolymerLabs/todo-list/pull/5#discussion_r41037208"},"pull_request":{"href":"https://api.github.com/repos/PolymerLabs/todo-list/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/PolymerLabs/todo-list/pulls/5","id":46323050,"html_url":"https://github.com/PolymerLabs/todo-list/pull/5","diff_url":"https://github.com/PolymerLabs/todo-list/pull/5.diff","patch_url":"https://github.com/PolymerLabs/todo-list/pull/5.patch","issue_url":"https://api.github.com/repos/PolymerLabs/todo-list/issues/5","number":5,"state":"open","locked":false,"title":"User can sign out.","user":{"login":"aguimaraes","id":131234,"avatar_url":"https://avatars.githubusercontent.com/u/131234?v=3","gravatar_id":"","url":"https://api.github.com/users/aguimaraes","html_url":"https://github.com/aguimaraes","followers_url":"https://api.github.com/users/aguimaraes/followers","following_url":"https://api.github.com/users/aguimaraes/following{/other_user}","gists_url":"https://api.github.com/users/aguimaraes/gists{/gist_id}","starred_url":"https://api.github.com/users/aguimaraes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aguimaraes/subscriptions","organizations_url":"https://api.github.com/users/aguimaraes/orgs","repos_url":"https://api.github.com/users/aguimaraes/repos","events_url":"https://api.github.com/users/aguimaraes/events{/privacy}","received_events_url":"https://api.github.com/users/aguimaraes/received_events","type":"User","site_admin":false},"body":"Is this the right way to implement the sign out feature?","created_at":"2015-09-29T19:48:26Z","updated_at":"2015-10-02T15:58:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a28117187b3ac9fad33612dda8a30b3e330ac35","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/PolymerLabs/todo-list/pulls/5/commits","review_comments_url":"https://api.github.com/repos/PolymerLabs/todo-list/pulls/5/comments","review_comment_url":"https://api.github.com/repos/PolymerLabs/todo-list/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PolymerLabs/todo-list/issues/5/comments","statuses_url":"https://api.github.com/repos/PolymerLabs/todo-list/statuses/51459349994da3a98c9381f945ae46c7d62ccf62","head":{"label":"aguimaraes:logout","ref":"logout","sha":"51459349994da3a98c9381f945ae46c7d62ccf62","user":{"login":"aguimaraes","id":131234,"avatar_url":"https://avatars.githubusercontent.com/u/131234?v=3","gravatar_id":"","url":"https://api.github.com/users/aguimaraes","html_url":"https://github.com/aguimaraes","followers_url":"https://api.github.com/users/aguimaraes/followers","following_url":"https://api.github.com/users/aguimaraes/following{/other_user}","gists_url":"https://api.github.com/users/aguimaraes/gists{/gist_id}","starred_url":"https://api.github.com/users/aguimaraes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aguimaraes/subscriptions","organizations_url":"https://api.github.com/users/aguimaraes/orgs","repos_url":"https://api.github.com/users/aguimaraes/repos","events_url":"https://api.github.com/users/aguimaraes/events{/privacy}","received_events_url":"https://api.github.com/users/aguimaraes/received_events","type":"User","site_admin":false},"repo":{"id":43389905,"name":"todo-list","full_name":"aguimaraes/todo-list","owner":{"login":"aguimaraes","id":131234,"avatar_url":"https://avatars.githubusercontent.com/u/131234?v=3","gravatar_id":"","url":"https://api.github.com/users/aguimaraes","html_url":"https://github.com/aguimaraes","followers_url":"https://api.github.com/users/aguimaraes/followers","following_url":"https://api.github.com/users/aguimaraes/following{/other_user}","gists_url":"https://api.github.com/users/aguimaraes/gists{/gist_id}","starred_url":"https://api.github.com/users/aguimaraes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aguimaraes/subscriptions","organizations_url":"https://api.github.com/users/aguimaraes/orgs","repos_url":"https://api.github.com/users/aguimaraes/repos","events_url":"https://api.github.com/users/aguimaraes/events{/privacy}","received_events_url":"https://api.github.com/users/aguimaraes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aguimaraes/todo-list","description":"Polymer Summit Todo List App","fork":true,"url":"https://api.github.com/repos/aguimaraes/todo-list","forks_url":"https://api.github.com/repos/aguimaraes/todo-list/forks","keys_url":"https://api.github.com/repos/aguimaraes/todo-list/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aguimaraes/todo-list/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aguimaraes/todo-list/teams","hooks_url":"https://api.github.com/repos/aguimaraes/todo-list/hooks","issue_events_url":"https://api.github.com/repos/aguimaraes/todo-list/issues/events{/number}","events_url":"https://api.github.com/repos/aguimaraes/todo-list/events","assignees_url":"https://api.github.com/repos/aguimaraes/todo-list/assignees{/user}","branches_url":"https://api.github.com/repos/aguimaraes/todo-list/branches{/branch}","tags_url":"https://api.github.com/repos/aguimaraes/todo-list/tags","blobs_url":"https://api.github.com/repos/aguimaraes/todo-list/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aguimaraes/todo-list/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aguimaraes/todo-list/git/refs{/sha}","trees_url":"https://api.github.com/repos/aguimaraes/todo-list/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aguimaraes/todo-list/statuses/{sha}","languages_url":"https://api.github.com/repos/aguimaraes/todo-list/languages","stargazers_url":"https://api.github.com/repos/aguimaraes/todo-list/stargazers","contributors_url":"https://api.github.com/repos/aguimaraes/todo-list/contributors","subscribers_url":"https://api.github.com/repos/aguimaraes/todo-list/subscribers","subscription_url":"https://api.github.com/repos/aguimaraes/todo-list/subscription","commits_url":"https://api.github.com/repos/aguimaraes/todo-list/commits{/sha}","git_commits_url":"https://api.github.com/repos/aguimaraes/todo-list/git/commits{/sha}","comments_url":"https://api.github.com/repos/aguimaraes/todo-list/comments{/number}","issue_comment_url":"https://api.github.com/repos/aguimaraes/todo-list/issues/comments{/number}","contents_url":"https://api.github.com/repos/aguimaraes/todo-list/contents/{+path}","compare_url":"https://api.github.com/repos/aguimaraes/todo-list/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aguimaraes/todo-list/merges","archive_url":"https://api.github.com/repos/aguimaraes/todo-list/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aguimaraes/todo-list/downloads","issues_url":"https://api.github.com/repos/aguimaraes/todo-list/issues{/number}","pulls_url":"https://api.github.com/repos/aguimaraes/todo-list/pulls{/number}","milestones_url":"https://api.github.com/repos/aguimaraes/todo-list/milestones{/number}","notifications_url":"https://api.github.com/repos/aguimaraes/todo-list/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aguimaraes/todo-list/labels{/name}","releases_url":"https://api.github.com/repos/aguimaraes/todo-list/releases{/id}","created_at":"2015-09-29T19:36:36Z","updated_at":"2015-09-29T19:36:38Z","pushed_at":"2015-09-29T19:41:49Z","git_url":"git://github.com/aguimaraes/todo-list.git","ssh_url":"git@github.com:aguimaraes/todo-list.git","clone_url":"https://github.com/aguimaraes/todo-list.git","svn_url":"https://github.com/aguimaraes/todo-list","homepage":null,"size":230,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"master"}},"base":{"label":"PolymerLabs:master","ref":"master","sha":"5f2df6b230483b5b7074dc4caa40c64e84cfe0ea","user":{"login":"PolymerLabs","id":5912903,"avatar_url":"https://avatars.githubusercontent.com/u/5912903?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerLabs","html_url":"https://github.com/PolymerLabs","followers_url":"https://api.github.com/users/PolymerLabs/followers","following_url":"https://api.github.com/users/PolymerLabs/following{/other_user}","gists_url":"https://api.github.com/users/PolymerLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerLabs/subscriptions","organizations_url":"https://api.github.com/users/PolymerLabs/orgs","repos_url":"https://api.github.com/users/PolymerLabs/repos","events_url":"https://api.github.com/users/PolymerLabs/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":42480130,"name":"todo-list","full_name":"PolymerLabs/todo-list","owner":{"login":"PolymerLabs","id":5912903,"avatar_url":"https://avatars.githubusercontent.com/u/5912903?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerLabs","html_url":"https://github.com/PolymerLabs","followers_url":"https://api.github.com/users/PolymerLabs/followers","following_url":"https://api.github.com/users/PolymerLabs/following{/other_user}","gists_url":"https://api.github.com/users/PolymerLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerLabs/subscriptions","organizations_url":"https://api.github.com/users/PolymerLabs/orgs","repos_url":"https://api.github.com/users/PolymerLabs/repos","events_url":"https://api.github.com/users/PolymerLabs/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PolymerLabs/todo-list","description":"Polymer Summit Todo List App","fork":false,"url":"https://api.github.com/repos/PolymerLabs/todo-list","forks_url":"https://api.github.com/repos/PolymerLabs/todo-list/forks","keys_url":"https://api.github.com/repos/PolymerLabs/todo-list/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PolymerLabs/todo-list/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PolymerLabs/todo-list/teams","hooks_url":"https://api.github.com/repos/PolymerLabs/todo-list/hooks","issue_events_url":"https://api.github.com/repos/PolymerLabs/todo-list/issues/events{/number}","events_url":"https://api.github.com/repos/PolymerLabs/todo-list/events","assignees_url":"https://api.github.com/repos/PolymerLabs/todo-list/assignees{/user}","branches_url":"https://api.github.com/repos/PolymerLabs/todo-list/branches{/branch}","tags_url":"https://api.github.com/repos/PolymerLabs/todo-list/tags","blobs_url":"https://api.github.com/repos/PolymerLabs/todo-list/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PolymerLabs/todo-list/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PolymerLabs/todo-list/git/refs{/sha}","trees_url":"https://api.github.com/repos/PolymerLabs/todo-list/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PolymerLabs/todo-list/statuses/{sha}","languages_url":"https://api.github.com/repos/PolymerLabs/todo-list/languages","stargazers_url":"https://api.github.com/repos/PolymerLabs/todo-list/stargazers","contributors_url":"https://api.github.com/repos/PolymerLabs/todo-list/contributors","subscribers_url":"https://api.github.com/repos/PolymerLabs/todo-list/subscribers","subscription_url":"https://api.github.com/repos/PolymerLabs/todo-list/subscription","commits_url":"https://api.github.com/repos/PolymerLabs/todo-list/commits{/sha}","git_commits_url":"https://api.github.com/repos/PolymerLabs/todo-list/git/commits{/sha}","comments_url":"https://api.github.com/repos/PolymerLabs/todo-list/comments{/number}","issue_comment_url":"https://api.github.com/repos/PolymerLabs/todo-list/issues/comments{/number}","contents_url":"https://api.github.com/repos/PolymerLabs/todo-list/contents/{+path}","compare_url":"https://api.github.com/repos/PolymerLabs/todo-list/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PolymerLabs/todo-list/merges","archive_url":"https://api.github.com/repos/PolymerLabs/todo-list/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PolymerLabs/todo-list/downloads","issues_url":"https://api.github.com/repos/PolymerLabs/todo-list/issues{/number}","pulls_url":"https://api.github.com/repos/PolymerLabs/todo-list/pulls{/number}","milestones_url":"https://api.github.com/repos/PolymerLabs/todo-list/milestones{/number}","notifications_url":"https://api.github.com/repos/PolymerLabs/todo-list/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PolymerLabs/todo-list/labels{/name}","releases_url":"https://api.github.com/repos/PolymerLabs/todo-list/releases{/id}","created_at":"2015-09-14T22:16:09Z","updated_at":"2015-09-29T11:41:44Z","pushed_at":"2015-10-02T15:57:47Z","git_url":"git://github.com/PolymerLabs/todo-list.git","ssh_url":"git@github.com:PolymerLabs/todo-list.git","clone_url":"https://github.com/PolymerLabs/todo-list.git","svn_url":"https://github.com/PolymerLabs/todo-list","homepage":null,"size":238,"stargazers_count":23,"watchers_count":23,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":3,"forks":8,"open_issues":3,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PolymerLabs/todo-list/pulls/5"},"html":{"href":"https://github.com/PolymerLabs/todo-list/pull/5"},"issue":{"href":"https://api.github.com/repos/PolymerLabs/todo-list/issues/5"},"comments":{"href":"https://api.github.com/repos/PolymerLabs/todo-list/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/PolymerLabs/todo-list/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/PolymerLabs/todo-list/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PolymerLabs/todo-list/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/PolymerLabs/todo-list/statuses/51459349994da3a98c9381f945ae46c7d62ccf62"}}}}