{"action":"created","comment":{"url":"https://api.github.com/repos/juju/juju-gui/pulls/comments/56844653","id":56844653,"diff_hunk":"@@ -39,15 +45,48 @@ YUI.add('deployment-bar', function() {\n     */\n     getInitialState: function() {\n       return {\n+        hasCommits: false,\n         latestChangeDescription: null\n       };\n     },\n \n+    componentDidMount: function() {\n+      this._updateHasCommits();\n+    },\n+\n     componentWillReceiveProps: function(nextProps) {\n+      this._updateHasCommits();\n       this._updateLatestChange(nextProps.currentChangeSet);\n     },\n \n     /**\n+      Check if we have any commits.\n+\n+      @param {Function} callback A function to call once the state has updated.\n+      @method _updateHasCommits\n+    */\n+    _updateHasCommits: function() {\n+      var hasCommits = false;\n+      if (!this.state.hasCommits) {\n+        this.props.services.forEach(service => {","path":"jujugui/static/gui/src/app/components/deployment-bar/deployment-bar.js","position":45,"original_position":45,"commit_id":"edb8de106bd030086cb0868d1c7eff8014825e7a","original_commit_id":"edb8de106bd030086cb0868d1c7eff8014825e7a","user":{"login":"hatched","id":532033,"avatar_url":"https://avatars.githubusercontent.com/u/532033?v=3","gravatar_id":"","url":"https://api.github.com/users/hatched","html_url":"https://github.com/hatched","followers_url":"https://api.github.com/users/hatched/followers","following_url":"https://api.github.com/users/hatched/following{/other_user}","gists_url":"https://api.github.com/users/hatched/gists{/gist_id}","starred_url":"https://api.github.com/users/hatched/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hatched/subscriptions","organizations_url":"https://api.github.com/users/hatched/orgs","repos_url":"https://api.github.com/users/hatched/repos","events_url":"https://api.github.com/users/hatched/events{/privacy}","received_events_url":"https://api.github.com/users/hatched/received_events","type":"User","site_admin":false},"body":"Because this is called from `componentWillReceiveProps` shouldn't it also take a props argument and use that one instead? Because here you're using `currentProps` instead of `nextProps` in the `componentWillReceiveProps` case.","created_at":"2016-03-21T15:46:05Z","updated_at":"2016-03-21T15:46:05Z","html_url":"https://github.com/juju/juju-gui/pull/1472#discussion_r56844653","pull_request_url":"https://api.github.com/repos/juju/juju-gui/pulls/1472","_links":{"self":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/comments/56844653"},"html":{"href":"https://github.com/juju/juju-gui/pull/1472#discussion_r56844653"},"pull_request":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/1472"}}},"pull_request":{"url":"https://api.github.com/repos/juju/juju-gui/pulls/1472","id":62855457,"html_url":"https://github.com/juju/juju-gui/pull/1472","diff_url":"https://github.com/juju/juju-gui/pull/1472.diff","patch_url":"https://github.com/juju/juju-gui/pull/1472.patch","issue_url":"https://api.github.com/repos/juju/juju-gui/issues/1472","number":1472,"state":"open","locked":false,"title":"Add panel component for deployment flow","user":{"login":"huwshimi","id":361637,"avatar_url":"https://avatars.githubusercontent.com/u/361637?v=3","gravatar_id":"","url":"https://api.github.com/users/huwshimi","html_url":"https://github.com/huwshimi","followers_url":"https://api.github.com/users/huwshimi/followers","following_url":"https://api.github.com/users/huwshimi/following{/other_user}","gists_url":"https://api.github.com/users/huwshimi/gists{/gist_id}","starred_url":"https://api.github.com/users/huwshimi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huwshimi/subscriptions","organizations_url":"https://api.github.com/users/huwshimi/orgs","repos_url":"https://api.github.com/users/huwshimi/repos","events_url":"https://api.github.com/users/huwshimi/events{/privacy}","received_events_url":"https://api.github.com/users/huwshimi/received_events","type":"User","site_admin":false},"body":"In this branch:\r\n- moved the deployment bar out of the deployment component so that it can be rendered independently of the deployment flow\r\n- added a new panel for displaying the deployment steps\r\n- added the summary as a deployment step\r\n- updated the state for handling the new deployment flow\r\n- updated the existing deployment summary to work with the changes to the state/rendering of the deployment components. The old summary will be retained while we are building the new deployment flow. Some of the sub-components are duplicated for the summary so that they can be modified without affecting the other flow, hence the size of this branch.\r\n\r\nThe deployment flow will work by adding another component following the structure of summary.js that will be rendered by deployment.js using another case here: https://github.com/juju/juju-gui/pull/1472/files#diff-760cf384f3bb1b0f33ff2b63af7534f9R43\r\n\r\nThe case is parsed from the deploy url param so for `.../deploy/setup/` \"setup\" would be the case and whatever is returned will be displayed in the deployment panel.\r\n\r\nThose panels can then be navigated to from any control in the flow with a standard `changeState` call such as:\r\n\r\n```\r\n    changeState({\r\n        sectionC: {\r\n          component: 'deploy',\r\n          metadata: {\r\n            activeComponent: 'setup'\r\n          }\r\n        }\r\n      });\r\n```\r\n\r\nThe step can be displayed in the head by adding another step here: https://github.com/juju/juju-gui/pull/1472/files#diff-760cf384f3bb1b0f33ff2b63af7534f9R59\r\n\r\n","created_at":"2016-03-15T04:59:26Z","updated_at":"2016-03-21T15:46:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f870cf4b5af059454d8f5304c4505aaa3f212dc8","assignee":null,"milestone":{"url":"https://api.github.com/repos/juju/juju-gui/milestones/8","html_url":"https://github.com/juju/juju-gui/milestones/2.NEXT","labels_url":"https://api.github.com/repos/juju/juju-gui/milestones/8/labels","id":1646049,"number":8,"title":"2.NEXT","description":"","creator":{"login":"hatched","id":532033,"avatar_url":"https://avatars.githubusercontent.com/u/532033?v=3","gravatar_id":"","url":"https://api.github.com/users/hatched","html_url":"https://github.com/hatched","followers_url":"https://api.github.com/users/hatched/followers","following_url":"https://api.github.com/users/hatched/following{/other_user}","gists_url":"https://api.github.com/users/hatched/gists{/gist_id}","starred_url":"https://api.github.com/users/hatched/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hatched/subscriptions","organizations_url":"https://api.github.com/users/hatched/orgs","repos_url":"https://api.github.com/users/hatched/repos","events_url":"https://api.github.com/users/hatched/events{/privacy}","received_events_url":"https://api.github.com/users/hatched/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":1,"state":"open","created_at":"2016-03-15T16:39:15Z","updated_at":"2016-03-21T13:54:27Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/juju/juju-gui/pulls/1472/commits","review_comments_url":"https://api.github.com/repos/juju/juju-gui/pulls/1472/comments","review_comment_url":"https://api.github.com/repos/juju/juju-gui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juju/juju-gui/issues/1472/comments","statuses_url":"https://api.github.com/repos/juju/juju-gui/statuses/edb8de106bd030086cb0868d1c7eff8014825e7a","head":{"label":"huwshimi:deployment-layout","ref":"deployment-layout","sha":"edb8de106bd030086cb0868d1c7eff8014825e7a","user":{"login":"huwshimi","id":361637,"avatar_url":"https://avatars.githubusercontent.com/u/361637?v=3","gravatar_id":"","url":"https://api.github.com/users/huwshimi","html_url":"https://github.com/huwshimi","followers_url":"https://api.github.com/users/huwshimi/followers","following_url":"https://api.github.com/users/huwshimi/following{/other_user}","gists_url":"https://api.github.com/users/huwshimi/gists{/gist_id}","starred_url":"https://api.github.com/users/huwshimi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huwshimi/subscriptions","organizations_url":"https://api.github.com/users/huwshimi/orgs","repos_url":"https://api.github.com/users/huwshimi/repos","events_url":"https://api.github.com/users/huwshimi/events{/privacy}","received_events_url":"https://api.github.com/users/huwshimi/received_events","type":"User","site_admin":false},"repo":{"id":15032585,"name":"juju-gui","full_name":"huwshimi/juju-gui","owner":{"login":"huwshimi","id":361637,"avatar_url":"https://avatars.githubusercontent.com/u/361637?v=3","gravatar_id":"","url":"https://api.github.com/users/huwshimi","html_url":"https://github.com/huwshimi","followers_url":"https://api.github.com/users/huwshimi/followers","following_url":"https://api.github.com/users/huwshimi/following{/other_user}","gists_url":"https://api.github.com/users/huwshimi/gists{/gist_id}","starred_url":"https://api.github.com/users/huwshimi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huwshimi/subscriptions","organizations_url":"https://api.github.com/users/huwshimi/orgs","repos_url":"https://api.github.com/users/huwshimi/repos","events_url":"https://api.github.com/users/huwshimi/events{/privacy}","received_events_url":"https://api.github.com/users/huwshimi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/huwshimi/juju-gui","description":"Juju-GUI is a web-based GUI for Juju <https://juju.ubuntu.com/>.","fork":true,"url":"https://api.github.com/repos/huwshimi/juju-gui","forks_url":"https://api.github.com/repos/huwshimi/juju-gui/forks","keys_url":"https://api.github.com/repos/huwshimi/juju-gui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/huwshimi/juju-gui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/huwshimi/juju-gui/teams","hooks_url":"https://api.github.com/repos/huwshimi/juju-gui/hooks","issue_events_url":"https://api.github.com/repos/huwshimi/juju-gui/issues/events{/number}","events_url":"https://api.github.com/repos/huwshimi/juju-gui/events","assignees_url":"https://api.github.com/repos/huwshimi/juju-gui/assignees{/user}","branches_url":"https://api.github.com/repos/huwshimi/juju-gui/branches{/branch}","tags_url":"https://api.github.com/repos/huwshimi/juju-gui/tags","blobs_url":"https://api.github.com/repos/huwshimi/juju-gui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/huwshimi/juju-gui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/huwshimi/juju-gui/git/refs{/sha}","trees_url":"https://api.github.com/repos/huwshimi/juju-gui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/huwshimi/juju-gui/statuses/{sha}","languages_url":"https://api.github.com/repos/huwshimi/juju-gui/languages","stargazers_url":"https://api.github.com/repos/huwshimi/juju-gui/stargazers","contributors_url":"https://api.github.com/repos/huwshimi/juju-gui/contributors","subscribers_url":"https://api.github.com/repos/huwshimi/juju-gui/subscribers","subscription_url":"https://api.github.com/repos/huwshimi/juju-gui/subscription","commits_url":"https://api.github.com/repos/huwshimi/juju-gui/commits{/sha}","git_commits_url":"https://api.github.com/repos/huwshimi/juju-gui/git/commits{/sha}","comments_url":"https://api.github.com/repos/huwshimi/juju-gui/comments{/number}","issue_comment_url":"https://api.github.com/repos/huwshimi/juju-gui/issues/comments{/number}","contents_url":"https://api.github.com/repos/huwshimi/juju-gui/contents/{+path}","compare_url":"https://api.github.com/repos/huwshimi/juju-gui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/huwshimi/juju-gui/merges","archive_url":"https://api.github.com/repos/huwshimi/juju-gui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/huwshimi/juju-gui/downloads","issues_url":"https://api.github.com/repos/huwshimi/juju-gui/issues{/number}","pulls_url":"https://api.github.com/repos/huwshimi/juju-gui/pulls{/number}","milestones_url":"https://api.github.com/repos/huwshimi/juju-gui/milestones{/number}","notifications_url":"https://api.github.com/repos/huwshimi/juju-gui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/huwshimi/juju-gui/labels{/name}","releases_url":"https://api.github.com/repos/huwshimi/juju-gui/releases{/id}","deployments_url":"https://api.github.com/repos/huwshimi/juju-gui/deployments","created_at":"2013-12-08T22:20:08Z","updated_at":"2014-06-25T06:57:23Z","pushed_at":"2016-03-21T05:49:31Z","git_url":"git://github.com/huwshimi/juju-gui.git","ssh_url":"git@github.com:huwshimi/juju-gui.git","clone_url":"https://github.com/huwshimi/juju-gui.git","svn_url":"https://github.com/huwshimi/juju-gui","homepage":null,"size":113453,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"juju:develop","ref":"develop","sha":"21297da18952f02839401a5cb648ea4b5fbbb8f2","user":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=3","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"repo":{"id":14960387,"name":"juju-gui","full_name":"juju/juju-gui","owner":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=3","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juju/juju-gui","description":"Juju-GUI is a web-based GUI for Juju <https://jujucharms.com/>.","fork":false,"url":"https://api.github.com/repos/juju/juju-gui","forks_url":"https://api.github.com/repos/juju/juju-gui/forks","keys_url":"https://api.github.com/repos/juju/juju-gui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juju/juju-gui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juju/juju-gui/teams","hooks_url":"https://api.github.com/repos/juju/juju-gui/hooks","issue_events_url":"https://api.github.com/repos/juju/juju-gui/issues/events{/number}","events_url":"https://api.github.com/repos/juju/juju-gui/events","assignees_url":"https://api.github.com/repos/juju/juju-gui/assignees{/user}","branches_url":"https://api.github.com/repos/juju/juju-gui/branches{/branch}","tags_url":"https://api.github.com/repos/juju/juju-gui/tags","blobs_url":"https://api.github.com/repos/juju/juju-gui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juju/juju-gui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juju/juju-gui/git/refs{/sha}","trees_url":"https://api.github.com/repos/juju/juju-gui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juju/juju-gui/statuses/{sha}","languages_url":"https://api.github.com/repos/juju/juju-gui/languages","stargazers_url":"https://api.github.com/repos/juju/juju-gui/stargazers","contributors_url":"https://api.github.com/repos/juju/juju-gui/contributors","subscribers_url":"https://api.github.com/repos/juju/juju-gui/subscribers","subscription_url":"https://api.github.com/repos/juju/juju-gui/subscription","commits_url":"https://api.github.com/repos/juju/juju-gui/commits{/sha}","git_commits_url":"https://api.github.com/repos/juju/juju-gui/git/commits{/sha}","comments_url":"https://api.github.com/repos/juju/juju-gui/comments{/number}","issue_comment_url":"https://api.github.com/repos/juju/juju-gui/issues/comments{/number}","contents_url":"https://api.github.com/repos/juju/juju-gui/contents/{+path}","compare_url":"https://api.github.com/repos/juju/juju-gui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juju/juju-gui/merges","archive_url":"https://api.github.com/repos/juju/juju-gui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juju/juju-gui/downloads","issues_url":"https://api.github.com/repos/juju/juju-gui/issues{/number}","pulls_url":"https://api.github.com/repos/juju/juju-gui/pulls{/number}","milestones_url":"https://api.github.com/repos/juju/juju-gui/milestones{/number}","notifications_url":"https://api.github.com/repos/juju/juju-gui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juju/juju-gui/labels{/name}","releases_url":"https://api.github.com/repos/juju/juju-gui/releases{/id}","deployments_url":"https://api.github.com/repos/juju/juju-gui/deployments","created_at":"2013-12-05T17:15:48Z","updated_at":"2016-03-18T06:45:30Z","pushed_at":"2016-03-21T14:57:20Z","git_url":"git://github.com/juju/juju-gui.git","ssh_url":"git@github.com:juju/juju-gui.git","clone_url":"https://github.com/juju/juju-gui.git","svn_url":"https://github.com/juju/juju-gui","homepage":"","size":117638,"stargazers_count":80,"watchers_count":80,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":60,"forks":49,"open_issues":60,"watchers":80,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/1472"},"html":{"href":"https://github.com/juju/juju-gui/pull/1472"},"issue":{"href":"https://api.github.com/repos/juju/juju-gui/issues/1472"},"comments":{"href":"https://api.github.com/repos/juju/juju-gui/issues/1472/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/1472/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/1472/commits"},"statuses":{"href":"https://api.github.com/repos/juju/juju-gui/statuses/edb8de106bd030086cb0868d1c7eff8014825e7a"}}}}