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

Files: 
CommentFileSizeAuthor
#23 table-before.png249.37 KBrteijeiro
#23 table-after.png250.39 KBrteijeiro
#23 form-before.png466.4 KBrteijeiro
#23 form-after.png459.81 KBrteijeiro
#22 t-templates-2.diff3.16 KBmortendk
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 86,784 pass(es). View
#20 t-templates.diff3.16 KBmortendk
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 86,820 pass(es), 15 fail(s), and 1 exception(s). View
#18 text-area-resize.gif400.27 KBmortendk
#18 text-area-resize-seven.gif176.07 KBmortendk
#18 f-template-interdiff.txt599 bytesmortendk
#18 cleanup-templates-f-4.diff3.81 KBmortendk
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 86,816 pass(es), 5 fail(s), and 0 exception(s). View
#16 cleanup-templates-f-3.diff3.16 KBmortendk
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 86,829 pass(es). View
#6 clean-templates-t.diff2.45 KBmortendk
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 86,249 pass(es), 1 fail(s), and 0 exception(s). View
#1 issue-2407745-1.patch8.08 KBSivaji
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 83,906 pass(es), 2 fail(s), and 0 exception(s). View

Comments

Sivaji’s picture

Status: Active » Needs review
FileSize
8.08 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 83,906 pass(es), 2 fail(s), and 0 exception(s). View

Status: Needs review » Needs work

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

Sivaji’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 Classy 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
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 86,249 pass(es), 1 fail(s), and 0 exception(s). View

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
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 86,829 pass(es). View

fixed the test

mortendk’s picture

Issue summary: View changes
mortendk’s picture

Issue summary: View changes
FileSize
3.81 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 86,816 pass(es), 5 fail(s), and 0 exception(s). View
599 bytes
176.07 KB
400.27 KB

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
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 86,820 pass(es), 15 fail(s), and 1 exception(s). View

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
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 86,784 pass(es). View

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.