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
Comments
Comment #1
sivaji_ganesh_jojodae commentedComment #3
sivaji_ganesh_jojodae commentedLine 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.
Comment #4
davidhernandezPostponing 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.
Comment #5
davidhernandezUn-postponing. The templates have been copied to Classy, so all we need to do is remove classes from the original templates.
Comment #6
mortendk commentedwe need visual confirmation on resizable textareas still works without classes, else selector classes must be prefixed with
.js-Comment #10
mortendk commentedComment #11
mortendk commentedComment #12
mortendk commentedComment #13
mortendk commentedComment #14
mortendk commentedComment #15
mortendk commentedfunction testThemeTableWithEmptyMessage() in tableTest.php needs to test on classy not on stark
Comment #16
mortendk commentedfixed the test
Comment #17
mortendk commentedComment #18
mortendk commentedscreenshots added of resize


Removed text-area class that was set from the module : housecleaning
Comment #20
mortendk commentedReuploaded patch from #16 - im an idiot so it was named as beeing F* templates, so lets try with the right letter
One issue:
.form-textareaclass is still added to the textarea, when using stark.Looks like it gets the name from
form.incDunno 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 ?
Comment #22
mortendk commentedlets try thins again
Comment #23
rteijeiro commentedGood job, @mortendk! Yeah!
Table BEFORE
Table AFTER
Form BEFORE
Form AFTER
Comment #24
alexpottTemplates are not frozen in beta. Committed 275947d and pushed to 8.0.x. Thanks!