Vscode: SCM: Add "stage ranges" action/button to diff view

Created on 5 May 2017  路  7Comments  路  Source: microsoft/vscode

Inspired by GitX, it would be useful to add a "stage lines" action/button for the selected lines in diff view. This would make the partial commit feature much more discoverable.

GitX:
timey branch master 2017-05-05 11-26-15

Mock:
server js working tree - timey 2017-05-05 11-29-00

feature-request help wanted scm

Most helpful comment

Can we add an unstage(reset -p) and discard(checkout -p) button as well?

All 7 comments

We're gonna add them to the context menu for now: #25766

I think this should work with selection as well, should switch to Stage selected lines when a selection it's done.

This should at least be added to the right click context menu. A button would be nice as well.

Can we add an unstage(reset -p) and discard(checkout -p) button as well?

Staging ranges (hunks) is now available in the context menu, but the user in this issue did not discover it. I believe the current UI makes this too hard to discover.

Consider this situation:

Screen Shot 2019-12-10 at 20 39 03

To stage the deleted hunk, the area that the user needs to interact with is highlighted in green:

Screen Shot 2019-12-10 at 20 39 03_2

This affordance is exceedingly difficult to find, since interacting with the two most visible elements (highlighted in red) leads to failure:

  • right-clicking in the greyed-out area of a hunk of deleted lines does not open the context menu
  • right-clicking in the left side of the diff view does not show the staging option (this behavior is apparently by design, although I can't follow the rationale)

To find this feature, the user has to right-click the line _above_ the deleted hunk, on the right side of the screen, which is not highlighted in any way. In short, this is not a well designed interface element and should be changed.

Any progress on this? I read #3563 and an UI like GitHub desktop provides would aid a login discoverability! Atom does this in the same way.

I agree with @timjs. I'd never really used hunk or partial staging until I started using Atom. When committing changes, everything is visible and easy to understand.

atom--staging-changes

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shanalikhan picture shanalikhan  路  3Comments

VitorLuizC picture VitorLuizC  路  3Comments

sijad picture sijad  路  3Comments

DovydasNavickas picture DovydasNavickas  路  3Comments

omidgolparvar picture omidgolparvar  路  3Comments