Skip to content
Snippets Groups Projects
Commit 9c8a84bf authored by catch's avatar catch
Browse files

Revert "Issue #3405660 by smustgrave, quietone, Wim Leers, larowlan, lauriii:...

Revert "Issue #3405660 by smustgrave, quietone, Wim Leers, larowlan, lauriii: Remove tour from themes"

This reverts commit 3951fa4d.
parent 97c49565
No related branches found
No related tags found
No related merge requests found
Showing
with 27 additions and 51 deletions
...@@ -16,17 +16,3 @@ tour-styling: ...@@ -16,17 +16,3 @@ tour-styling:
css: css:
component: component:
css/tour.module.css: { media: screen } css/tour.module.css: { media: screen }
tour-claro-styling:
version: VERSION
css:
theme:
css/theme/claro-tour.theme.css: {}
tour-stable9-styling:
version: VERSION
js:
js/theme/tour.js: {}
css:
theme:
css/theme/stable9-tour.module.css: {}
...@@ -115,23 +115,3 @@ function tour_tour_insert($entity) { ...@@ -115,23 +115,3 @@ function tour_tour_insert($entity) {
function tour_tour_update($entity) { function tour_tour_update($entity) {
\Drupal::service('plugin.manager.tour.tip')->clearCachedDefinitions(); \Drupal::service('plugin.manager.tour.tip')->clearCachedDefinitions();
} }
/**
* Implements hook_library_info_alter().
*/
function tour_library_info_alter(&$libraries, $extension) {
if ($extension === 'tour') {
$theme = \Drupal::service('theme.manager')->getActiveTheme()->getName();
$base_theme = FALSE;
if ($theme && !\Drupal::service('theme_handler')->listInfo()[$theme]) {
$base_theme = \Drupal::service('theme_handler')->listInfo()[$theme]->base_theme;
}
if (in_array('claro', [$theme, $base_theme])) {
$libraries['tour']['dependencies'][] = 'tour/tour-claro-styling';
}
elseif (in_array('stable9', [$theme, $base_theme])) {
$libraries['tour']['dependencies'][] = 'tour/tour-stable9-styling';
}
}
}
...@@ -207,10 +207,7 @@ protected function getAllLibraries() { ...@@ -207,10 +207,7 @@ protected function getAllLibraries() {
$extensions = $modules; $extensions = $modules;
$module_list = array_keys($modules); $module_list = array_keys($modules);
sort($module_list); sort($module_list);
// Remove deprecated module Tour. $this->assertEquals($this->allModules, $module_list, 'All core modules are installed.');
$module_list = array_diff($module_list, ['tour']);
$all_modules = array_diff($this->allModules, ['tour']);
$this->assertEquals($all_modules, $module_list, 'All core modules are installed.');
$themes = $this->themeHandler->listInfo(); $themes = $this->themeHandler->listInfo();
$extensions += $themes; $extensions += $themes;
...@@ -219,8 +216,7 @@ protected function getAllLibraries() { ...@@ -219,8 +216,7 @@ protected function getAllLibraries() {
$this->assertEquals($this->allThemes, $theme_list, 'All core themes are installed.'); $this->assertEquals($this->allThemes, $theme_list, 'All core themes are installed.');
$libraries['core'] = $this->libraryDiscovery->getLibrariesByExtension('core'); $libraries['core'] = $this->libraryDiscovery->getLibrariesByExtension('core');
// Remove deprecated module Tour.
unset($extensions['tour']);
foreach ($extensions as $extension_name => $extension) { foreach ($extensions as $extension_name => $extension) {
$library_file = $extension->getPath() . '/' . $extension_name . '.libraries.yml'; $library_file = $extension->getPath() . '/' . $extension_name . '.libraries.yml';
if (is_file($this->root . '/' . $library_file)) { if (is_file($this->root . '/' . $library_file)) {
......
...@@ -26,9 +26,6 @@ class Stable9LibraryOverrideTest extends StableLibraryOverrideTestBase { ...@@ -26,9 +26,6 @@ class Stable9LibraryOverrideTest extends StableLibraryOverrideTestBase {
'media/drupal.media-icon', 'media/drupal.media-icon',
'options/drupal.options-icon', 'options/drupal.options-icon',
'telephone/drupal.telephone-icon', 'telephone/drupal.telephone-icon',
'tour/tour-styling',
'tour/tour-claro-styling',
'tour/tour-stable9-styling',
]; ];
/** /**
......
...@@ -121,15 +121,10 @@ protected function getAllLibraries() { ...@@ -121,15 +121,10 @@ protected function getAllLibraries() {
$modules = \Drupal::moduleHandler()->getModuleList(); $modules = \Drupal::moduleHandler()->getModuleList();
$module_list = array_keys($modules); $module_list = array_keys($modules);
sort($module_list); sort($module_list);
// Remove deprecated module Tour. $this->assertEquals($this->allModules, $module_list, 'All core modules are installed.');
$module_list = array_diff($module_list, ['tour']);
$all_modules = array_diff($this->allModules, ['tour']);
$this->assertEquals($all_modules, $module_list, 'All core modules are installed.');
$libraries['core'] = $this->libraryDiscovery->getLibrariesByExtension('core'); $libraries['core'] = $this->libraryDiscovery->getLibrariesByExtension('core');
// Remove deprecated module Tour.
unset($modules['tour']);
foreach ($modules as $module_name => $module) { foreach ($modules as $module_name => $module) {
$library_file = $module->getPath() . '/' . $module_name . '.libraries.yml'; $library_file = $module->getPath() . '/' . $module_name . '.libraries.yml';
if (is_file($this->root . '/' . $library_file)) { if (is_file($this->root . '/' . $library_file)) {
......
...@@ -128,6 +128,8 @@ libraries-extend: ...@@ -128,6 +128,8 @@ libraries-extend:
- claro/system.admin - claro/system.admin
core/drupal.autocomplete: core/drupal.autocomplete:
- claro/autocomplete - claro/autocomplete
tour/tour-styling:
- claro/tour-styling
shortcut/drupal.shortcut: shortcut/drupal.shortcut:
- claro/drupal.shortcut - claro/drupal.shortcut
core/drupal.ajax: core/drupal.ajax:
......
...@@ -139,6 +139,12 @@ drupal.node.preview: ...@@ -139,6 +139,12 @@ drupal.node.preview:
theme: theme:
css/components/node-preview.css: {} css/components/node-preview.css: {}
tour-styling:
version: VERSION
css:
theme:
css/theme/tour.theme.css: {}
media-form: media-form:
version: VERSION version: VERSION
css: css:
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
position: relative; position: relative;
/** /**
* Ensure mobile site header is always above other elements including * Ensure mobile site header is always above other elements including
* contextual links. * contextual links, and Tour.
*/ */
z-index: 101; z-index: 101;
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
position: relative; position: relative;
/** /**
* Ensure mobile site header is always above other elements including * Ensure mobile site header is always above other elements including
* contextual links. * contextual links, and Tour.
*/ */
z-index: 101; z-index: 101;
......
File moved
...@@ -261,6 +261,11 @@ libraries-override: ...@@ -261,6 +261,11 @@ libraries-override:
state: state:
css/toolbar.menu.css: css/toolbar/toolbar.menu.css css/toolbar.menu.css: css/toolbar/toolbar.menu.css
tour/tour-styling:
css:
component:
css/tour.module.css: css/tour/tour.module.css
update/drupal.update.admin: update/drupal.update.admin:
css: css:
theme: theme:
...@@ -295,3 +300,7 @@ libraries-override: ...@@ -295,3 +300,7 @@ libraries-override:
css: css:
theme: theme:
css/field_ui_display_mode_table.css: css/field_ui/field_ui_display_mode_table.css css/field_ui_display_mode_table.css: css/field_ui/field_ui_display_mode_table.css
libraries-extend:
tour/tour:
- stable9/tour
...@@ -8,3 +8,8 @@ normalize: ...@@ -8,3 +8,8 @@ normalize:
css: css:
base: base:
css/core/assets/vendor/normalize-css/normalize.css: { weight: -20 } css/core/assets/vendor/normalize-css/normalize.css: { weight: -20 }
tour:
version: VERSION
js:
js/tour.js: {}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment