In case of the default being "equals", i agree it's a UX improvement to hide the operator:
hidden operator

But in other cases, i think it's clearly bad, like in the case of ">=", as shown here in a commerce condition:
missing operator

So, i'd suggest to just always show the operator.

Comments

tr’s picture

Category: Bug report » Feature request
Status: Active » Needs review
StatusFileSize
new778 bytes

When editing a reaction rule or a rules component, Rules shows a summary of the rule's events, conditions, and actions. This summary may be found at (for example):
admin/config/workflow/rules/reaction/manage/3 for reaction rule number 3
admin/config/workflow/rules/components/manage/7 for component number 7

In this summary, the context variables and their values are displayed so that the Rule can be examined and understood without having to drill down into each event/condition/component to see what the values are.

But this summary currently hides the value of a context parameter if the parameter is declared to have a default value and the parameter value is equal to the default value. This is true of all context parameters with default values, in all conditions and actions.

This feature was added in c5a6e631e back in 2010. I assume the reason was to save some screen space, since there is limited room to display all this information. This commit wasn't connected to an issue, so there is no discussion attached to it.

In general, I think it's a bad idea to hide this information. This issue shows one reason why - we don't always know what the default value is, so how can we understand what the rule is doing? I think it is better to show it in all cases.

Here's a patch.

tr’s picture

StatusFileSize
new779 bytes

Re-rolled #1 against current HEAD to remove fuzz. No functional changes.

  • TR committed d46b786 on 7.x-2.x
    Issue #2179781 by TR: Hiding default-operator in rule conditions is not...
tr’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.