diff --git a/core/modules/settings_tray/settings_tray.api.php b/core/modules/settings_tray/settings_tray.api.php index 4516127..b435d8c 100644 --- a/core/modules/settings_tray/settings_tray.api.php +++ b/core/modules/settings_tray/settings_tray.api.php @@ -10,6 +10,29 @@ * @{ * Settings Tray API * + * @section sec_overview Overview and terminology + * + * The goal of the Settings Tray module is to make administering blocks easier, + * and therefore to make the site building experience faster and more pleasant. + * + * It achieves this by building on the infrastructure that the Contextual + * Links module provides: Settings Tray provides a "Quick Edit" contextual link + * for blocks. Clicking this contextual link opens the Settings Tray, which + * allows to change the rendered contents of the block by showing all relevant + * configuration (minus block visibility conditions). This means blocks can be + * modified without leaving the page. + * + * For example: + * - for every block, one can configure whether to display the block title or + * not, and optionally override it (block configuration) + * - for menu blocks, one can configure which menu levels to display (block + * configuration) but also the menu itself (menu configuration) + * - for the site branding block, one can change which branding elements to + * display (block configuration), but also the site name and slogan (simple + * configuration) + * + * The Settings Tray uses a variant of a standard dialog: an off-canvas dialog. + * * @section sec_api The API: the form in the Settings Tray * * By default, every block will show its built-in form in the Settings Tray. diff --git a/core/modules/settings_tray/settings_tray.info.yml b/core/modules/settings_tray/settings_tray.info.yml index f25420f..fd2db01 100644 --- a/core/modules/settings_tray/settings_tray.info.yml +++ b/core/modules/settings_tray/settings_tray.info.yml @@ -1,6 +1,6 @@ name: 'Settings Tray' type: module -description: 'Provides the ability to change the most common configuration from the Drupal front-end.' +description: 'In-place editing of block configuration.' package: Core (Experimental) version: VERSION core: 8.x diff --git a/core/modules/settings_tray/settings_tray.module b/core/modules/settings_tray/settings_tray.module index 7017439..bb1065b 100644 --- a/core/modules/settings_tray/settings_tray.module +++ b/core/modules/settings_tray/settings_tray.module @@ -7,6 +7,7 @@ use Drupal\Core\Asset\AttachedAssetsInterface; use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Url; use Drupal\settings_tray\Block\BlockEntityOffCanvasForm; use Drupal\settings_tray\Form\SystemBrandingOffCanvasForm; use Drupal\settings_tray\Form\SystemMenuOffCanvasForm; @@ -18,10 +19,14 @@ function settings_tray_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.settings_tray': $output = '

' . t('About') . '

'; - $output .= '

' . t('The Settings Tray module provides an \'edit mode\' in which clicking on a block opens a slide-out tray which allows configuration to be altered without leaving the page.For more information, see the online documentation for the Settings Tray module.', [':settings-tray-documentation' => 'https://www.drupal.org/documentation/modules/settings_tray']) . '

'; + $output .= '

' . t('The Settings Tray module allows users with the Administer blocks and Use contextual links permissions to edit blocks without visiting a separate page. For more information, see the online documentation for the Settings Tray module.', [':handbook_url' => 'https://www.drupal.org/documentation/modules/settings_tray', ':administer_block_permission' => \Drupal::url('user.admin_permissions', [], ['fragment' => 'module-block']), ':contextual_permission' => \Drupal::url('user.admin_permissions', [], ['fragment' => 'module-contextual'])]) . '

'; $output .= '

' . t('Uses') . '

'; $output .= '
'; - $output .= '
' . t('Editing blocks on the same page in the slide-out tray') . '
'; + $output .= '
' . t('Editing blocks in place') . '
'; + $output .= '
'; + $output .= '

' . t('To edit blocks in place, you can either enable \'edit mode\' in the toolbar and click the block, or choosing Quick edit from the contextual links of a block (see the Contextual Links module help for more information about how to use contextual links).', [':contextual' => \Drupal::url('help.page', ['name' => 'contextual'])]) . '

'; + $output .= '

' . t('This will open the Settings Tray for this block, where a compact form will be displayed, with configuration that controls what the block shows. After saving, the page reloads, and the effects are visible.') . '

'; + $output .= '
'; $output .= '
'; return ['#markup' => $output]; }