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
- Set a visibility rule for a component
- Export config
- 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.
Issue fork display_builder-3563122
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
Comment #3
yannickooComment #4
yannickooComment #6
mogtofu33 commented