Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
(First, verify that the preprocess changes have been made. #2322163: [meta] Consensus Banana Phase 1, move CSS classes from preprocess to twig templates.)
- Copy the Twig templates from the core module's templates directory to Classy's templates directory. Include all templates, even ones without classes.
- Remove all classes from the core module's template. Remove all classes added with addClass and ones that are hard-coded in the template.
- If there are classes that are required for basic functionality, discuss whether they should be kept.
- If there is CSS from the module, or anywhere else, referring to the class, discuss removing it or moving it to Bartik&Seven. Do not move the CSS to Classy.
Twig Templates to Copy
core/modules/file/templates/file-link.html.twig
core/modules/file/templates/file-managed-file.html.twig
core/modules/file/templates/file-upload-help.html.twig
core/modules/file/templates/file-widget-multiple.html.twig
core/modules/file/templates/file-widget.html.twig
Comment | File | Size | Author |
---|---|---|---|
#5 | copy_file_templates_to-2349675-5.patch | 2.99 KB | mortendk |
#5 | interdiff-classy-file-2-5.patch | 4.54 KB | mortendk |
#2 | file-to-classy-2349675-2.patch | 3.06 KB | emma.maria |
#1 | class-file.diff | 2.92 KB | mortendk |
Comments
Comment #1
mortendk CreditAttribution: mortendk commentedmoved the classes out of core
Discussion of the classes - should be done as a follow up, so bikesheedding wont stop classy ;)
Comment #2
emma.mariaIn the last patch the template files in Classy were not added to a 'templates' folder in theme folder. I have moved the files over :)
Comment #3
emma.mariaComment #4
davidhernandezThe templates should go into the root of the templates folder, not a subfolder.
Comment #5
mortendk CreditAttribution: mortendk commentedmoved templates to /template
Comment #6
mortendk CreditAttribution: mortendk commentedgo bot go
Comment #8
mortendk CreditAttribution: mortendk commentedComment #9
Xen CreditAttribution: Xen commentedComment #10
Xen CreditAttribution: Xen commentedLooks good. All the templates are properly picked up.
Comment #11
davidhernandezI'm universally setting all the phase 2 issues back to needs review, because we're missing some things. Please double-check if any removed classes are being used in javascript. It is best to test the affected template using Stark to make sure nothing is broken.
Comment #12
Xen CreditAttribution: Xen commentedThere is no classes in the templates in this patch.
Comment #13
alexpottCommitted c71025a and pushed to 8.0.x. Thanks!
This normal task was committed due the fact the banana consensus received per approval wrt to #2350615: [policy, no patch] What changes can be accepted during the Drupal 8 beta phase?