kblincoe / VisualGit_SE701_2019_4

1 stars 0 forks source link

Add ability to expand diff to see lines between hunks #251

Closed gnawf closed 5 years ago

gnawf commented 5 years ago

Fixes #155

Adds two two buttons between hunks to view more changes above or below the hunk.

preview

To test the functionality in this PR:

  1. Open a repository
  2. Click on a changed file (not new file)
  3. The diff should have buttons for expand above and below
  4. Clicking the expand buttons should let you view the lines above or below the diff, respectively
gnawf commented 5 years ago

@Carl-Tang rebased and fixed the issues with the end of file expansion

@antdangnz not too sure why that's occurring 😐I haven't changed any styling or anything that should affect that.

YichenTang97 commented 5 years ago

@Carl-Tang rebased and fixed the issues with the end of file expansion @antdangnz not too sure why that's occurring 😐I haven't changed any styling or anything that should affect that.

Approve that the end of file expansion problem is fixed. About the scroll down clip off problem, I think the contents are successful load, the problem is that a part of the diff panel is covered by the footer (when you scroll down, a part of the scroll bar is covered by the footer) - please have a look at the gif below: 2019-04-12_08-17-01

YichenTang97 commented 5 years ago

@Carl-Tang rebased and fixed the issues with the end of file expansion @antdangnz not too sure why that's occurring 😐I haven't changed any styling or anything that should affect that.

Approve that the end of file expansion problem is fixed. About the scroll down clip off problem, I think the contents are successful load, the problem is that a part of the diff panel is covered by the footer (when you scroll down, a part of the scroll bar is covered by the footer) - please have a look at the gif below:

The same problem also applies to the file panel. It is not your fault. The problem is summarized in a new issue #266. It would be a easy fix by editting the margin of the main panel (or the separated file, diff panels etc.), as suggested in this post, do you want to do a quick fix on it as well?

gnawf commented 5 years ago

Uhh I'll leave the footer fix to someone else, as I don't have the issue on Mac (I can see the entire contents of the diff panel).

I've rebased and tested it @Carl-Tang

WanniCode commented 5 years ago

Do we need this require anymore? https://github.com/kblincoe/VisualGit_SE701_2019_4/blob/0c4f32b09d6abdcd95237ff72a875f28419f71a0/app/components/diff-panel/diff.panel.component.ts#L14

otherwise, i think LGTM