Problem/Motivation
While working on #3571451: Check config schema when attaching and rendering a block, we noticed than block sources are not initialized with their default values.
In UI Patterns 2, we don't care much about required block settings because it was managed by the Form API:
- if a setting is required, we add the
#requiredrender property - BlockForm can's be submitted without filling a required value
- So it is not possible to render a block without required props filled
But in Display Builder, we can render component without subimiting BlockForm, so with a missing required value:
- on preview panel
- on builder panel
Proposed resolution
That's why we need to add those default values.
Issue fork ui_patterns-3619419
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 #2
pdureau commentedComment #4
pdureau commentedComment #7
just_like_good_vibesas we discussed, i have reworked the proposition and we did another work in cooperation for display_builder in #3571451: Check config schema when attaching and rendering a block.
pipeline is running for MR !550
Comment #9
just_like_good_vibes