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

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

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Won't Fix
    • active-choices-plugin

    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

          Hi kinow,

          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

          stankolubomir Lubomir Stanko added a comment - Hi kinow , 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

          Hi stankolubomir,

          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

          kinow Bruno P. Kinoshita added a comment - Hi stankolubomir , 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

          kinow 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

          stankolubomir Lubomir Stanko added a comment - kinow 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

          It should be doable stankolubomir. 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.

          kinow Bruno P. Kinoshita added a comment - It should be doable stankolubomir . 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.

          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?

          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?

          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.

          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.

          People

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

            Dates

              Created:
              Updated:
              Resolved: