Active
Project:
Display Builder
Version:
1.0.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
1 Oct 2026 at 08:49 UTC
Updated:
1 Oct 2026 at 08:55 UTC
Jump to comment: Most recent
Child of #3624396: Plan: Harden InstanceInterface, IslandInterface and DisplayBuildableInterface as public API before RC1. Three names leave the module's namespace or its conventions, and get expensive once 1.0 ships:
hook_island_info_alter(). Hooks share one namespace, and drupal.org has a project named island, whose hooks are hook_island_*.plugin.manager.db_island, the one service ID with an abbreviation, where "db" reads as database.display_builder.* and their submodule equivalents. Core gives services their class name as ID, and keeps string IDs for plugin managers only.onUpdate, onAttachToRoot and so on: event names are global, and core prefixes them with the module. Their docblocks also promise more than happens: "Fired when a new node is attached directly at root level", while they fire only from the builder UI, never for a change made through InstanceInterface.hook_island_info_alter() becomes hook_display_builder_island_info_alter().plugin.manager.db_island becomes plugin.manager.display_builder_island. plugin.manager.display_buildable stays: it already follows the convention, and the instance's buildable field stores it.island_plugins becomes display_builder_island_plugins.display_builder_ai, change and release at the same time, and require the release that renames.display_builder.api.php, as #3627266: Mark the API boundary: @api on what contrib extends, @internal on the rest plans for both alter hooks.DisplayBuilderEvents constants take the module prefix: display_builder.update, display_builder.attach_to_root, display_builder.attach_to_slot, display_builder.move, display_builder.active, display_builder.delete, display_builder.history_change, display_builder.restore, display_builder.revert, display_builder.publish, display_builder.preset_save. The constant names stay, so a subscriber using them is unaffected. No code relies on the values: the island fan-out maps each constant to a method of its own.InstanceInterface outside the builder fires none of them.IslandInfoHooks and StylesIslandTest.display_builder_ai: AddComponent and SetLayout.None.
hook_island_info_alter() renamed hook_display_builder_island_info_alter().plugin.manager.db_island renamed plugin.manager.display_builder_island.display_builder.*, display_builder_entity_view.*, display_builder_page_layout.* and display_builder_views.* replaced by class names.DisplayBuilderEvents values prefixed with display_builder., constant names unchanged.None. The island discovery cache rebuilds under its new key.
Comments
Comment #2
mogtofu33 commented