Problem/Motivation

Add a drush command to migrate config from UI Patterns 2:

  • core.entity_view_display.{entity_type}.{bundle}.{view_mode} with manage display and layout builder
  • views.view.{view}

We are not targeting a 100% scope but just some common uses cases. We want to help migration, not do full migration.

Proposed resolution

Documentation https://docs.google.com/document/d/1A4jUkz0ETBQC6hUCmDfRtEziH0C7Db6ncpBx...

Remaining tasks

Let's start by collecting before / after YAML snippets to build unit tests.

Command icon 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

pdureau created an issue. See original summary.

duaelfr made their first commit to this issue’s fork.

nicoloye made their first commit to this issue’s fork.

nicoloye’s picture

Component: UI Patterns Legacy [2.x only] » Code
Issue tags: +UISuiteCamp2025, +BarCampPerpignan2025
duaelfr’s picture

A bit of progress today:
* Rebased our branch on latest 2.0.x commit
* Started to factorize settings to props conversion
* Prepared future conversion of mappings to slots
* Wrote the field_formatters settings conversion

To be continued.

duaelfr’s picture

More progress today:
* Rebased our branch on latest 2.0.x commit
* Factorize views_styles slots conversion
* Factorize and extend dependencies conversion
* Fix 1.x missing dependencies during dependencies conversion
* Fix field_formatters variants_token conversion
* Document and harmonize views style settings conversion
* Add field_group settings conversion
* Add views row settings conversion

To be continued

grimreaper’s picture

Status: Active » Needs work

Hello,

Updating issue status to needs work as there are code in preparation.

Would it be possible to create a MR please to see more easily the WIP? I don't wanna create it to not have commit attribution when merged (or another one could be created later).

grimreaper’s picture

I have created the MR as WIP to be able to test it on project.

grimreaper’s picture

Assigned: Unassigned » grimreaper
grimreaper’s picture

I have code from a project for layout builder entity overrides that is generic, not related to any entity type and/or any patterns in particular.

So I will be able to share it.

duaelfr’s picture

Rerolled and resolved remaining comments

grimreaper’s picture

Debugging config update.
Starting slot mapping conversion.

TODO:
- finish slot mapping
- cleanup todos and code quality
- provide service to refactor common code between Drush command and potential hook_update

I think regarding the migration, the process could be.

1: dev environment, destroy your env to update code with ui_patterns_legacy Drush command
2: once code is updated, rebuild your env and execute normal update

I think instead of providing a Drush command for config update, we can do that in multiple hook_update_N + hook_update_NAME.

grimreaper’s picture

Status: Needs work » Needs review

Need real life examples to complete slots mapping. Could be completed later.

No service to refactor hook_update and Drush command.

To discuss.

duaelfr’s picture

The MR contains a lot of unrelated minor changes. I believe we should commit them separately to make it easier to review this massive MR and focus on the actual changes.

grimreaper’s picture

Ok, I will handle that next week.

grimreaper’s picture

Put all changes related to coding standard on separated branch.

Maybe should go into #3541295: [2.0.9] Add missing strict_types=1 directives

grimreaper’s picture

StatusFileSize
new63.87 KB

Patch for Composer usage. Ok on my project.

grimreaper’s picture

Documented Core patch.
Documented update workflow.
Refactored code duplication between hook_update_N and Drush command.
Added message at the end of hook_post_update_NAME.

I let @nicoloye prepare automated tests.

grimreaper’s picture

StatusFileSize
new131.8 KB
pdureau’s picture

Title: [2.1.0] Add config migration from UI Patterns 1.x » Add config migration from UI Patterns 1.x

  • grimreaper committed df15b4e0 on 2.0.x
    [#3507031] feat: Add config and Layout Builder overrides migration from...
grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Needs review » Fixed

As discussed this morning in weekly UIP2, merged!

Thanks everyone!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.