Repository navigation
Closed
Description
This is part of #3956 and is for viewing changes as compared to any branch (ex: master).
Changes:
- create a feature flag (ideally we don't change anything in the
HistorySideBarcomponent) - copy change (history -> compare, changes -> commit [may not be reflected in mocks, talk to @niik])
-
branch selecting inputwith new icon in input - list of branches on
branch selecting inputclick (if it's empty) which can be "x"ed out - clicking on a branch shows commits ahead of the target branch
- filtering
User Flow to check functionality:
- click on compare tab and see the commits you made on your branch + all commits from where you branched off of (existing behavior)
- click into the "compare a branch..." input and see a list of branches just like you would for switching branches if you clicked on the "current branch" menu item
- click on "master" and "master" becomes the text in the input and you see all the commits you have ahead of "master"
- press "x" in the branch input and see list of branches again
- select another branch, ex: "new-branch" and "new-branch" becomes the text in the input and you see all the commits you have ahead of "new-branch"
- press "x" in the branch input and see list of branches again
- start typing the name of an existent branch in "compare a branch..." input
- see all branches filtered with same behavior as we have for the branches container
- select a new target branch, ex: "filtered-branch" and "filtered-branch" becomes the text in the input and you see all the commits you have ahead of "filtered-branch"
- press "x" in the branch input and see list of branches again
- see the compare tab return to default state
Other pieces:
- ahead/behind counts for each branch is in [RBB] Ahead/Behind Branch Commit Counts #3968
- toggle for behind/ahead or any behind info in [RBB] Ahead/Behind Toggle #3997
Notes:
@donokuda said this may change soon
Reacted by Yhancik






Activity
nerdneha commentedon Feb 8, 2018
@donokuda @niik
does the branch list grouping of recent v other exactly match the behavior we have in the branches list for "current branch"?
niik commentedon Feb 9, 2018
It should, yeah.
iAmWillShepherd commentedon Feb 27, 2018
Question:
shiftkey commentedon Feb 27, 2018
I know this one! It should be this icon which can be rendered as an
OcticonReact component using theOcticonSymbol.gitBranchsymbol.donokuda commentedon Feb 28, 2018
Because the branch-icon-inside-of-the-text-field is something new, I'm not necessarily sure what the implications are for implementing it.
I did a scrappy little prototype of how I imagined it to behave; but in the potential situation where the cost of implementation is higher than the value of its worth, I think a potential compromise is to always have the icon showing:
iAmWillShepherd commentedon Feb 28, 2018
@nerdneha could you clarify ☝️ ?
donokuda commentedon Feb 28, 2018
@iAmWillShepherd That's around changing the tab label from "Changes" to "Commit"
Sorry for the confusion there 😭
[-]Compare to Branch[/-][+][RBB] Compare to Branch[/+]iAmWillShepherd commentedon Mar 21, 2018
@desktop/design, any reason we made the decision to use a
TextBoxandFilterListinstead of something like a select DOM element or a combo box?As I've been building this, it feels like the selection of the branch should happen from something closer in behavior to a select list. I believe we can style each option so that we see the ahead/behind info as well.
donokuda commentedon Mar 21, 2018
I'd be interested in trying out the combo box approach.
The main reason why we went down the FilterList route is because it's an interaction that already exists in the app itself. My concern with going with just the
<select>approach is that you can't necessarily search for a branch.donokuda commentedon Mar 21, 2018
In a past life, I've also explored a combo box in a mock (albeit without behind/ahead information.)
shiftkey commentedon Mar 23, 2018
Somewhat related: I've not used
downshiftyet, but it's been on my radar since i came across itmonths ago.
To quote the elevator pitch:
This seems like an ideal opportunity to explore the a combined "select with autocomplete" input element and see if it feels better than our current
FilterListexperience.The examples in this post give a pretty good idea of what's possible with it, FWIW: https://blog.kentcdodds.com/introducing-downshift-for-react-b1de3fca0817