-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace old GIFs with symbols #208
Conversation
db4e54b
to
dd72b29
Compare
* add emojis plugin * remove GIFs
d1015d4
to
8fdbe8f
Compare
jenkinsci/badge-plugin#208 Replace GIFs with symbols
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested each of the replacements in my Jenkins 2.479.1 controller and they look much better. I've tested several of the gif images from the webapps directory and confirmed that they look good in the build history and continue to be visibly pixelated int he job summary page.
Pipeline that I used to test was:
pipeline {
agent {
label 'alpine'
}
stages {
stage('Badge') {
steps {
addBadge icon: 'folder-open.gif', text: 'This is a folder open 16x16 icon'
script {
manager.createSummary('folder-open.gif').appendText('This is a folder open')
}
}
}
}
}
src/main/resources/com/jenkinsci/plugins/badge/dsl/AddSummaryStep/help-icon.html
Outdated
Show resolved
Hide resolved
…tep/help-icon.html Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
org.junit.ComparisonFailure: expected:<[/plugin/badge/images/info.gif]> but was:<[symbol-information-circle]>
at org.junit.Assert.assertEquals(Assert.java:117)
at org.junit.Assert.assertEquals(Assert.java:146)
at org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorderTest.testBadgeMigration(GroovyPostbuildRecorderTest.java:481)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:706)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.lang.Thread.run(Thread.java:1583)
@basil That must have slipped my mind - sorry for the fuzz. |
Following a brief discussion with @MarkEWaite (jenkinsci/groovy-postbuild-plugin#81 (comment)) I propose to get rid of the *.gif images.
In order to not break current pipelines an on-the-fly replacement should be implemented. See the following table for my proposal:
status-blue
cloud-upload-outline
cloud-download-outline
trash
status-red
folder
green_square
information-circle
red_square
save-outline
status-blue
document-text
status-yellow
yellow_square
Some of the icons do not have proper replacements from the core (https://github.com/jenkinsci/jenkins/tree/master/war/src/main/resources/images/symbols) or the
ionicons-api-plugin
. That's why I addedemoji-symbols-api
as a dependency to find the missing pieces.Any feedback is highly welcome!
Testing done
Added tests to cover the replacement
Submitter checklist