The module lets you import and manage zipped Adobe Edge compositions. After uploading an archive the composition is exposed through a block. With that you can for example show multiple animations on a page.
The module shares JS resources between compositions and modifies path prefixes so the compositions can run in subdirectories.

Sandbox URL:
http://drupal.org/sandbox/ti2m/1615254

Git:
git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/ti2m/1615254.git edge_compositions

Version: 7.x

Example:
http://insidrrr.de

Demo compositions:
Edge website, e.g. Marketshare Demo

Reviews of other projects
http://drupal.org/node/1660466#comment-6171592
http://drupal.org/node/1663310#comment-6171480
http://drupal.org/node/1664178#comment-6172518

http://drupal.org/node/1660466#comment-6182582
http://drupal.org/node/1668344#comment-6189074
http://drupal.org/node/1668080#comment-6192002

http://drupal.org/node/1615222#comment-6192276

PAReview:
http://ventral.org/pareview/httpgitdrupalorgsandboxti2m1615254git-7x-1x

Am looking forward to any feedback, thanks for reviewing!

CommentFileSizeAuthor
#12 drupalcs-result.txt1.81 KBklausi
#4 error_message.png17.28 KBiptechlabs

Comments

orakili’s picture

Status: Needs review » Needs work

Hello and Welcome,

Thanks for the module. The code is clean and easy to understand.

Automatic review

http://ventral.org/pareview/httpgitdrupalorgsandboxti2m1615254git-7x-1x

Only minor warnings regarding comments. No problem.

Manual review

- The use of $project_name in file paths looks unsecure. I think you should add a helper function to sanitize the project name to make it suitable for use in paths and html attributes.

- You create a directory to store sources in public:// and set it inaccessible using htaccess. It makes the module dependent of apache. Why not create the directory in private://

- In edge_compositions.module edge_compositions_admin_form: though fine as it is, you may want to use theme_table for the overview table.

- Regarding javascript. In edge_compositions.module edge_compositions_comp_render, you may want to use drupal_add_js to add the AdobeEdge variable to Drupal.settings and in edge_drupal.js add a Drupal.behaviors and then access this variable and do what you need to do with it (like copying the properties to window.AdobeEdge).

  drupal_add_js(array(
    'AdobeEdge' => array(
      'pathPrefix' => array(
        'libs' => $path,
        'comps' => array(
          $edge_comp_id => $path . "/" . drupal_strtolower($project_name),
        ),
      ),
    ),
  ), 'setting');

That's all for now. Could you provide a composition for testing?

Thanks

orakili’s picture

Issue summary: View changes

Added Drupal version

ti2m’s picture

Hi,
thanks a lot for the quick and detailed review!

I have commited the latest changes (checked for PAReview errors):
- The project name gets sanitized now. It's being extracted from the path on the server, so I'm not sure if its possible at all that the name gets corrupted, but better make sure anyway.

- I switched the archive source folder over to private:// and added a check to make sure the private path is configured. I agree, makes more sense this way.

- Used theme_table, totally forgot about it, looks way more consistent now, thanks for the hint.

- JS: I can't use Drupal.settings as it somehow seems to be to slow, the Edge preloader has already run through the critical code when JQuery.extend is done. Should have mentioned that in the code. I'll look into other options in future releases.

- I added the demo composition links above, all compositions from the Edge showcase website should work, e.g. Marketshare Demo

Thanks again, hope it all works now.

ti2m’s picture

Status: Needs work » Needs review
iptechlabs’s picture

Status: Needs review » Needs work
StatusFileSize
new17.28 KB

Hello,

- There is a displayed bug when I upload a zip file.

- It is better to add a description indicating the extensions files that we can upload (zip, tar, gz) in the form.

- Why does this function edge_compositions_admin_form_submit() is declared and not implemented?

ti2m’s picture

Issue summary: View changes

Added showcase links

ti2m’s picture

Status: Needs work » Needs review

Hi,
thanks for reviewing!

- The error is not coming from the zip format, it looks like the archive didn't contain a valid composition. What composition did you try to upload? The Marketshare demo I posted above, or a custom composition? The marketshare demo works on my installation and multiple other installations I know of. Maybe you can sent me the archive (edge@timm-jansen.de), then I can take a look.

- I have added a description for the allowed formats.

- I removed the empty hook _form_submission(). This is for future functionality, but of course doesn't make sense in the current release.

Timusan’s picture

Hey ti2m

I just finished a manual review of the functionality.

I thought it would be a good test to try out the ready-made examples that Adobe offers on their Edge website.
These where the Edge packages that I tested:

All of these demos seem to work perfectly. The interface is clear, I can immediately test my uploaded Edge.
The rebuild and delete just function as they should.
The blocks become available immediately and also work as they should.

There are only 2 things that caught my attention:

  1. The testing of the Edge should maybe happen in a JS model or a popup (though popups are evil, I know...) so the user does not leave her/his current screen.
  2. I was a bit confused about the severity of the status messages I got after uploading an Edge zip file:
    edge.0.1.6.min.js library already existed and was overwritten!
    json2_min.js library already existed and was overwritten!
    jquery-1.7.1.min.js library already existed and was overwritten!
    jquery.easing.1.3.js library already existed and was overwritten!
    Edge_sample_gettingjumpy2.edge was ignored and was NOT copied to the server.
    Edge_sample_gettingjumpy2.html was ignored and was NOT copied to the server.
    

    Maybe also tell the user that this is not a problem, just a status report?

