Skip to content
Snippets Groups Projects

Issue #3405660: Remove tour from themes

Closed Stephen Mustgrave requested to merge issue/drupal-3405660:3405660-remove-tour-from into 11.x
3 unresolved threads

Closes #3405660

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Stephen Mustgrave added 63 commits

    added 63 commits

    • efd1f0db...d16f4915 - 61 commits from branch project:11.x
    • bb4f70e2 - Merge branch '11.x' of git.drupal.org:project/drupal into 3405660-remove-tour-from
    • 224f3885 - Address feedback

    Compare with previous version

  • Stephen Mustgrave added 67 commits

    added 67 commits

    • 224f3885...5bf40faa - 66 commits from branch project:11.x
    • 4379132c - Merge branch '11.x' of git.drupal.org:project/drupal into 3405660-remove-tour-from

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • assigned to @quietone

  • Wim Leers
    Wim Leers @wimleers started a thread on the diff
  • 115 115 function tour_tour_update($entity) {
    116 116 \Drupal::service('plugin.manager.tour.tip')->clearCachedDefinitions();
    117 117 }
    118
    119 /**
    120 * Implements hook_library_info_alter().
    121 */
    122 function tour_library_info_alter(&$libraries, $extension) {
    123 if ($extension === 'tour') {
    124 $theme = \Drupal::service('theme.manager')->getActiveTheme()->getName();
    125 if ($theme === 'claro') {
    126 $libraries['tour']['dependencies'][] = 'tour/tour-claro-styling';
    127 }
    128 elseif ($theme === 'stable9') {
    129 $libraries['tour']['dependencies'][] = 'tour/tour-stable9-styling';
    130 }
    • Comment on lines +123 to +130

      :thinking:

      1. :white_check_mark: Will this work correctly on a site that has both of these themes in use? I can't find anything in theme.api.php about this being computed per theme. → but \Drupal\Core\Asset\AssetResolver::getCssAssets() clearly does that: // Add the theme name to the cache key since themes may implement :thumbsup:
      2. What about themes whose base theme is stable9? :thinking:
    • Please register or sign in to reply
  • Stephen Mustgrave added 181 commits

    added 181 commits

    • ef0ffdbb...501e1ed2 - 179 commits from branch project:11.x
    • e70919de - Merge branch '11.x' of git.drupal.org:project/drupal into 3405660-remove-tour-from
    • d0204ace - Add base theme

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • quietone added 62 commits

    added 62 commits

    Compare with previous version

  • 115 115 function tour_tour_update($entity) {
    116 116 \Drupal::service('plugin.manager.tour.tip')->clearCachedDefinitions();
    117 117 }
    118
    119 /**
    120 * Implements hook_library_info_alter().
    121 */
    122 function tour_library_info_alter(&$libraries, $extension) {
    123 if ($extension === 'tour') {
    124 $theme = \Drupal::service('theme.manager')->getActiveTheme()->getName();
    125 $base_theme = FALSE;
    126 if ($theme && !\Drupal::service('theme_handler')->listInfo()[$theme]) {
  • Stephen Mustgrave added 34 commits

    added 34 commits

    • 53f1c92d...6d9a73fe - 32 commits from branch project:11.x
    • 3cd845b1 - Merge branch '11.x' of git.drupal.org:project/drupal into 3405660-remove-tour-from
    • b9648548 - Loop through many themes

    Compare with previous version

  • 115 115 function tour_tour_update($entity) {
    116 116 \Drupal::service('plugin.manager.tour.tip')->clearCachedDefinitions();
    117 117 }
    118
    119 /**
    120 * Implements hook_library_info_alter().
    121 */
    122 function tour_library_info_alter(&$libraries, $extension): void {
    123 if ($extension === 'tour') {
    124 $themes = [];
    125 $current_theme = \Drupal::service('theme.manager')->getActiveTheme()->getName();
    126 $themes[] = $current_theme;
    127 if ($current_theme && !\Drupal::service('theme_handler')->listInfo()[$current_theme]) {
  • Stephen Mustgrave added 7 commits

    added 7 commits

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Please register or sign in to reply
    Loading