gitGraph is wrong/ugly if mainBranchOrder != 0 #3505
Labels
Status: Triage
Needs to be verified, categorized, etc
Type: Bug / Error
Something isn't working or is incorrect
Describe the bug
In a gitGraph, if I set the mainBranchOrder to 1, and other branch to 0, the shape of branch links is wrong/reversed/ugly. The shape of the links allows a quick and intuitive interpretation of a git graph, but when the shape is wrong, the story the graph is expected to tell is unintelligible/unconventional.
The shape of merge links appears correct/good; it looks like only branch links are affected.
The purpose of setting mainBranchOrder to 1 is to show upstream (topic/developer's) branches above the integration/downstream/main branch, and bugfix/non-developer branches underneath the main branch. The main branch should be in the middle of the page, or at least not at the top.
To Reproduce
See the sample code linked below.
Expected behavior
When the mainBranchOrder is 1 and the other branch is 0, I expect the shape of the graph to be flipped along the X axis compared to the default branch ordering, as seen in the screenshots below.
Specifically, branches should leave the origin node at a 90 degree angle, and enter the new branch at a 0 degree angle, with the direction of the elbow changing from vertical to horizontal.
Screenshots
Simple graph with mainBranchOrder = 0 (looks good, non-overlapping links)
Same git graph but with mainBranchOrder = 1 and bb as order = 0 (looks wrong, links overlap)
I expected the graph to be simply mirrored as below (crudely flipped in IrfanView, hence the labels are mirrored too):
Code Sample
Good Graph sample (mainBranchOrder=0)
Bad Graph Sample (mainBranchGraph=1)
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: