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:

  1. a new version of a Component has new required props
  2. a new version of a Component uses different field type/field storage settings/field instance settings than when the Pattern was 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.

CommentFileSizeAuthor
#4 image (3).png24.42 KBnikolabintev

Comments

wim leers created an issue. See original summary.

wim leers’s picture

Assigned: Unassigned » lauriii
Status: Active » Postponed (maintainer needs more info)
Issue tags: +Needs product manager review

Project: Experience Builder » Drupal Canvas

Experience Builder has been renamed to Drupal Canvas in preparation for its beta release. You can now track issues on the new project page.

nikolabintev’s picture

StatusFileSize
new24.42 KB

Hi 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?

wim leers’s picture

a new prop is added,

Did you mean that a new required prop was added? Or does it happen also for new optional props?