Problem/Motivation
In #2348543: [meta] Consensus Banana Phase 2, transition templates to the starterkit theme we moved a lot of templates from modules to Classy, the CSS that relies on the classes in Classy is still in the modules files
Proposed resolution
Move the CSS that relies on the HTML classes for every module. Ensure that the classes aren't being added in the module.
Remaining tasks
User interface changes
None for Classy, Stark will be more Stark
API changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #50 | move_file_theme_css_to-2489566-50.patch | 10 KB | davidhernandez |
| #47 | interdiff-2489566-45-47.txt | 397 bytes | rainbowarray |
| #47 | 2489566-47-move-file-css-classy.patch | 9.96 KB | rainbowarray |
| #16 | move_file_theme_css-2489566-16.patch | 11.53 KB | axe312 |
| #15 | move_file_theme_css_to-2489566-15.patch | 12.59 KB | chernous_dn |
Comments
Comment #1
manjit.singhComment #2
manjit.singhComment #3
lewisnymanThere are three situations where we are adding the css file through a library, we need to remove them and make sure we are loading these files in the right places in Classy.
Comment #4
manjit.singhDone with the changes mentioned in #3. Please verify.
Comment #5
sqndr commentedI don't think this can be removed since it's a different library?
Comment #6
lauriiiComment #7
mortendk commentedComment #8
chernous_dn commentedUpdate #4 patch.
@LewisNyman I think we dont need remove
'library' => ['file/drupal.file']and$element['#attached']['library'][] = 'file/drupal.file'Because in
drupal.fileusedfile.jsand dependencies to core/jquery and etc.We need remove only
component:css/file.theme.css: {}.Вut we can remove
drupal.file.formatter.generic:and include in classy in templatefile-managed-file.html.twig.Also I moved icons to classy. Tested and add screenshots.
Comment #9
chernous_dn commentedComment #13
chernous_dn commentedI have some error in patch #8. Update patch.
Comment #15
chernous_dn commentedTrying fix patch #13. Include style to
file-link.html.twig. And remove from include stylefield.html.twig.Comment #16
axe312 commentedHere is a new version of the patch. I moved the file icons within a separate folder. Having them into the root dir of classy seemed so wrong.
I could not find any differences via visual regression testing after applying the patch.
Comment #17
axe312 commentedI attached the json config file for the visual regression testing I did. I used the drupalcore-frontend-toolkit to create the screenshots. See here: https://github.com/lewisnyman/drupalcore-frontend-toolkit/pull/15
Comment #18
lewisnymanGreat. Thanks for the work here. This is the first issue where we have added image to Classy, we need a review from a Classy maintainer to ensure that the folder structure is correct.
Comment #19
lauriiiNew line needed to the end of file
Comment #20
mortendk commentedyes we are first moving the css files over into css/[*modulename*]/foo.css then were probably gathering them afterwads in /css/*.css or some other naming conversion
so the naming is correct :)
Comment #21
mortendk commentedComment #22
davidhernandezHmm. Something's not right here. Right now the Book CSS was added into a "navigation" folder, matching the organization of the templates folder. But comment and search were not. They were added in folders that matched the module they came from. We need one or the other.
Also, the files are being moved with *.theme in the name. I thought we were going to remove that since we aren't going to move any *.module files to Classy so there is no need for the differentiation.
Comment #23
mortendk commented@david as i recall the discussion back in LA - was that we first move all the css files, then we rename em etc, the same way as we did with moving the template files to classy ? or did i get that wrong, it was something about "more important to move them instead of discussing names for each file
Comment #24
davidhernandez@morten, I think we did have that conversation. So that is right. But at this point, with the amount of time that has passed and how close we are to RC, I think we need to start eliminating the two step processes. There is no guarantee we'll get follow ups in, so we should decide on naming and folder structure, and have these patches go in that way.
Comment #25
lewisnymanOk that sounds good, it makes sense to remove the
.theme.stuff in Classy because it's the same convention we follow in Seven and Bartik.Comment #26
lewisnymanOk, I've renamed the folder structure to match the templates and I've rename the file to file.css. I've also renamed the folder to icons, which feels more appropriate if we want to put more stuff in there.
Comment #27
davidhernandezShould these just go in a components folder? My concern is about the stuff we will move that is not directly tied to a template. What will we do with all the system CSS we just split? Are we going to move that all over as the "components" folder and leave the other CSS in template-based folders? That would seem inconsistent with how we organize the other themes, which is SMACSS-based.
Comment #28
lewisnyman@davidhernandez I was also thinking about this today and realised that splitting the CSS in to separate folders really harms findability. One of the benefits of having one component per file is it's really easy to find the file when they are sorted alphabetically. This makes it a lot harder.
TLDR I agree and will write a new patch to move the CSS file structure inline with Seven and Bartik
Comment #29
lewisnymanComment #30
mortendk commentedim fine with moving all the css files into /css/*.css - the only reason ive been anal about it was to follow the guidelines we agreed on in LA, so we first moved em over then we renamed etc. It makes a ton more sense to just do it one go & we seem to agree upon it so +1
Comment #31
lewisnymanThanks, this just needs manual testing to make sure the new patch hasn't introduced regressions and I haven't messed up the image paths :)
Comment #32
joginderpcPatch is working fine tested on my system.
Comment #33
lewisnymanThank you!
Comment #34
lewisnymanComment #35
lauriiiCan someone explain why is these changes in this patch?
Comment #36
davidhernandezWe agreed to put the css files into the components folder, so maybe Lewis was testing it and included it by accident? Even if we tried to sneak it in :) the names should be changed too. Anyway, lets make a separate issue for fixing that.
Comment #37
rainbowarrayReroll.
Comment #38
rainbowarrayThis is fixing the file names. I didn't split off the the file renames for search, comment and book into another issue. If someone wants to open that, it would be straightforward.
Or.... just change the issue title. :)
Comment #39
lauriiiWe still have unrelated changes in the patch :)
Comment #40
emma.mariaI have removed any changes relating to book, comment and search.
Patch and interdiff attached.
Comment #41
lauriiiThanks for the fix!
s/drupal.file/file
You could also take a look on the Git configuration documentation to make reviewing of your patches that do moving of files a little easier :)
Comment #42
lewisnymanThe only
I wonder if we can just call this library file? The drupal part seem redundant.
Comment #43
davidhernandezYes, no drupal.* please. I don't think it is necessary for any of the libraries.
Comment #44
subhojit777Quite clear in #41 / #42 / #43 what to do next.
Comment #45
rainbowarrayThis should fix the remaining concerns.
Comment #46
lewisnymanWe've just been having this whole component/theme discussion in other issues. These should be component files.
Comment #47
rainbowarrayComment #48
lewisnymanThanks for the interdiff
Comment #49
alexpottNeeds a reroll.
Comment #50
davidhernandezrerolled.
Comment #51
lewisnymanThis looks good, setting to RTBC/postponed on #2566771: [Voltron patch] Move all remaining *.theme.css to Classy
Comment #52
akalata commented