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

Drag&Drop of params no longer working correctly

    • 2.277

      See the 2 gif attached. I also tried with the https://github.com/jenkinsci/jenkins/pull/5067, it's not solving the problem.

      The behavior is really odd when you have multiple parameters and you want to re-order them in the job view.

      Working in 2.249, not working in 2.267 (I imagine due to table-2-div)

          [JENKINS-64291] Drag&Drop of params no longer working correctly

          This is a bit messed up. I recall fixing similar stuff before the summer on the tables-to-divs PR. timja do you have any idea what may be causing this?

          Félix Queiruga Balado added a comment - This is a bit messed up. I recall fixing similar stuff before the summer on the tables-to-divs PR. timja  do you have any idea what may be causing this?

          Tim Jacomb added a comment -

          I remember fiddling with numbers till it worked. Guessing the numbers don’t work in this case

          Tim Jacomb added a comment - I remember fiddling with numbers till it worked. Guessing the numbers don’t work in this case

          Ian Williams added a comment -

          Not sure if it provides any insight (as browser not mentioned), but on our old 2.121.x instance, we'd see this behavior on occasion in IE11, but would workfine in Chrome/FF. Restarting IE would generally resolve.

          Ian Williams added a comment - Not sure if it provides any insight (as browser not mentioned), but on our old 2.121.x instance, we'd see this behavior on occasion in IE11, but would workfine in Chrome/FF. Restarting IE would generally resolve.

          Thank you for the pointer, I'll research the cross-browser behaviour

          Félix Queiruga Balado added a comment - Thank you for the pointer, I'll research the cross-browser behaviour

          I have been testing this locally a lot. I think drag & drop only fails when one of the draggable elements is not tables-to-divs compatible. For example, drag & drop for git branch sources were failing until I updated bitbucket-branch-source, git plugin and github-branch-source.

          And in Global Tool Configuration only drag & drop for JDK and Gradle installations fail, which makes sense because the jdk-tool plugin is not yet compatible.

          Please let me know if somebody is able to verify this hypothesis.

          Félix Queiruga Balado added a comment - I have been testing this locally a lot. I think drag & drop only fails when one of the draggable elements is not tables-to-divs compatible. For example, drag & drop for git branch sources were failing until I updated bitbucket-branch-source, git plugin and github-branch-source. And in Global Tool Configuration only drag & drop for JDK and Gradle installations fail, which makes sense because the jdk-tool plugin is not yet compatible. Please let me know if somebody is able to verify this hypothesis.

          I have done further testing on an instance running the Jenkins master branch and plugins reasonably up to date. I have not managed to find drag & drop errors on job config, but I did find them on Global Tool Configuration.

          My findings testing the Git configuration (see video):

          • Testing on the Git tools hetero-list component, drag & drop only fails when there's an repeatable element that contains form entries.
          • It works fine when only draggable with minimum markup are present on the hetero-list (only have header, help area and remove button). Removing the form fields seems to fix the issue.
          • I think the result is the same for the JDK tool configuration.

          Hope the explanation is understandable, I can try to rephrase everything. Video dowloadable on
          https://drive.google.com/file/d/1DFkH_-XQe6J47ngYkAH730Foe8ausmY9/view?usp=sharing . It was too big to upload to the issue tracker.

          Félix Queiruga Balado added a comment - I have done further testing on an instance running the Jenkins master branch and plugins reasonably up to date. I have not managed to find drag & drop errors on job config, but I did find them on Global Tool Configuration. My findings testing the Git configuration (see video): Testing on the Git tools hetero-list component, drag & drop only fails when there's an repeatable element that contains form entries. It works fine when only draggable with minimum markup are present on the hetero-list (only have header, help area and remove button). Removing the form fields seems to fix the issue. I think the result is the same for the JDK tool configuration. Hope the explanation is understandable, I can try to rephrase everything. Video dowloadable on https://drive.google.com/file/d/1DFkH_-XQe6J47ngYkAH730Foe8ausmY9/view?usp=sharing  . It was too big to upload to the issue tracker.

          I'm looking at this and so far it seems that the best option is to straight up replace the drag & drop library. Trying https://github.com/SortableJS right now. 

          Doing a deep search across the jenkins ecosystem it seems it can be easily done, as the use of the dragdrop.js file is limited to hetero-list.js and repeatable.js.

           

          Thoughts on this? cc oleg_nenashev, halkeye

          Félix Queiruga Balado added a comment - I'm looking at this and so far it seems that the best option is to straight up replace the drag & drop library. Trying https://github.com/SortableJS  right now.  Doing a deep search across the jenkins ecosystem it seems it can be easily done, as the use of the dragdrop.js file is limited to hetero-list.js and repeatable.js.   Thoughts on this? cc oleg_nenashev , halkeye

          Félix Queiruga Balado added a comment - There may be issues with these tests, last updated on 2009.  https://github.com/jenkinsci/htmlunit/blob/master/src/test/java/com/gargoylesoftware/htmlunit/libraries/YuiTest.java https://github.com/jenkinsci/htmlunit/blob/master/src/test/resources/yui/2.3.0/tests/dragdrop.html Does anyone have any insight on these tests?

          Tim Jacomb added a comment -

          that htmlunit is not used, we use upstream so ignore it or get someone to archive it

          Tim Jacomb added a comment - that htmlunit is not used, we use upstream so ignore it or get someone to archive it

          I have determined that the best approach is to replace the drag & drop library with a better, more supported one. I chose SortableJS as mentioned in a previous comment. The PR to replace the drag & drop implementation and fix this issue is https://github.com/jenkinsci/jenkins/pull/5177.

          Félix Queiruga Balado added a comment - I have determined that the best approach is to replace the drag & drop library with a better, more supported one. I chose SortableJS as mentioned in a previous comment. The PR to replace the drag & drop implementation and fix this issue is  https://github.com/jenkinsci/jenkins/pull/5177 .

            fqueiruga Félix Queiruga Balado
            wfollonier Wadeck Follonier
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: