Problem/Motivation

Steps to reproduce

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

pdureau created an issue. See original summary.

pdureau’s picture

Don't forget to update specs

pdureau’s picture

Title: [2.0.0-alpha2] On block by component instead of a single generic block » [2.0.0-alpha2] One block by component instead of a single generic block
smustgrave’s picture

Not sure I follow is this to move over https://www.drupal.org/project/ui_patterns_blocks ?

pdureau’s picture

Title: [2.0.0-alpha2] One block by component instead of a single generic block » [2.0.0-alpha3] One block by component instead of a single generic block
Assigned: pdureau » Unassigned

The news UI Patterns Blocks submodule is taking the name of https://www.drupal.org/project/ui_patterns_blocks and is covering the features of 4 contrib modules:

  • UI Patterns Blocks : Allows site builders to wrap blocks content in the field (slot) of a pattern (component).
  • UI Patterns Pattern Block: Expose each component as a configurable block. No field (slot) mapping, slots are rendered with the preview data
  • UI Patterns Entity Links : Expose each entity link (canonical, edit…) as a block, and allow mapping of link label and url
  • Component Blocks: Expose each component as many configurable blocks, one for each available content entity (ex: current node and author in a node). Field (slot) mapping with content entities fields. For Layout Builder only.

Some of those modules expose one block by component (UI Patterns Pattern Block, Component Blocks), some a single block for all components (UI Patterns Entity Links). We started the work in Alpha1 by doing a single block for all components, but we changed our mind and we now want a block by component.

smustgrave’s picture

So first time seeing these modules. But if I understand we want component block merged in?

pdureau’s picture

So first time seeing these modules.

Except component_blocks, they are crap modules. I am the author of one, and Christian is the author of an other, so I allow myself to be harsh 🤣

However, each of them has an interesting feature we want to include into UI Patterns 2

But if I understand we want component block merged in?

Covering the scope of component_blocks was not the initial plan, and we are not in contact with Lee and the other component_blocks contributors.

However, thanks to our new Source plugin type and the other blocks modules we are merging, we have realized than we already have everything we need to also cover component_blocks scope without properly merging it. So I am now mentioning it.

smustgrave’s picture

I speak to @larowlan has he helps me out with core stuff. So if we want to look int component_block I can start with that if I can free up.

pdureau’s picture

The issue which may be considered as covering component_blocks scope is #3444768: [2.0.0-alpha3] Blocks: Add sources with an entity context

The current issue is much simpler: instead of having a single block with a component selector in blockForm(): https://git.drupalcode.org/project/ui_patterns/-/blob/2.0.x/modules/ui_p...

We need to generate a block by component, without a component selector in the blockForm()

I guess initial_component_id parameter ComponentFormBuilderTrait::buildComponentsForm() is the one to load or not the component selector.

oldeb’s picture

Assigned: Unassigned » oldeb

oldeb’s picture

Status: Active » Needs review

  • pdureau committed 92f759d5 on 2.0.x authored by oldeb
    Issue #3443441 by oldeb, pdureau: One block by component instead of a...
pdureau’s picture

Title: [2.0.0-alpha3] One block by component instead of a single generic block » [2.0.0-alpha2] One block by component instead of a single generic block
Assigned: oldeb » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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