Skip to content

improve the displaying of renames and copies - #902

Merged
joshaber merged 21 commits into
masterfrom
handle-copies
Feb 10, 2017
Merged

joshaber merged 21 commits into
masterfrom
handle-copies

Conversation

@shiftkey

@shiftkey shiftkey commented Feb 6, 2017 •

Copy link
Copy Markdown
Member

Fixes #900
Fixes #605

A bunch of related visual issues:

  • copies are rendered like renames in the list
  • file header for changes shows rename and copy
  • can commit copied change
  • copies are listed correctly in commit history
  • add some tests for handling copied file
  • review PathLabel usage and see if it can be simplified
  • can we remove the duplication of the colours for the octicons?

@shiftkey

shiftkey commented Feb 6, 2017 •

Copy link
Copy Markdown
Member Author

Previewing a copied change

As this was status-d incorrectly you'd weren't able to view or commit this change. There's some flow-on effects from this which I'm working through.

There's also the same PathLabel and Octicon we display in the file list. Because consistency?

When you enable diff.renames=copies for the repository this also displays in the history view:

Renames and Copies are coloured slightly different

I've used the "new" colour for the copied change as this is a new file, and the "modified" for the rename (which isn't coloured currently):

This also is available in the history view:

@shiftkey

shiftkey commented Feb 8, 2017

Copy link
Copy Markdown
Member Author

@donokuda @niik if you could quickly glance over d985f14 - it's a very specific mixin, and might need a better name, but any feels would be ❤️

PathLabel supports undefined, so making this available for PathText
means callers can choose to avoid these sizing and let the defaults
take over
@shiftkey shiftkey changed the title [WIP] improve the displaying of renames and copies improve the displaying of renames and copies Feb 8, 2017
@shiftkey

shiftkey commented Feb 8, 2017

Copy link
Copy Markdown
Member Author

Some little visual tweaks to call out here:

  • header has same background colour as diff hunk header
  • light border to separate header from diff contents

Here's what it looks like with excessively long paths:

I've opened #917 to track the long rename/copies overflowing (this is occuring on master)

@shiftkey

shiftkey commented Feb 8, 2017

Copy link
Copy Markdown
Member Author

Ready for review ⚙️

@joshaber joshaber self-assigned this Feb 9, 2017

@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.

This looks good to me 👍 One question and needs a merge.

readonly status: FileStatus

readonly availableWidth: number
readonly availableWidth?: number

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@shiftkey

Copy link
Copy Markdown
Member Author

🐩

@joshaber
joshaber merged commit cb10c18 into master Feb 10, 2017
@joshaber
joshaber deleted the handle-copies branch February 10, 2017 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants