Needs review
Project:
Omega
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Apr 2012 at 18:13 UTC
Updated:
22 May 2012 at 18:18 UTC
Jump to comment: Most recent file
Comments
Comment #1
rlhawkHere's the patch.
Comment #2
rlhawkI ran tests using Apache Bench before and after patching and found no significant performance hit. Even so, it could be a good idea to add a setting for including the extra classes, so they wouldn't be added if not needed. This is assuming that the feature actually works. It does in my tests, but I look forward to feedback from the community and especially from the maintainers.
Comment #3
bdevore commentedNot sure if this related enough, but would it be possible to build in some kind of support for custom $zebra values so that .alpha and .omega can be added to views queries depending on the result#? I'm not finding much documentation on how views builds the css variables out, but maybe I don't know where to look?
Comment #4
PCateNumbersUSA commentedfLove this idea! Is there a chance the patch will be included future versions of the theme without the need for a patch? Also, I haven't tested it myself, but does this patch add classes to all grid columns (included nested ones inside content), or does it just work on the theme layout grid columns?
Comment #5
rlhawkIt only adds first and last classes to the regions within a zone, based on their positions in the grid. It doesn't do anything with the content, including views, inside the region.
Comment #6
rlhawkI'm going to create code for subthemes that will do this for now, so patching won't be necessary. I'll post it in the Omega group when it's ready, along with a pointer here.
Comment #7
rlhawkHere's the code I'm using in my Omega subthemes to add first and last classes to regions: http://pastebin.com/z1CJtWfW
ApacheBench results (using ab -n 100 -c 10 http://MYURL/):
BEFORE ADDITIONAL CODE:
Requests per second: 19.49 [#/sec] (mean)
Time per request: 513.125 [ms] (mean)
Time per request: 51.312 [ms] (mean, across all concurrent requests)
AFTER ADDITIONAL CODE:
Requests per second: 19.41 [#/sec] (mean)
Time per request: 515.243 [ms] (mean)
Time per request: 51.524 [ms] (mean, across all concurrent requests)