diff -u b/core/modules/outside_in/outside_in.module b/core/modules/outside_in/outside_in.module --- b/core/modules/outside_in/outside_in.module +++ b/core/modules/outside_in/outside_in.module @@ -148,15 +148,28 @@ * Implements hook_block_alter(). */ function outside_in_block_alter(&$definitions) { - if (!empty($definitions['system_branding_block'])) { - $definitions['system_branding_block']['forms']['off_canvas'] = SystemBrandingOffCanvasForm::class; - } - - // Since menu blocks use derivatives, check the definition ID instead of - // relying on the plugin ID. foreach ($definitions as &$definition) { - if ($definition['id'] === 'system_menu_block') { - $definition['forms']['off_canvas'] = SystemMenuOffCanvasForm::class; + switch ($definition['id']) { + // Don't provide Outside-In capabilities for these two very special blocks. + // @see \Drupal\Core\Block\MainContentBlockPluginInterface + // @see \Drupal\Core\Block\TitleBlockPluginInterface + case 'page_title_block': + case 'system_main_block': + continue; + + // Use specialized off-canvas forms when they're available. + // @todo move these into the corresponding block plugin annotations when Outside In becomes stable. + case 'system_menu_block': + $definition['forms']['off_canvas'] = SystemMenuOffCanvasForm::class; + break; + case 'system_branding_block': + $definition['forms']['off_canvas'] = SystemBrandingOffCanvasForm::class; + break; + + // Otherwise fall back to the default off-canvas form. + default: + $definition['forms']['off_canvas'] = BlockEntityOffCanvasForm::class; + break; } } }