Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
color.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Mar 2014 at 12:02 UTC
Updated:
28 Dec 2014 at 23:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
draganerorWill check this one...
Comment #2
draganerorComment #3
sqndr commentedAny thoughts on how to fix this one?
Comment #4
nod_Here is a patch, the functionality works but it needs tests.
Comment #6
nod_Comment #7
nod_Comment #9
sqndr commentedGave me a whitespace error. New patch added.
@nod_: What kind of tests does it need? Manual testing or ... If I could help, give a shout! :)
Comment #10
nod_Oh yeah feel free to take it up. Don't have much time for it.
The test needed is adding a new library to color_test_theme (in the color/tests/color_test folder), declare a css file from that library to the color module (in color.inc) and make sure that file gets rewritten properly.
Comment #11
sqndr commented@nod_: Great, thanks. I'll try this out, assigning to myself.Comment #12
rainbowarrayAny progress on this, sqndr? It would be nice to get this in so we can get stylesheets out of info.yml and just have them in libraries.yml.
Comment #13
sqndr commented@mdrummond: No progress so far. You can pick this up if you want.
Comment #14
undertext commentedI have added a new library to color_test_theme and declared a css file from that library to the color module. It seems that current tests are checking file rewriting ( 'Make sure the color stylesheet is included in the content' assertion').
Also list_themes() function is deprecated now. So i use \Drupal::service('theme_handler')->listInfo() in patch.
Should we create a new issue about replacing list_themes() function occurrences ?
Comment #15
nod_probably yes. Although I'm not certain what's the workflow those days.
Comment #16
m1r1k commentedComment #17
rainbowarrayPart of the reason for this patch is so that theme info.yml files don't have stylesheet attachments inside them anymore. So it would be nice if this patch pulled those declarations out of info.yml. Alternatively that could be handled in a follow-up, but the todo points at this issue for that task.
Other things I spotted:
Is this the way this is being handled elsewhere? Using a global like this doesn't feel like a very d8 way to do this.
Why are some of these 3b3b3b and some 3c3c3c?
Missing newlines at the ends of these files.
Comment #18
tim.plunkett#17.1, #2228093: Modernize theme initialization *just* went in, so see https://www.drupal.org/node/2324935
Comment #19
sqndr commentedComment #20
sqndr commentedHere's a patch - and an interdiff with #14.
Comment #21
sqndr commentedComment #23
joelpittetNot sure if you meant that tag? :p
Comment #24
sqndr commentedHaha - brilliant. Sorry 'bout that :D
Comment #25
rainbowarrayWe still have one for 3b3b3b and two for 3c3c3c. Maybe there is something going on there that I don't understand. But if not, can we get these consistent?
Part of the point of this is that it allows us to no longer have stylesheet declarations in a theme info.yml file. Guessing we will handle that in a separate issue? The @todo points to this issue for that.
Comment #26
andypostNo reason to disturb theme_handler
Comment #27
wim leersColorTestworked as intended before sqndr's changes — it didn't actually test anything forcolor_test_theme— fortunately, it did test Bartik correctly.librarieskey. That worked, but Color module didn't support that yet.So, restoring the second hunk from #4 to do that again, and things work wonderfully well for Bartik :)
interdiff-lost-hunks.txt.The test-only patch should have two failures: one for Bartik, one for the test theme.
+1!
Comment #28
wim leersBumping to major because this is a blocker to shipping with Bartik's assets in a
libraries.ymlfile, and hence it prevents a best practice from being visible in Drupal 8's only front-end theme.Comment #30
nod_Comment #31
nod_Test looks good to me :D
Since the logic hasn't changed You could say wim RTBC'ed that part of the patch. Two halves makes one RTBC patch :p
Comment #32
wim leersHeh :)
Comment #33
rainbowarray+1 zillion to this.
Theme sanity, yay!
Comment #34
alexpottCommitted ce7fefd and pushed to 8.0.x. Thanks!
Comment #37
Jeff Burnz commented#2387535: Color module can't replace CSS files loaded via a library in hook_page_attachments_alter()
Comment #38
yesct commentedthere was only one issue (this one with Developer Experience tag. I think DX (Developer Experience) is the one being used mostly.