Support from Acquia helps fund testing for Drupal Acquia logo

Comments

peteainsworth’s picture

Status: Needs review » Active
FileSize
4.1 KB

I've moved the assets, creating a new js/layouts/off-canvas directory to match the CSS structure. I've also updated _off-canvas.scss and off-canvas.layout.inc to reflect the new locations. Should off-canvas.js be renamed off-canvas.layout.js? What is the convention there?

peteainsworth’s picture

Status: Active » Needs review

Changed issue status.

peteainsworth’s picture

Status: Active » Needs review

Also should I include the regenerated css in the patch?

msmithcti’s picture

Status: Needs review » Needs work

Looking like a worthwhile restructure. Just a minor point:

  1. +++ b/omega/layouts/off-canvas/off-canvas.layout.inc
    @@ -18,4 +18,4 @@
    +scripts[] = js/layouts/off-canvas/off-canvas.js
    

    Why are we moving this out of the layout? IMO unlike the images this is so specific to the layout it should stay there.

    I think you're right, renaming this file to off-canvas.layout.js would seem to follow convention (or at least set a useful convention to follow).

  2. +++ b/omega/sass/layouts/off-canvas/_off-canvas.scss
    @@ -10,11 +10,11 @@
    +  background: transparent image-url("close.png") center center no-repeat;
    ...
    +  background: transparent image-url("menu.png") center center no-repeat;
     }
    

    Such a nice clean up!

You are right to leave the CSS out of the patch, makes it easier to review.

peteainsworth’s picture

There was no particular reason behind moving the JS it was just based on #2090571-4: Create an off canvas Omega layout

Ideally it would be nice to keep all the layout specific assets within the layout directory to contain them. However, since the SASS already needs to be contained within the configured sass-dir, should the JS follow this convention or should the convention be that assets remain in the layout directory unless they can potentially be reused? In this case, I could see the JS being reused in an alternative off-canvas layout.

Internet’s picture

Assigned: peteainsworth » Internet
Issue summary: View changes
Internet’s picture

Updated the patch to move javascript file out of assets but keep it in the layout folder.

Internet’s picture

Status: Needs work » Needs review
steinmb’s picture

Assigned: Internet » Unassigned
Status: Needs review » Needs work

Empty patch