{"action":"created","comment":{"url":"https://api.github.com/repos/desktop/desktop/pulls/comments/177302366","pull_request_review_id":107142770,"id":177302366,"diff_hunk":"@@ -91,6 +92,13 @@ interface IBranchListProps {\n    * to prepopulate the new branch name field.\n    */\n   readonly onCreateNewBranch?: (name: string) => void\n+\n+  readonly textbox?: TextBox\n+\n+  readonly onRenderItem?: (","path":"app/src/ui/branches/branch-list.tsx","position":24,"original_position":24,"commit_id":"9b79e4ede5eb6b87694b16b86ef3512471d1d3c6","original_commit_id":"9b79e4ede5eb6b87694b16b86ef3512471d1d3c6","user":{"login":"shiftkey","id":359239,"avatar_url":"https://avatars2.githubusercontent.com/u/359239?v=4","gravatar_id":"","url":"https://api.github.com/users/shiftkey","html_url":"https://github.com/shiftkey","followers_url":"https://api.github.com/users/shiftkey/followers","following_url":"https://api.github.com/users/shiftkey/following{/other_user}","gists_url":"https://api.github.com/users/shiftkey/gists{/gist_id}","starred_url":"https://api.github.com/users/shiftkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiftkey/subscriptions","organizations_url":"https://api.github.com/users/shiftkey/orgs","repos_url":"https://api.github.com/users/shiftkey/repos","events_url":"https://api.github.com/users/shiftkey/events{/privacy}","received_events_url":"https://api.github.com/users/shiftkey/received_events","type":"User","site_admin":true},"body":"Render props are a fine way craft higher-order components, which sounds like what you're aiming for. This is already something that we need to support with `List` and it's related components, so it's not a foreign pattern.\r\n\r\nTo take this further, you could make this a required function and extract the logic for the old code path up into `BranchesContainer`.","created_at":"2018-03-27T04:01:02Z","updated_at":"2018-03-27T04:18:30Z","html_url":"https://github.com/desktop/desktop/pull/4182#discussion_r177302366","pull_request_url":"https://api.github.com/repos/desktop/desktop/pulls/4182","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/desktop/desktop/pulls/comments/177302366"},"html":{"href":"https://github.com/desktop/desktop/pull/4182#discussion_r177302366"},"pull_request":{"href":"https://api.github.com/repos/desktop/desktop/pulls/4182"}},"in_reply_to_id":177295019},"pull_request":{"url":"https://api.github.com/repos/desktop/desktop/pulls/4182","id":173022510,"html_url":"https://github.com/desktop/desktop/pull/4182","diff_url":"https://github.com/desktop/desktop/pull/4182.diff","patch_url":"https://github.com/desktop/desktop/pull/4182.patch","issue_url":"https://api.github.com/repos/desktop/desktop/issues/4182","number":4182,"state":"open","locked":false,"title":"Compare to Branch","user":{"login":"iAmWillShepherd","id":1715082,"avatar_url":"https://avatars0.githubusercontent.com/u/1715082?v=4","gravatar_id":"","url":"https://api.github.com/users/iAmWillShepherd","html_url":"https://github.com/iAmWillShepherd","followers_url":"https://api.github.com/users/iAmWillShepherd/followers","following_url":"https://api.github.com/users/iAmWillShepherd/following{/other_user}","gists_url":"https://api.github.com/users/iAmWillShepherd/gists{/gist_id}","starred_url":"https://api.github.com/users/iAmWillShepherd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iAmWillShepherd/subscriptions","organizations_url":"https://api.github.com/users/iAmWillShepherd/orgs","repos_url":"https://api.github.com/users/iAmWillShepherd/repos","events_url":"https://api.github.com/users/iAmWillShepherd/events{/privacy}","received_events_url":"https://api.github.com/users/iAmWillShepherd/received_events","type":"User","site_admin":true},"body":"So, I accidentally built all the things in #3956, my bad. I was confused because I used the image in the first issue to build out my tasks list.\r\n\r\nFixes #3967\r\nFixes #3968 \r\nFixes #3997 \r\nFixes #3998\r\n\r\nI also created issues #4317 and #4318 to track additional work that needs to be done around this feature.\r\n\r\n### MVP\r\n- [x] Add feature flag\r\n- [x] Rename _Changes_ tab -> _Commit_\r\n- [x] Rename _History_ tab -> _Compare_\r\n- [x] Add UI to select a branch\r\n- [x] Add `TabBar` component to allow selecting *ahead* or *behind*\r\n- [x] Update commit list based on `CompareType`\r\n- [x] If no branch is selected we should show all commits (basically do what we've always done) and hide the _ahead/behind_ buttons\r\n- [x] Update ahead/behind info when branch is switched\r\n- [x] Add a button to merge commits that are **ahead** of the current branch\r\n\r\n### Polish\r\n- [x] Switch from select input to a text input\r\n  - [x] Input should show a filter-list of branches on focus\r\n  - [x] Each branch should show the number of commits ahead and behind the current branch\r\n    - [x] Figure out a way to load ahead/behind for every branch (All branches currently show the same ahead/behind info of the currently selected branch).\r\n  - [x] Selecting a branch should populate the text input with its name\r\n  - [x] Text input should have an icon that, when clicked, clears the text in the input field and takes user back to normal layout (pressing <kbd>escape</kbd> should do the same thing)\r\n- [x] Add a new `CompareBranchListItem` component that has all the logic to load the compare state async\r\n- [x] 🎨\r\n\r\n### Incomplete\r\n* #3998: reverting on conflict + error message\r\n\r\n### Progress\r\n#### Ahead/Behind and Commits\r\n![2018-03-22 11 03 47](https://user-images.githubusercontent.com/1715082/37782447-e0c85ca4-2dc0-11e8-94ae-44c2043cd718.gif)\r\n#### Merging\r\n![2018-03-26 15 34 01](https://user-images.githubusercontent.com/1715082/37931462-507167c4-310b-11e8-8c4f-a8d8aba9c587.gif)","created_at":"2018-03-06T00:03:03Z","updated_at":"2018-03-27T04:18:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc85ac8f5ef574fa9980c7a20254c0c2e0f15077","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":590997902,"url":"https://api.github.com/repos/desktop/desktop/labels/ready-for-review","name":"ready-for-review","color":"0e8a16","default":false}],"milestone":{"url":"https://api.github.com/repos/desktop/desktop/milestones/12","html_url":"https://github.com/desktop/desktop/milestone/12","labels_url":"https://api.github.com/repos/desktop/desktop/milestones/12/labels","id":2859518,"number":12,"title":"1.2.0","description":"","creator":{"login":"joshaber","id":13760,"avatar_url":"https://avatars1.githubusercontent.com/u/13760?v=4","gravatar_id":"","url":"https://api.github.com/users/joshaber","html_url":"https://github.com/joshaber","followers_url":"https://api.github.com/users/joshaber/followers","following_url":"https://api.github.com/users/joshaber/following{/other_user}","gists_url":"https://api.github.com/users/joshaber/gists{/gist_id}","starred_url":"https://api.github.com/users/joshaber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshaber/subscriptions","organizations_url":"https://api.github.com/users/joshaber/orgs","repos_url":"https://api.github.com/users/joshaber/repos","events_url":"https://api.github.com/users/joshaber/events{/privacy}","received_events_url":"https://api.github.com/users/joshaber/received_events","type":"User","site_admin":true},"open_issues":18,"closed_issues":6,"state":"open","created_at":"2017-10-23T15:45:52Z","updated_at":"2018-03-27T01:54:10Z","due_on":"2018-04-23T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/desktop/desktop/pulls/4182/commits","review_comments_url":"https://api.github.com/repos/desktop/desktop/pulls/4182/comments","review_comment_url":"https://api.github.com/repos/desktop/desktop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/desktop/desktop/issues/4182/comments","statuses_url":"https://api.github.com/repos/desktop/desktop/statuses/9b79e4ede5eb6b87694b16b86ef3512471d1d3c6","head":{"label":"desktop:compare-branches","ref":"compare-branches","sha":"9b79e4ede5eb6b87694b16b86ef3512471d1d3c6","user":{"login":"desktop","id":13171334,"avatar_url":"https://avatars0.githubusercontent.com/u/13171334?v=4","gravatar_id":"","url":"https://api.github.com/users/desktop","html_url":"https://github.com/desktop","followers_url":"https://api.github.com/users/desktop/followers","following_url":"https://api.github.com/users/desktop/following{/other_user}","gists_url":"https://api.github.com/users/desktop/gists{/gist_id}","starred_url":"https://api.github.com/users/desktop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/desktop/subscriptions","organizations_url":"https://api.github.com/users/desktop/orgs","repos_url":"https://api.github.com/users/desktop/repos","events_url":"https://api.github.com/users/desktop/events{/privacy}","received_events_url":"https://api.github.com/users/desktop/received_events","type":"Organization","site_admin":false},"repo":{"id":58559694,"name":"desktop","full_name":"desktop/desktop","owner":{"login":"desktop","id":13171334,"avatar_url":"https://avatars0.githubusercontent.com/u/13171334?v=4","gravatar_id":"","url":"https://api.github.com/users/desktop","html_url":"https://github.com/desktop","followers_url":"https://api.github.com/users/desktop/followers","following_url":"https://api.github.com/users/desktop/following{/other_user}","gists_url":"https://api.github.com/users/desktop/gists{/gist_id}","starred_url":"https://api.github.com/users/desktop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/desktop/subscriptions","organizations_url":"https://api.github.com/users/desktop/orgs","repos_url":"https://api.github.com/users/desktop/repos","events_url":"https://api.github.com/users/desktop/events{/privacy}","received_events_url":"https://api.github.com/users/desktop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/desktop/desktop","description":"Simple collaboration from your desktop","fork":false,"url":"https://api.github.com/repos/desktop/desktop","forks_url":"https://api.github.com/repos/desktop/desktop/forks","keys_url":"https://api.github.com/repos/desktop/desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/desktop/desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/desktop/desktop/teams","hooks_url":"https://api.github.com/repos/desktop/desktop/hooks","issue_events_url":"https://api.github.com/repos/desktop/desktop/issues/events{/number}","events_url":"https://api.github.com/repos/desktop/desktop/events","assignees_url":"https://api.github.com/repos/desktop/desktop/assignees{/user}","branches_url":"https://api.github.com/repos/desktop/desktop/branches{/branch}","tags_url":"https://api.github.com/repos/desktop/desktop/tags","blobs_url":"https://api.github.com/repos/desktop/desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/desktop/desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/desktop/desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/desktop/desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/desktop/desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/desktop/desktop/languages","stargazers_url":"https://api.github.com/repos/desktop/desktop/stargazers","contributors_url":"https://api.github.com/repos/desktop/desktop/contributors","subscribers_url":"https://api.github.com/repos/desktop/desktop/subscribers","subscription_url":"https://api.github.com/repos/desktop/desktop/subscription","commits_url":"https://api.github.com/repos/desktop/desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/desktop/desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/desktop/desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/desktop/desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/desktop/desktop/contents/{+path}","compare_url":"https://api.github.com/repos/desktop/desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/desktop/desktop/merges","archive_url":"https://api.github.com/repos/desktop/desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/desktop/desktop/downloads","issues_url":"https://api.github.com/repos/desktop/desktop/issues{/number}","pulls_url":"https://api.github.com/repos/desktop/desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/desktop/desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/desktop/desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/desktop/desktop/labels{/name}","releases_url":"https://api.github.com/repos/desktop/desktop/releases{/id}","deployments_url":"https://api.github.com/repos/desktop/desktop/deployments","created_at":"2016-05-11T15:59:00Z","updated_at":"2018-03-27T01:11:51Z","pushed_at":"2018-03-27T01:46:05Z","git_url":"git://github.com/desktop/desktop.git","ssh_url":"git@github.com:desktop/desktop.git","clone_url":"https://github.com/desktop/desktop.git","svn_url":"https://github.com/desktop/desktop","homepage":"https://desktop.github.com","size":21599,"stargazers_count":4526,"watchers_count":4526,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1574,"mirror_url":null,"archived":false,"open_issues_count":332,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1574,"open_issues":332,"watchers":4526,"default_branch":"master"}},"base":{"label":"desktop:master","ref":"master","sha":"2da6938beb949e604bdf7f751cc672d8766eb441","user":{"login":"desktop","id":13171334,"avatar_url":"https://avatars0.githubusercontent.com/u/13171334?v=4","gravatar_id":"","url":"https://api.github.com/users/desktop","html_url":"https://github.com/desktop","followers_url":"https://api.github.com/users/desktop/followers","following_url":"https://api.github.com/users/desktop/following{/other_user}","gists_url":"https://api.github.com/users/desktop/gists{/gist_id}","starred_url":"https://api.github.com/users/desktop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/desktop/subscriptions","organizations_url":"https://api.github.com/users/desktop/orgs","repos_url":"https://api.github.com/users/desktop/repos","events_url":"https://api.github.com/users/desktop/events{/privacy}","received_events_url":"https://api.github.com/users/desktop/received_events","type":"Organization","site_admin":false},"repo":{"id":58559694,"name":"desktop","full_name":"desktop/desktop","owner":{"login":"desktop","id":13171334,"avatar_url":"https://avatars0.githubusercontent.com/u/13171334?v=4","gravatar_id":"","url":"https://api.github.com/users/desktop","html_url":"https://github.com/desktop","followers_url":"https://api.github.com/users/desktop/followers","following_url":"https://api.github.com/users/desktop/following{/other_user}","gists_url":"https://api.github.com/users/desktop/gists{/gist_id}","starred_url":"https://api.github.com/users/desktop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/desktop/subscriptions","organizations_url":"https://api.github.com/users/desktop/orgs","repos_url":"https://api.github.com/users/desktop/repos","events_url":"https://api.github.com/users/desktop/events{/privacy}","received_events_url":"https://api.github.com/users/desktop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/desktop/desktop","description":"Simple collaboration from your desktop","fork":false,"url":"https://api.github.com/repos/desktop/desktop","forks_url":"https://api.github.com/repos/desktop/desktop/forks","keys_url":"https://api.github.com/repos/desktop/desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/desktop/desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/desktop/desktop/teams","hooks_url":"https://api.github.com/repos/desktop/desktop/hooks","issue_events_url":"https://api.github.com/repos/desktop/desktop/issues/events{/number}","events_url":"https://api.github.com/repos/desktop/desktop/events","assignees_url":"https://api.github.com/repos/desktop/desktop/assignees{/user}","branches_url":"https://api.github.com/repos/desktop/desktop/branches{/branch}","tags_url":"https://api.github.com/repos/desktop/desktop/tags","blobs_url":"https://api.github.com/repos/desktop/desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/desktop/desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/desktop/desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/desktop/desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/desktop/desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/desktop/desktop/languages","stargazers_url":"https://api.github.com/repos/desktop/desktop/stargazers","contributors_url":"https://api.github.com/repos/desktop/desktop/contributors","subscribers_url":"https://api.github.com/repos/desktop/desktop/subscribers","subscription_url":"https://api.github.com/repos/desktop/desktop/subscription","commits_url":"https://api.github.com/repos/desktop/desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/desktop/desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/desktop/desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/desktop/desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/desktop/desktop/contents/{+path}","compare_url":"https://api.github.com/repos/desktop/desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/desktop/desktop/merges","archive_url":"https://api.github.com/repos/desktop/desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/desktop/desktop/downloads","issues_url":"https://api.github.com/repos/desktop/desktop/issues{/number}","pulls_url":"https://api.github.com/repos/desktop/desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/desktop/desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/desktop/desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/desktop/desktop/labels{/name}","releases_url":"https://api.github.com/repos/desktop/desktop/releases{/id}","deployments_url":"https://api.github.com/repos/desktop/desktop/deployments","created_at":"2016-05-11T15:59:00Z","updated_at":"2018-03-27T01:11:51Z","pushed_at":"2018-03-27T01:46:05Z","git_url":"git://github.com/desktop/desktop.git","ssh_url":"git@github.com:desktop/desktop.git","clone_url":"https://github.com/desktop/desktop.git","svn_url":"https://github.com/desktop/desktop","homepage":"https://desktop.github.com","size":21599,"stargazers_count":4526,"watchers_count":4526,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1574,"mirror_url":null,"archived":false,"open_issues_count":332,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1574,"open_issues":332,"watchers":4526,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/desktop/desktop/pulls/4182"},"html":{"href":"https://github.com/desktop/desktop/pull/4182"},"issue":{"href":"https://api.github.com/repos/desktop/desktop/issues/4182"},"comments":{"href":"https://api.github.com/repos/desktop/desktop/issues/4182/comments"},"review_comments":{"href":"https://api.github.com/repos/desktop/desktop/pulls/4182/comments"},"review_comment":{"href":"https://api.github.com/repos/desktop/desktop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/desktop/desktop/pulls/4182/commits"},"statuses":{"href":"https://api.github.com/repos/desktop/desktop/statuses/9b79e4ede5eb6b87694b16b86ef3512471d1d3c6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"shiftkey"}}