Problem/Motivation

Currently when creating a page layout with Display Builder, default layout is imported from modules/display_builder_page_layout/fixtures/default_page_layout.yml, if it is the first page layout, let's try to import from current block layout configuration.

Because currently, a user could ask:
- why is there the XXX block while I have removed it?
- where are all the blocks I have configured on block layout?

Also currently, the fixture references some blocks generated by derivatives from config, menu block, main, account, footer. What if there is no footer menu on the website? (very low probability that there is no main and account menu even if theorically possible)

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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

grimreaper created an issue. See original summary.

pdureau’s picture

Issue tags: +Novice
pdureau’s picture

We may need a ComponentSource plugin type, like Canvas does, with 3 plugins:

  • SDC, as we already have
  • Layout plugins for #3531521: Layout plugins support
  • Theme page, where every region is a slot and the template is page.html.twig, to address this feature
pdureau’s picture

Title: Block layout import » Import initial config from block layout
pdureau’s picture

Assigned: Unassigned » pdureau

pdureau’s picture

Status: Active » Needs work

Now #3531521: Layout plugins support is merged, we can start.

pdureau’s picture

Status: Needs work » Active

green pipeline :)

To do before sending to review:

  • regions labels
  • implements ::calculateDependencies()
  • evaluate the use of SourceWithSlotsInterface
  • do we need to check the active theme before getActiveTheme() in getSlotDefinitions()
pdureau’s picture

pdureau’s picture

Status: Active » Needs work
pdureau’s picture

Assigned: pdureau » Unassigned
Status: Needs work » Needs review
grimreaper’s picture

Assigned: Unassigned » grimreaper
grimreaper’s picture

Assigned: grimreaper » Unassigned

Tested, ok for me.

I left a few minor suggestions and questions.

Also, I would have expected more changes needed in the tests.

pdureau’s picture

Assigned: Unassigned » pdureau
Status: Needs review » Needs work

Thanks, i will have a look

pdureau’s picture

Assigned: pdureau » Unassigned
Status: Needs work » Needs review
grimreaper’s picture

Status: Needs review » Reviewed & tested by the community

Thanks.

No having tests aside, I think it is RTBC.

pdureau’s picture

No having tests aside, I think it is RTBC.

Great, thanks. We didn't have test for /modules/display_builder_entity_view/src/BuilderDataConverter.php so I don't belive we absolutely need one for /modules/display_builder_page_layout/src/BuilderDataConverter.php

pdureau’s picture

Assigned: Unassigned » mogtofu33

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

mogtofu33’s picture

Assigned: mogtofu33 » Unassigned
Status: Reviewed & tested by the community » Fixed

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.

  • mogtofu33 committed 34abe370 on 1.0.x authored by pdureau
    feat: #3547979 Import initial config from block layout
    
    By: grimreaper...

Status: Fixed » Closed (fixed)

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