Line coverage on a Pull Request should be able to be toggled. This presents a difficult UI challenge since the SCM UI already uses red and green to indicate added and removed lines.
To prevent cluttering the Files Changed UI in the pull request, we propose only annotating lines added in the PR with coverage information, and using a border width and border color to do so. An example of an added line that is not covered by tests:
Line coverage on a Pull Request should be able to be toggled. This presents a difficult UI challenge since the SCM UI already uses red and green to indicate added and removed lines.
To prevent cluttering the Files Changed UI in the pull request, we propose only annotating lines added in the PR with coverage information, and using a border width and border color to do so. An example of an added line that is not covered by tests:
Example HTML that could facilitate this:
Similarly, for a covered line:
And partial coverage using color code
#f4b01c
:In the case of a partial, text on hover should read “Line partially covered by tests”.