simplecov
simplecov copied to clipboard
Support for different color themes on html report
Hello! I was working late at night at a project and wondered if simplecov had a dark theme, and it looks like it doesn't. I saw that other issue about colour-blind friendly colours (https://github.com/colszowka/simplecov/issues/534), and thought that maybe a dark theme and a colour-blind theme could be provided as separate formatters, and changing between them could be something like this
# Colorblind friendly theme
SimpleCov.formatter = SimpleCov::Formatter::HTMLColorblindFormatter
# Dark theme
SimpleCov.formatter = SimpleCov::Formatter::HTMLDarkThemeFormatter
What do you think?
@dread-uo hi there, sorry for the long silence! As mentioned elsewhere, somewhat non easy times for me and hence little OSS work done.
Sounds like a good idea and I mean, we have different formatters. What I think we need/want is probably that we can parameterize a formatter. Because I think what we really want is the HTML formatter - just with different css. So, some new formatter interface where you're able to parameterize it. Could probably already done with some meta programming (classes that create classes!) although I wouldn't recommend it.
The whole formatter interface should probably also be documented better.
But yes, as an end goal supporting both is a goal! :ok_hand: