Description of the need

When adding a context by path, every field available to the context is presented in the dialog box. This not only produces un-necessary clutter but creates a bad UX because the field chosen may be attached to a different entity type, making it easy to accidentally add a similarly named field that won't display data as expected because it doesn't belong to the given layout path provided in the context.

Additionally, not filtering on a given criteria might also a performance hit on larger sites that have hundreds of fields. By limiting through the selection rule, it reduces the number of fields that need to be loaded.

Proposed solution

Add Selection Rules so a context can be limited to only show the fields related to the rule.

Alternatives that have been considered

See the Drupal Panels module Selection Rules for more inspiration.

image

GitHub Issue #: 
5376