Good job Ti2m!

The module seems to work out-of-the-box, as advertised without any setup hassle.
It gets a big thumbs up from me...!

Cheers
T

Timusan’s picture

Issue summary: View changes

Add reviews

ti2m’s picture

Hi Timusan,

thanks a lot for your review and for the functionality test! Am glad to hear it all works as supposed to.

  1. I'm not a big fan of popups. I'm planning a detail page for each compoision in the next version, maybe I'll integrate the preview inline there. But thanks for the idea.
  2. You are right, that was still on my todo. I now grouped the messages and changed the wording. I have also separated "updated", "obsolete" and "ignored" files. The first two output "status", the last one "warning" message. Think its way clearer now.
ti2m’s picture

Added tag: PAReviews: review bonus as outlined on http://drupal.org/node/1410826

Timusan’s picture

Status: Needs review » Reviewed & tested by the community

Et voila, as stated above...looks fine to me!

ti2m’s picture

Messed up setting the bonus tag before.

ti2m’s picture

Issue tags: +PAreview: review bonus

Copy and paste isn't always a clever idea.

ti2m’s picture

Issue summary: View changes

Add project review link

ti2m’s picture

Issue summary: View changes

Add review link

klausi’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -PAreview: review bonus +PAreview: security
StatusFileSize
new1.81 KB

Review of the 7.x-1.x branch:

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

manual review:

  1. "admin/structure/edge/%/rebuild": this path is vulnerbale to CSRF. You should have some sort of token or confirmation form to not execute actions on GET requests. See http://drupal.org/node/178896
  2. "require_once 'edge_compositions_builder.inc';": classes are autoloaded in Drupal 7 with a files[] entry in the module's info file. Remove those lines and add edge_compositions_builder.inc to the info file. See http://drupal.org/node/542202
  3. edge_compositions_comp_render(): do not inject script tags. Use Drupal.settings with drupal_add_js() to pass configuration settings to Javascript. See http://drupal.org/node/756722
  4. edge_compositions_comp_create(): use drupal_write_record() instead of db_insert() and you get schema validation for free.

The CSRF issue is a blocker, so I have to bump this back to "needs work". Otherwise this looks pretty ready. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

ti2m’s picture

Status: Needs work » Reviewed & tested by the community

Hi klausi,

thanks a lot for the detailed review! That was quiet helpful for my general Drupal knowledge.

I don't think line exceeds are important, but as they just concern comments I decided to fix them anyway.

  1. Fixed that with a confirmation form, as I already did on the delete action.
  2. Removed require statements and modified .info file. Didn't know about the class auto loader.
  3. This is not that easy, as the configuration really needs to be inside the div of the composition, has to do with the script that reads the config and how multiple edge compositions with the same composition id work together. But as this will not be supported in this first release I removed it, I'll put more thought into it.
  4. Fixed, thanks for the hint, saw it the other day when debugging user registration, should have looked into it.

I made all the changes, which weren't too many, and fully tested the module functionality again. As klausi stated "otherwise this looks pretty ready" and it was RTBC before, I'll put it back to RTBC. Let me know if I'm not supposed to do this myself.

ti2m’s picture

Issue summary: View changes

Added review ref

ti2m’s picture

Issue tags: +PAreview: review bonus

Added tag: 'PAReview: review bonus' as outlined on http://drupal.org/node/1410826

As far as I understood I'm not supposed to remove 'PAReview: security' tag even if it's fixed, so am leaving it.

ti2m’s picture

Issue summary: View changes

Added review ref

klausi’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution, ti2m! Welcome to the community of project contributors on drupal.org.

I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.

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.

As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.

Thanks to the dedicated reviewer(s) as well.

ti2m’s picture

Thanks a lot everyone for all the reviews! Special thanks to klausi for all the work he's doing, I'll try to help out a bit.

ti2m’s picture

Status: Fixed » Active

Hi,
I have a follow up question and thought this would be the right place to ask.

I want users to be able to choose from a pool of external JS libraries that will be loaded with an edge composition, e.g. edge commons, createJS... I am aware you are not allowed to include third party code in your module, but I would just provide a couple of currently up to date url's for the most common libraries and then load them from the specific external server (maybe cache them locally).

I think that isn't a problem, or is it? Am basically doing what google analytics does. Adding the libs through the library api isn't an option as this is way to heavy and not practible for the user. Later on admins should be able to configure which libraries can be loaded by defining a library url stack.

Any help would be great, I looked for some time but couldn't find anything.

Thanks

klausi’s picture

Status: Active » Fixed

No, downloading files is not a problem as they are not hosted on drupal.org.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mcfilms’s picture

Timm's project is now a full-fledged awesome module. Check it out: http://drupal.org/project/edge_suite

mcfilms’s picture

Issue summary: View changes

Added review ref