Problem/Motivation
In Display builder we print the settings value of a component in the Layers panel (and could be some other places).
Currently the ComponentSource provide only the id and variant name.
On display builder it's a simple flattening of the array if not nested as you can see here.
It's a starting point good enough, could handle nested settings source (like icons) a bit better, but I think it's an edge case, for most source we just want the first level key => value to text.
Steps to reproduce
Proposed resolution
Implement the buildComponentSettingItem() from display builder in ComponentSource().
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
pdureau commentedOnce #3571009: Add SourceWithSlotsInterface and LayoutSource is done on UI Patterns side, we will remove
ComponentSourcefrom Display Builder codebase. So we must also do this change.However, let's not take the current implementation of ComponentSource::settingsSummary() from Display Builder where:
::processProperty(),::processStandardProperty(),::normalizeValue(),::flattenArrayToString()::formatUiStyleSummary(),::isUiStyleAttribute()Instead of all this, can we try to implement
ComponentSource::settingsSummary()by simply looping on the prop sources and aggregate each source implementation ofSourceInterface::settingsSummary().The part about UI Styles will reside in
ui_styles_attributessource plugin.