Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Oct 2014 at 12:24 UTC
Updated:
20 Feb 2015 at 13:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mortendk commentedmoved the classes out of core
Discussion of the classes - should be done as a follow up, so bikesheedding wont stop classy ;)
Comment #3
davidhernandezThe templates should go into the root of the templates folder, not a subfolder.
Morten you agreed to put them in one folder. I'm not sure why these patches are now all going in subfolders.
Comment #4
mortendk commentedcause i was stupid ;)
this patch have issues with test its using xpath so killing the ID's & classes gives us issues
Comment #6
mortendk commentedComment #7
mortendk commentedComment #8
danquah commentedComment #9
danquah commentedComment #10
davidhernandezPlease 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 #13
emma.mariaReviewing this now.
Comment #14
emma.mariaModule templates
The following look fine to me, they have the classes and IDs stripped out.
core/modules/forum/templates/forum-list.html.twig
core/modules/forum/templates/forum-submitted.html.twig
core/modules/forums.html.twig
Here is what Stark looks like before and after the patch.



My issues with this patch are....
Should we leave a completely empty "a" link wrapper here? Doesn't the ID provide a function as an anchor link for new? I would put this back in the module file.
We need to keep visually-hidden classes they provide a function for accessibility.
again visually-hidden needs to be put back in the module file.
Otherwise the patch does not break any other functioning of the forum module.
Also the original files from the module have been added to the Classy theme and contain no changes.
Comment #15
emma.mariaTagging novice for the improvement work said in #14 on the patch in #4.
The work in #14 are small tasks of putting things back into template files that were removed by the patch.
Comment #16
mortendk commented1. hmm do we consider this functionality ? - i can see that it could be ?
2. the visually-hidden is still a a class - its not prefixed as beein essential or with a specific "drupal-stuff" ala js- etc.
Ib core Were assuming absolutely nothing on the frontend. we Dont wanna break the chance for a theme to do completely new things in the future. So yes visually hidden or whatever else unless its absoluterly nessersary for functionality should be removed - its up to a themer to add that it in.
Comment #17
davidhernandezThe visually-hidden stuff is part of a group of classes used for hiding content and accessibility. We should keep those in the core template. It might make sense to have those renamed or handled in a different way, but that's not something we should try to solve here. That should be a global Drupal core issue.
Comment #18
mortendk commented@david true - lets keep them here then take that on as a general issue later on, so we can attacch that to the behaviour of classy
Comment #19
mortendk commentedadded back the new id & visually-hidden classes
Comment #20
DickJohnson commentedEverything else seems to be okay, but:
1. In classy/templates/forum-submitted.html.twig we say:
But I can't see the submitted class in DOM. With Classy installed and enabled:

With Stark installed and enabled:

2. In every file-comment we have line like
Do we need these in Classy?
Comment #21
DickJohnson commentedI can't see the class without the patch either, so it seems that either I'm doing something wrong or then we have a place for follow up issue. From my point of view this is RTBC.
Comment #22
mortendk commentedthis should be followup issue, also i dont really understand the issue ;) but please create it
Comment #23
manuel garcia commentedThe patch still applies cleanly, no need to reroll.
Code looks good. I went ahead and did some manual testing:
@DickJohnson that template file is used only on forum listings, not on the final forum node page. So this means it shows up under /forum, /forum/1 and so on. The class appears there fine, so no problems there.
This good to go imho.
Comment #24
davidhernandezattributes should stay. Only remove the addClass part.
Comment #25
manuel garcia commentedGood catch @davidhernandez , here is the updated patch (based on #19).
Comment #27
manuel garcia commentedOops... forgot to add the new files...
Comment #28
davidhernandez@Manuel, check your Git settings to make sure it is optimized for copying. See the handbook instructions here - https://www.drupal.org/documentation/git/configure
If optimized, Git will make the file copy one line, like Morten's patch in #19, where it looks like the following:
This makes it easy to review and commit, because we can see the file is copied and not edited.
If it isn't working, try git diff -C.
Comment #29
mortendk commentedrerolled the patch added back in the attributes that was missed before, good catch :)
Comment #30
davidhernandezThis else is not needed since the class was removed. Uploading a fix.
Otherwise, everything looks fine. All the forum modules CSS is visual, and there is no JS.
Comment #32
mortendk commentedhuh is testbot drunk ? heres some coffe go test
Comment #34
manuel garcia commented@davidhernandez thanks for useful link & info, done -=]
I've read through the patch, it looks (even more) beautiful. RTBC'ing
Comment #35
mortendk commented@manuel im using sourcetree it makes it all work for me
Comment #36
davidhernandezFixing the space around the 'if'. Previously it would put a blank space when there was no colspan.
Comment #37
davidhernandezOops. Named that .txt for some reason. Same interdiff applies.
Comment #38
mortendk commentedPatch works and white space cleaned up
css
took a look at the css as well, the css file should be renamed from forum.module to forum.theme.css as theres no essential css for the forum to work.
im adding this as a followup issue, to get the MAT css fixed / at least have note on it.
#2421099: forum module css file follow MAT naming
Comment #39
alexpottTheme changes are not blocked by beta. Committed e6e3034 and pushed to 8.0.x. Thanks!