Problem/Motivation
Classy will be moved to contrib during Drupal 9. After we have ensured that core themes (Bartik, Claro, Seven, Umami) are not using Classy templates or libraries, we can remove Classy as a base theme of these themes.
Proposed resolution
Change base theme from Classy to Stable. These themes will be made not dependent on Stable in a follow-up #3110855: Plan for removing dependency to Stable in Bartik/Seven/Claro/Umami.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | interdiff.txt | 3.01 KB | lauriii |
| #15 | 3115088-15.patch | 59.4 KB | lauriii |
| #11 | interdiff.txt | 7.01 KB | lauriii |
| #11 | 3115088-11.patch | 59.34 KB | lauriii |
| #8 | interdiff.txt | 2.82 KB | lauriii |
Comments
Comment #2
lauriiiLet's see what kind test failures this will cause 🤠
Comment #4
lauriiiRemoved references to Classy from the themes and also fixed failing tests.
I also removed
Drupal\KernelTests\Core\Theme\ThemeNotUsingClassyLibraryTestbecause it would need a lot of refactoring to make sense. It was mainly designed to support the migration, but if we think it would be valuable enough to rewrite this to work with the changes, it would be possible.Comment #6
lauriiiReroll after #3115153: Follow-up to #3113608: Bartik template incorrectly referencing Claro library.
Comment #8
lauriiiWe don't have to replace these libraries - we just have to ensure they are still loaded. I ensured that all of them are loaded either by extending existing library or by directly attaching them in a template.
Comment #9
tim.plunkettThis change is either out of scope, or the same change needs to be made to a couple other config files as well.
This is removed, but not ThemesNotUsingClassyTemplatesTest. Just checking if that's correct.
This seemed confusing/wrong at first, but now I see that `css/classy` is a directory *within* Seven, not that this is referring directly to Classy itself. So, not wrong, just confusing :D
base theme: classyIs there a follow-up for those, or should they be handled here?
Comment #10
bnjmnmTests depending on Classy are covered by this meta-issue #3083275: [meta] Update tests that rely on Classy to not rely on it anymore (the title of the issue should probably be updated to make it clear it covers all Classy dependencies in tests, not just ones depending on Classy markup)
Comment #11
lauriiiDrupal\FunctionalTests\Theme\SevenLayoutBuilderTestandDrupal\FunctionalTests\Theme\ClaroLayoutBuilderTestpass.Comment #12
bnjmnmAlmost half the of the 59k is removing tests that aren't necessary after core themes stop declaring Classy as a base theme.
Went through the remaining code and noted the following:
libraries:or it is requested by a template via attach_library. Also confirmed that any files previously loaded by an override of classy/base were now included in the theme's global-styling.Comment #13
tim.plunkettCross-post, was just going to RTBC as well. #10 and #11 addressed my concerns. Thanks!
Comment #14
alexpott@catch has been avoiding a hook_update_N because it backs us into a corner with supporting 8.9.x and 9.0.x at the same time. I think this can be a post update. They don't have the same issues with numbering.
<3 - really great to a comprehensive test.
Comment #15
lauriiiMoved the update hook to post update. 👍
Comment #16
lauriiiThe CR for this can be found here: https://www.drupal.org/node/3103178.
Comment #17
alexpottThis also stops it being uninstalled if classy if the admin or default theme. Which imo is a nice outcome.
Comment #18
bnjmnm#15 successfully moves the Classy uninstall from hook_update_N to a post update. Switching back to RTBC.
Comment #19
alexpottCommitted 458e132 and pushed to 9.0.x. Thanks!