Overview

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

Proposed resolution

User interface changes

Comments

wim leers created an issue. See original summary.

wim leers credited lauriii.

wim leers’s picture

catch’s picture

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.

wim leers’s picture

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

#3478537: Introduce an XB `PageTemplate` config entity is in!

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

catch’s picture

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

wim leers’s picture

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
catch’s picture

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

wim leers’s picture

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 😅

wim leers’s picture

Issue tags: +post-stable priority

Project: Experience Builder » Drupal Canvas
Version: 0.x-dev » 1.x-dev

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