This module extends the basic Image LazyLoader functionality (see Image Lazyloader).

Project page URI: https://drupal.org/sandbox/basvanderheijden/2030603
Git clone URI: git clone --branch master basvanderheijden@git.drupal.org:sandbox/basvanderheijden/2030603.git paas_lazycolor

Instead of presenting the user with a throbber on a white background, the average color of the image will be used as a placeholder.
So if you're image is predominantly red colored, you will see a red rectangle while the image is loaded. The red rectangle will be replaced by the original image source once the image has been downloaded (or is positioned within the browsers viewport).

FYI: Inspiration to create this extension module, stems from Pinterest (see Pinterest amazing attention to detail and why design should lead code) which uses the same technique for preloading images.

Because calculating the average colors for each image is quite a heavy task on the backend, and the main purpose of lazy loading is to decrease load on the server, the average colors will be only be generated once, and cached in a seperate cache bin. It will also be cached statically for multiple requests to the same image within a single page request.

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://ventral.org/pareview/httpgitdrupalorgsandboxbasvanderheijden20306...

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

bertboerland’s picture

README.txt is missing

FILE: /var/www/drupal-7-pareview/pareview_temp/paas_lazycolor.info
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
5 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------

FILE: /var/www/drupal-7-pareview/pareview_temp/paas_lazycolor.install
--------------------------------------------------------------------------------
FOUND 2 ERROR(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
28 | ERROR | Expected 1 space after "+"; 0 found
31 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------

FILE: /var/www/drupal-7-pareview/pareview_temp/paas_lazycolor.module
--------------------------------------------------------------------------------
FOUND 44 ERROR(S) AND 1 WARNING(S) AFFECTING 29 LINE(S)
--------------------------------------------------------------------------------
2 | ERROR | Missing file doc comment
25 | ERROR | Function comment short description must be on a single line
28 | ERROR | Last parameter comment requires a blank newline after it
28 | ERROR | Missing parameter type at position 1
28 | ERROR | Missing comment for param "$variables" at position 1
29 | ERROR | Return comment must be on the next line
50 | ERROR | Inline comments must start with a capital letter
50 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
62 | ERROR | Inline control structures are not allowed
63 | ERROR | Inline control structures are not allowed
72 | WARNING | Line exceeds 80 characters; contains 95 characters
74 | ERROR | Last parameter comment requires a blank newline after it
74 | ERROR | Missing parameter type at position 1
74 | ERROR | Parameter comment must be on the next line at position 1
75 | ERROR | Return comment must be on the next line
102 | ERROR | Last parameter comment requires a blank newline after it
102 | ERROR | Missing parameter type at position 1
102 | ERROR | Parameter comment must be on the next line at position 1
103 | ERROR | Return comment must be on the next line
112 | ERROR | Variable "White" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
118 | ERROR | Variable "rTotal" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
119 | ERROR | Variable "gTotal" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
120 | ERROR | Variable "bTotal" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
123 | ERROR | Expected 1 space before "="; 0 found
123 | ERROR | Expected 1 space after "="; 0 found
124 | ERROR | Expected 1 space before "="; 0 found
124 | ERROR | Expected 1 space after "="; 0 found
125 | ERROR | Calls to inbuilt PHP functions must be lowercase; expected
| | "imagecolorat" but found "ImageColorAt"
130 | ERROR | Variable "rTotal" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
131 | ERROR | Variable "gTotal" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
132 | ERROR | Variable "bTotal" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
136 | ERROR | Variable "rTotal" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
136 | ERROR | Expected 1 space before "/"; 0 found
136 | ERROR | Expected 1 space after "/"; 0 found
137 | ERROR | Variable "gTotal" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
137 | ERROR | Expected 1 space before "/"; 0 found
137 | ERROR | Expected 1 space after "/"; 0 found
138 | ERROR | Variable "bTotal" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
138 | ERROR | Expected 1 space before "/"; 0 found
138 | ERROR | Expected 1 space after "/"; 0 found
140 | ERROR | Calls to inbuilt PHP functions must be lowercase; expected
| | "imagecreatetruecolor" but found "imageCreateTrueColor"
141 | ERROR | Calls to inbuilt PHP functions must be lowercase; expected
| | "imagefill" but found "imageFill"
141 | ERROR | Calls to inbuilt PHP functions must be lowercase; expected
| | "imagecolorallocate" but found "ImageColorAllocate"
143 | ERROR | Calls to inbuilt PHP functions must be lowercase; expected
| | "imagejpeg" but found "imageJpeg"
148 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------
cravecode’s picture

What an interesting idea for a module! Other than the automated testing results, this module looks pretty good. Congrats and good luck!

My suggestions:

  • Should change your Git repository to version specific branches i.e.: 7.x-1.x (D7 dev).
bertboerland’s picture

@cravecode, thanks! yes, the effect on pinterest is almost to fast to be seen, but subconscious one "feels" the color :-)

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

I'm a robot and this is an automated message from Project Applications Scraper.

bertboerland’s picture

Status: Closed (won't fix) » Active

still would love to see this as a module instead of a sandbox. so please, what else do we need to do?

klausi’s picture

Status: Active » Needs review

Looks like this needs review? See https://drupal.org/node/532400

kscheirer’s picture

Status: Needs review » Needs work
Master Branch
It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.

Otherwise seems pretty short and sweet, nice work.

----
Top Shelf Modules - Crafted, Curated, Contributed.

PA robot’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.

basvanderheijden’s picture

Status: Closed (won't fix) » Active

Issues fixed (branch, readme files etc).

basvanderheijden’s picture

Status: Active » Needs review
PA robot’s picture

Status: Needs review » Closed (duplicate)
Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: https://drupal.org/node/2235863

Project 2: https://drupal.org/node/2030715

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

I'm a robot and this is an automated message from Project Applications Scraper.

avpaderno’s picture