Overview
When I create a Pattern, I expect that to be able to always use the latest version of each Component (see #3523841: Versioned Component config entities (SDC, JS: prop_field_definitions, block: default_setting, all: slots for fallback) + component instances refer to versions ⇒ less data to store per XB field row, see its active_version config entity property).
But it does not; it continues to use whichever version of each Component was the active version at the time of creating the Pattern config entity.
Proposed resolution
Automatically update each Pattern config entity whenever a Component config entity's active_version changes used in any Pattern.
This is possible since #3457504: XB field type: calculate all dependencies, store them, surface in new Component "Audit" operation, see ComponentInputsEvolutionTest for inspiration.
⚠️ This is NOT possible when:
- a new version of a
Componenthas new required props - a new version of a
Componentuses different field type/field storage settings/field instance settings than when thePatternwas created (related: #3463996: [META] [PP-1] When the field type, storage/instance settings, widget, expression or requiredness for an SDC/code component prop changes, the Content Creator must be able to upgrade)
But most of the time, it should be possible to transparently update. When it is not possible, a log entry should be created.
User interface changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | image (3).png | 24.42 KB | nikolabintev |
Comments
Comment #2
wim leersComment #4
nikolabintev commentedHi team,
We are using Drupal Canvas on a relatively large project and we see the patterns as a very solid technique. However, one issue that we observe is that when the definition of a specific SDC component is updated, for example, a new prop is added, this component throws an error when we try to edit it within an existing pattern.
Any thoughts on this? How could it be handled and what is the best approach to do so?
Comment #5
wim leersDid you mean that a new required prop was added? Or does it happen also for new optional props?