Overview

In #3567413: When editing a Canvas entity with a component tree (e.g., page, template, or region), automatically upgrade component instance versions for cases where there's no impact on existing data we added the infra for updating component instances to the latest (active) version if possible.

However, there's a benefit to doing intermediate updates when we cannot update to the latest (active) one, but at least a more recent one:

a) Consistent UX if there are many instances of the same component. We might not be able to update all of those to the active one, but we can minimize the number of different widgets/UX each one might be using, providing a (more) consistent UX.
b) Reducing the number of versions in use. This way we can clean-up unused past versions of a Component config entity at some point.

Proposed resolution

Expand \Drupal\canvas\Plugin\Canvas\ComponentSource\GeneratedFieldExplicitInputUxComponentInstanceUpdater so, when an upgrade to the active one is not possible, we iterate through them from most recent to oldest, and check if that update can happen.

User interface changes

Comments

penyaskito created an issue. See original summary.