danielpalme / ReportGenerator

ReportGenerator converts coverage reports generated by coverlet, OpenCover, dotCover, Visual Studio, NCover, Cobertura, JaCoCo, Clover, gcov or lcov into human readable reports in various formats.
https://reportgenerator.io
Apache License 2.0
2.58k stars 281 forks source link

Report colors do not match Azure DevOps theme #594

Closed bramborman closed 1 year ago

bramborman commented 1 year ago

The wiki says:

_- HtmlInline_AzurePipelines: Same as HtmlInline but with an adaptive light/dark theme matching the look and feel of Azure Pipelines._

My Windows 10, browser (Edge) and Azure DevOps themes are all set to be dark, but the report is light when displayed in the Azure Pipelines UI, anyway:

azdo

I'm using the extension v5.1.18 in Azure DevOps Services (cloud) and this really is the file generated by this version. When I download it from the artifacts, the dark/light colors work fine. I've been looking into that and it seems that Azure DevOps cleans the HTML file of some tags and also CSS, resulting in this behavior when displayed in the Pipelines UI. I don't know if there's a way to fix this on your side, so at least the documentation here should be updated.

danielpalme commented 1 year ago

The problem here is that Azure DevOps blocks JavaScript and some CSS rules (see #592). There is nothing I can do about it.

If you download the report, everything works fine and your local dark theme is picked up.

I updated the documenation:

When publishing the reports to Azure DevOps some features are not supported (light/dark theme, dynamic filtering). The reason is, that strict CSP rules are applied and JavaScript and some CSS rules are blocked.