Problem/Motivation

#2631854: Create PanelsDisplayManager and improve API for making working with PanelsDisplayVariants easier has a schema for block plugin settings used inside of panels display variant plugins. This mirrors the ctools BlockDisplayVariant and since panels is dependent upon ctools is safe to move.

Proposed resolution

Move panels.block_plugin.* schema into ctools

Remaining tasks

Move it

User interface changes

None

API changes

None

Data model changes

Adding schema definition for something we're already doing.

Comments

EclipseGc created an issue. See original summary.

dsnopek’s picture

Status: Active » Needs review
StatusFileSize
new1.15 KB

Here's a patch that implements this!

This way any display variant (for example, the PanelsDisplayVariant) can simply set its type to ctools.block_display_variant and omit any of the configuration properties that come from BlockDisplayVariant, like:

display_variant.plugin.panels_variant:
  type: ctools.block_display_variant

This is exactly what I'm going to do on #2631854: Create PanelsDisplayManager and improve API for making working with PanelsDisplayVariants easier once this issue is committed (I've already tested that it works!).

eclipsegc’s picture

Status: Needs review » Needs work
  1. +++ b/config/schema/ctools.schema.yml
    @@ -16,3 +16,41 @@ condition.plugin.entity_bundle:*:
    +ctools.block_display_variant.block_plugin.*:
    

    I think I'd prefer to see this as just ctools.block_plugin.*:

  2. +++ b/config/schema/ctools.schema.yml
    @@ -16,3 +16,41 @@ condition.plugin.entity_bundle:*:
    +ctools.block_display_variant:
    +  type: display_variant.plugin
    +  label: 'Block display variant'
    +  mapping:
    +    selection_logic:
    +      type: string
    +      label: 'Selection logic'
    +    selection_conditions:
    +      type: sequence
    +      label: 'Selection Conditions'
    +      sequence:
    +        - type: condition.plugin.[id]
    +          label: 'Selection Condition'
    +    blocks:
    +      type: sequence
    +      label: 'Blocks'
    +      sequence:
    +        - type: ctools.block_display_variant.block_plugin.[id]
    

    I feel like we should probably address this in #2646286: Remove selection logic/conditions from the BlockDisplayVariant

dsnopek’s picture

Status: Needs work » Needs review
StatusFileSize
new620 bytes
new1.11 KB

This patch addresses #3.1. Per IRC discussion, we're going to defer handling #3.2 to #2646286: Remove selection logic/conditions from the BlockDisplayVariant

  • EclipseGc committed a73040e on 8.x-3.x authored by dsnopek
    Issue #2646284 by dsnopek: Move panels block plugin schema to CTools
    
dsnopek’s picture

Status: Needs review » Fixed

Status: Fixed » Needs work

The last submitted patch, 4: ctools-block-schema-2646284-4.patch, failed testing.

dsnopek’s picture

Status: Needs work » Fixed

Silly testbot! You can't apply a patch after it's been committed! :-)

Status: Fixed » Closed (fixed)

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