Skip to content

better info for renames and empty diffs - #1237

Merged
joshaber merged 5 commits into
masterfrom
better-diff-for-renames
Apr 26, 2017
Merged

joshaber merged 5 commits into
masterfrom
better-diff-for-renames

Conversation

@shiftkey

@shiftkey shiftkey commented Apr 20, 2017 •

Copy link
Copy Markdown
Member

Fixes #980 and another corner case

In some scenarios Git won't generate a diff - 100% same content renames and empty files being committed. This tidies up those two scenarios, as well as correcting the file header not flexboxing right.

Before:

After:

TODO:

  • ensure trimming actually works

screen shot 2017-04-21 at 2 08 21 pm

  • visual feedback on what we should be showing in the diff cc @donokuda @niik

@shiftkey shiftkey changed the title [WIP] better info for renames and empty diffs better info for renames and empty diffs Apr 24, 2017
@shiftkey

Copy link
Copy Markdown
Member Author

Opening this up for review, but it probably needs some design feedback before it can be merged - not urgent.

Comment thread app/src/ui/diff/index.tsx Outdated
if (diff.hunks.length === 0) {
if (this.props.file.status === FileStatus.New) {
return <div className='panel'>
File does not contain any content

This comment was marked as spam.

Comment thread app/src/ui/diff/index.tsx Outdated

if (this.props.file.status === FileStatus.Renamed) {
return <div className='panel'>
File renamed without changing content

This comment was marked as spam.

@joshaber joshaber left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me 👍

@donokuda donokuda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like there could be more spacing around the arrow in the title bar, but otherwise everything looks good here.

I'll let this PR hang out a bit in case you wanted to address @joshaber's feedback.

@joshaber joshaber added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 25, 2017
@joshaber joshaber self-assigned this Apr 25, 2017
@shiftkey

Copy link
Copy Markdown
Member Author

🍎

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

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants