Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Conversation

@kuychaco
Copy link
Contributor

File diff selection improvements:
Fixes #469
Fixes #471

When lines are selected in line mode...

when selecting a hunk header, shift/cmd-clicking should retain previous selections, and additionally select or unselect lines as appropriate, keeping line mode

When a hunk is selected and we're in hunk mode...

when selecting another hunk header or a line within a hunk while pressing shift or command, the entire hunk is additionally selected or unselected as appropriate, keeping hunk mode

Entering modes

  • Single clicking a line enters line mode
  • Single clicking a hunk header or double-clicking a line in a hunk enters hunk mode
  • github:toggle-patch-selection-mode or / switches from one mode to another

Indication of selection mode

In order to make it clear which selection mode you are in (line vs hunk) it would be good to add some different styling to hunks when in hunk mode, like so:

screenshot_1_23_17__9_21_pm

screenshot_1_23_17__9_20_pm

@simurai do you have any 💭s on what would look best, or any other ideas? Right now this PR implements the former.

@kuychaco kuychaco requested a review from BinaryMuse January 24, 2017 05:39
@simurai
Copy link
Contributor

simurai commented Jan 24, 2017

Right now this PR implements the former.

I like the former as well. 👍

Another thought: When starting to select lines and then at some point all lines of a hunk are selected, shouldn't the hunk header get selected too? So it wouldn't really show what mode you're in (line mode vs hunk mode), but more "is the hunk entirely or partially selected".

@kuychaco kuychaco merged commit c93a942 into master Jan 24, 2017
@kuychaco kuychaco deleted the ku-file-selection-improvements branch January 24, 2017 23:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants