Problem/Motivation

Some current and planned tasks may be related:

Proposed resolution

1. Pass a full InstanceInterface between BuildePanel

Instead of string $instance_id as we already did in #3578999: Pass existing Instance object to islands methods instead of loading it again. This is necessary to be bale to send the current state (so, the instance entity) to the new island plugin.

This will also help consolidating the logic, because InstanceInterface is more specific than string. Also, this will remove the last remaining ambiguity between instance/node/builder terminology (following #3538360: Profile & Instance naming normalization.

We may extract this work to a dedicated ticket if it makes review simpler.

2. Slot handlers as island plugins

2 steps:

  1. Add a new slot handler island typeIn IslandType, in ProfileForm...
  2. Move BuilderPanel::buildComponentSlot() logic to its own island
#[Island(
  id: 'dropzone',
  enabled_by_default: TRUE,
  label: new TranslatableMarkup('Dropzone'),
  description: new TranslatableMarkup('...'),
  type: IslandType::Slot,
)]
class Dropzone extends IslandPluginBase {

Do we also introduce a mechanism which force at least one island to be activated for a specific type?

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

Issue summary: View changes

pdureau’s picture

Status: Active » Needs work

Let's start

pdureau’s picture

Exciting progress.

I believe the MR is now a suitable proposal, with the expected:

  1. Add a new slot handler island typeIn IslandType, in ProfileForm...
  2. Move BuilderPanel::build(), BuilderPanel::buildComponentSlot() and LayersPanel::buildSingleComponent() logic to the new Dropzone island

And also:

  • a new SlottablePanelInterface for BuilderPanel & LayersPanel

Needs work:

pdureau’s picture

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

I moved some of the work to #3606874: Rename and document data-instance-id attribute, I rebased the MR, and the pipeline is now magically green.

So, this review must be done after #3606874: Rename and document data-instance-id attribute is merged.