gitgraph.js icon indicating copy to clipboard operation
gitgraph.js copied to clipboard

Space Conservative Branching Style

Open iiian opened this issue 5 years ago • 3 comments

First of all, I would love to say thank you so much for building this library. Really great way to demonstrate commits. Awesome job, and huge value add to the git community

Is your feature request related to a problem? Please describe. I'm frustrated when looking at my commit history, because it has a propensity to grow endlessly towards one side of the screen, when it could be more space conservative. A space conservative UI layout, where commit lines effectively ride as close to master, or their parent, as possible would be ideal.

Describe the solution you'd like Something that effectively mirrors SourceTree/Bitbucket/git log --oneline --graph style graph commits

Thanks again for an awesome tool! Sorry for being another toxic requester/non-contributer in the OSS community 😅

iiian avatar Feb 14 '20 20:02 iiian

Hi @iiian, normally you should already have a "compact" mode where we are a bit more space conservative, is it what you want? If not, please attach some screenshots 😅

For the ref: https://gitgraphjs.com/#15.2

fabien0102 avatar Feb 15 '20 12:02 fabien0102

Hi @fabien0102 , @iiian ,

If we look into the compact mode example:

Screenshot from 2020-05-31 11-27-46

Branches develop, feat1, feat2 move more and more to the right. Is there any possibility to force the alignment so that these branches stay on the same vertical line? Maybe there is a tweak to re-use the same branch multiple times to achieve that. This is what I understand by git log --oneline --graph style graph.

The problem is, that many projects have "long term branches" and "short term" branches. I think that it is ok to reserve space for long term branches, but short term branches shouldn't.

tangoalx avatar May 31 '20 09:05 tangoalx

Indeed, we used to be able to delete a branch to solve this issue https://github.com/nicoespeon/gitgraph.js/blob/055a79a175bde42a6e043f9fb57fd9a22911524e/src/gitgraph.js#L851-L853

But this logic was totally forgot in the v2 🙄

fabien0102 avatar Jun 02 '20 07:06 fabien0102