Problem/Motivation

When using visibility rules for components we have the problem that the list of visibility rules is super long and that can be easily improved by checking all of the condition plugins and remove them from form state if they are the same as the default configuration.

I found that technique in core's ConditionPluginCollection. Maybe we should try to refactor the visibility settings at some point to make use of that plugin collection as well.

Steps to reproduce

  1. Set a visibility rule for a component
  2. Export config
  3. See that many unused settings are saved as well

Proposed resolution

Check configuration state during form validation to remove values from form values.

Data model changes

Unnecessary visibility settings are no longer visible in config export.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

yannickoo created an issue. See original summary.

yannickoo’s picture

Status: Active » Needs review
yannickoo’s picture

mogtofu33 made their first commit to this issue’s fork.

mogtofu33’s picture

Status: Needs review » 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.