Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display coverage percentage next to files in the file explorer #151

Open
AlCalzone opened this issue Jul 26, 2018 · 9 comments
Open

Display coverage percentage next to files in the file explorer #151

AlCalzone opened this issue Jul 26, 2018 · 9 comments

Comments

@AlCalzone
Copy link

When opening a coverage report, e.g. from nyc, I first get an overview of coverage for files and folders. It would be nice to see this percentage next to the files in the file explorer (if that is even possible).

@ryanluker
Copy link
Owner

ryanluker commented Jul 27, 2018

@AlCalzone thanks for submitting an issue. Other then the make your own tree view (https://github.com/Microsoft/vscode-extension-samples/tree/master/tree-view-sample) I do not know of a way to add to the existing file explorer, myself but I will ask the vscode dev slack group and see if anyone knows more 😄 .

@ryanluker
Copy link
Owner

@AlCalzone looked a little further and got some feedback from the slack channel, microsoft/vscode#54938 it is coming eventually so in the future something like the could be added 😄

@ryanluker ryanluker changed the title Is it possible to display coverage percentage next to files in the file explorer? Display coverage percentage next to files in the file explorer Jul 27, 2018
@tenninebt
Copy link

tenninebt commented May 13, 2020

For the ones who want to have a solution in the mean time, I've created an extension that adds a TreeView to the Test Explorer, it is pretty basic, and in experimental state (Not unit tested, not published...) but I'm using it within a Flutter project. I needed an easy way to visualise my coverage and navigate it.
Please be indulgent as it is my first extension and written as a draft.

https://github.com/tenninebt/vscode-koverage

@ryanluker
Copy link
Owner

@tenninebt thanks for bringing your extension up! looks cool for a first stab at extension building 😁.
I also need to convert this project to webpack eventually as well so it was good to see how you implemented that.

@MalachiMackie
Copy link

@ryanluker looks like the vscode issue you linked to has been resolved. Is it possible to look at this again?

@ryanluker
Copy link
Owner

ryanluker commented Aug 1, 2022

@MalachiMackie Thanks for the ping! We can definitely take another look at implementing this for sure.

@GitMensch
Copy link

If it shows out that it still doesn't work by means of vscode, then integrating koverage tenninebt/vscode-koverage#24 may be a good solution.

@mendeljacks
Copy link

Idea to use vscode.FileDecorationProvider:

  • Vs code offers the ability to decorate the file tree explorer view with badges and colors
  • Badge seems to allow two characters so we can show percentage rounded
  • Color threshold can be set by the user in the extension settings

image

@ryanluker
Copy link
Owner

Idea to use vscode.FileDecorationProvider:

* Vs code offers the ability to decorate the file tree explorer view with badges and colors

* Badge seems to allow two characters so we can show percentage rounded

* Color threshold can be set by the user in the extension settings

image

Nice! That would work well, thanks for the mockup too!

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

No branches or pull requests

6 participants