{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/93266023","pull_request_review_id":13789698,"id":93266023,"diff_hunk":"@@ -73,377 +73,466 @@ module.exports = protectForm( React.createClass( {\n \t},\n \n \tresetState: function() {\n-\t\tvar clearSettings = { fetchingSettings: true };\n+\t\tconst clearSettings = { fetchingSettings: true };\n \t\tthis.discussionAttributes.forEach( function( attribute ) {\n \t\t\tclearSettings[ attribute ] = '';\n \t\t} );\n \t\tthis.replaceState( clearSettings );\n \t\tdebug( 'resetting state' );\n \t},\n \n-\tdefaultArticleSettings: function() {\n+\tsetDirtyField( key ) {","path":"client/my-sites/site-settings/form-discussion.jsx","position":72,"original_position":72,"commit_id":"11d58b3c2a5a992ab5029c276739c02f045cb0f6","original_commit_id":"11d58b3c2a5a992ab5029c276739c02f045cb0f6","user":{"login":"roccotripaldi","id":2694219,"avatar_url":"https://avatars.githubusercontent.com/u/2694219?v=3","gravatar_id":"","url":"https://api.github.com/users/roccotripaldi","html_url":"https://github.com/roccotripaldi","followers_url":"https://api.github.com/users/roccotripaldi/followers","following_url":"https://api.github.com/users/roccotripaldi/following{/other_user}","gists_url":"https://api.github.com/users/roccotripaldi/gists{/gist_id}","starred_url":"https://api.github.com/users/roccotripaldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roccotripaldi/subscriptions","organizations_url":"https://api.github.com/users/roccotripaldi/orgs","repos_url":"https://api.github.com/users/roccotripaldi/repos","events_url":"https://api.github.com/users/roccotripaldi/events{/privacy}","received_events_url":"https://api.github.com/users/roccotripaldi/received_events","type":"User","site_admin":false},"body":"Thanks for explaining :)","created_at":"2016-12-20T15:57:46Z","updated_at":"2016-12-20T15:57:46Z","html_url":"https://github.com/Automattic/wp-calypso/pull/10167#discussion_r93266023","pull_request_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10167","_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/93266023"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/10167#discussion_r93266023"},"pull_request":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10167"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10167","id":98647239,"html_url":"https://github.com/Automattic/wp-calypso/pull/10167","diff_url":"https://github.com/Automattic/wp-calypso/pull/10167.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/10167.patch","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/10167","number":10167,"state":"open","locked":false,"title":"Site Settings: Update the discussion tab to use separate cards","user":{"login":"ryelle","id":541093,"avatar_url":"https://avatars.githubusercontent.com/u/541093?v=3","gravatar_id":"","url":"https://api.github.com/users/ryelle","html_url":"https://github.com/ryelle","followers_url":"https://api.github.com/users/ryelle/followers","following_url":"https://api.github.com/users/ryelle/following{/other_user}","gists_url":"https://api.github.com/users/ryelle/gists{/gist_id}","starred_url":"https://api.github.com/users/ryelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryelle/subscriptions","organizations_url":"https://api.github.com/users/ryelle/orgs","repos_url":"https://api.github.com/users/ryelle/repos","events_url":"https://api.github.com/users/ryelle/events{/privacy}","received_events_url":"https://api.github.com/users/ryelle/received_events","type":"User","site_admin":false},"body":"This PR refactors the existing discussion settings into separate cards, & switches the checkboxes to toggles (see #9171). It doesn't add the new settings from that issue (that'll be another PR).\r\n\r\n![screen shot 2016-12-19 at 4 39 12 pm](https://cloud.githubusercontent.com/assets/541093/21330080/b9e21c80-c609-11e6-90cd-82ded2850d8a.png)\r\n\r\n**To test**\r\n\r\n1. Check out this PR\r\n2. Visit your discussion settings at `/settings/discussion/$site` for a Jetpack site\r\n3. Make any changes\r\n4. See that those changes were saved on your Jetpack site in wp-admin, Settings > Discussion\r\n\r\nPlease also test this on wp.com sites! There are 2 more \"Email me whenever\" settings for wp.com sites.\r\n\r\n1. Check out this PR\r\n2. Visit your discussion settings at `/settings/discussion/$site` for a wp.com site\r\n3. Make any changes\r\n4. See that those changes were saved by reloading the page, or verifying on the production settings page.\r\n\r\nNote 1: I've moved the form away from the `dirtyLinkedState` mixin because toggles would not be supported (and linkedState is deprecated as of React v15).\r\n\r\nNote 2: The events being tracked are different now - I switched to \"Toggled x\" instead of \"Clicked x\", as the event string; and the events for the toggles are not being tracked as english sentences anymore, instead \"Toggled page_comments\". Happy to change this if needed, but the toggle doesn't actually have a click handler, so it's not as simple as the `FormCheckbox` code. \r\n\r\ncc @oskosk @tyxla @roccotripaldi @johnHackworth for code & @rickybanister @MichaelArestad for design :)","created_at":"2016-12-19T21:56:14Z","updated_at":"2016-12-20T15:57:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e563e6cbcbc42f07a40acde48fee6d8ed0019e1a","assignee":{"login":"ryelle","id":541093,"avatar_url":"https://avatars.githubusercontent.com/u/541093?v=3","gravatar_id":"","url":"https://api.github.com/users/ryelle","html_url":"https://github.com/ryelle","followers_url":"https://api.github.com/users/ryelle/followers","following_url":"https://api.github.com/users/ryelle/following{/other_user}","gists_url":"https://api.github.com/users/ryelle/gists{/gist_id}","starred_url":"https://api.github.com/users/ryelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryelle/subscriptions","organizations_url":"https://api.github.com/users/ryelle/orgs","repos_url":"https://api.github.com/users/ryelle/repos","events_url":"https://api.github.com/users/ryelle/events{/privacy}","received_events_url":"https://api.github.com/users/ryelle/received_events","type":"User","site_admin":false},"assignees":[{"login":"ryelle","id":541093,"avatar_url":"https://avatars.githubusercontent.com/u/541093?v=3","gravatar_id":"","url":"https://api.github.com/users/ryelle","html_url":"https://github.com/ryelle","followers_url":"https://api.github.com/users/ryelle/followers","following_url":"https://api.github.com/users/ryelle/following{/other_user}","gists_url":"https://api.github.com/users/ryelle/gists{/gist_id}","starred_url":"https://api.github.com/users/ryelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryelle/subscriptions","organizations_url":"https://api.github.com/users/ryelle/orgs","repos_url":"https://api.github.com/users/ryelle/repos","events_url":"https://api.github.com/users/ryelle/events{/privacy}","received_events_url":"https://api.github.com/users/ryelle/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/141","html_url":"https://github.com/Automattic/wp-calypso/milestone/141","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/141/labels","id":2117426,"number":141,"title":"Jetpack Module Settings in Calypso","description":"Implementation of Jetpack module settings in Calypso Site Settings page","creator":{"login":"oskosk","id":746152,"avatar_url":"https://avatars.githubusercontent.com/u/746152?v=3","gravatar_id":"","url":"https://api.github.com/users/oskosk","html_url":"https://github.com/oskosk","followers_url":"https://api.github.com/users/oskosk/followers","following_url":"https://api.github.com/users/oskosk/following{/other_user}","gists_url":"https://api.github.com/users/oskosk/gists{/gist_id}","starred_url":"https://api.github.com/users/oskosk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oskosk/subscriptions","organizations_url":"https://api.github.com/users/oskosk/orgs","repos_url":"https://api.github.com/users/oskosk/repos","events_url":"https://api.github.com/users/oskosk/events{/privacy}","received_events_url":"https://api.github.com/users/oskosk/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":9,"state":"open","created_at":"2016-11-06T19:35:36Z","updated_at":"2016-12-19T21:56:15Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10167/commits","review_comments_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10167/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/10167/comments","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/11d58b3c2a5a992ab5029c276739c02f045cb0f6","head":{"label":"Automattic:update/site-settings-discussion-cards","ref":"update/site-settings-discussion-cards","sha":"11d58b3c2a5a992ab5029c276739c02f045cb0f6","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","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://avatars.githubusercontent.com/u/887802?v=3","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":"2016-12-20T14:17:37Z","pushed_at":"2016-12-20T15:55:58Z","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":38751,"stargazers_count":8228,"watchers_count":8228,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1041,"mirror_url":null,"open_issues_count":1601,"forks":1041,"open_issues":1601,"watchers":8228,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"32d8b4cc90f8ffc6fbc7d0d825082620c63b9d7a","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","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://avatars.githubusercontent.com/u/887802?v=3","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":"2016-12-20T14:17:37Z","pushed_at":"2016-12-20T15:55:58Z","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":38751,"stargazers_count":8228,"watchers_count":8228,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1041,"mirror_url":null,"open_issues_count":1601,"forks":1041,"open_issues":1601,"watchers":8228,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10167"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/10167"},"issue":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/10167"},"comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/10167/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10167/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/10167/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/wp-calypso/statuses/11d58b3c2a5a992ab5029c276739c02f045cb0f6"}}}}
{"actor":{"display_login":"roccotripaldi"}}