diff --git a/core/modules/outside_in/outside_in.api.php b/core/modules/outside_in/outside_in.api.php index ba88f0a910..541a849f30 100644 --- a/core/modules/outside_in/outside_in.api.php +++ b/core/modules/outside_in/outside_in.api.php @@ -17,12 +17,13 @@ * - Limits the form items displayed in the Settings Tray to only items * that affect the content of the rendered block, or * - Adds additional form items to edit configuration that is rendered by the - * block. + * block. @see \Drupal\outside_in\Form\SystemBrandingOffCanvasForm which + * adds site name and slogan configuration. + * * These can be used to provide a better experience, so that the Settings Tray * only displays what the user will expect to change when editing the block. * - * Each block plugin can specify which form to use in the Settings Tray dialog - * in their plugin annotation: + * Each block plugin can specify which form is to be used by n some cases, a block' in their plugin annotation: * @code * forms = { * "off_canvas" = "\Drupal\some_module\Form\MyBlockOffCanvasForm", @@ -49,6 +50,8 @@ * }, * @encode * + * @see outside_in_block_alter() + * * Therefore, the entire Settings Tray API is just this annotation: it controls * what the Settings Tray does for a given block. * diff --git a/core/modules/outside_in/outside_in.module b/core/modules/outside_in/outside_in.module index 20bc350d3b..0fa32890c0 100644 --- a/core/modules/outside_in/outside_in.module +++ b/core/modules/outside_in/outside_in.module @@ -97,10 +97,9 @@ function outside_in_preprocess_block(&$variables) { // Only blocks that have an off_canvas form will have a "Quick Edit" link. We // could wait for the contextual links to be initialized on the client side, // and then add the class and data- attribute below there (via JavaScript). - // But that means that it will be impossible to show Settings Tray's clickable - // regions immediately when the page loads. When latency is high, this will - // cause flicker. Therefore, for now, we choose to duplicate some logic to - // guarantee a smooth experience. + // But that would mean that it would be impossible to show Settings Tray's + // clickable regions immediately when the page loads. When latency is high, + // this will cause flicker. // @see \Drupal\outside_in\Access\BlockPluginHasOffCanvasFormAccessCheck /** @var \Drupal\outside_in\Access\BlockPluginHasOffCanvasFormAccessCheck $access_checker */ $access_checker = \Drupal::service('access_check.outside_in.block.off_canvas_form'); @@ -188,7 +187,7 @@ function outside_in_block_alter(&$definitions) { break; // Otherwise, use the block plugin's normal form rather than - // a custom form for Outside In. + // a custom form for Settings Tray. default: $definition['forms']['off_canvas'] = $definition['class']; break; diff --git a/core/modules/outside_in/src/Access/BlockPluginHasOffCanvasFormAccessCheck.php b/core/modules/outside_in/src/Access/BlockPluginHasOffCanvasFormAccessCheck.php index e8136d609f..78c3167d5d 100644 --- a/core/modules/outside_in/src/Access/BlockPluginHasOffCanvasFormAccessCheck.php +++ b/core/modules/outside_in/src/Access/BlockPluginHasOffCanvasFormAccessCheck.php @@ -40,7 +40,6 @@ public function access(BlockInterface $block) { * The access result. * * @see outside_in_preprocess_block() - * @todo Remove when outside_in_preprocess_block() is removed. */ public function accessBlockPlugin(BlockPluginInterface $block_plugin) { return AccessResult::allowedIf($block_plugin instanceof PluginWithFormsInterface && $block_plugin->hasFormClass('off_canvas'));