Skip to content

Custom Action - Input Control (Checkbox) : Add 'Unchecked Value' and provide sensible defaults #1482

Closed

Description

@goran-w

When creating/editing a Checkbox input-control for a Custom Action, we should be able to specify a Unchecked Value, just like the Checked Value already present.

Also, these two fields of Checked Value / Unchecked Value should start pre-filled with sensible defaults, like true / false, 1 / 0 (or similar).

Motivation: Currently the input-variable is expanded to an empty string by default, when the checkbox is unchecked. This makes it a bit error-prone, since this argument will then be skipped and will break the order of arguments, unless it is enclosed in quotes on the resulting command-line. Also, the Checked Value is currently empty by default, which means there will be no distinction between checked/unchecked if we just create a checkbox without touching this field. Adding the Unchecked Value as a modifiable field, and providing non-empty defaults for both of these fields, would improve its ease-of-use (while still supporting empty-string variants if desired)...

Image

(The help-text below the Checked / Unchecked Value fields should be changed to say "... these values ...".)

Activity

  1. love-linger commented on Jul 1, 2025

    @love-linger
    Collaborator

    CheckBox is designed only being used as a toggle of its underline Checked Value, which will change the way the external tool/script behaves.

    For example:

    • git fetch will not overrides the local ref by default if it is mismatched with remote one
    • When --force is enabled, git fetch command will disable this check

    So, in my opinion, a simple --some-swith-option is really better than --some-switch-option=true|fase, since for switch-type-options, the program always needs to implement a default behavior.

  2. love-linger commented on Jul 1, 2025

    @love-linger
    Collaborator

    And when a commandline option supports different values, such as --some-option=1|2|3, I think an extra CombBox input element is better than CheckBox

  3. self-assigned this
    on Jul 1, 2025
  4. goran-w commented on Jul 1, 2025

    @goran-w
    ContributorAuthor

    CheckBox is designed only being used as a toggle of its underline Checked Value, which will change the way the external tool/script behaves.

    Ah, I see - makes sense!

    And when a commandline option supports different values, such as --some-option=1|2|3, I think an extra CombBox input element is better than CheckBox

    Great new feature, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions