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/language/templates/language-negotiation-configure-form.html.twig
Comment | File | Size | Author |
---|---|---|---|
#1 | copy_language_templates-2349707-1.patch | 1.25 KB | mortendk |
Comments
Comment #1
mortendk CreditAttribution: mortendk commentedComment #2
mortendk CreditAttribution: mortendk commentedComment #3
Xen CreditAttribution: Xen commentedComment #4
Xen CreditAttribution: Xen commentedIs properly picked up in Bartik.
Comment #5
lauriiiDunno whats wrong but the file is not created to classy
Comment #6
lauriiiSorry for being headless lauri. Have to use git apply instead
Comment #7
alexpottThis is used in language.admin.js not sure we should be moving this to classy without a better plan.
Comment #8
Xen CreditAttribution: Xen commentedMissed that.
Then it should be prefixed by js- and applied differently... I'll look into it.
Comment #9
Xen CreditAttribution: Xen commentedWell, seems that my D8-fu is not quite enough for the language-negotiation-configure-form...
In case anyone else want to give it a stab: The JS don't come into play until there's more than one negotiation type to be configured, which isn't the case by default. It's easy to do by running
drush config-edit language.types
and addinglanguage_content
toconfigurable
. Secondly, one needs to be *not* locked, which isn't the case either per default. And I don't know when that'll be the case, so I ended up hacking it in for testing.You'd think when you'd gotten all that in line, it would be a simple matter too add a class to the form render array and be done with it, but the template loops over
language_types
which isn't form elements, so adding a class attribute isn't as strait-forward as it could be.Maybe some of the theming/template/form bigshots should take a look at this form. As it is, getting the js class in the proper place would be hacky, and I can't really spot the proper way to do it.
Comment #10
davidhernandezPostponing for now. See #2348543: [meta] Consensus Banana Phase 2, transition templates to the starterkit theme for updates.
Comment #11
lauriiiComment #12
joelpittetAutomated triage: bumping to 9.0.x because our API base themes (stable and classy) are locked in with the release of 8.0.x.
Comment #13
catchMoving back to 8.3.x and minor per #2349661: Copy config_translation templates to Classy.
Comment #26
quietone CreditAttribution: quietone at PreviousNext commentedAsked in #frontend and andy-blum replied that this should move to the contrib project.