• Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor Minor
    • blueocean-plugin
    • None

      Scope

      1. Need new implementations of basic form controls that allow for full programmatic control over "value" or "selectedValue" properties.
        1. Checkbox.checked
        2. Dropdown.selectedOption
        3. PasswordInput.value (instead of current "defaultValue" prop)
        4. RadioButtonGroup.selectedOption/defaultOption
        5. TextArea.value (instead of current "defaultValue" prop)
        6. TextInput.value (instead of current "defaultValue" prop)
        7. Favorite.checked (note: this control composes Checkbox)
        8. List.selectedItem/defaultSlection
      2. Since the developer will manually manage the corresponding value property for each, the onChange (or equivalent callback) should be marked as required and throw an error if not set, including message that explains intended usage.
      3. These controls should be shipped alongside the existing components and placed in a suitable namespace, e.g.
        1. import { controls } from '@jenkins-cd/design-language'
        2. const { TextInput, Dropdown } = controls;
      4. Old components should be marked as deprecated
        1. Mark as such in jsdocs
        2. Add some simple console.warn infrastructure so that the first time each legacy component type mounts, a warning is displayed. For each full page load, there should be only one warning each for TextInput, Dropdown, etc
      5. The following areas use these components and should be ported over - but probably after the above work has been completed and shipped in JDL:
        1. dashboard/creation
          1. Git: TextInput, Dropdown
          2. Git Credentials: TextInput, TextArea, PasswordInput, RadioButtonGroup
          3. Github: TextInput, List
        2. core-js/parameter (TextInput, TextArea, PasswordInput, Checkbox, RadioButtonGroup, Dropdown)
        3. personalization (Favorite usage)
        4. editor

      Additional Background
      nicu found a bug in TextInput that made it difficult to programmatically change the value after the user had typed into the control. A fix was suggested here: PR#169

      This led to some further discussion in this PR: PR#170

          [JENKINS-44622] JDL form component improvements

          Cliff Meyers added a comment -

          jamesdumay here is the ticket you requested that tracks the changes to the form controls. Steps 1-4 are probably good for a first pass, then tackling number 5 in parts? I could easily handle 5.1-5.3 but not having much experience w/ the editor, perhaps Keith could help out with 5.4.

          Cliff Meyers added a comment - jamesdumay here is the ticket you requested that tracks the changes to the form controls. Steps 1-4 are probably good for a first pass, then tackling number 5 in parts? I could easily handle 5.1-5.3 but not having much experience w/ the editor, perhaps Keith could help out with 5.4.

            Unassigned Unassigned
            cliffmeyers Cliff Meyers
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: