Hi All,
I have put together a module that provides a few features that make theming a bit easier. Current features include region classes, block classes, viewport dimensions, & media breakpoint display. Features can be turned on & off individually via a config page.
Both the readme.txt & the module page have extended descriptions.
Drupal 7
Module sandbox: http://drupal.org/sandbox/deckerdev/1935896
Git clone: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/deckerdev/1935896.git theme_utils
PAReview: http://ventral.org/pareview/httpgitdrupalorgsandboxdeckerdev1935896git
Reviews of other projects:
http://drupal.org/node/1948458#comment-7201900
http://drupal.org/node/1945384#comment-7201946
http://drupal.org/node/1948458#comment-7204198
http://drupal.org/node/1948458#comment-7206032
Comments
Comment #0.0
rrrob commentedUpdated issue description.
Comment #0.1
rrrob commentedUpdated git clone.
Comment #0.2
rrrob commentedAdded another reviewed module url
Comment #1
rrrob commentedAdded tag PAReview: review bonus
Comment #2
luco commentedhi rrrob,
good job on those reviews!
here's mine for you:
WSOD
while trying to install your module, I got this error:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /yadayada/sites/all/modules/custom/theme_utils/theme_utils.module on line 194can you help me fix it? the PHP CSS parser is right where it needs to be.
nevertheless, here's what I gathered by looking at your code:
module group
I would group your module under User interface.
javascript
your JS file is pretty neat - dare I say, better than the one I wrote in my application ;) - but it calculates em as a fraction of 16, when it's actually a fraction of whatever the font-size is defined by the theme (sometimes it's 14, for example).
simple workaround: place a text box in your settings form in which users type in their font size for em measuring, defaulting to "16".
libraries
I think your module could check for the PHP CSS parser library in
sites/all/libraries. that's more aligned with Drupal best practices for external libs.css
in your CSS, the class "tubox" is rather obscure. I would suggest you change it to "theme-utils-box".
comments
you could add some more comments in your code - especially in the JS.
the comment in
theme_utils.module- "Primary module file" - is kinda obvious, since there can be only one.moduleanyway. try briefly describing your module.general thoughts
the error message for missing library could point users to a link where they can download it.
in hook_help(), there's a word missing: "Various utilities that make theming a bit easier".
your variables are too generic. for example,
$modulecould be replaced with$block_module. in my module, I placed the module's name in every variable (even ones that don't go to the db), but I'm paranoid. ;)there's errors in PAReview, but they're false positives, I guess.
good luck!
cheers,
Luciano
Comment #3
klausiUpdating status, please check comment #2.
Comment #4
jeffstric commentedHi ,rrrob:
I install the module,and find some error reports below:
It will appear when i open a page first time and disappear if I refresh the page.
Comment #5
rrrob commented@luco,
Thanks for reviewing my module. I think I've taken care of most of your comments.
WSOD
The parser library uses namespaces, which in turn requires PHP >= 5.3.0. I've added checks in the module for this.
module group
Good idea. Done.
javascript
Another good idea. Done.
css
Done.
comments
Done.
general thoughts
Added to missing library error message.
Fixed hook_help().
Variables are within function scope, so no worries there.
PAReview does indeed report false positives.
Comment #6
rrrob commented@jeffstric,
Will you take a look again? I think this is a PHP version issue that should be corrected with the latest changes.
Comment #7
klausimanual review:
But otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Assigning to ELC as he might have time to take a final look at this.
Comment #8
rrrob commentedThanks klausi for reviewing this module.
Comment #9
klausino objections for more than a week, so ...
Thanks for your contribution, rrrob!
I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #10
elc commentedhttp://drupal.org/project/theme_utils
I have found some additional things that should be noted/adjusted when possible as the module already has a 1.0 release. I've listed the ones that don't warrant an issue all their own here, plus created an issue on the project issue queue.
klausi has already provided a link to it, but you should be structuring your commit messages so that they follow the directions on Commit messages - providing history and credit.
eg
(Referencing this issue is the one exception).
Magic numbers 1 and 0 as booleans; use TRUE and FALSE PHP reserved words instead. On theme_utils_media_query, TRUE and FALSE are translated into 1 and 0 for the #disabled key which is not needed. variable_get(<var>, 1) should also be using TRUE/FALSE instead of 1/0.
Use REQUEST_TIME instead of time() in theme_utils_get_media_queries()'s call to cache_set().
Windows file permissions; The entire repository is executable files. See Changing file permission masks on Windows to fix them.
#1975500: Incorrect information in hook_libraries_info() - "My test library" etc.
Comment #11.0
(not verified) commentedAdded additional project reviews