{"action":"created","issue":{"url":"https://api.github.com/repos/blockstack/blockstack-browser/issues/1583","repository_url":"https://api.github.com/repos/blockstack/blockstack-browser","labels_url":"https://api.github.com/repos/blockstack/blockstack-browser/issues/1583/labels{/name}","comments_url":"https://api.github.com/repos/blockstack/blockstack-browser/issues/1583/comments","events_url":"https://api.github.com/repos/blockstack/blockstack-browser/issues/1583/events","html_url":"https://github.com/blockstack/blockstack-browser/pull/1583","id":348452368,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2Nzk5NjIz","number":1583,"title":"Make Onboarding More Failure-Resistant","user":{"login":"wbobeirne","id":649992,"node_id":"MDQ6VXNlcjY0OTk5Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/649992?v=4","gravatar_id":"","url":"https://api.github.com/users/wbobeirne","html_url":"https://github.com/wbobeirne","followers_url":"https://api.github.com/users/wbobeirne/followers","following_url":"https://api.github.com/users/wbobeirne/following{/other_user}","gists_url":"https://api.github.com/users/wbobeirne/gists{/gist_id}","starred_url":"https://api.github.com/users/wbobeirne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbobeirne/subscriptions","organizations_url":"https://api.github.com/users/wbobeirne/orgs","repos_url":"https://api.github.com/users/wbobeirne/repos","events_url":"https://api.github.com/users/wbobeirne/events{/privacy}","received_events_url":"https://api.github.com/users/wbobeirne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-07T19:16:19Z","updated_at":"2018-08-14T15:01:43Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/blockstack/blockstack-browser/pulls/1583","html_url":"https://github.com/blockstack/blockstack-browser/pull/1583","diff_url":"https://github.com/blockstack/blockstack-browser/pull/1583.diff","patch_url":"https://github.com/blockstack/blockstack-browser/pull/1583.patch"},"body":"Closes #1506. Closes #1524. Closes #1548.\r\n\r\n### What This Does\r\n\r\nThis adds failure handling to most aspects of onboarding. You'll now both be informed of, and will be able to continue through onboarding bug-free if the following happen:\r\n\r\n* You're unable to check the availability of your username\r\n* Your username registration fails\r\n* Your recovery email fails to send\r\n\r\nEmail requests are now done in parallel, and cap out at 10 seconds on slow connections.\r\n\r\nAn implication of this change is that users can now end up in the browser after onboarding without a username. While this was already a use case we supported, it'll be more important now that we behave without issue in that case (Hopefully we suss out all issues after #1547 is complete.)\r\n\r\nIn addition to the above features and changes, this PR adds the [`reapop` library](https://github.com/LouisBarranqueiro/reapop) as per @aulneau's suggestion for showing error messages. This should be useful in other parts of the browser. Here's an example of how to use:\r\n\r\n```.jsx\r\nimport { notify } from 'reapop'\r\n\r\nclass MyComponent extends React.Component {\r\n  componentDidMount() {\r\n    this.props.notify({\r\n      title: 'Hello!',\r\n      // ...\r\n    })\r\n  }\r\n}\r\n\r\nconnect(mapStateToProps, () => {\r\n  notify\r\n})(MyComponent)\r\n```\r\n\r\n### Steps to Test\r\n\r\nThe easiest way to test all of these cases is to use [Chrome's \"Request Blocking\" feature](https://developers.google.com/web/updates/2017/04/devtools-release-notes#block-requests).\r\n\r\n* **Failed Username Check**\r\n  1. Go through onboarding until the username step\r\n  2. Block requests to `registrar.blockstack.org`\r\n  3. Attempt to check on a username\r\n  4. Confirm you get an error and the skip button appears\r\n  5. Skip the step, confirm onboarding continues correctly and shows no username at the end\r\n* **Failed Username Registration**\r\n  1. Go through onboarding until the username step\r\n  2. Attempt to check on a username succesfully\r\n  3. Block requests to `registrar.blockstack.org`\r\n  4. Attempt to register the username\r\n  5. Confirm that after it finishes, you see a popup informing you it failed\r\n  6. Confirm onboarding continues correctly and shows no username at the end\r\n* **Emails failed to send**\r\n  1. Go through onboarding until the username step\r\n  2. Block requests to `browser-api.blockstack.org`\r\n  3. Complete the step, confirm that the next step you see informs you of the failure to send the email\r\n  4. Unblock requests and click \"resend\"\r\n  5. Confirm that the email successfully resends\r\n  6. Confirm onboarding continues correctly\r\n\r\n## Screenshots\r\n\r\n### Failed to check username availability (w/ skip button)\r\n\r\n<img width=\"479\" alt=\"screen shot 2018-08-07 at 3 01 15 pm\" src=\"https://user-images.githubusercontent.com/649992/43796622-c3dde826-9a52-11e8-84d4-556f99045771.png\">\r\n\r\n\r\n### Failed to register username\r\n\r\n<img width=\"831\" alt=\"screen shot 2018-08-07 at 3 02 23 pm\" src=\"https://user-images.githubusercontent.com/649992/43796679-ee3029b8-9a52-11e8-96d7-96b5f8dc0eb2.png\">\r\n\r\n\r\n### Email failed to send\r\n\r\n<img width=\"483\" alt=\"screen shot 2018-08-07 at 3 04 07 pm\" src=\"https://user-images.githubusercontent.com/649992/43796763-29155724-9a53-11e8-8b87-2195e2e24bc4.png\">\r\n\r\n\r\n\r\n### End screen after failed / skipped username registration\r\n\r\n<img width=\"479\" alt=\"screen shot 2018-08-07 at 2 49 15 pm\" src=\"https://user-images.githubusercontent.com/649992/43796479-61eee0f2-9a52-11e8-8862-9fcfefdd984b.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/blockstack/blockstack-browser/issues/comments/412903356","html_url":"https://github.com/blockstack/blockstack-browser/pull/1583#issuecomment-412903356","issue_url":"https://api.github.com/repos/blockstack/blockstack-browser/issues/1583","id":412903356,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjkwMzM1Ng==","user":{"login":"jeffdomke","id":767828,"node_id":"MDQ6VXNlcjc2NzgyOA==","avatar_url":"https://avatars0.githubusercontent.com/u/767828?v=4","gravatar_id":"","url":"https://api.github.com/users/jeffdomke","html_url":"https://github.com/jeffdomke","followers_url":"https://api.github.com/users/jeffdomke/followers","following_url":"https://api.github.com/users/jeffdomke/following{/other_user}","gists_url":"https://api.github.com/users/jeffdomke/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffdomke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffdomke/subscriptions","organizations_url":"https://api.github.com/users/jeffdomke/orgs","repos_url":"https://api.github.com/users/jeffdomke/repos","events_url":"https://api.github.com/users/jeffdomke/events{/privacy}","received_events_url":"https://api.github.com/users/jeffdomke/received_events","type":"User","site_admin":false},"created_at":"2018-08-14T15:01:43Z","updated_at":"2018-08-14T15:01:43Z","author_association":"MEMBER","body":"Re Ken's comment. What other options to do we have? \r\n- Force them to retry. \r\n- Let them skip and include a warning that says \"You can skip picking a username but some apps won't behave properly.\" \r\n\r\nAnything else? "}}
{"actor":{"display_login":"jeffdomke"}}