jenkinsci / badge-plugin

Jenkins Badge plugin
https://plugins.jenkins.io/badge/
MIT License
32 stars 43 forks source link

Hard-code size of icons (#148) #158

Closed strangelookingnerd closed 6 months ago

strangelookingnerd commented 6 months ago

Fixes #148 by hard-coding the icon style to include width: 16px; height: 16px;

I also removed the no longer existing references to the badge-shortText css classes (removed in https://github.com/jenkinsci/badge-plugin/pull/153/) and therefore the usage of badgeClass alltogether. Further I changed the "default" css style for text badges to not be "border: solid" anymore - I am pretty sure this was not intended.

Testing done

Manually verified badges look as expected.

Submitter checklist

mPokornyETM commented 6 months ago

may you pls paste before / after screenshots here. Just for easy verifying. Thx

MarkEWaite commented 6 months ago

The border was solid in the 1.9.1 release so it was set to solid in order to retain compatibility with past behavior. I believe the border can be set to 0 for those users that do not want a border around their short text messages. I prefer that the border be left as is rather than switching the default to no longer have a border.

strangelookingnerd commented 6 months ago

The border was solid in the 1.9.1 release so it was set to solid in order to retain compatibility with past behavior. I believe the border can be set to 0 for those users that do not want a border around their short text messages. I prefer that the border be left as is rather than switching the default to no longer have a border.

Using addShortText(text: "Test") I get

1.9.1: image

1.10: image

1.11 (broken): image

1.12: image

Not sure what is to be considered "compatibility" here if I'm honest.

strangelookingnerd commented 6 months ago

@MarkEWaite I reverted the change and kept the border by default. Still feel it does not look good but for the sake of compatibility I must agree with you.

MarkEWaite commented 6 months ago

@MarkEWaite I reverted the change and kept the border by default. Still feel it does not look good but for the sake of compatibility I must agree with you.

I agree that the look in 1.10 was much more attractive than the look in the other releases, but I'd rather restore compatibility first and then improve the appearance.

jimklimov commented 6 months ago

Well, with 1.9.1 and the discussion at https://issues.jenkins.io/browse/JENKINS-73167 my borders were also rounded and thin, as far as I can remember.

Although upon later investigation, we had not only Badge but also Groovy PostBuild plugin (which builds upon it) so maybe the additional style came from there.