Skip to content
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

Merged
merged 3 commits into from
Nov 10, 2024
Merged

Replace old GIFs with symbols #208

merged 3 commits into from
Nov 10, 2024

Conversation

strangelookingnerd
Copy link
Contributor

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:

name old new origin
completed.gif Image grafik core status-blue
db_in.gif Image grafik ionicons cloud-upload-outline
db_out.gif Image grafik ionicons cloud-download-outline
delete.gif Image grafik core trash
error.gif Image grafik core status-red
folder.gif Image grafik core folder
green.gif Image grafik emoji green_square
info.gif Image grafik core information-circle
red.gif Image grafik emoji red_square
save.gif Image grafik ionicon save-outline
success.gif Image grafik core status-blue
text.gif Image grafik core document-text
warning.gif Image grafik core status-yellow
yellow.gif Image grafik emoji 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 added emoji-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

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

MarkEWaite added a commit to MarkEWaite/docker-lfs that referenced this pull request Nov 10, 2024
Copy link
Contributor

@MarkEWaite MarkEWaite left a 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')
                }
            }
        }
    }
}

…tep/help-icon.html

Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
@strangelookingnerd strangelookingnerd merged commit d6c6c40 into master Nov 10, 2024
20 checks passed
@strangelookingnerd strangelookingnerd deleted the replace_gifs branch November 10, 2024 20:17
Copy link
Member

@basil basil left a 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)

@strangelookingnerd
Copy link
Contributor Author

@basil That must have slipped my mind - sorry for the fuzz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants