{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/23846","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/23846/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/23846/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/23846/events","html_url":"https://github.com/Automattic/wp-calypso/pull/23846","id":310802465,"number":23846,"title":"Jetpack connect: Use promises for createAccount","user":{"login":"sirreal","id":841763,"avatar_url":"https://avatars2.githubusercontent.com/u/841763?v=4","gravatar_id":"","url":"https://api.github.com/users/sirreal","html_url":"https://github.com/sirreal","followers_url":"https://api.github.com/users/sirreal/followers","following_url":"https://api.github.com/users/sirreal/following{/other_user}","gists_url":"https://api.github.com/users/sirreal/gists{/gist_id}","starred_url":"https://api.github.com/users/sirreal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirreal/subscriptions","organizations_url":"https://api.github.com/users/sirreal/orgs","repos_url":"https://api.github.com/users/sirreal/repos","events_url":"https://api.github.com/users/sirreal/events{/privacy}","received_events_url":"https://api.github.com/users/sirreal/received_events","type":"User","site_admin":false},"labels":[{"id":285009991,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Jetpack","name":"Jetpack","color":"006b75","default":false},{"id":285010049,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Signup","name":"Signup","color":"006b75","default":false},{"id":360006704,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/State","name":"State","color":"bfdadc","default":false},{"id":285010018,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04","default":false},{"id":838866001,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20e2e%20Testing","name":"[Status] Needs e2e Testing","color":"ed74b2","default":false},{"id":559313069,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Tests]%20Includes%20Tests","name":"[Tests] Includes Tests","color":"5ae8a3","default":false},{"id":285010109,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Type]%20Janitorial","name":"[Type] Janitorial","color":"fad8c7","default":false}],"state":"open","locked":false,"assignee":{"login":"sirreal","id":841763,"avatar_url":"https://avatars2.githubusercontent.com/u/841763?v=4","gravatar_id":"","url":"https://api.github.com/users/sirreal","html_url":"https://github.com/sirreal","followers_url":"https://api.github.com/users/sirreal/followers","following_url":"https://api.github.com/users/sirreal/following{/other_user}","gists_url":"https://api.github.com/users/sirreal/gists{/gist_id}","starred_url":"https://api.github.com/users/sirreal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirreal/subscriptions","organizations_url":"https://api.github.com/users/sirreal/orgs","repos_url":"https://api.github.com/users/sirreal/repos","events_url":"https://api.github.com/users/sirreal/events{/privacy}","received_events_url":"https://api.github.com/users/sirreal/received_events","type":"User","site_admin":false},"assignees":[{"login":"sirreal","id":841763,"avatar_url":"https://avatars2.githubusercontent.com/u/841763?v=4","gravatar_id":"","url":"https://api.github.com/users/sirreal","html_url":"https://github.com/sirreal","followers_url":"https://api.github.com/users/sirreal/followers","following_url":"https://api.github.com/users/sirreal/following{/other_user}","gists_url":"https://api.github.com/users/sirreal/gists{/gist_id}","starred_url":"https://api.github.com/users/sirreal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirreal/subscriptions","organizations_url":"https://api.github.com/users/sirreal/orgs","repos_url":"https://api.github.com/users/sirreal/repos","events_url":"https://api.github.com/users/sirreal/events{/privacy}","received_events_url":"https://api.github.com/users/sirreal/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-04-03T11:45:13Z","updated_at":"2018-04-06T14:04:54Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/23846","html_url":"https://github.com/Automattic/wp-calypso/pull/23846","diff_url":"https://github.com/Automattic/wp-calypso/pull/23846.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/23846.patch"},"body":"The end goal is to return a promise from the action that can be consumed in the component.\r\nThere's not reason to go through Redux state for these cases where a component needs to perform an API call and proceed depending on the result.\r\n\r\nBy consuming a promise in the component we should be able to reduce significant Redux complexity.\r\n\r\nRelated to #23483 \r\n\r\n## Testing\r\n1. Create a new Jurassic Ninja site\r\n1. Must be logged out of WordPress.com\r\n1. Follow the connection -> sign up flow for the new site\r\n1. Signup and connection should work normally\r\n\r\n## Error testing\r\n1. Account creation errors are not handled well currently. This PR does not change that and some limitations (signup form cannot change state to `submitting=false`, not global notices in logged out #23951) prevent improvements. I'll tackle that in a follow-up\r\n1. To force an API error, I've added D11559-code to make error testing simple. Apply it, sandbox `public-api.wordpress.com` and uncomment one of the errors. Verify that master fails in the same state as this branch: dead form, no notices 😬 \r\n1. You _can_ verify that this branch has the pieces in place for better error handling. The `submitting` state and prop on the `SignupForm` should be `false` after the error, and a `notice` action should have been dispatched:\r\n   ```js\r\n   actionLog.filter(/NOTICE/)\r\n   ```"},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/379263510","html_url":"https://github.com/Automattic/wp-calypso/pull/23846#issuecomment-379263510","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/23846","id":379263510,"user":{"login":"seear","id":7767559,"avatar_url":"https://avatars3.githubusercontent.com/u/7767559?v=4","gravatar_id":"","url":"https://api.github.com/users/seear","html_url":"https://github.com/seear","followers_url":"https://api.github.com/users/seear/followers","following_url":"https://api.github.com/users/seear/following{/other_user}","gists_url":"https://api.github.com/users/seear/gists{/gist_id}","starred_url":"https://api.github.com/users/seear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seear/subscriptions","organizations_url":"https://api.github.com/users/seear/orgs","repos_url":"https://api.github.com/users/seear/repos","events_url":"https://api.github.com/users/seear/events{/privacy}","received_events_url":"https://api.github.com/users/seear/received_events","type":"User","site_admin":false},"created_at":"2018-04-06T14:04:54Z","updated_at":"2018-04-06T14:04:54Z","author_association":"MEMBER","body":"> Verify that master fails in the same state as this branch: dead form, no notices\r\n\r\nMm, not too slick.\r\n\r\nAlso noting here that (in production) the button remains enabled when there are errors on the input fields. Clicking the button doesn't seem to do anything.\r\n\r\n<img width=\"483\" alt=\"screen shot 2018-04-06 at 15 02 31\" src=\"https://user-images.githubusercontent.com/7767559/38425391-af2b830a-39ab-11e8-895b-e4c827bd1cb8.png\">\r\n"}}
{"actor":{"display_login":"seear"}}