{"action":"closed","number":52,"pull_request":{"url":"https://api.github.com/repos/kiteco/kite-installer/pulls/52","id":134547309,"html_url":"https://github.com/kiteco/kite-installer/pull/52","diff_url":"https://github.com/kiteco/kite-installer/pull/52.diff","patch_url":"https://github.com/kiteco/kite-installer/pull/52.patch","issue_url":"https://api.github.com/repos/kiteco/kite-installer/issues/52","number":52,"state":"closed","locked":false,"title":"Improved install flow","user":{"login":"abe33","id":247140,"avatar_url":"https://avatars1.githubusercontent.com/u/247140?v=4","gravatar_id":"","url":"https://api.github.com/users/abe33","html_url":"https://github.com/abe33","followers_url":"https://api.github.com/users/abe33/followers","following_url":"https://api.github.com/users/abe33/following{/other_user}","gists_url":"https://api.github.com/users/abe33/gists{/gist_id}","starred_url":"https://api.github.com/users/abe33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abe33/subscriptions","organizations_url":"https://api.github.com/users/abe33/orgs","repos_url":"https://api.github.com/users/abe33/repos","events_url":"https://api.github.com/users/abe33/events{/privacy}","received_events_url":"https://api.github.com/users/abe33/received_events","type":"User","site_admin":false},"body":"The purpose of this rewrite of the install flow is two-fold: \r\n- Make setting up a custom install with extra steps or customs views much simpler\r\n- Making reasoning, working and debugging the install flow easier\r\n\r\nThe idea here is to split every steps of the flow as objects that return a `Promise` from their `start` method. The install object itself returns a `Promise` from its `start` method.\r\nThe view part of a step is handled separately of the logic, allowing to have a different set of views depending of the platform where the install flow has to run. \r\n\r\nThe install flow itself works like this: \r\n1. An object, the `state` will be passed-on to each steps, those steps have the ability to modify that state by returning an object in their resolution or by calling a method on the `install` object they receive. Note that any modification to the state is done by cloning the original state first.\r\n2. Once a step resolves, the state is updated and the next step is called with that new state.\r\n3. If a step promise is rejected, there's three options here: \r\n  - if the step provides a failure step, the flow continue to that step (useful to retry a specific step if errors are found in the data it provided).\r\n  - if the install itself has a failure step, the flow continue to that step (this can be used to have a global error handling for the whole step)\r\n  - if no failure step is provided, the promise returned to handle the whole install is rejected.\r\n\r\nAs far as Atom is concerned, the views work like this: \r\n- an `InstallElement` is bound to an `Install` object using the `views` manager. This allow to just pass an `Install` instance as a pane item.\r\n- this element listens to step changes of the install and checks whether a step has a `view` property. \r\n- if that is the case, that view is attached to the DOM and initialized, it's the view responsibility to listens to state changes and update itself accordingly.\r\n- when a new step doesn't have a view, the previous view is preserved, allowing a single view to works across several logical steps.\r\n- the install element itself provides views for download/install/etc. progresses, so we can reorganize these steps at will without the need to change the corresponding step views.\r\n\r\n\r\n### How to test the new flow\r\n\r\n- Open the `kite-installer` project in Atom. \r\n- In the devtools console run the following commands: \r\n\r\n```js\r\nrequire(atom.project.getPaths()[0] + '/examples/install.js')();\r\n```","created_at":"2017-08-07T23:28:32Z","updated_at":"2017-12-05T14:29:42Z","closed_at":"2017-12-05T14:29:42Z","merged_at":"2017-12-05T14:29:42Z","merge_commit_sha":"cd216f3f80ca668db84321d0f54e2e6c4f516316","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/kiteco/kite-installer/pulls/52/commits","review_comments_url":"https://api.github.com/repos/kiteco/kite-installer/pulls/52/comments","review_comment_url":"https://api.github.com/repos/kiteco/kite-installer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kiteco/kite-installer/issues/52/comments","statuses_url":"https://api.github.com/repos/kiteco/kite-installer/statuses/49843064b7d023ba5c9d5ca77aea97105aeb6e99","head":{"label":"kiteco:feature-improved-install-flow","ref":"feature-improved-install-flow","sha":"49843064b7d023ba5c9d5ca77aea97105aeb6e99","user":{"login":"kiteco","id":7321919,"avatar_url":"https://avatars0.githubusercontent.com/u/7321919?v=4","gravatar_id":"","url":"https://api.github.com/users/kiteco","html_url":"https://github.com/kiteco","followers_url":"https://api.github.com/users/kiteco/followers","following_url":"https://api.github.com/users/kiteco/following{/other_user}","gists_url":"https://api.github.com/users/kiteco/gists{/gist_id}","starred_url":"https://api.github.com/users/kiteco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiteco/subscriptions","organizations_url":"https://api.github.com/users/kiteco/orgs","repos_url":"https://api.github.com/users/kiteco/repos","events_url":"https://api.github.com/users/kiteco/events{/privacy}","received_events_url":"https://api.github.com/users/kiteco/received_events","type":"Organization","site_admin":false},"repo":{"id":73506977,"name":"kite-installer","full_name":"kiteco/kite-installer","owner":{"login":"kiteco","id":7321919,"avatar_url":"https://avatars0.githubusercontent.com/u/7321919?v=4","gravatar_id":"","url":"https://api.github.com/users/kiteco","html_url":"https://github.com/kiteco","followers_url":"https://api.github.com/users/kiteco/followers","following_url":"https://api.github.com/users/kiteco/following{/other_user}","gists_url":"https://api.github.com/users/kiteco/gists{/gist_id}","starred_url":"https://api.github.com/users/kiteco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiteco/subscriptions","organizations_url":"https://api.github.com/users/kiteco/orgs","repos_url":"https://api.github.com/users/kiteco/repos","events_url":"https://api.github.com/users/kiteco/events{/privacy}","received_events_url":"https://api.github.com/users/kiteco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kiteco/kite-installer","description":"Javascript library to install Kite app","fork":false,"url":"https://api.github.com/repos/kiteco/kite-installer","forks_url":"https://api.github.com/repos/kiteco/kite-installer/forks","keys_url":"https://api.github.com/repos/kiteco/kite-installer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kiteco/kite-installer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kiteco/kite-installer/teams","hooks_url":"https://api.github.com/repos/kiteco/kite-installer/hooks","issue_events_url":"https://api.github.com/repos/kiteco/kite-installer/issues/events{/number}","events_url":"https://api.github.com/repos/kiteco/kite-installer/events","assignees_url":"https://api.github.com/repos/kiteco/kite-installer/assignees{/user}","branches_url":"https://api.github.com/repos/kiteco/kite-installer/branches{/branch}","tags_url":"https://api.github.com/repos/kiteco/kite-installer/tags","blobs_url":"https://api.github.com/repos/kiteco/kite-installer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kiteco/kite-installer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kiteco/kite-installer/git/refs{/sha}","trees_url":"https://api.github.com/repos/kiteco/kite-installer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kiteco/kite-installer/statuses/{sha}","languages_url":"https://api.github.com/repos/kiteco/kite-installer/languages","stargazers_url":"https://api.github.com/repos/kiteco/kite-installer/stargazers","contributors_url":"https://api.github.com/repos/kiteco/kite-installer/contributors","subscribers_url":"https://api.github.com/repos/kiteco/kite-installer/subscribers","subscription_url":"https://api.github.com/repos/kiteco/kite-installer/subscription","commits_url":"https://api.github.com/repos/kiteco/kite-installer/commits{/sha}","git_commits_url":"https://api.github.com/repos/kiteco/kite-installer/git/commits{/sha}","comments_url":"https://api.github.com/repos/kiteco/kite-installer/comments{/number}","issue_comment_url":"https://api.github.com/repos/kiteco/kite-installer/issues/comments{/number}","contents_url":"https://api.github.com/repos/kiteco/kite-installer/contents/{+path}","compare_url":"https://api.github.com/repos/kiteco/kite-installer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kiteco/kite-installer/merges","archive_url":"https://api.github.com/repos/kiteco/kite-installer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kiteco/kite-installer/downloads","issues_url":"https://api.github.com/repos/kiteco/kite-installer/issues{/number}","pulls_url":"https://api.github.com/repos/kiteco/kite-installer/pulls{/number}","milestones_url":"https://api.github.com/repos/kiteco/kite-installer/milestones{/number}","notifications_url":"https://api.github.com/repos/kiteco/kite-installer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kiteco/kite-installer/labels{/name}","releases_url":"https://api.github.com/repos/kiteco/kite-installer/releases{/id}","deployments_url":"https://api.github.com/repos/kiteco/kite-installer/deployments","created_at":"2016-11-11T19:54:14Z","updated_at":"2017-08-16T02:26:11Z","pushed_at":"2017-12-05T14:29:42Z","git_url":"git://github.com/kiteco/kite-installer.git","ssh_url":"git@github.com:kiteco/kite-installer.git","clone_url":"https://github.com/kiteco/kite-installer.git","svn_url":"https://github.com/kiteco/kite-installer","homepage":null,"size":597,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":5,"open_issues":8,"watchers":8,"default_branch":"master"}},"base":{"label":"kiteco:master","ref":"master","sha":"4c97778e4868c7529a852dda49a97f077dde87bf","user":{"login":"kiteco","id":7321919,"avatar_url":"https://avatars0.githubusercontent.com/u/7321919?v=4","gravatar_id":"","url":"https://api.github.com/users/kiteco","html_url":"https://github.com/kiteco","followers_url":"https://api.github.com/users/kiteco/followers","following_url":"https://api.github.com/users/kiteco/following{/other_user}","gists_url":"https://api.github.com/users/kiteco/gists{/gist_id}","starred_url":"https://api.github.com/users/kiteco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiteco/subscriptions","organizations_url":"https://api.github.com/users/kiteco/orgs","repos_url":"https://api.github.com/users/kiteco/repos","events_url":"https://api.github.com/users/kiteco/events{/privacy}","received_events_url":"https://api.github.com/users/kiteco/received_events","type":"Organization","site_admin":false},"repo":{"id":73506977,"name":"kite-installer","full_name":"kiteco/kite-installer","owner":{"login":"kiteco","id":7321919,"avatar_url":"https://avatars0.githubusercontent.com/u/7321919?v=4","gravatar_id":"","url":"https://api.github.com/users/kiteco","html_url":"https://github.com/kiteco","followers_url":"https://api.github.com/users/kiteco/followers","following_url":"https://api.github.com/users/kiteco/following{/other_user}","gists_url":"https://api.github.com/users/kiteco/gists{/gist_id}","starred_url":"https://api.github.com/users/kiteco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiteco/subscriptions","organizations_url":"https://api.github.com/users/kiteco/orgs","repos_url":"https://api.github.com/users/kiteco/repos","events_url":"https://api.github.com/users/kiteco/events{/privacy}","received_events_url":"https://api.github.com/users/kiteco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kiteco/kite-installer","description":"Javascript library to install Kite app","fork":false,"url":"https://api.github.com/repos/kiteco/kite-installer","forks_url":"https://api.github.com/repos/kiteco/kite-installer/forks","keys_url":"https://api.github.com/repos/kiteco/kite-installer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kiteco/kite-installer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kiteco/kite-installer/teams","hooks_url":"https://api.github.com/repos/kiteco/kite-installer/hooks","issue_events_url":"https://api.github.com/repos/kiteco/kite-installer/issues/events{/number}","events_url":"https://api.github.com/repos/kiteco/kite-installer/events","assignees_url":"https://api.github.com/repos/kiteco/kite-installer/assignees{/user}","branches_url":"https://api.github.com/repos/kiteco/kite-installer/branches{/branch}","tags_url":"https://api.github.com/repos/kiteco/kite-installer/tags","blobs_url":"https://api.github.com/repos/kiteco/kite-installer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kiteco/kite-installer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kiteco/kite-installer/git/refs{/sha}","trees_url":"https://api.github.com/repos/kiteco/kite-installer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kiteco/kite-installer/statuses/{sha}","languages_url":"https://api.github.com/repos/kiteco/kite-installer/languages","stargazers_url":"https://api.github.com/repos/kiteco/kite-installer/stargazers","contributors_url":"https://api.github.com/repos/kiteco/kite-installer/contributors","subscribers_url":"https://api.github.com/repos/kiteco/kite-installer/subscribers","subscription_url":"https://api.github.com/repos/kiteco/kite-installer/subscription","commits_url":"https://api.github.com/repos/kiteco/kite-installer/commits{/sha}","git_commits_url":"https://api.github.com/repos/kiteco/kite-installer/git/commits{/sha}","comments_url":"https://api.github.com/repos/kiteco/kite-installer/comments{/number}","issue_comment_url":"https://api.github.com/repos/kiteco/kite-installer/issues/comments{/number}","contents_url":"https://api.github.com/repos/kiteco/kite-installer/contents/{+path}","compare_url":"https://api.github.com/repos/kiteco/kite-installer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kiteco/kite-installer/merges","archive_url":"https://api.github.com/repos/kiteco/kite-installer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kiteco/kite-installer/downloads","issues_url":"https://api.github.com/repos/kiteco/kite-installer/issues{/number}","pulls_url":"https://api.github.com/repos/kiteco/kite-installer/pulls{/number}","milestones_url":"https://api.github.com/repos/kiteco/kite-installer/milestones{/number}","notifications_url":"https://api.github.com/repos/kiteco/kite-installer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kiteco/kite-installer/labels{/name}","releases_url":"https://api.github.com/repos/kiteco/kite-installer/releases{/id}","deployments_url":"https://api.github.com/repos/kiteco/kite-installer/deployments","created_at":"2016-11-11T19:54:14Z","updated_at":"2017-08-16T02:26:11Z","pushed_at":"2017-12-05T14:29:42Z","git_url":"git://github.com/kiteco/kite-installer.git","ssh_url":"git@github.com:kiteco/kite-installer.git","clone_url":"https://github.com/kiteco/kite-installer.git","svn_url":"https://github.com/kiteco/kite-installer","homepage":null,"size":597,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":5,"open_issues":8,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kiteco/kite-installer/pulls/52"},"html":{"href":"https://github.com/kiteco/kite-installer/pull/52"},"issue":{"href":"https://api.github.com/repos/kiteco/kite-installer/issues/52"},"comments":{"href":"https://api.github.com/repos/kiteco/kite-installer/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/kiteco/kite-installer/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/kiteco/kite-installer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kiteco/kite-installer/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/kiteco/kite-installer/statuses/49843064b7d023ba5c9d5ca77aea97105aeb6e99"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"abe33","id":247140,"avatar_url":"https://avatars1.githubusercontent.com/u/247140?v=4","gravatar_id":"","url":"https://api.github.com/users/abe33","html_url":"https://github.com/abe33","followers_url":"https://api.github.com/users/abe33/followers","following_url":"https://api.github.com/users/abe33/following{/other_user}","gists_url":"https://api.github.com/users/abe33/gists{/gist_id}","starred_url":"https://api.github.com/users/abe33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abe33/subscriptions","organizations_url":"https://api.github.com/users/abe33/orgs","repos_url":"https://api.github.com/users/abe33/repos","events_url":"https://api.github.com/users/abe33/events{/privacy}","received_events_url":"https://api.github.com/users/abe33/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":99,"additions":2130,"deletions":1236,"changed_files":59}}
{"actor":{"display_login":"abe33"}}