enhancement
major
minor
defect
critical
major
minor
Problem
<null-input-disabled/> only checks the first argument from the inputs. If another argument is empty (e.g., the second selection), the command remains active.
Version: 8.0.0-alpha12, React-View-Layer (tl-layout-view/tl-layout-react).
Reproduction (Prime)
Attachments (prime/project/attachments.view.xml), a selection-dependent command with inputs="owner, attachment, readOnly" and <null-input-disabled/>: If no attachment is selected, the command remains active.
Prime: Selection-dependent commands list the selection first (inputs="attachment, owner, readOnly").
Expected behavior
null-input-disabled checks all inputs or specifies an option for the intended inputs (e.g. , <null-input-disabled inputs="attachment"/>).
Solution
<null-input-disabled> and <null-input-hidden> receive an optional inputs attribute containing the names of the arguments that must not be empty: {{{#!xml <generic-command inputs="owner, attachment, readOnly">
<executability>
<null-input-disabled inputs="attachment"/>
</executability>
...
</generic-command> }}} The command is disabled (or hidden) as soon as any of the specified arguments is null. Without this attribute, the rule checks only the main argument (the value of the trigger, or otherwise the first input) as before, so existing views do not change their behavior. A name that is not an argument of the command is reported as an error when the configuration is loaded.