[later phase] [PP-1] Gracefully handle deleted regions in PageTemplate config entities"

Created on 16 October 2024, 2 months ago

Overview

See https://git.drupalcode.org/project/experience_builder/-/merge_requests/3...

Proposed resolution

User interface changes

📌 Task
Status

Postponed

Version

0.0

Component

Config management

Created by

🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @wim leers
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
  • 🇬🇧United Kingdom catch

    Deleted regions with block content configured is tricky. However a good first step here would be being able to 'clean up' a page template config entity where regions were previously FALSE (nothing configured for them) but now don't exist. I can see this happening when people are XB-ifying their own sites and trying to clean up/simplify their theme as a result.

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    📌 Introduce an XB `PageTemplate` config entity Active is in!

    (Also, thanks, @catch, and sorry for not crediting you in the first place 🙈)

  • 🇬🇧United Kingdom catch

    So one option - when saving an entity, automatically remove FALSE regions that don't exist any more in the theme info?

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Yes, we could do that.

    But I think @lauriii is stating that there should be no interaction required from any user at all; only the act of updating a theme (to have added or deleted regions) should automatically update the affected PageTemplate config entity, if any.

    P.S.: NULL regions BTW, not FALSE, because:

            # A region that is left empty may be `null`.
            nullable: true
            # All non-empty regions must have a component tree defined.
            type: experience_builder.component_tree
    
  • 🇬🇧United Kingdom catch

    Ah OK makes sense with NULL, so NULL to non-existent then :P

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Yep! :D I felt weird even pointing that out, because it felt like absurd nitpickery — but it actually meant something different so I decided to post it anyway 😅

Production build 0.71.5 2024