Reduce the complication of entity view display config storage #6271
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Entity view display config has an option to store region information about about where fields should be placed. It is part of an old system of page generation that we don't really use with our move to Layout Builder. The information stored in that part of the config has no functional impact (to the best of my knowledge) on how our platform works. It is an artifact of how Drupal is initially set up, when fields are set in a region list. Unless you update the config at that point to move all the fields to "hidden" it gets frozen at whatever state it was in when you turn on Layout Builder. You no longer have access to the form to update that config.
The PR proposes a method for not storing the unnecessary config and making its non-storage into a systematic change that will automatically be reflected in the way that the configuration is output anytime it is re-saved.
The benefit of doing this is that we can shrink the file sizes for these config significantly and not have the noise to contend with when we are looking for actual useful information in the config.
How to test