sdavis3 / code-coverage-widgets

A dashboard widget for Azure DevOps or Team Foundation Server (TFS) to display information about unit test code coverage.
MIT License
16 stars 10 forks source link

Suggestion - Allow conditional formatting based on rules. #7

Open AnthonyBorton opened 7 years ago

AnthonyBorton commented 7 years ago

I love the widget you have created and would like to suggest an enhancement for your consideration.

If you look at the Work Item Query widget from Microsoft you can see that you can specify conditional styling rules based on values. I would love to be able to change the colour of the widget background to red if coverage falls below a threshold I set. I'd also love to change the background to green if the coverage exceeds a different value.

Just an idea.

Cheers

Anthony

sdavis3 commented 7 years ago

Thanks for the compliment @AnthonyBorton. Since the font is currently black, I see two ways of accomplishing this: 1) Change the font to the conditional styling or 2) Change the background, as you suggest, but also change the font to white so it can be read on a display.

Thoughts?

AnthonyBorton commented 7 years ago

Looking at the Microsoft dashboard widgets, they use black font for white tiles and a white font for any tiles with colour. Might be nice to do the same thing for consistency.