Skip to content

always be showing the branch information - #786

Merged
joshaber merged 16 commits into
masterfrom
always-be-showing-branch
Jan 13, 2017
Merged

joshaber merged 16 commits into
masterfrom
always-be-showing-branch

Conversation

@shiftkey

@shiftkey shiftkey commented Jan 11, 2017 •

Copy link
Copy Markdown
Member

The current branch selector only appears when you have a valid branch. This PR adds support for detached HEAD and unborn repository scenarios.

Fixes #762

  • detect unborn and detached HEAD states from Git
  • display button and context for unborn repository
  • display button and context for detached HEAD
  • [ ] clarify branch selector behaviour for both scenarios
  • cleanup currentBranch usages and ensure they work with a valid tip

@shiftkey

Copy link
Copy Markdown
Member Author

Some work-in-progress details of the new button states:

Feels on this welcome

@shiftkey

Copy link
Copy Markdown
Member Author

A different variant for detached HEAD (we don't have a branch, but we have a given commit):

It'd be nice to show the commit message here for extra context, but it feels like cramming in too much. Thoughts @donokuda @niik?

@shiftkey

Copy link
Copy Markdown
Member Author

We have #720 which moves creating branch into the popover. This means showing the popover helps users switch back to a valid branch, but users also might be interested in creating a new branch from the detached HEAD.

@joshaber rather than go deep here, should I write up a separate issue about these scenarios and what we want to support here in terms of features?

@shiftkey shiftkey changed the title [WIP] always be showing the branch information always be showing the branch information Jan 11, 2017
Comment thread app/src/ui/app.tsx
description='Current branch'
onDropdownStateChanged={this.onBranchDropdownStateChanged}
dropdownContentRenderer={this.renderBranchFoldout}
dropdownState='closed' />

This comment was marked as spam.

@shiftkey

Copy link
Copy Markdown
Member Author

Ready for review

@niik

niik commented Jan 11, 2017

Copy link
Copy Markdown
Member

It'd be nice to show the commit message here for extra context, but it feels like cramming in too much. Thoughts @donokuda @niik?

Yeah, I think you're right to not include it. I'm not sure that we should be using the alert icon when we're detached, we should probably look at incorporating some warning next to the commit box instead.

@donokuda

Copy link
Copy Markdown
Contributor

I'm not sure that we should be using the alert icon when we're detached, we should probably look at incorporating some warning next to the commit box instead.

Any thoughts on using the commit icon instead?

@shiftkey

Copy link
Copy Markdown
Member Author

I'm not sure that we should be using the alert icon when we're detached, we should probably look at incorporating some warning next to the commit box instead.

👍 tracking this in #788

@shiftkey

Copy link
Copy Markdown
Member Author

@donokuda here's what it looks like with the commit icon. I like it.

@donokuda

Copy link
Copy Markdown
Contributor

yaas. Looks good! ✨ Plus I'm also hoping that'll help explain what it means to be in a detached HEAD state if you're new to Git (assuming they're familiar with the Octicon tho.)

@shiftkey shiftkey mentioned this pull request Jan 12, 2017
8 tasks done
@niik

niik commented Jan 12, 2017

Copy link
Copy Markdown
Member

Any thoughts on using the commit icon instead?

Yeah, I think that's better. Not completely sold on it but let's roll with it and see how it feels.

@niik niik assigned niik and unassigned niik Jan 12, 2017
@niik

niik commented Jan 12, 2017

Copy link
Copy Markdown
Member

I was gonna review this but I have to run, someone else feel free to pick it up or I'll try getting to it tomorrow

@joshaber joshaber self-assigned this Jan 12, 2017

@joshaber joshaber left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip kinds is a great distinction 👍

Comment thread app/src/models/branch.ts Outdated
Remote,
}

export enum BranchState {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@shiftkey

Copy link
Copy Markdown
Member Author

🐒

@joshaber
joshaber merged commit 3e87bb6 into master Jan 13, 2017
@joshaber
joshaber deleted the always-be-showing-branch branch January 13, 2017 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants