Problem/Motivation

Remove non essential classes from core - the classes are in classy, cores templates should be as clean as possible.
js required classes should be prefixed to js- according to code standards
simpletest should be done with classy theme, not stark

Proposed resolution

See parent issue(s) and related issue(s) for details,

Twig Templates to modify:

  • core/modules/system/templates/table.html.twig
  • core/modules/system/templates/tablesort-indicator.html.twig
  • core/modules/system/templates/task-list.html.twig
  • core/modules/system/templates/textarea.html.twig
  • core/modules/system/templates/time.html.twig

It appears task list no longer exists.

Remaining tasks

* test if resizable classes are essential
* test tablesort to still work

User interface changes

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sivaji_Ganesh_Jojodae’s picture

Status: Active » Needs review
FileSize
8.08 KB

Status: Needs review » Needs work

The last submitted patch, 1: issue-2407745-1.patch, failed testing.

Sivaji_Ganesh_Jojodae’s picture

Line causing the test to fail is below,

$this->assertRaw('<tr class="odd"><td colspan="3" class="empty message">Empty row.</td>', 'Colspan on #empty row found.');

Wondering if I should update the template file or test case.

davidhernandez’s picture

Status: Needs work » Postponed

Postponing this until we decide how we are moving forward. Keep an eye on #2348543: [meta] Consensus Banana Phase 2, transition templates to the starterkit theme for updates. Thanks.

davidhernandez’s picture

Title: Copy system templates t*.html.twig to Classy » Remove classes from system templates t*.html.twig
Issue summary: View changes
Status: Postponed » Needs work

Un-postponing. The templates have been copied to Classy, so all we need to do is remove classes from the original templates.

mortendk’s picture

Status: Needs work » Needs review
FileSize
2.45 KB

we need visual confirmation on resizable textareas still works without classes, else selector classes must be prefixed with .js-

Status: Needs review » Needs work

The last submitted patch, 6: clean-templates-t.diff, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 6: clean-templates-t.diff, failed testing.

mortendk’s picture

Issue summary: View changes
mortendk’s picture

Issue summary: View changes
mortendk’s picture

Issue summary: View changes
mortendk’s picture

Issue summary: View changes
mortendk’s picture

Issue tags: +Needs screenshots
mortendk’s picture

Issue tags: +test on classy

function testThemeTableWithEmptyMessage() in tableTest.php needs to test on classy not on stark

mortendk’s picture

Status: Needs work » Needs review
FileSize
3.16 KB

fixed the test

mortendk’s picture

Issue summary: View changes
mortendk’s picture

screenshots added of resize

Removed text-area class that was set from the module : housecleaning

Status: Needs review » Needs work

The last submitted patch, 18: cleanup-templates-f-4.diff, failed testing.

mortendk’s picture

Status: Needs work » Needs review
Issue tags: -cssbanana, -Needs screenshots, -test on classy
FileSize
3.16 KB

Reuploaded patch from #16 - im an idiot so it was named as beeing F* templates, so lets try with the right letter

One issue: .form-textarea class is still added to the textarea, when using stark.
Looks like it gets the name from form.inc

function template_preprocess_textarea(&$variables) {
  $element = $variables['element'];
  Element::setAttributes($element, array('id', 'name', 'rows', 'cols', 'placeholder'));
  Element\RenderElement::setAttributes($element, array('form-textarea'));
  $variables['wrapper_attributes'] = new Attribute();

Dunno why this is added but its there.
We could make a cowboy solution and use {{ attributes.removeClass('form-textarea') }} on the core template, but thats to ugly even for sloppy themers ;)

Anybody got a clue on why & where this comes from or should be make it into a followup issue & get the templates cleaned up now ?

Status: Needs review » Needs work

The last submitted patch, 20: t-templates.diff, failed testing.

mortendk’s picture

Status: Needs work » Needs review
FileSize
3.16 KB

lets try thins again

rteijeiro’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
459.81 KB
466.4 KB
250.39 KB
249.37 KB

Good job, @mortendk! Yeah!

Table BEFORE

Table AFTER

Form BEFORE

Form AFTER

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Templates are not frozen in beta. Committed 275947d and pushed to 8.0.x. Thanks!

  • alexpott committed 275947d on 8.0.x
    Issue #2407745 by mortendk, rteijeiro, sivaji@knackforge.com: Remove...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.