Remove tour from themes

Created on 2 December 2023, 7 months ago
Updated 28 February 2024, 4 months ago

Problem/Motivation

There are usages of tour in claro, olivero, and stable9 that need to be moved so the module can be deprecated.

Steps to reproduce

$ grep -riw tour core/themes | awk -F: '{print $1}' | sort -u | nl
     1  core/themes/claro/claro.info.yml
     2  core/themes/claro/claro.libraries.yml
     3  core/themes/claro/css/theme/tour.theme.css
     4  core/themes/claro/css/theme/tour.theme.pcss.css
     5  core/themes/olivero/css/components/site-header.css
     6  core/themes/olivero/css/components/site-header.pcss.css
     7  core/themes/stable9/css/tour/tour.module.css
     8  core/themes/stable9/js/tour.js
     9  core/themes/stable9/stable9.info.yml
    10  core/themes/stable9/stable9.libraries.yml

Proposed resolution

This issue will be postponed till 11.x where it will be merged to just delete the CSS

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Closed: duplicate

Version

11.0 🔥

Component
Tour 

Last updated 13 days ago

Created by

🇳🇿New Zealand quietone New Zealand

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @quietone
  • First commit to issue fork.
  • Merge request !5657Issue #3405660: Remove tour from themes → (Closed) created by smustgrave
  • Status changed to Needs review 7 months ago
  • 🇺🇸United States smustgrave

    So I moved the CSS to their own libraries so they should still function with these themes and are still there for when we move tour back.

  • Pipeline finished with Failed
    7 months ago
    Total: 981s
    #58366
  • Pipeline finished with Success
    7 months ago
    Total: 516s
    #58372
  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    I've pinged FEFM about this. I'm not sure if this needs to be done at all. I don't think it prevents removal of the module but I'll get them to confirm.

  • 🇺🇸United States smustgrave

    So just for the record did this approach so it will still work with each theme and be easier to re add later on

  • 🇫🇮Finland lauriii Finland

    I'm fairly sure we've done something similar before but I can't remember where. I tried to look at couple potential places but didn't find anything.

    I'm removing the tag because I don't think that the issue needs FEFM review given that it's essentially just an approach for the contrib module. I think it's enough that the approach is confirmed by @smustgrave who is the maintainer of the contributed module.

  • Status changed to RTBC 7 months ago
  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    In that case this is RTBC then

    Thanks

  • Status changed to Needs work 6 months ago
  • 🇬🇧United Kingdom catch

    This needs a rebase for a conflict in claro.libraries.yml

    I think it ought to be possible to add the additional files into the claro libraries definitions using hook_library_info_alter() - this would be the module equivalent of libraries extend - the main advantage of that is it runs on library info build rather than every HTML request (and it might mean the files aren't added when the tour libraries aren't there, although if they're every page then that'll be the same anyway). However optional whether we do that since the existing approach successfully encapsulates the tour-specific stuff in the module and should work fine.

  • Status changed to Needs review 6 months ago
  • 🇺🇸United States smustgrave

    So like this?

  • Pipeline finished with Success
    6 months ago
    Total: 630s
    #66034
  • 🇬🇧United Kingdom catch

    It might need the files added directly to the end of the css or js entries - assuming that they need to override tour's own CSS, if it's a dependency it'll be loaded before. Didn't test this though and don't know exactly what they're doing though.

  • Pipeline finished with Canceled
    6 months ago
    Total: 94s
    #71624
  • Pipeline finished with Canceled
    6 months ago
    Total: 89s
    #71626
  • Pipeline finished with Success
    6 months ago
    Total: 539s
    #71630
  • Status changed to Needs work 5 months ago
  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    Last one for 🌱 [Meta] Tasks to deprecate Tour module Active 🚀

    Found two potential regressions in the MR. Eliminated one, leaving just the one — curious what y'all think.

  • Status changed to Needs review 5 months ago
  • 🇺🇸United States smustgrave

    Added a way to check base theme. But not sure we should worry too much about contrib themes here as we are well in advance announcing Tour is deprecated. Contrib themes should update their code to handle that.

  • Pipeline finished with Failed
    5 months ago
    Total: 616s
    #85528
  • Pipeline finished with Failed
    5 months ago
    Total: 499s
    #85538
  • Status changed to Needs work 5 months ago
  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    That introduced test failures:

    Exception: Warning: Undefined property: Drupal\Core\Extension\Extension::$base_theme
    tour_library_info_alter()() (Line: 125)
    
  • Pipeline finished with Failed
    5 months ago
    #85562
  • Pipeline finished with Failed
    5 months ago
    Total: 502s
    #85580
  • Pipeline finished with Success
    5 months ago
    Total: 589s
    #90090
  • Status changed to Needs review 5 months ago
  • 🇳🇿New Zealand quietone New Zealand

    Test failures resolved.

  • Status changed to RTBC 5 months ago
  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    No more remarks 👍

  • 🇳🇿New Zealand quietone New Zealand

    @Wim Leers, thanks!

  • Status changed to Needs review 5 months ago
  • 🇬🇧United Kingdom catch

    One and a half questions on the MR, might be me getting confused.

  • 🇺🇸United States smustgrave

    Is this something we need to be concerned about? Shouldn’t it be up to the contrib themes to update?

    • catch committed 3951fa4d on 11.x
      Issue #3405660 by smustgrave, quietone, Wim Leers, larowlan, lauriii:...
    • catch committed 9c8a84bf on 11.x
      Revert "Issue #3405660 by smustgrave, quietone, Wim Leers, larowlan,...
  • 🇬🇧United Kingdom catch

    Oops I didn't realise I'd actually committed this, then it got pushed with another change today, reverted the commit pending #19.

    @smustgrave well once this MR is committed, if it breaks in a claro subtheme situation, that would happen before tour moves to contrib, if it's the difference of a couple of lines here I think it's worth checking. Also the logic doesn't look right to me there unless I'm really missing something.

  • Status changed to Needs work 5 months ago
  • 🇺🇸United States smustgrave

    Sounds like we have to loop through all sub themes

  • Status changed to Needs review 4 months ago
  • 🇺🇸United States smustgrave

    Doing a loop to get all the sub-themes

  • Pipeline finished with Success
    4 months ago
    Total: 921s
    #94355
  • Pipeline finished with Failed
    4 months ago
    Total: 849s
    #94989
  • Pipeline finished with Success
    4 months ago
    Total: 584s
    #95013
  • Merge request !6649Resolve #3405660 "Remove css" → (Open) created by smustgrave
  • 🇺🇸United States smustgrave

    The theme removal was discussed in slack https://drupal.slack.com/archives/C04CHUX484T/p1708034907274609

    It was agreed upon that leaving the CSS is fine and when we remove tour we can remove the css from the themes

    So going to delete the css and postpone this.

  • Status changed to Postponed 4 months ago
  • Pipeline finished with Failed
    4 months ago
    Total: 502s
    #96877
  • Pipeline finished with Failed
    4 months ago
    Total: 649s
    #96883
  • 🇬🇧United Kingdom catch
  • 🇳🇿New Zealand quietone New Zealand
  • Pipeline finished with Canceled
    4 months ago
    Total: 19s
    #102520
  • Status changed to Needs review 4 months ago
  • 🇺🇸United States smustgrave

    Seems we can merge these now :)

  • Pipeline finished with Failed
    4 months ago
    Total: 484s
    #102521
  • Status changed to Needs work 4 months ago
  • 🇳🇱Netherlands Spokje

    This displeased Drupal\KernelTests\Core\Theme\Stable9LibraryOverrideTest::testStable9LibraryOverrides:
    https://git.drupalcode.org/issue/drupal-3405660/-/jobs/891571#L3438

  • Status changed to Postponed 4 months ago
  • 🇺🇸United States smustgrave

    Thought with the css being removed that wouldn't care but guess since the module is still there. Guess this re-postponed :(

  • Status changed to Closed: duplicate 4 months ago
  • 🇳🇿New Zealand quietone New Zealand

    This work is being done in 📌 Remove Tour module Postponed . I'll close this as a duplicate and move credit.

Production build 0.69.0 2024