Re: K3 modules update, themes questions

Chad Kieffer <[email protected]> Sat, 30 Mar 2013 15:39:30 -0600
Newsgroups gmane.comp.web.gallery.devel
Message-ID <[email protected]>
My $.02 for separation. 

Consider it a separation of concerns for the interface/view, much like in the MVC framework directory layouts. 

I believe most developers are used to separate directories and as file lists grow, I don't want to hunt for the file the CSS file I need to edit.

There's certain familiarity we gain by keeping separate directories as I think many Drupal themes employ the same directory names.

- Chad

On Mar 30, 2013, at 10:13 AM, Shad Laws <shad-xpYdmXCiSuZWk0Htik3J/[email protected]> wrote:

> Hey Bharat,
> 
> On 30 March 2013 05:18, Bharat Mediratta <[email protected]> wrote:
>> 
>> A couple of thoughts:
>> 
>> 1) It seems silly to have separate css and js directories.  Why would we not
>> just have one directory?  There's no benefit that I can see to having
>> multiple dirs - so I'm in favor of the single media directory, but I'm open
>> to being convinced here.
> 
> Something else I forgot earlier: Kohana doesn't care much, but our
> combined js/css script does.  In 3.0.x it searched js and css
> directories, respectively.  I've already revised it to search media
> for both, so if we kept different conventions for modules and themes
> we'd have to be more clever here.
> 
>> 2) Why bother with the new common subdir?  What does it buy us?
> 
> Separation of layers/dependencies.  I wanted to communicate to theme
> developers "this stuff is required; this stuff isn't."
> 
> Take care,
> Shad
> 
> 
>> 
>> On Fri, Mar 29, 2013 at 1:21 AM, Shad Laws <shad-xpYdmXCiSuZWk0Htik3J/[email protected]> wrote:
>>> 
>>> cc: devel
>>> 
>>> Hi Chad,
>>> 
>>> My suggestion was based mostly on what Bharat suggested in our recent
>>> tl;dr-sized thread about K3 naming conventions for modules.  I was
>>> essentially just copying the same structure over to themes.  AFAIK, there's
>>> no fundamental reason why it's better to put them in one directory versus
>>> many.  To Kohana, none of the four names have special meanings (media, js,
>>> css, images).
>>> 
>>> While it made sense for modules, I don't personally feel strongly one way
>>> or the other about putting them in a unified media directory for themes.
>>> 
>>> There are a couple other points, however, that I do think would be nice to
>>> address:
>>> - deleting the file that doesn't appear to be used
>>> - moving themeroller to a vendor directory
>>> - renaming a couple things (ui.init.js --> init.js, old-ie.css -->
>>> screen-old-ie.css)
>>> - making it clear which files are required by Gallery modules and which
>>> are specific to the theme.
>>> 
>>> More on the last point...
>>> - some images are required by Gallery, and if they don't exist something
>>> will break.
>>> - most views are required by Gallery, but not all.
>>> 
>>> In both of the cases above, I put the required ones in subdirs called
>>> "common."  I like the subdir idea, although proposals on a different name
>>> are welcome :-).  We could use "gallery," but I feel like that pertains to
>>> the gallery module...
>>> 
>>> Scratching my head on this a bit more, here's draft two.  Thoughts?
>>> 
>>> Take care,
>>> Shad
>>> 
>>> ----
>>> 
>>> themes/wind
>>> |-- theme.info
>>> |-- thumbnail.png
>>> |-- css
>>> |   |-- screen-old-ie.css             [I renamed this]
>>> |   |-- screen-rtl.css
>>> |   `-- screen.css
>>> |-- js
>>> |   `-- screen.js                     [I renamed this]
>>> |-- media
>>> |   |-- ico-album.png
>>> |   |-- ico-error.png
>>> |   |-- ico-help.png
>>> |   |-- ico-info.png
>>> |   |-- ico-print.png
>>> |   |-- ico-separator-rtl.gif
>>> |   |-- ico-separator.gif
>>> |   |-- ico-view-comments.png
>>> |   |-- ico-view-fullsize.png
>>> |   |-- ico-view-slideshow-rtl.png
>>> |   |-- ico-view-slideshow.png
>>> |   |-- ico-warning.png
>>> |   |-- loading-large.gif
>>> |   |-- loading-small.gif
>>> |   |-- select-photos-backg.png       [doesn't seem to be used anywhere -
>>> delete it?]
>>> |   `-- common                        [not sure I love this name...]
>>> |       |-- avatar.jpg                [used in modules, but not in theme]
>>> |       |-- ico-denied-inactive.png   [used in permissions_form.html.php,
>>> but not in theme]
>>> |       |-- ico-denied-passive.png    [used in permissions_form.html.php,
>>> but not in theme]
>>> |       |-- ico-denied.png            [used in permissions_form.html.php,
>>> but not in theme]
>>> |       |-- ico-lock.png              [used in permissions_form.html.php,
>>> but not in theme]
>>> |       |-- ico-success-inactive.png  [used in permissions_form.html.php,
>>> but not in theme]
>>> |       |-- ico-success-passive.png   [used in permissions_form.html.php,
>>> but not in theme]
>>> |       `-- ico-success.png           [used in permissions_form.html.php
>>> *and* in theme]
>>> |-- vendor
>>> |   `-- themeroller
>>> |       |-- ui.base.css
>>> |       `-- images
>>> |           `-- ...
>>> `-- views
>>>    |-- common                        [not sure I love this name...]
>>>    |   |-- album.html.php
>>>    |   |-- block.html.php
>>>    |   |-- dynamic.html.php
>>>    |   |-- movie.html.php
>>>    |   |-- no_sidebar.html.php
>>>    |   |-- page.html.php
>>>    |   |-- paginator.html.php
>>>    |   `-- photo.html.php
>>>    `-- wind
>>>        `-- sidebar.html.php          [only used by page.html.php in Wind
>>> theme]
>>> 
>>> 
>>> On 29 March 2013 01:59, Chad Kieffer <[email protected]> wrote:
>>>> 
>>>> Hi Shad,
>>>> 
>>>> I'm not keen on combining images, js, and css files into a single
>>>> directory for themes. My personal preference is to keep separate css, js,
>>>> and images folders. Media makes sense as a replacement to images, but media
>>>> to me implies that the folder contains video, flash, or audio in addition to
>>>> images and icons.
>>>> 
>>>> Is this change a personal preference of yours or a Kohana convention? Do
>>>> we get a performance boost by keeping files in a single folder when Kohana
>>>> handles core and module file overrides?
>>>> 
>>>> - Chad
>>>> 
>>>> 
>>>> On Mar 28, 2013, at 4:41 PM, Shad Laws wrote:
>>>> 
>>>> Hey everyone,
>>>> 
>>>> So, I *think* I've finished the main move/rename/search/replace task for
>>>> (almost) all of the modules!  I've also corrected the class names I found in
>>>> bootstrap.php (several instances), index.php (1 instance in a comment), and
>>>> the installer (0 instances).  The only exceptions are:
>>>> - forge - will be replaced with formo
>>>> - kohana23_compat - will be deleted (but needs pagination to go
>>>> somewhere...)
>>>> - unit_test - revise? replace?
>>>> - gallery_unit_test - probably modified to fit new unit_test
>>>> 
>>>> Also, in a few cases, I found some files for which I couldn't really find
>>>> a new home yet.  For now, I put them in an "orphans" directory of the
>>>> corresponding module.  These cases are:
>>>> - stuff that overloads classes that no longer exist (MY_Input in
>>>> gallery/orphans)
>>>> - stuff that Bharat is already working on and I didn't want to disturb
>>>> him (MY_ORM and Database in gallery/orphans)
>>>> - stuff that addresses how K2 handles errors (error and gallery_error in
>>>> gallery/orphans)
>>>> - stuff that needs the forge -> formo conversion first (rest of files in
>>>> recaptcha/orphans and gallery/orphans)
>>>> 
>>>> Next stop: fixing up the themes.  Here's what the directory structure of
>>>> wind looks like right now:
>>>> 
>>>> themes/wind
>>>> |-- theme.info
>>>> |-- thumbnail.png
>>>> |-- css
>>>> |   |-- fix-ie.css
>>>> |   |-- screen-rtl.css
>>>> |   |-- screen.css
>>>> |   `-- themeroller
>>>> |       |-- ui.base.css
>>>> |       `-- images
>>>> |           `-- ...
>>>> |-- images
>>>> |   |-- avatar.jpg
>>>> |   |-- ico-album.png
>>>> |   |-- ico-denied-inactive.png
>>>> |   |-- ico-denied-passive.png
>>>> |   |-- ico-denied.png
>>>> |   |-- ico-error.png
>>>> |   |-- ico-help.png
>>>> |   |-- ico-info.png
>>>> |   |-- ico-lock.png
>>>> |   |-- ico-print.png
>>>> |   |-- ico-separator-rtl.gif
>>>> |   |-- ico-separator.gif
>>>> |   |-- ico-success-inactive.png
>>>> |   |-- ico-success-passive.png
>>>> |   |-- ico-success.png
>>>> |   |-- ico-view-comments.png
>>>> |   |-- ico-view-fullsize.png
>>>> |   |-- ico-view-slideshow-rtl.png
>>>> |   |-- ico-view-slideshow.png
>>>> |   |-- ico-warning.png
>>>> |   |-- loading-large.gif
>>>> |   |-- loading-small.gif
>>>> |   `-- select-photos-backg.png
>>>> |-- js
>>>> |   `-- ui.init.js
>>>> `-- views
>>>>    |-- album.html.php
>>>>    |-- block.html.php
>>>>    |-- dynamic.html.php
>>>>    |-- movie.html.php
>>>>    |-- no_sidebar.html.php
>>>>    |-- page.html.php
>>>>    |-- paginator.html.php
>>>>    |-- photo.html.php
>>>>    `-- sidebar.html.php
>>>> 
>>>> Here's my first draft of what I think it should look like:
>>>> 
>>>> themes/wind
>>>> |-- theme.info
>>>> |-- thumbnail.png
>>>> |-- media
>>>> |   |-- ico-album.png
>>>> |   |-- ico-error.png
>>>> |   |-- ico-help.png
>>>> |   |-- ico-info.png
>>>> |   |-- ico-print.png
>>>> |   |-- ico-separator-rtl.gif
>>>> |   |-- ico-separator.gif
>>>> |   |-- ico-view-comments.png
>>>> |   |-- ico-view-fullsize.png
>>>> |   |-- ico-view-slideshow-rtl.png
>>>> |   |-- ico-view-slideshow.png
>>>> |   |-- ico-warning.png
>>>> |   |-- loading-large.gif
>>>> |   |-- loading-small.gif
>>>> |   |-- select-photos-backg.png       [doesn't seem to be used anywhere -
>>>> delete it?]
>>>> |   |-- screen-old-ie.css             [I renamed this]
>>>> |   |-- screen-rtl.css
>>>> |   |-- screen.css
>>>> |   |-- init.js                       [I renamed this]
>>>> |   `-- common                        [not sure I love this name...]
>>>> |       |-- avatar.jpg                [used in modules, but not in theme]
>>>> |       |-- ico-denied-inactive.png   [used in permissions_form.html.php,
>>>> but not in theme]
>>>> |       |-- ico-denied-passive.png    [used in permissions_form.html.php,
>>>> but not in theme]
>>>> |       |-- ico-denied.png            [used in permissions_form.html.php,
>>>> but not in theme]
>>>> |       |-- ico-lock.png              [used in permissions_form.html.php,
>>>> but not in theme]
>>>> |       |-- ico-success-inactive.png  [used in permissions_form.html.php,
>>>> but not in theme]
>>>> |       |-- ico-success-passive.png   [used in permissions_form.html.php,
>>>> but not in theme]
>>>> |       `-- ico-success.png           [used in permissions_form.html.php
>>>> *and* in theme]
>>>> |-- vendor
>>>> |   `-- themeroller
>>>> |       |-- ui.base.css
>>>> |       `-- images
>>>> |           `-- ...
>>>> `-- views
>>>>    |-- album.html.php  [note: these are the only views that sit in the
>>>> root views directory]
>>>>    |-- block.html.php
>>>>    |-- dynamic.html.php
>>>>    |-- movie.html.php
>>>>    |-- no_sidebar.html.php
>>>>    |-- page.html.php
>>>>    |-- paginator.html.php
>>>>    |-- photo.html.php
>>>>    `-- sidebar.html.php
>>>> 
>>>> Thoughts?
>>>> 
>>>> Take care,
>>>> Shad
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> Own the Future-Intel(R) Level Up Game Demo Contest 2013
>>>> Rise to greatness in Intel's independent game demo contest. Compete
>>>> for recognition, cash, and the chance to get your game on Steam.
>>>> $5K grand prize plus 10 genre and skill prizes. Submit your demo
>>>> by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2__[ g a
>>>> l l e r y - d e v e l ]_________________________
>>>> 
>>>> [ list info/archive --> http://gallery.sf.net/lists.php ]
>>>> [ gallery info/FAQ/download --> http://gallery.sf.net ]
>>> 
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> Own the Future-Intel(R) Level Up Game Demo Contest 2013
>>> Rise to greatness in Intel's independent game demo contest. Compete
>>> for recognition, cash, and the chance to get your game on Steam.
>>> $5K grand prize plus 10 genre and skill prizes. Submit your demo
>>> by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
>>> __[ g a l l e r y - d e v e l ]_________________________
>>> 
>>> [ list info/archive --> http://gallery.sf.net/lists.php ]
>>> [ gallery info/FAQ/download --> http://gallery.sf.net ]
>> 
>> 

------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete 
for recognition, cash, and the chance to get your game on Steam. 
$5K grand prize plus 10 genre and skill prizes. Submit your demo 
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
__[ g a l l e r y - d e v e l ]_________________________

[ list info/archive --> http://gallery.sf.net/lists.php ]
[ gallery info/FAQ/download --> http://gallery.sf.net ]