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

Unnecessary Scrollbars on build with parameters screen when using Active Choices Plugin

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Won't Fix
    • Component/s: active-choices-plugin
    • Environment:
    • Similar Issues:

      Description

      Adding an Active Choices Reactive Parameter with choice type of radio buttons or check boxes produces unnecessary scrollbars on the [build with parameters] screen (see attached image). Jenkins url is: https:// [ci_url] /job/ [job_name] /build?delay=0sec
      Height calculation in the Javascript function of checkboxContent.jelly and radioContent.jelly seems to create a height value which is too small.

      I have created a push request on GitHub with my own solution, should you choose to accept it.

        Attachments

          Activity

          Hide
          kinow Bruno P. Kinoshita added a comment -

          Tested the pull request, it would remove the scroll bar, but that would implicate a change in the plugin behavior that could cause issues to users with hundreds/thousands of options. Marking as won't fix.

          Show
          kinow Bruno P. Kinoshita added a comment - Tested the pull request, it would remove the scroll bar, but that would implicate a change in the plugin behavior that could cause issues to users with hundreds/thousands of options. Marking as won't fix.
          Hide
          stankolubomir Lubomir Stanko added a comment -

          Active choices plugin is great, but this issue bothers me a lot.
          Is this issue still not possible to do without breaking other stuff? I hope development moved forward a bit. So it maybe could be possible to fix now?

          Show
          stankolubomir Lubomir Stanko added a comment - Active choices plugin is great, but this issue bothers me a lot. Is this issue still not possible to do without breaking other stuff? I hope development moved forward a bit. So it maybe could be possible to fix now?
          Hide
          kinow Bruno P. Kinoshita added a comment -

          It should be doable Lubomir Stanko. We just need someone with time to try a few variations, and come up with a solution that a) works well in most browsers, and b) works well with builds with 1 option, or with 100s of options. I intend to work on other issues related to performance and new features, but if you have time to give it a go, let me know and I'd be happy to review a pull request or patch. It should be doable to try a few variations in the browser inspector, without the need to clone the project and import in an IDE.

          Show
          kinow Bruno P. Kinoshita added a comment - It should be doable Lubomir Stanko . We just need someone with time to try a few variations, and come up with a solution that a) works well in most browsers, and b) works well with builds with 1 option, or with 100s of options. I intend to work on other issues related to performance and new features, but if you have time to give it a go, let me know and I'd be happy to review a pull request or patch. It should be doable to try a few variations in the browser inspector, without the need to clone the project and import in an IDE.
          Hide
          stankolubomir Lubomir Stanko added a comment -

          Bruno P. Kinoshita I've found some time to check and test it and I've created a pull request. Please check https://github.com/jenkinsci/active-choices-plugin/pull/21

          Show
          stankolubomir Lubomir Stanko added a comment - Bruno P. Kinoshita I've found some time to check and test it and I've created a pull request. Please check  https://github.com/jenkinsci/active-choices-plugin/pull/21
          Hide
          kinow Bruno P. Kinoshita added a comment -

          Hi Lubomir Stanko,

          Added comments to the pull request explaining why this approach would cause issues to other existing users of the plugin. Unfortunately I think we have to investigate other alternatives to workaround scroll bars or performance issues (or a completely different approach). But always thinking what will happen to other users

          Cheers

          Bruno

          Show
          kinow Bruno P. Kinoshita added a comment - Hi Lubomir Stanko , Added comments to the pull request explaining why this approach would cause issues to other existing users of the plugin. Unfortunately I think we have to investigate other alternatives to workaround scroll bars or performance issues (or a completely different approach). But always thinking what will happen to other users Cheers Bruno
          Hide
          stankolubomir Lubomir Stanko added a comment -

          Hi Bruno P. Kinoshita,

          I've created another PR https://github.com/jenkinsci/active-choices-plugin/pull/22 . Now I'm setting height variable only for more than 10 choices. I suppose it is not necessary to set height for less than 10 choices. I believe most users have 3 to 5 choices. So at least these won't be affected by unnecessary scrollbars.

          Thanks,

          Lubo

          Show
          stankolubomir Lubomir Stanko added a comment - Hi Bruno P. Kinoshita , I've created another PR https://github.com/jenkinsci/active-choices-plugin/pull/22  . Now I'm setting height variable only for more than 10 choices. I suppose it is not necessary to set height for less than 10 choices. I believe most users have 3 to 5 choices. So at least these won't be affected by unnecessary scrollbars. Thanks, Lubo

            People

            • Assignee:
              kinow Bruno P. Kinoshita
              Reporter:
              somejavadev Java Dev
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: