Problem/Motivation

None of the fields on the condition form carries a weight, so they are rendered in the order they happened to be added to the array. That order is context mapping, then the negation checkbox, then the paragraph type checkboxes, then the entity types and bundles textarea.

The negation checkbox therefore comes first, above the two fields whose result it inverts. Someone reading the form top to bottom is asked whether to invert an answer before being shown anything about how that answer is reached.

The rest of the order is no better. The paragraph type checkboxes appear before the entity types field, which is the opposite of how the condition works: the entity type and bundle decide whether a page is a candidate at all, and only then do the paragraph types matter.

Proposed resolution

Give the fields weights so the form reads in the same order the condition is evaluated. The entity types and bundles field first, since it decides which pages are candidates. The paragraph types next, since they decide what has to be found on those pages. The negation last, since it flips the whole answer.

The negation checkbox is added by the parent class without a weight, so the plugin has to set one on it explicitly, otherwise it stays wherever it lands.

This is presentation only. No stored configuration changes and the condition evaluates exactly as before.

Comments

trebormc created an issue. See original summary.

  • trebormc committed 10d559b3 on 1.0.x
    Issue #3619025 by trebormc: Order the condition form fields by how the...
trebormc’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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