gitu icon indicating copy to clipboard operation
gitu copied to clipboard

View diff of unstaged files?

Open knubie opened this issue 11 months ago • 1 comments

Hi, I just found this project on the orange site and have been playing around with it and quite like it so far. One thing I couldn't figure out, and maybe it's not been implemented yet, is how to view a diff of one of the unstaged (or staged, or untracked) files.

knubie avatar Mar 11 '24 16:03 knubie

Ah perhaps this isn't clear, but lines ending with an ellipsis (...) are collapsed sections. You can expand them by pressing tab.

Untracked files don't show anything, but you can still open them in your editor by pressing enter

altsem avatar Mar 11 '24 18:03 altsem

Aha, got it, thanks! Just and idea, but maybe an arrow on the left hand side of the line might be a good indicator as well?

knubie avatar Mar 15 '24 12:03 knubie

Think that may be a good idea!

altsem avatar Mar 17 '24 12:03 altsem

@knubie I messed around a bit and think I found something that I feel doesn't clutter the UI. Does this make more sense? image

altsem avatar Mar 19 '24 18:03 altsem

@altsem Thank you for working on this!

This is just my 2¢ so make of it what you will, but I think those kinds of collapsible icons are usually at the beginning of the line (on the left side in this case), like this:

This is a collapsible section And here is more content that can be toggled.

I think the ellipsis probably makes more sense as an end-of-line identifier, as that is often used in code editors and IDEs to show folded code.

However, given that each line is a different length, the identifier (whichever one is used) will be in a different position for each line, making it difficult to tell which line is collapsed when scanning the screen. Plus, when scanning text I don't always scan to the end of the line so I might not even see the ellipsis at all.

That said, this your project so please feel free to implement whatever changes you want!

knubie avatar Mar 19 '24 23:03 knubie

No worries! I appreciate the interest and feedback. I guess the cursor would have to change at some point to not be an arrow. Haven't decided on that either. Here's how that looked like: image

It feels a lot cleaner to only mark the collapsed sections (but does not make as much sense?): image

It's just not clear to me where to go, so I haven't changed it.

altsem avatar Mar 20 '24 16:03 altsem

Closing this for now, I'll keep the idea in mind :)

altsem avatar Mar 28 '24 18:03 altsem