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

Classic job configuration page shown for Multibranch projects

    XMLWordPrintable

Details

    Description

      The classic job configuration page is shown for Multibranch projects (and implementations of Organization Folder) instead of the new page.

      Attachments

        Issue Links

          Activity

            danielbeck Daniel Beck added a comment -

            gusreiber If this new config UI style is opt-in, we need documentation for plugin developers what they need to do (preferably in a way that doesn't require depending on Jenkins 2) to enable this for their config forms.

            danielbeck Daniel Beck added a comment - gusreiber If this new config UI style is opt-in, we need documentation for plugin developers what they need to do (preferably in a way that doesn't require depending on Jenkins 2) to enable this for their config forms.
            gusreiber gus reiber added a comment -

            yup. later.

            gusreiber gus reiber added a comment - yup. later.

            Disconcerting behavior: if you create a new Multi-branch pipeline, you do not get the new config page styles when looking at

            Concerns: we don't want plugins to have to take a 2.0 dependencies to get nice config pages when running on a 2.0 Jenkins.

            Expectation: Every item type that has a configuration screen will need to be explicitly updated to support the new tab styling.

            Root cause: there is no common page/form/tag that is inherited by all item configuration pages (it is copied).

            Decision: this is not a blocker for Jenkins 2 beta/ga (as long as they aren't worse than they used to be).

            swashbuck1r Spike Washburn added a comment - Disconcerting behavior: if you create a new Multi-branch pipeline, you do not get the new config page styles when looking at Concerns: we don't want plugins to have to take a 2.0 dependencies to get nice config pages when running on a 2.0 Jenkins. Expectation: Every item type that has a configuration screen will need to be explicitly updated to support the new tab styling. Root cause: there is no common page/form/tag that is inherited by all item configuration pages (it is copied). Decision: this is not a blocker for Jenkins 2 beta/ga (as long as they aren't worse than they used to be).

            amuniz - please verify that the config pages of other item types to verify that they behave as they used to.

            swashbuck1r Spike Washburn added a comment - amuniz - please verify that the config pages of other item types to verify that they behave as they used to.
            jglick Jesse Glick added a comment -

            I checked freestyle, standalone Pipeline, and multibranch Pipeline and all seemed as expected—the job types use the new UI, the multibranch used the old UI but still looked fine.

            jglick Jesse Glick added a comment - I checked freestyle, standalone Pipeline, and multibranch Pipeline and all seemed as expected—the job types use the new UI, the multibranch used the old UI but still looked fine.

            Yes, double checked.

            amuniz Antonio Muñiz added a comment - Yes, double checked.

            Recap: anything inheriting from Job gets the config UI enhancements. Other types (like Folder-based types) will need to update their configure.jelly to add this enhancement. This enhancement may be problematic for non-Job types that want to support Jenkins 1.x and 2.x.

            swashbuck1r Spike Washburn added a comment - Recap: anything inheriting from Job gets the config UI enhancements. Other types (like Folder-based types) will need to update their configure.jelly to add this enhancement. This enhancement may be problematic for non-Job types that want to support Jenkins 1.x and 2.x.
            jglick Jesse Glick added a comment - If fixing, check https://github.com/jenkinsci/workflow-cps-plugin/pull/13 .

            Based on the relevant diff for the Job configure.jelly, it seems it would indeed be difficult to support both the 1.x and 2.x UI. Besides the additional JS/CSS includes, there are some additional div elements for Bootstrap, and sidepanel.jelly is no longer included.

            It appears some logic would be necessary to detect the Jenkins version (does not seem like a good idea to me) and decide whether to display a 1.x layout or 2.x layout. You could maybe get away with adding in the extra elements and styling changes and have it still look the same on 1.x, but sidepanel.jelly is a different story.

            diff --git a/core/src/main/resources/hudson/model/Job/configure.jelly b/core/src/main/resources/hudson/model/Job/configure.jelly
            index ec2a5b6..ac39d60 100644
            --- a/core/src/main/resources/hudson/model/Job/configure.jelly
            +++ b/core/src/main/resources/hudson/model/Job/configure.jelly
            @@ -27,40 +27,51 @@ THE SOFTWARE.
             -->
             <?jelly escape-by-default='true'?>
             <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
            -  <l:layout title="${it.displayName} Config" norefresh="true" permission="${it.EXTENDED_READ}">
            -    <st:include page="sidepanel.jelly" />
            -    <f:breadcrumb-config-outline />
            +
            +  <l:layout norefresh="true" type="one-column" permission="${it.EXTENDED_READ}" title="${it.displayName} Config">
            +
            +    <l:js src="jsbundles/config-scrollspy.js" />
            +    <l:css src="jsbundles/config-scrollspy.css" />
            +
                 <l:main-panel>
            -      <div class="behavior-loading">${%LOADING}</div>
            -      <f:form method="post" action="configSubmit" name="config">
            -        <j:set var="descriptor" value="${it.descriptor}" />
            -        <j:set var="instance" value="${it}" />
            +    <div class="container">
            +      <div class="row">
            +        <div class="col-md-offset-2 col-md-20">
            +
            +          <div class="behavior-loading">${%LOADING}</div>
            +
            +          <f:form method="post" action="configSubmit" name="config" tableClass="config-table scrollspy">
            +            <j:set var="descriptor" value="${it.descriptor}" />
            +            <j:set var="instance" value="${it}" />
            
            ... snip indentation changes ...
            
            +        </div>
            +      </div>
            +    </div>
                 </l:main-panel>
               </l:layout>
             </j:jelly>
            
            mjdetullio Matthew DeTullio added a comment - Based on the relevant diff for the Job configure.jelly, it seems it would indeed be difficult to support both the 1.x and 2.x UI. Besides the additional JS/CSS includes, there are some additional div elements for Bootstrap, and sidepanel.jelly is no longer included. It appears some logic would be necessary to detect the Jenkins version (does not seem like a good idea to me) and decide whether to display a 1.x layout or 2.x layout. You could maybe get away with adding in the extra elements and styling changes and have it still look the same on 1.x, but sidepanel.jelly is a different story. diff --git a/core/src/main/resources/hudson/model/Job/configure.jelly b/core/src/main/resources/hudson/model/Job/configure.jelly index ec2a5b6..ac39d60 100644 --- a/core/src/main/resources/hudson/model/Job/configure.jelly +++ b/core/src/main/resources/hudson/model/Job/configure.jelly @@ -27,40 +27,51 @@ THE SOFTWARE. --> <?jelly escape-by-default= 'true' ?> <j:jelly xmlns:j = "jelly:core" xmlns:st = "jelly:stapler" xmlns:d = "jelly:define" xmlns:l = "/lib/layout" xmlns:t = "/lib/hudson" xmlns:f = "/lib/form" xmlns:i = "jelly:fmt" > - <l:layout title= "${it.displayName} Config" norefresh= "true" permission= "${it.EXTENDED_READ}" > - <st:include page= "sidepanel.jelly" /> - <f:breadcrumb-config-outline /> + + <l:layout norefresh= "true" type= "one-column" permission= "${it.EXTENDED_READ}" title= "${it.displayName} Config" > + + <l:js src= "jsbundles/config-scrollspy.js" /> + <l:css src= "jsbundles/config-scrollspy.css" /> + <l:main-panel> - <div class= "behavior-loading" > ${%LOADING} </div> - <f:form method= "post" action= "configSubmit" name= "config" > - <j:set var= "descriptor" value= "${it.descriptor}" /> - <j:set var= "instance" value= "${it}" /> + <div class= "container" > + <div class= "row" > + <div class= "col-md-offset-2 col-md-20" > + + <div class= "behavior-loading" > ${%LOADING} </div> + + <f:form method= "post" action= "configSubmit" name= "config" tableClass= "config-table scrollspy" > + <j:set var= "descriptor" value= "${it.descriptor}" /> + <j:set var= "instance" value= "${it}" /> ... snip indentation changes ... + </div> + </div> + </div> </l:main-panel> </l:layout> </j:jelly>

            Adding link to https://github.com/jenkinsci/cloudbees-folder-plugin/pull/67 as demonstration. PR has technical details on issues with the implementation.

            mjdetullio Matthew DeTullio added a comment - Adding link to https://github.com/jenkinsci/cloudbees-folder-plugin/pull/67 as demonstration. PR has technical details on issues with the implementation.
            jglick Jesse Glick added a comment -

            It appears some logic would be necessary to detect the Jenkins version (does not seem like a good idea to me)

            This is what I think needs to be done, unless we bite the bullet and update the baseline to 2.7.3.

            jglick Jesse Glick added a comment - It appears some logic would be necessary to detect the Jenkins version (does not seem like a good idea to me) This is what I think needs to be done, unless we bite the bullet and update the baseline to 2.7.3.

            Code changed in jenkins
            User: Matthew DeTullio
            Path:
            src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolder.java
            src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/configure.jelly
            src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/configure2.jelly
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/2ae71549c53d15a39707082d2cd284f3a4923b0a
            Log:
            [HACK]JENKINS-33622 Get 2.x UI to show on config page.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Matthew DeTullio Path: src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolder.java src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/configure.jelly src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/configure2.jelly http://jenkins-ci.org/commit/cloudbees-folder-plugin/2ae71549c53d15a39707082d2cd284f3a4923b0a Log: [HACK] JENKINS-33622 Get 2.x UI to show on config page.

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/configure.jelly
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/d1b44b6a29a71f028079de67bce30f34cd3e3f85
            Log:
            Merge pull request #115 from jglick/new-UI-JENKINS-33622

            JENKINS-33622 Update to Jenkins 2.x configuration page style

            Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/afddb64d3704...d1b44b6a29a7

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/configure.jelly http://jenkins-ci.org/commit/cloudbees-folder-plugin/d1b44b6a29a71f028079de67bce30f34cd3e3f85 Log: Merge pull request #115 from jglick/new-UI- JENKINS-33622 JENKINS-33622 Update to Jenkins 2.x configuration page style Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/afddb64d3704...d1b44b6a29a7

            People

              jglick Jesse Glick
              amuniz Antonio Muñiz
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: