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

Pipeline view automatically scrolls left

    XMLWordPrintable

Details

    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

          flippy Repkov Denis created issue -
          flippy Repkov Denis made changes -
          Field Original Value New Value
          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:
          {noformat}
          /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
          {noformat}
          * After executing this requests the pipeline view automatically scrolls left.

          This behavior can be pretty disturbing, since user have to scroll back to the right each time after jenkins does this automatically left scroll.
          * 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:
          {noformat}
          /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
          {noformat}
          * 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.
          svanoort Sam Van Oort made changes -
          Priority Major [ 3 ] Minor [ 4 ]
          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).

          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).
          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.

          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.
          svanoort Sam Van Oort made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          svanoort Sam Van Oort added a comment -

          Fix merged, will go out with next release

          svanoort Sam Van Oort added a comment - Fix merged, will go out with next release
          svanoort Sam Van Oort made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          svanoort Sam Van Oort made changes -
          Labels UX
          svanoort Sam Van Oort added a comment -

          Resolved with v 1.6

          svanoort Sam Van Oort added a comment - Resolved with v 1.6
          svanoort Sam Van Oort made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 173089 ] JNJira + In-Review [ 210189 ]

          People

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

            Dates

              Created:
              Updated:
              Resolved: