vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

Addition of Work In Progress row

Open axosoft-ramint opened this issue 3 years ago • 4 comments

This PR attaches a "WIP" row to the top of the graph when there are changes in the working directory.

Note: To support this, I have utilized git-ls-files: https://git-scm.com/docs/git-ls-files/2.9.5

I also generated a new "work dir stats" model which represents the number of added, deleted and modified files.

Additional notes:

  • We currently aren't sending the work dir stats into the graph as we cannot handle renames just yet. They are incredibly tricky to detect with unstaged files using git and it needs to be thought out more.
  • We are using ls-files instead of diff shortstat because git diff does not pick up unstaged stuff by itself (which is a shame, because git diff DOES have rename detection).

axosoft-ramint avatar Aug 19 '22 03:08 axosoft-ramint

@eamodio Need a review pass on this since I'm touching core git logic.

axosoft-ramint avatar Aug 19 '22 03:08 axosoft-ramint

@axosoft-ramint Heads up you'll want to bump the current version of the component-library and change the package.json to use the new version, probably v1.0.0-rc.4

miggy-e avatar Aug 19 '22 16:08 miggy-e

@axosoft-ramint Since this isn't a requirement for 12.2 and I'm still swamped in 12.2 task, I won't get to review this until later in the week.

eamodio avatar Aug 22 '22 01:08 eamodio

@eamodio This PR is updated. Would you mind giving it a look when you have the chance? Thanks!

axosoft-ramint avatar Sep 22 '22 07:09 axosoft-ramint

Looks like our new paging strategy broke this after rebasing it. When paging, we get a WIP node for every page of commits and the edges break on it. Having a look.

axosoft-ramint avatar Sep 26 '22 02:09 axosoft-ramint

NOTE: Updated this to just send workDirStats as a prop and update it when needed. We will take care of adding the WIP node row on the component side: https://github.com/gitkraken/GitKrakenComponents/pull/89

axosoft-ramint avatar Sep 27 '22 10:09 axosoft-ramint

Quality gate Quality gate: Failed

3 Issues

  • Code issue 3 Code issues

Details

eamodio avatar Sep 28 '22 17:09 eamodio

Quality gate Quality gate: Failed

9 Issues

  • Code issue 9 Code issues

Details

@eamodio Some of the warnings from the Embold analysis make sense, and I've updated the code for those, but...

image

...all I did was move an import from the type list to the non-type list. Why would this trigger such a warning?

image

We do this everywhere already in the existing code? I counted 131 other instances, including one in updateAvatars right above.

image

We also do this everywhere already in the existing code.

Should I change these anyway?

axosoft-ramint avatar Sep 29 '22 00:09 axosoft-ramint

Please ignore any Embold checks -- I was trying an evaluation and it apparently added all this without asking.

eamodio avatar Sep 29 '22 02:09 eamodio

Component-side logic has landed. Once this merges I can bump the library version and it should enable the feature.

axosoft-ramint avatar Sep 30 '22 00:09 axosoft-ramint