code-coverage-api-plugin icon indicating copy to clipboard operation
code-coverage-api-plugin copied to clipboard

Make colors configurable

Open uhafner opened this issue 3 years ago • 4 comments

Currently, all colors are hard-coded. It would be helpful, if those could be changed by the user. The following Colors that should be configurable:

  • trend chart line and branch color
  • treemap covered vs. missed percentage
  • coverage column: coverage percentage

Making the color palette color blind friendly would be helpful as well. Maybe it makes sense to provide a global color scheme that will be used by other plugins as well.

Trend chart colors

Trend chart color configuration is the easiest of the above color configurations. In order to change the default trend configuration dialog you need to create a new custom dialog that extends the existing dialog. You can follow the same concept as in the forensics API plugin or warnings plugin.

  • create the chart
  • create a function that stores the dialog values into a JSON configuration object
  • create a function that fills the dialog values from a JSON configuration object

To select the actual color, you can use the default input color selector, see example in pull-request-monitoring plugin.

uhafner avatar Oct 02 '21 08:10 uhafner

I'd like to work on this. Can you assign this to me and guide me on how to go about this?

deeepsig avatar Oct 02 '21 12:10 deeepsig

The first thing we need is to prepare your development environment. How familiar are you with Jenkins and plugin development? Do you already have a Jenkins instance with this plugin?

If not then I would recommend, that you install my development envirnment. This helps to set up coding and deploying to a real Jenkins instance. If that works, we can start talking about the requirements, if that is ok for you.

uhafner avatar Oct 02 '21 15:10 uhafner

How familiar are you with Jenkins and plugin development? Do you already have a Jenkins instance with this plugin?

I am a complete newbie into Jenkins and plugin development. But I am willing to learn and want to contribute to it in the long run. I am not that focused on the hacktoberfest label, I will contribute anyways. Please guide me on how to go about this :) At the moment, I am going through this : https://www.youtube.com/watch?v=LFDrDnKPOTg ( learning more about Jenkins ) and this : https://www.youtube.com/watch?v=azyv183Ua6U ( plugin development )

deeepsig avatar Oct 02 '21 17:10 deeepsig

No, that is fine! Everybody started as a newbie. Most issues that I filed are especially a good starting point for beginners.

uhafner avatar Oct 03 '21 10:10 uhafner

All colors are now based on the Jenkins theme, so changing the colors does not make sense here, this should be a global option.

uhafner avatar May 21 '23 20:05 uhafner