Problem/Motivation
Classy will be moved to contrib during Drupal 9. In preparation to that, we have to remove dependencies on Classy from all core themes.
Proposed resolution
Use this spreadsheet of Core Theme's use of Classy as reference
Create theme-specific versions of all libraries that are not already overridden by the theme.
Copy all remaining Templates and CSS that are not already overridden by the theme and remove dependency to Classy. Some templates in Classy are identical to Stable and can be removed instead of copied. This is covered by #3098150: Add test coverage to ensure Classy templates that have identical versions in Stable are kept in sync
Themes subtheming Classy should not depend on preprocess/alters in classy.theme. The issue for this is: #3109287: Decouple Classy-inheriting themes from Classy's preprocess functions
Theme specific issues:
Claro: #3084810: Decouple Claro from Classy, #3108109: Decouple Classy libraries from Claro
Umami: #3096014: [META] Make Umami theme non-dependent on Classy
Seven: #3107872: Decouple Classy libraries from Seven
Bartik #3108181: Decouple Classy libraries from Bartik
Remaining tasks
- Determine directory structure for copied templates: #3095713: Create classy directory with README, in the templates and css directories for all themes subtheming Classy
- Create test process for copying libraries: #3096203: Create Classy library dependency tests that can be used for all themes, and verify by providing an Umami-specific classy/dropbutton
- Create test process for copying templates: #3096349: Create test for confirming Themes do not depend on Classy templates (currently blocked on #3106600: Decouple Classy libraries from Umami and other yet-to-be-created issues for decoupling Classy libraries from themes)
- Copy templates from Classy: #3113608: Add copies of Classy templates to core themes
- Remove Classy templates with identical copies in Stable: #3098150: Add test coverage to ensure Classy templates that have identical versions in Stable are kept in sync
- Make core themes depend on Stable instead of Classy: #3115088: Remove Classy as a base theme of core themes
Once the test procedure and directory naming is settled, create multiple issues for moving templates/libraries to themes. Consider grouping similar templates in an issue to reduce the total number of issues, but the scope should remain reasonable for each.
Comments
Comment #2
davidhernandezWe'll need some announcement around this. People are prone to copy Bartik and Seven, so it would be good to let them know this dependency on Classy is going away and they should do the same thing core is doing and copy its templates to their theme.
Comment #3
lauriiiComment #5
bnjmnmAt the time I'm writing this the Core Theme's use of Classy has documented everything other than CSS files. There are two takeaways I wanted to share here as soon as possible.
a) Is it a sound approach to move Classy's libraries to a single new place where they are available to all themes?
b) If it is a sound approach, would this be best implemented as core libraries, in Stable, or somewhere else?
Comment #6
bnjmnmAdded the issue #3095713: Create classy directory with README, in the templates and css directories for all themes subtheming Classy, which is a prerequisite for any issues copying Classy templates to other themes.
Comment #7
bnjmnmDiscussed my questions in #5 with @lauriii, this is what was concluded
#5.1: Templates that are identical in Classy and Stable do not need to be copied. These themes can inherit those templates from Stable.
#5.2: For the time being, each theme will get their own copies of the libraries they previously acquired via Classy. Centralizing these libraries is possibly desirable, but can be done in a followup.
Comment #8
bnjmnmMoving forward on this depends on these three issues:
Comment #9
bnjmnmCreated the issue #3098150: Add test coverage to ensure Classy templates that have identical versions in Stable are kept in sync for removing templates from Classy that have identical equivalents in stable and updated IS to reflect this.
Comment #10
bnjmnmAdded theme-specific parent issues to issue summary.
Comment #11
lauriiiComment #12
lauriiiI discussed with @xjm about backporting this to 8.9.x in #3095713-20: Create classy directory with README, in the templates and css directories for all themes subtheming Classy. Summary of the discussion is that we should backport a version of the patch that copies all the templates to Drupal 8.9.x, but keeps the base theme setting as Classy. This means that pre-existing template extends and library overrides and extends should continue to work.
Comment #13
Devipriya Rajamanickam commentedComment #14
Devipriya Rajamanickam commentedComment #15
bnjmnmComment #16
bnjmnmComment #17
bnjmnmAdded #3108109: Decouple Classy libraries from Claro to issue summary.
Comment #18
bnjmnmAdded #3108181: Decouple Classy libraries from Bartik to issue summary.
Comment #19
bnjmnmAdded #3109287: Decouple Classy-inheriting themes from Classy's preprocess functions to issue summary.
Comment #20
gábor hojtsyComment #21
lauriiiComment #22
lauriiiComment #23
lauriiiComment #24
lauriiiComment #25
lauriiiYay! The final issue of this meta has been committed: #3115088: Remove Classy as a base theme of core themes. 🎉