Problem/Motivation

While working on #3573905: Simplify DisplayBuildableInterface, i have noticed than removing InstanceStorageInterface::createFromImplementation() could allow us to replace "Initialization of the display builder." step log by something specific to each integrations

Proposed resolution

Add specific first step log sentence for each implementation:

  • page_layout: "Initialization from existing Page Layout configuration." or "Import from Block Layout configuration."
  • entity_view: "Initialization from existing Entity View Display configuration." or "Import from Layout Builder or Manage Display configuration."
  • entity_view_override: "Initialization from existing content." or "Copy from Entity View Dispaly configuration." or "Import from Layout Builder override."
  • view_display: "Initialization from existing View configuration" or Initialization from default configuration.

Those sentences can be changed later if there are better proposals, the main goal of this change is to add this "feature" while simplifying the implementation. A win-win :)

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

Title: Specific first step logs after instance initialization » Specific first log messages according to the data source
Category: Task » Feature request
Issue summary: View changes

pdureau’s picture

Assigned: pdureau » mogtofu33
Status: Active » Needs review
pdureau’s picture

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

oh, a playwright fail. I didn't see it initially because the job didn't get executed n previous run.

I will have a look

pdureau’s picture

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

It looks OK now

By removing InstanceStorageInterface, this ticket is also helping the current work on RevionableInterface.

pdureau’s picture

Display Builder Dev Tools need to be updated after this merge:

diff --git a/src/Plugin/display_builder/Buildable/StandaloneEntity.php b/src/Plugin/display_builder/Buildable/StandaloneEntity.php
index d0b72a5..b9b2ca4 100644
--- a/src/Plugin/display_builder/Buildable/StandaloneEntity.php
+++ b/src/Plugin/display_builder/Buildable/StandaloneEntity.php
@@ -12,7 +12,6 @@ use Drupal\Core\StringTranslation\TranslatableMarkup;
 use Drupal\Core\Url;
 use Drupal\display_builder\Attribute\DisplayBuildable;
 use Drupal\display_builder\DisplayBuildablePluginBase;
-use Drupal\display_builder\InstanceStorageInterface;
 
 /**
  * Plugin implementation of the display_buildable for standalone instances.
@@ -104,8 +103,9 @@ final class StandaloneEntity extends DisplayBuildablePluginBase {
   /**
    * {@inheritdoc}
    */
-  public static function collectInstances(InstanceStorageInterface $instanceStorage, ?EntityTypeManagerInterface $entityTypeManager = NULL): array {
+public static function collectInstances(?EntityTypeManagerInterface $entityTypeManager = NULL): array {
     $instances = [];
+    $instanceStorage = $entityTypeManager->getStorage('display_builder_instance');
 
     /** @var array<string, \Drupal\display_builder\Inst

I create a dedicated ticket?

mogtofu33’s picture

Assigned: mogtofu33 » Unassigned
Status: Needs review » 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.

  • pdureau committed 1460d57d on 1.0.x
    feat: #3576918 Specific first log messages according to the data source
    

Status: Fixed » Closed (fixed)

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