Currently there are two reciprocal conditional actions: show and hide. Despite the name, the are persistent. For example, if the condition(s) are FALSE and the action is SHOW, then the target component is HIDDEN.

I propose to change:
then SHOW YourComponentName -> then YourComponentName IS SHOWN
and
then HIDE YourComponentName -> then YourComponentName ISN'T SHOWN

Effectively, the "hide" command will be eliminated and replaced with the "invert" "isn't" option for shown.

This lays the groundwork for other actions. For example, we can just add a REQUIRED action and the inverted version of that is not required. Or SET to VALUE would become ISN'T Set To Value.

Comments

danchadwick’s picture

Status: Active » Needs review
StatusFileSize
new7.79 KB
danchadwick’s picture

StatusFileSize
new8.26 KB

Revised patch. Fixes a bug in 'invert' javascript.

danchadwick’s picture

StatusFileSize
new8.87 KB

Revised again. Fixed tests. These pass locally. Testbot can't test this yet because it doesn't apply to the current head.

  • DanChadwick committed f22f4fe on 7.x-4.x
    Issue #2458897 by DanChadwick: Convert conditional show/hide to is/isn't...
danchadwick’s picture

Status: Needs review » Fixed

Committed to 7.x-4.x

danchadwick’s picture

Version: 7.x-4.x-dev » 8.x-4.x-dev
Category: Feature request » Task
Status: Fixed » Patch (to be ported)

Of the 4 conditional patches, apply this 3rd.

fenstrat’s picture

Version: 8.x-4.x-dev » 7.x-4.x-dev
Category: Task » Feature request
Status: Patch (to be ported) » Fixed

Committed and pushed to 8.x-4.x. Thanks!

  • fenstrat committed 53d5f11 on 8.x-4.x authored by DanChadwick
    Issue #2458897 by DanChadwick: Convert conditional show/hide to is/isn't...

The last submitted patch, 1: webform-hide_to_isnt_shown-2458897-1.patch, failed testing.

The last submitted patch, 2: webform-hide_to_isnt_shown-2458897-2.patch, failed testing.

Status: Fixed » Needs work

The last submitted patch, 3: webform-hide_to_isnt_shown-2458897-3.patch, failed testing.

danchadwick’s picture

Status: Needs work » Fixed

Testbot estúpido.

Status: Fixed » Closed (fixed)

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