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

Hide difference viewer sides when empty #1643

Merged
merged 3 commits into from May 3, 2018

Conversation

Projects
None yet
2 participants
@jcansdale
Contributor

jcansdale commented May 3, 2018

What this PR does

  • When diff LeftView is empty, automatically set to show RightViewOnly.
  • When diff RightView is empty, automatically set to show LeftViewOnly.

Previously when a file was added or deleted, the PR file diff view would show an empty view on the left or right side (depending on whether it was added or deleted).

image

This PR makes the diff view automatically hide the empty side.

image

This frees up a lot more space when adding or reviewing comments.

image

When a side it hidden in this way, the diff mode option will be ignored for this view (it's a global option and will be honored for views where there is something to diff).

image

Fixes #1624

jcansdale added some commits May 3, 2018

Hide diff view sides when empty
When diff LeftView is empty, automatically set to show RightViewOnly.
When diff RightView is empty, automatically set to show LeftViewOnly.

Fixes #1624
@grokys

grokys approved these changes May 3, 2018

This LGTM, and is a welcome change.

I was worried that setting the LHS/RHS-only setting would persist to diff views opened by e.g. Team Explorer Changes but that doesn't seem to be the case

@jcansdale jcansdale merged commit aeb4ec8 into master May 3, 2018

2 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@jcansdale jcansdale deleted the fixes/1624-hide-diff-view-side-when-empty branch May 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment