Closed (fixed)
Project:
High contrast
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Feb 2020 at 22:02 UTC
Updated:
12 Mar 2020 at 19:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
neograph734Something like this I think..
Comment #4
neograph734Comment #5
hkirsman commentedI haven't worked with events but I see this is pretty cool.
I tested with drush cim and worked nicely.
I also see that it's good opportunity get rid of some code duplication. We don't need install hook anymore as on module install the configuration is created and hook is triggered. We also don't need to duplicate the css saving in update hook because if we trigger configuration save, css is also saved.
Adding patch and interdiff.
PS: I noticed there's no uninstall hook so the css is left behind. Added task here https://www.drupal.org/project/high_contrast/issues/3116364
Comment #7
hkirsman commentedLast build failed as the use is not needed in install file anymore. It might be that it still fails - not sure if it's looking for tests? Adding patch.
Comment #9
neograph734The 'unused use' is just a coding standards message. It probably failed because there are no tests.
But the code looks good to me.