Closed carej closed 4 years ago
Hi carej
Thank you for your pull request. The colors of the short texts have intentionally been kept simple. If the user likes to have a more colorful appearance he can do this by setting the colors explicitly. I'd rather keep the default as simple as possible. If we changed the default now to yellow, all users of the plugin would get a different style after an upgrade of the plugin.
Best Regards, Marc
Why are the defaults in the Action different from those provided by the step?
On Fri, Mar 27, 2020 at 3:25 PM Marc Brugger notifications@github.com wrote:
Hi carej
Thank you for your pull request. The colors of the short texts have intentionally been kept simple. If the user likes to have a more colorful appearance he can do this by setting the colors explicitly. I'd rather keep the default as simple as possible. If we changed the default now to yellow, all users of the plugin would get a different style after an upgrade of the plugin.
Best Regards, Marc
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jenkinsci/badge-plugin/pull/24#issuecomment-605256080, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXJWBJP6YC2TDBUBCJO7OTRJT4UFANCNFSM4LVD6FTA .
After consulting the code a bit more I realized that there is indeed an inconsistency. I implemented a slightly different approach to you PR in https://github.com/jenkinsci/badge-plugin/pull/25
Having the default in the global config, the groovy postbuild plugin could also use them and would therefore bin in sync with the badge plugin.
What do you think?
The addShortText step adds a badge that does not render in the same fashion as a badge that is added via the manager (i.e. GroovyPostbuildRecorder.BadgeManager); see attached image.
I would expect these two methods for adding text badges would produce identical badges. The fix here is to initialize ShortText with the same defaults used in BadgeAction,