Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-24170

Provide icon spec/class alternative to the getIconFileName() method on Action/ManagementLink

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • core

      This will help us eliminate the use of file names for icons and instead move to a CSS class spec type model.

      I think this should be done by adding a new interface in the icons-set module (located in the icon-shim plugin repo https://github.com/jenkinsci/icon-shim-plugin). This will allow plugins maintain backward compatibility with older versions of Jenkins core.

      e.g.

       
      interface IconSpec {
          String getIconClassName();
      }
      

      Then... plugin extension points that implement/extend Action/ManagementLink can also implement this interface.

      Then... jelly scripts that use 'iconFileName' (e.g. core/src/main/resources/jenkins/model/Jenkins/manage.jelly) can be changed to use 'iconClassName', falling back to 'iconFileName' if 'iconClassName' not available.

          [JENKINS-24170] Provide icon spec/class alternative to the getIconFileName() method on Action/ManagementLink

          Code changed in jenkins
          User: tfennelly
          Path:
          core/pom.xml
          core/src/main/resources/hudson/model/AbstractProject/main.jelly
          core/src/main/resources/jenkins/model/Jenkins/manage.jelly
          core/src/main/resources/lib/hudson/actions.jelly
          core/src/main/resources/lib/hudson/summary.jelly
          core/src/main/resources/lib/layout/task.jelly
          http://jenkins-ci.org/commit/jenkins/38ff4f08be317ff28222d7d8e1eaa66ea534c3ff
          Log:
          Use IconSpec.getIconClassName() instead of Action.getIconFileName() where possible JENKINS-24170

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: tfennelly Path: core/pom.xml core/src/main/resources/hudson/model/AbstractProject/main.jelly core/src/main/resources/jenkins/model/Jenkins/manage.jelly core/src/main/resources/lib/hudson/actions.jelly core/src/main/resources/lib/hudson/summary.jelly core/src/main/resources/lib/layout/task.jelly http://jenkins-ci.org/commit/jenkins/38ff4f08be317ff28222d7d8e1eaa66ea534c3ff Log: Use IconSpec.getIconClassName() instead of Action.getIconFileName() where possible JENKINS-24170

          Tom FENNELLY added a comment -

          Merged in 38ff4f0

          Tom FENNELLY added a comment - Merged in 38ff4f0

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3591
          Use IconSpec.getIconClassName() instead of Action.getIconFileName() where possible JENKINS-24170 (Revision 38ff4f08be317ff28222d7d8e1eaa66ea534c3ff)

          Result = SUCCESS
          tom.fennelly : 38ff4f08be317ff28222d7d8e1eaa66ea534c3ff
          Files :

          • core/src/main/resources/hudson/model/AbstractProject/main.jelly
          • core/src/main/resources/lib/layout/task.jelly
          • core/pom.xml
          • core/src/main/resources/lib/hudson/summary.jelly
          • core/src/main/resources/lib/hudson/actions.jelly
          • core/src/main/resources/jenkins/model/Jenkins/manage.jelly

          dogfood added a comment - Integrated in jenkins_main_trunk #3591 Use IconSpec.getIconClassName() instead of Action.getIconFileName() where possible JENKINS-24170 (Revision 38ff4f08be317ff28222d7d8e1eaa66ea534c3ff) Result = SUCCESS tom.fennelly : 38ff4f08be317ff28222d7d8e1eaa66ea534c3ff Files : core/src/main/resources/hudson/model/AbstractProject/main.jelly core/src/main/resources/lib/layout/task.jelly core/pom.xml core/src/main/resources/lib/hudson/summary.jelly core/src/main/resources/lib/hudson/actions.jelly core/src/main/resources/jenkins/model/Jenkins/manage.jelly

            tfennelly Tom FENNELLY
            tfennelly Tom FENNELLY
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: