gitu
gitu copied to clipboard
View diff of unstaged files?
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.
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
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?
Think that may be a good idea!
@knubie I messed around a bit and think I found something that I feel doesn't clutter the UI.
Does this make more sense?
@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!
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:
It feels a lot cleaner to only mark the collapsed sections (but does not make as much sense?):
It's just not clear to me where to go, so I haven't changed it.
Closing this for now, I'll keep the idea in mind :)