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

User configurable option for number of options displayed in Active Choices

    XMLWordPrintable

Details

    • Improvement
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • active-choices-plugin
    • None
    • Active Choices plugin v 1.4

    Description

      Sometimes it is better that an AC control displays more of the available options even if a single selection will be made. For example, the AC display of files in a folder benefits from displaying more than a single file even though a single file will be selected by the user. Currently, an expanded display (displaying 5 option values) is available only for an AC multi-select control. Perhaps, we can introduce a user-selectable configuration option that controls the number of the displayed options.

      Attachments

        1. JenkinsMulti10.png
          27 kB
          alex alekhin
        2. uno-choice-20161028.hpi
          1.73 MB
          Bruno P. Kinoshita

        Activity

          Code changed in jenkins
          User: Bruno P. Kinoshita
          Path:
          src/main/java/org/biouno/unochoice/AbstractCascadableParameter.java
          src/main/java/org/biouno/unochoice/AbstractScriptableParameter.java
          src/main/java/org/biouno/unochoice/CascadeChoiceParameter.java
          src/main/java/org/biouno/unochoice/ChoiceParameter.java
          src/main/java/org/biouno/unochoice/DynamicReferenceParameter.java
          src/main/resources/org/biouno/unochoice/CascadeChoiceParameter/config.jelly
          src/main/resources/org/biouno/unochoice/ChoiceParameter/config.jelly
          src/main/resources/org/biouno/unochoice/DynamicReferenceParameter/config.jelly
          src/main/resources/org/biouno/unochoice/common/checkboxContent.jelly
          src/main/resources/org/biouno/unochoice/common/choiceParameterCommon.jelly
          src/main/resources/org/biouno/unochoice/common/radioContent.jelly
          src/main/webapp/help-useDefaultMaxVisibleItemCount.html
          src/main/webapp/help-visibleItemCount.html
          src/test/java/org/biouno/unochoice/issue38889/TestNumberOfVisibleElements.java
          src/test/java/org/biouno/unochoice/issue38889/package-info.java
          http://jenkins-ci.org/commit/active-choices-plugin/83f53bd14f939711e56213ca91ad679fffedd7e6
          Log:
          JENKINS-38889 Add an option to disable the default maximum number of visible elements. Also add another option to specify the number of visible elements on the UI. Unit tests included.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Bruno P. Kinoshita Path: src/main/java/org/biouno/unochoice/AbstractCascadableParameter.java src/main/java/org/biouno/unochoice/AbstractScriptableParameter.java src/main/java/org/biouno/unochoice/CascadeChoiceParameter.java src/main/java/org/biouno/unochoice/ChoiceParameter.java src/main/java/org/biouno/unochoice/DynamicReferenceParameter.java src/main/resources/org/biouno/unochoice/CascadeChoiceParameter/config.jelly src/main/resources/org/biouno/unochoice/ChoiceParameter/config.jelly src/main/resources/org/biouno/unochoice/DynamicReferenceParameter/config.jelly src/main/resources/org/biouno/unochoice/common/checkboxContent.jelly src/main/resources/org/biouno/unochoice/common/choiceParameterCommon.jelly src/main/resources/org/biouno/unochoice/common/radioContent.jelly src/main/webapp/help-useDefaultMaxVisibleItemCount.html src/main/webapp/help-visibleItemCount.html src/test/java/org/biouno/unochoice/issue38889/TestNumberOfVisibleElements.java src/test/java/org/biouno/unochoice/issue38889/package-info.java http://jenkins-ci.org/commit/active-choices-plugin/83f53bd14f939711e56213ca91ad679fffedd7e6 Log: JENKINS-38889 Add an option to disable the default maximum number of visible elements. Also add another option to specify the number of visible elements on the UI. Unit tests included.

          Good points.

          Added two options, under each parameter type. The options are in the Advanced section.

          The checkbox should be checked by default. It is a flag that when unchecked disables a verification step that checks whether the number of elements in the return array is bigger than 10.

          The input text is used for the number of visible items displayed. If the checkbox is enabled, it has no effect. As the default behavior doesn't allow to change the number of visible elements.

          But when the checkbox is unchecked, this value is used to specify the number of visible elements.

          Code in a branch in GitHub. Attached binary plug-in file. Could you try it locally, see if that makes sense, and if that works as expected, please ioannis

          kinow Bruno P. Kinoshita added a comment - Good points. Added two options, under each parameter type. The options are in the Advanced section. The checkbox should be checked by default. It is a flag that when unchecked disables a verification step that checks whether the number of elements in the return array is bigger than 10. The input text is used for the number of visible items displayed. If the checkbox is enabled, it has no effect. As the default behavior doesn't allow to change the number of visible elements. But when the checkbox is unchecked, this value is used to specify the number of visible elements. Code in a branch in GitHub. Attached binary plug-in file. Could you try it locally, see if that makes sense, and if that works as expected, please ioannis
          alexalekhin alex alekhin added a comment -

          I wanted to create a new similar feature request but found this ticket, so add comments here
          I use 'Active choice reactive parameter' with multi select or checkboxes

          Now number of visible items is 10 but I have a list 40-50 items (see JenkinsMulti10.png).

          Scrollbar and filter can help to select items but it will be better if all of them will be displayed

          'Extended choice parameter' has property 'Number of Visible Items' - is it possible to introduce similar to Active Choices?

          So is it possible to change priority to this ticket and implement this feature?

          alexalekhin alex alekhin added a comment - I wanted to create a new similar feature request but found this ticket, so add comments here I use 'Active choice reactive parameter' with multi select or checkboxes Now number of visible items is 10 but I have a list 40-50 items (see JenkinsMulti10.png). Scrollbar and filter can help to select items but it will be better if all of them will be displayed 'Extended choice parameter' has property 'Number of Visible Items' - is it possible to introduce similar to Active Choices? So is it possible to change priority to this ticket and implement this feature?

          Hi alexalekhin

          Thanks for searching for open issues. It helps us tremendously with triaging issues.

          >'Extended choice parameter' has property 'Number of Visible Items' - is it possible to introduce similar to Active Choices?

          I think so!

          >So is it possible to change priority to this ticket and implement this feature?

          I rarely look at priorities here in JIRA. As I am currently working on something else (Python & weather forecast models orchestration, completely unrelated to active choices) I don't have any $work time to work on active choices. So it's 100% volunteer/spare time.

          If you are able to provide a pull request, it'd be faster to review, discuss, release. We had a meeting this week to discuss what issues we must include in the next release, which we are planning to prepare soon. Can't promise to include this one, but if I have spare time I can try

          Thanks!

          Bruno

          kinow Bruno P. Kinoshita added a comment - Hi alexalekhin Thanks for searching for open issues. It helps us tremendously with triaging issues. >'Extended choice parameter' has property 'Number of Visible Items' - is it possible to introduce similar to Active Choices? I think so! >So is it possible to change priority to this ticket and implement this feature? I rarely look at priorities here in JIRA. As I am currently working on something else (Python & weather forecast models orchestration, completely unrelated to active choices) I don't have any $work time to work on active choices. So it's 100% volunteer/spare time. If you are able to provide a pull request, it'd be faster to review, discuss, release. We had a meeting this week to discuss what issues we must include in the next release, which we are planning to prepare soon. Can't promise to include this one, but if I have spare time I can try Thanks! Bruno

          People

            kinow Bruno P. Kinoshita
            ioannis Ioannis Moutsatsos
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: