Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tolerable diff UI #2

Open
3 of 8 tasks
NattyNarwhal opened this issue Jul 11, 2021 · 3 comments
Open
3 of 8 tasks

Tolerable diff UI #2

NattyNarwhal opened this issue Jul 11, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@NattyNarwhal
Copy link
Collaborator

NattyNarwhal commented Jul 11, 2021

The diff view is pretty OK, but could be much better:

  • Make resizable, convert to menus
  • Colourize rows
  • Handle tabs trailing whitespace (especially \r\n); Windows text rendering can't really do it, so we may need to render ourselves
  • Save diff, just like copy
  • Navigate by file/hunk
  • Find text, Windows provides a built-in dialog for this
  • In the future, handle getting diffs from different sources, as well ones with commits attached (could we display commit metadata in the diff window? save/copy would also format an email-style patch too)
  • Make text fragments copyable, but complicates impl because then we need a real (rich?) text view

Old post:

Right now, it's a ListBox that can barely handle newlines.

Prior art from i.e. SourceSafe would suggest a split view, but the lg2 diff format and git's own view of them makes this a little awkward, because it deals with actual diffs, not comparing two file instances. The SccDiff API also deals in single files, but we can support DirDiff later, and that can be the exact same window, just we gather a bigger diff.

What would be a more interesting way of going about it is say, using a ListView and an image list; with the git_diff_foreach (not print since we're not making a blob/printing to text), we can insert an item and tag it with file/hunk/binary/context/add/remove. We can also add commands for i.e saving/copying the diff as a text blob, dealing with hunks, etc.

@NattyNarwhal
Copy link
Collaborator Author

It's gotten better from the LB, but could be better. Updating OP.

@NattyNarwhal NattyNarwhal added the enhancement New feature or request label Jul 27, 2021
@NattyNarwhal
Copy link
Collaborator Author

I realize diff could be done from a branch interface too...

@NattyNarwhal
Copy link
Collaborator Author

Diff from branch UI is done. Compares against HEAD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant