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

Pipeline view automatically scrolls left

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      • When jenkins pipeline contains more steps then can fit on the screen, scrollbar is displayed and user can scroll left and right to reach pipeline stages
      • Periodically jenkins issues following AJAX calls:
        /wfapi/runs?since=%2381&_=1467367102538
        /wfapi/nextPendingInputAction?_=1467367102539
        /wfapi/changesets?_=1467367102540
        /execution/node/78/wfapi/describe?_=1467367102541
        Request Method:GET
        /wfapi/changesets?_=1467367102542
        /buildHistory/ajax
        
      • After executing this requests the pipeline view automatically scrolls left.

      This behavior can be very disturbing, since user have to scroll back to the right each time after jenkins does this automatically left scroll.

        Attachments

          Activity

          Hide
          svanoort Sam Van Oort added a comment -

          Reproduced. This is a consequence of the way MVC is implemented in the JS code: for the view, the DOM element is removed and then rebuilt after applying templating with new data. The result is the page jumping back to the start, because the element reset.
          Annoying, indeed – though I think not a functionality-break, so not worth of being a classified as a "Major" bug.

          A fast workaround would be to remember viewport scroll positioning before templating is applied and return to it (as long as neither stage nor run count has decreased, because in that case the position won't be truly valid). It's not perfect, but the reasonable alternative in this case would be to rip out the mini-MVC framework and replace with Angular or React (major refactoring).

          Show
          svanoort Sam Van Oort added a comment - Reproduced. This is a consequence of the way MVC is implemented in the JS code: for the view, the DOM element is removed and then rebuilt after applying templating with new data. The result is the page jumping back to the start, because the element reset. Annoying, indeed – though I think not a functionality-break, so not worth of being a classified as a "Major" bug. A fast workaround would be to remember viewport scroll positioning before templating is applied and return to it (as long as neither stage nor run count has decreased, because in that case the position won't be truly valid). It's not perfect, but the reasonable alternative in this case would be to rip out the mini-MVC framework and replace with Angular or React (major refactoring).
          Hide
          svanoort Sam Van Oort added a comment -

          Solved by https://github.com/jenkinsci/pipeline-stage-view-plugin/pull/20 – and we can simply look to see if the scroll is outside the valid width when stage counts decrease. Doesn't need anything more than that, after all, and seems to represent more or less a full solution.

          Show
          svanoort Sam Van Oort added a comment - Solved by https://github.com/jenkinsci/pipeline-stage-view-plugin/pull/20 – and we can simply look to see if the scroll is outside the valid width when stage counts decrease. Doesn't need anything more than that, after all, and seems to represent more or less a full solution.
          Hide
          svanoort Sam Van Oort added a comment -

          Fix merged, will go out with next release

          Show
          svanoort Sam Van Oort added a comment - Fix merged, will go out with next release
          Hide
          svanoort Sam Van Oort added a comment -

          Resolved with v 1.6

          Show
          svanoort Sam Van Oort added a comment - Resolved with v 1.6

            People

            • Assignee:
              svanoort Sam Van Oort
              Reporter:
              flippy Repkov Denis
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: