diff --git a/core/modules/toolbar/config/tour.tour.toolbar.yml b/core/modules/toolbar/config/tour.tour.toolbar.yml
index cbe741d..2143a28 100644
--- a/core/modules/toolbar/config/tour.tour.toolbar.yml
+++ b/core/modules/toolbar/config/tour.tour.toolbar.yml
@@ -2,11 +2,12 @@ id: frontpage
module: toolbar
label: 'Frontpage'
langcode: en
+status: true
routes:
- route_name: view.frontpage.page_1
tips:
- page-overview:
- id: main-wrapper
+ toolbar-page-overview:
+ id: toolbar-page-overview
plugin: text
label: 'An overview of your site administration'
body: 'In this tour, you will learn where to access site set up and administration options.'
@@ -19,19 +20,19 @@ tips:
weight: 2
attributes:
data-id: 'toolbar-bar'
- toolbar-menu:
- id: toolbar-menu-administration
+ toolbar-menu-admin:
+ id: toolbar-menu-admin
plugin: text
label: 'Menu'
- body: "Clicking the 'manage' button hides or displays the additional menu options."
+ body: 'Clicking the manage button hides or displays the additional menu options.'
weight: 3
attributes:
- data-class: 'toolbar-menu-administration'
+ data-class: 'toolbar-icon-menu'
toolbar-link-admin-content:
id: toolbar-link-admin-content
plugin: text
label: 'Content'
- body: 'Manage all website content and comments from here.'
+ body: 'Manage all site content and comments.'
weight: 4
attributes:
data-id: 'toolbar-link-admin-content'
@@ -39,7 +40,7 @@ tips:
id: toolbar-link-admin-structure
plugin: text
label: 'Structure'
- body: 'This is where you can set the structure of various parts of your website. Create and manage content types, menus, blocks, taxonomies, and more from here.'
+ body: 'This is where you can set the structure of various parts of your website. Create and manage content types, menus, blocks, taxonomies, and more.'
weight: 5
attributes:
data-id: 'toolbar-link-admin-structure'
@@ -47,7 +48,7 @@ tips:
id: toolbar-link-admin-appearance
plugin: text
label: 'Appearance'
- body: "This configuration page lets you select a graphical layer or 'theme' for your website. Use it to enable and configure installed Drupal themes."
+ body: 'This configuration page lets you select a graphical layer or theme for your website. Use it to enable and configure installed Drupal themes.'
weight: 6
attributes:
data-id: 'toolbar-link-admin-appearance'
@@ -55,7 +56,7 @@ tips:
id: toolbar-link-admin-extend
plugin: text
label: 'Extend'
- body: "This is the 'modules' page where you can enable new site functionality. Extend the functionality of your site by enabling, disabling or updating modules."
+ body: 'This is the modules page where you can enable new site functionality. Extend the functionality of your site by enabling, disabling or updating modules.'
weight: 7
attributes:
data-id: 'toolbar-link-admin-modules'
@@ -87,23 +88,23 @@ tips:
id: toolbar-link-admin-help
plugin: text
label: 'Help'
- body: 'Module help topics.'
+ body: "More detailed information on the site's currently modules installed."
weight: 11
attributes:
data-id: 'toolbar-link-admin-help'
- blocks:
- id: blocks
+ toolbar-search-block:
+ id: toolbar-search-block
plugin: text
label: 'Blocks'
- body: 'Blocks can be configured and positioned within areas of your theme(s). This is an example of a block with a search tool. Click the edit icon to configure an individual block, or return to the Structure menu to see all blocks.'
+ body: 'Blocks can be configured and positioned within areas of your theme(s). This is an example of a block with a search tool. Click the edit icon to configure an individual block, or go to the block layout page to see all blocks.'
weight: 12
attributes:
- data-class: 'block-search'
- page-frontpage:
- id: content
+ data-class: 'search-block-form'
+ toolbar-page-frontpage:
+ id: toolbar-page-frontpage
plugin: text
label: 'The front page'
body: 'The front page of your site can either be a single piece of content or a dynamically-created list of content.'
weight: 13
attributes:
- data-id: 'content'
+ data-class: 'view-frontpage'
diff --git a/core/modules/toolbar/lib/Drupal/toolbar/Tests/Tour/FrontpageTourTest.php b/core/modules/toolbar/lib/Drupal/toolbar/Tests/Tour/FrontpageTourTest.php
new file mode 100644
index 0000000..b977bf8
--- /dev/null
+++ b/core/modules/toolbar/lib/Drupal/toolbar/Tests/Tour/FrontpageTourTest.php
@@ -0,0 +1,90 @@
+drupalGet('admin/structure/block');
+ $this->drupalPlaceBlock('search_form_block');
+ }
+
+ /**
+ * The pages we want to test for tour tip coverage.
+ *
+ * @var array
+ * A list of pages to test.
+ */
+ protected $tips = array(
+ 'node' => array(),
+ );
+
+ public static function getInfo() {
+ return array(
+ 'name' => 'Frontpage tour tests',
+ 'description' => 'Tests the frontpage tour.',
+ 'group' => 'Tour',
+ );
+ }
+}
diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module
index 0f58cb2..1fd3e7e 100644
--- a/core/modules/toolbar/toolbar.module
+++ b/core/modules/toolbar/toolbar.module
@@ -599,3 +599,21 @@ function _toolbar_clear_user_cache($uid = NULL) {
}
}
}
+
+/**
+ * Replace the toolbar tour tips with real URL paths based on routes.
+ *
+ * @param array $tour_tips
+ * Array of \Drupal\tour\TipPluginInterface items.
+ * @param \Drupal\Core\Entity\EntityInterface $entity
+ * The tour which contains the $tour_tips.
+ */
+function toolbar_tour_tips_alter(array &$tour_tips, Drupal\Core\Entity\EntityInterface $entity) {
+ foreach ($tour_tips as $tour_tip) {
+ if ($tour_tip->get('id') == 'toolbar-search-block') {
+ $body = $tour_tip->get('body');
+ $body = str_replace('[block.admin_display]', \Drupal::url('block.admin_display'), $body);
+ $tour_tip->set('body', $body);
+ }
+ }
+}