git-log--graph icon indicating copy to clipboard operation
git-log--graph copied to clipboard

Long branch names overlap with the commit messages

Open adalisk-emikhaylov opened this issue 2 years ago • 13 comments

image

adalisk-emikhaylov avatar Jun 23 '23 10:06 adalisk-emikhaylov

that's true, so what do we do about it? personally I think it's better like now instead of mhutchie/Git Graph, where the branches are instead placed next to the commit message where they don't really belong. You can always show the commit message by hovering it, so it will have a higher z-index, and in my experience the branch tips are more important than the commit messages.

I'd welcome other suggestions or opinions on this, because after all these kinds of adjustments are best based on majority vote.

phil294 avatar Jun 24 '23 16:06 phil294

My idea would be to move the messages to the right to clear the branch names. (Only on the commits that have this issue.) (With the offset calculated individually per commit.) (Probably with some upper limit on the offset.)

adalisk-emikhaylov avatar Jun 26 '23 15:06 adalisk-emikhaylov

My idea would be to move the messages to the right to clear the branch names.

sounds like a good idea, but currently very complicated / slow to do. With the pending resizability / customizability update, perhaps.

An easier solution might be to have all subject lines be right-aligned: image

but I'm not really sold on that approach

phil294 avatar Jun 26 '23 17:06 phil294

You can always show the commit message by hovering it, so it will have a higher z-index, and in my experience the branch tips are more important than the commit messages.

I have to admit, I had no idea that hovering would do that. It seems like a workable solution, but there are some trade-offs around discoverability and user effort (needing an extra mouse gesture to activate the hover behavior).

blm768 avatar Jun 27 '23 02:06 blm768

What about the commit is shown on top of the message but on hover it's opacity becomes 0?

yougotwill avatar Jun 30 '23 00:06 yougotwill

What about the commit is shown on top of the message but on hover it's opacity becomes 0?

so just like now, but in the opposite order? I don't really see an advantage in comparison to the current situation, except that now the commit messages are more important than then branch tips (which I don't think they are). And it also comes at the disadvantage of some branch tips to potentially be entirely hidden behind the message (when there are multiple branch tips at the same commit), so you don't even know they are there without mouse movement.

phil294 avatar Jul 01 '23 13:07 phil294

Sorry @phil294 I mistyped I meant showing the branch name on top of the commit message and when you hover it disappears and then the commit message is visible.

yougotwill avatar Jul 02 '23 23:07 yougotwill

@yougotwill Isn't this the current behavior?

@phil294 The only options I see are what I suggested in my first comment, or what Git Graph does. Right-aligning doesn't look good to me as well. Perhaps a toggle to switch between that and the current behavior.

Also Git Graph collapses foo and origin/foo into a single rect (origin | foo), perhaps this could help with screen space too.

adalisk-emikhaylov avatar Jul 04 '23 11:07 adalisk-emikhaylov

@adalisk-emikhaylov I agree with everything! Your solution was also suggested by @hansu here.

phil294 avatar Jul 04 '23 14:07 phil294

~~@adalisk-emikhaylov Not to my knowledge. There is no hover affect on the branch names. They have a lower opacity by default but I'm suggesting a hover effect when you put your mouse over them and then they become invisible so that you can read the commit message "behind" them.~~

yougotwill avatar Jul 05 '23 00:07 yougotwill

But it looks like an alternative solution has been reached so all good 👍

yougotwill avatar Jul 05 '23 00:07 yougotwill

Dammit disregard my earlier comments @adalisk-emikhaylov You are 100% correct my mistake. The branch names disappear when you hover on the commit message and not the branch names themselves which makes complete sense since you need to be able to click on the branch name.

yougotwill avatar Jul 05 '23 01:07 yougotwill

Possibly related but on my high DPI (4k) screen, it always overlaps no matter what. image

JustinGrote avatar Sep 01 '23 01:09 JustinGrote

Fixed in previous release. It now behaves pretty much as mhutchie/git-graph, except you can reveal more by hovering if something is cut off.

phil294 avatar Oct 03 '24 19:10 phil294

Nice, thank you!

hansu avatar Oct 06 '24 16:10 hansu

This does not really belong here, but I only want to mention that the Multi-diff viewer (which is new in this release) is really cool!

hansu avatar Oct 06 '24 16:10 hansu