Move build alteraion from ProfileViewBuilder to IslandInterface

Created on 20 October 2025, 4 days ago

Problem/Motivation

We have some logic specific to collaboration island in ProfileViewBuilder:

    // Enable SSE if the active users button is enabled.
    if (isset($islands_enabled_sorted['button']['collaboration'])) {
      $build['#attributes'] = [
        'hx-ext' => 'sse',
        'sse-connect' => Url::fromRoute('display_builder.api_sse', ['builder_id' => $builder_id])->toString(),
      ];
      // We don't attach it from the island plugin because the island doesn't
      // always render something in the toolbar.
      $build['#attached']['library'][] = 'display_builder/htmx_sse';
    }

This is not good because all island plugin logic must reside in the plugin executable.

Proposed resolution

Add a method in IslandInterface. Which name? Let's not forget we may extract the Islands API out of display builder one day, as a generic, sharable, API.

Implements the interface in collaboration plugin.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

UI/UX/Islands

Created by

🇫🇷France pdureau Paris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024