With Views Slideshow J360 we'll be able to add 360 degree images into our Drupal pages. Depends on Views Slideshow

There are various options in the original jQuery plugin but not all of them has been implemented.
ATM you can add:

  • Multiple images at once
  • One inline sprite
  • One grid sprite
  • Panoramic images

Info

Review bonus

Comments

aritra.ghosh’s picture

Status: Needs review » Needs work

Hii,

Smells like a great module. However here are some points found by a quick manual review:

1. Remove LICENSE.txt file. It will be automatically added by Drupal druing packaging.
2. Remove version, project, datestamp from .info file. These will also be be automatically added by Drupal.
3. Drupal is pretty strict with coding style and indentation issues. There are presently lots of them in the module. Please take time to fix them.

Its good idea to run you module through the coder module and automatic code sniffer and fix the errors.
http://ventral.org/pareview/httpgitdrupalorgsandboxsardbaba1821032git

Also install and use coder module to fix the coding style issues.

Good Luck!!..
Aritra

sardbaba’s picture

StatusFileSize
new70.69 KB

Hello and thanks for your comment!

I've solved issues 1 and 2. The 3rd it's partially solved in this sense: I've installed coder in my environment and after some fixing it's ok (see attachment) but when I run it on ventral, I got many whitespace|indentation warnings|errors. Do I have to consider Ventral.org stuff?

sardbaba’s picture

StatusFileSize
new32.44 KB

:::tumbleweed:::

Ok! It seems that there is no way to publish this module. I don't understand... How can I publish my module?

I'm sorry to write this but meanwhile that this module is waiting to be published, I've put 3 plugins into the Wordpress repository. When, in Wordpress, you want to publish a plugin/theme, you need to fill out this form http://wordpress.org/extend/plugins/add/ and after 2-3 days (and yes, they also approved it on saturday), someone inspect your plugin and if all things are done good, it's online in seconds.

Ok, this is not Views, Panels or CTools, but I would be happy to be able to publish it... if it's possible...

lolandese’s picture

Status: Needs work » Needs review

Ciao Mauro,
Some considerations regarding your points in #3, the review application:

  • is a one-time process (once inside, no more hassle)
  • avoids D.O. being cluttered with (duplicate) modules (clean)
  • is educational (free advice)
  • leads to readable code, being forced to follow standards and include comments (facilitates cooperation afterwards)
  • gets accelerated (a lot) once you get a review bonus (fair).

From your personal site can be deducted that you are an active user of several CMS. It's only logical you compare the process. In fact it's a valuable asset for the community to have members with a broad experience like you. Comparing is a good way to spot possible improvement.

The feedback on your module so far is indeed a bit meager, despite the fact the module offers an interesting feature set (wow, what a nice demo). I thought it was due to a certain complexity (Javascript and theme functions are involved), but it's actually not that hard. In any case I think that a simple module sometimes has an advantage in the review process because it's easier accessible for reviewers.

"Do I have to consider Ventral.org stuff?"
Yes, but in your case it seems that they are most minors. Consider it might report false positives in some rare cases.

I'm feeling a bit guilty for my off topic chatting instead of delivering a to-the-point technical review. I hope you are persistent, because especially you can know Drupal is worth it. As well the hard work of many people in it's community makes it worthwhile. In any case you're not alone in your opinion, but everything has a flip-side.

Aah, and another reason the feedback might be scarce, once you fixed some issues like you indicate in #2, setting the status back to "needs review" gives it a better exposure in the issue queue.

sardbaba’s picture

Ciao Martinus,

thanks for your support (for both cheering me up and for remembering me that I have to set "needs review").

I didn't know about Review Bonus (there is a lot of things to learn!), it's a great thing, but I don't know if I have the time to do it well (3 for 1 it's an hard work, considering also writing your own code).
Apart from that, I did everything I should to let reviewer to speed up the review process, so I hope someone will review it and kick down the tumbleweeds ;)

In the meanwhile, cheers!

jhaskins’s picture

Status: Needs review » Needs work

I don't see any issues with the code but there are a few issues with the project in general:

  1. You don't have a release branch in your git repo (see http://drupal.org/node/1015226)
  2. I'm not an expert on licensing but there may be a conflict between the cc-by-nc license used by the spritespin plugin & the gpl that distributed Drupal modules use. At the very least, the license file added by the drupal.org packaging scripts may cause confusion about the license. It may be best to not distribute it with the module & instead prompt users to download & install it separately.
  3. You should consider using the libraries module to include spritespin. Going along with #2, that page also provides some more info about why 3rd party libraris shouldn't be included with modules.
sardbaba’s picture

Status: Needs work » Needs review

Thanks Joe and sorry for my delay but without an email alert it's difficult to be advised :)

I've done what you ask:

1. Added "version = 7.x-1.x-dev" to the info file (even if I thought it would automatically be added by drupal.org packaging script)
2. I've removed the library and I've added a link to download it from my personal website, because it's a modified version to fit the Drupal needs.
3. Since I added the external download, I think it's better to put it in the module folder (also because is a library rarely used by other modules)

ain’s picture

Status: Needs review » Needs work
StatusFileSize
new14.89 KB

Nice idea for a module.

The result for the automated review is attached. There's a lot to fix, use the PAReview script to validate as you go through the fixing process.

Result of the manual review:

  1. You don't have the necessary branch on Git repository, it's still a master, but should be referring to a version, see Moving from a master to a major version branch.
  2. Automated review revealed that you're using tabs instead of spaces for indenting the lines across all files. Drupal coding standard is 2 spaces per a tab. Configure your code editor for it. Both Netbeans and Eclipse have settings to remove trailing whitespace or handle tab width. There are good resources available on Community Docs, e.g. Configuring NetBeans.
  3. views_slideshow_j360.module ln 33: glob() call does not make any sense there as you're not expecting back a list of files, but confirming a single file. It is overly expensive to do it like this, use file_exists() instead and you can also dump the array_shift().
  4. views_slideshow_j360.theme ln 25: you're using extract() to populate local variables for an associative array of settings. While it's convenient, It's not transparent and code becomes challenged in terms of readability. One has no idea if the variables assigned to $settings exist or derive from $options. Please make it more transparent and obvious. Follow the KISS principle and try to keep it DRY.
  5. The same transparency issue is keeping methods in different files, e.g. _views_slideshow_j360_library_path() from views_slideshow_j360.module is used in views_slideshow_j360.theme.inc only. While separation is often a good thing, it does not deliver here. You could easily join these 2 files and it'd all become a lot clearer, plus it's one file less to access the disk for.
  6. In the installation documentation, you advise user to download an external library and upload it to the module folder. This is generally a bad idea and you don't want user juggling with your module layout. I'd suggest advising a user to upload under sites/all/libraries (sites/sitename/libraries for multisite) instead and using Libraries API in the module to fetch it.

Good luck!

sardbaba’s picture

Status: Needs work » Needs review

Hi Ain, thanks for taking your time to make a review of my module.

I think many of the automated review problems are really out of the world and frustrating. If this means writing good code... well... I can spend my time in a better way. But don't get me wrong. I love Drupal! It's just that all these restrictions to get, in any case, modules filled with bugs is rather useless.

Anyway, I'm here to try to publish my first Drupal module and I'll try to do my best for that.

About the manual review:

1. Ok, done.
2. I'm actually using Eclipse Juno with Drupal Eclipse PDT. I've reformatted the code. I've done some checks with Ventral (I can't get PAReview to work on my env) and seems to be pretty good.
3. and 4. The code I've used is based on the same code from another approved module: Views Slideshow Galleria ...
5. Ok, done.

ain’s picture

Status: Needs review » Needs work

Automated review

The module still has errors, see http://ventral.org/pareview/httpgitdrupalorgsandboxsardbaba1821032git-7x...

Manual review

  1. Good README.
  2. Re views_slideshow_j360.module ln 33 glob() usage: code in approved module doesn't necessarily mean it's a totally valid. Please keep in mind that this approval process here is not about a particular project approval, but full project access, citing Apply for permission to create full projects:
    After contributing a useful and working module or theme as a sandbox project, you may go through a one-time approval process to get permission to promote it (and future projects) to a full project.
  3. views_slideshow_j360_spritespin_path() return type undefined, should be mixed, e.g. @return mixed.
  4. template_preprocess_views_slideshow_j360_main_frame() parameters undefined.
sardbaba’s picture

Status: Needs work » Needs review

Hi again Ain,

Automated review

7.x-1.x+1-dev seems to be good.

Manual review

1. Thanks
2. You are right sorry! the glob/array_shift for this stuff was pretty ugly.
3. ok
4. ok

drupik’s picture

Status: Needs review » Needs work

Hi Sardbaba.

I manually reviewed your module (7.x-1.x+1-dev):

  1. 7.x-1.x+1-dev branch name is incorrect, use 7.x-1.x as your main development branch: http://drupal.org/node/1015226
  2. In views_slideshow_j360.module on line 37 you call the _views_slideshow_j360_library_path() function, but this function does not exist (should't be views_slideshow_j360_spritespin_path()?)
  3. Your default branch is 'master', change default branch: http://drupal.org/node/1659588, and also remove master: http://drupal.org/node/1127732
  4. Your module depends on views and libraries, but there is no dependencies in the .info file.
  5. views-slideshow-j360-main-frame.tpl.php - I do not know whether these are coding standards, but all of template files that I've seen look different, instead of doing things like this:
    echo '<div id="views-slideshow-j360-images-' . $id . '" class="views-slideshow-j360-images ' . $classes . '">';
    you should do this:
    <div id="views-slideshow-j360-images-<?php print $id; ?>"class="views-slideshow-j360-images <?php print $classes; ?>">, also that 'foreach' can be done in theme_preprocess_views_slideshow_j360_main_frame(&$variables);
  6. views_slideshow_360.js - comment: "Debug settings values..." - I think that it is no longer needed.

If I'm wrong, forgive me, but this is my first review :)
Looking forward to this module, very useful for displaying commerce products.

sardbaba’s picture

Status: Needs work » Needs review

Hi Drupik, thank you so much!

1. and 3. ok, I've removed all branches (included master) and left only 7.x-1.x
2. Yes, it was the previous name... what a head!
4. and 6. you are right! done.
5. Ok, done.
About the foreach on theme_preprocess_views_slideshow_j360_main_frame I'm not sure what do you mean.

Ventral is good

drupik’s picture

Hi Sardbaba, good work!
I mean, for example, the developer for each view may have its own template, and each time it has to copy the long code, so a better idea is to move it to preprocess functions. To better understand what I mean, I enclosed patch.

Deeper manual review :)

  1. views_slideshow_j360.views_slideshow.inc line 11, 12:

    Do not document parameters and return value though -- these are documented on the hook definition referenced in the summary line. http://drupal.org/node/1354#hookimpl

    Just

     /**
    * Implements hook_views_slideshow_slideshow_info().
    */

    is sufficient here.

  2. views_slideshow_j360.views_slideshow.inc line 45, 46 - You used C style comments within function.

    C style comments (/* */) and standard C++ comments (//) are both fine, though the former is discouraged within functions (even for multiple lines, repeat the // single-line comment). Use of Perl/shell style comments (#) is discouraged. http://drupal.org/node/1354#inline

  3. I don't know why coder module report this:
    views_slideshow_j360.views_slideshow.inc
    Line 42: Potential problem:drupal_set_message() only accepts filtered text, be sure all !placeholders for $variables in t() are fully sanitized using check_plain(), filter_xss() or similar. (Drupal Docs) [security_3]
    drupal_set_message(t('You must install the spritespin plugin. You can find it at !website', array('!website' => $link)), 'error');
    but if change '!website' to '@website', warning no longer appears.
  4. views_slideshow_j360.js - variables like orig_width should be lowerCamelCased - origWidth
    Unlike the variables and functions defined in Drupal's PHP, multi-word variables and functions in JavaScript should be lowerCamelCased. The first letter of each variable or function should be lowercase, while the first letter of subsequent words should be capitalized. There should be no underscores between the words. http://drupal.org/node/172169#camelcasing
  5. views-slideshow-j360-main-frame.tpl.php - inline css: style="display:none" - is it possible to move it to a .css file?
  6. Add git clone link to Issue Summary.

But these are trivial errors, installed and tested the module, works as expected, so for me it is RTBC.
But the last word belongs to the git administrator, so to speed up the review process, participate in the review bonus.

Good luck Sardbaba, keep the great work.

sardbaba’s picture

Status: Needs review » Reviewed & tested by the community

Hi drupik, you are absolutely right! Thank you so much for your contribution and for the patch.

1. Yep
2. Ok...... I do not completely agree with this, but it's a Drupal crazy-stuff! Done! ;)
3. No problem, changed
4. Yep, sure! I changed them, thanks.
5. Thinking about it, it's better to use an input type="hidden" because is a placeholder to take the value into js. I changed it.
6. ok

Thanks again drupik, now I hope someone of the git administrators takes some time to see this module :)

klausi’s picture

Status: Reviewed & tested by the community » Needs review

Do not RTBC your own issues, see http://drupal.org/node/532400

We are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)

klausi’s picture

Status: Needs review » Reviewed & tested by the community

Oh, just saw that drupik argued for RTBC, so this is probably right. Sorry for the noise :-)

klausi’s picture

Issue summary: View changes

Added link to git

sardbaba’s picture

Yep @klausi :)

To summarize, I got a:

  • quick manual review at #1 by @aritra.ghosh
  • manual review at #8 by @ain
  • another manual and one automated review at #10 by @ain
  • one manual at #12 by @drupik
  • another one deeper manual review at #14 by @drupik (+ RTBC)
sardbaba’s picture

Issue summary: View changes

Better git clone command

klausi’s picture

Status: Reviewed & tested by the community » Fixed

manual review:

  • "(int) check_plain($frametime)": that check_plain() is useless here if you convert the string to an integer anyway.

But that is not an application blocker, so ...

Thanks for your contribution, sardbaba!

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.

sardbaba’s picture

YEAH!!! The review process is pretty long but the promotion to a full project is like a win (and in this sense is pretty better than Wordpress lol)! :)

Thank you klausi and thanks to all reviewers, naturally!
I'll try to return the favor to the community, as best as I can do ;)

drupik’s picture

Congrats sardbaba, all the best :)

lolandese’s picture

Well done. Time for an Ichnusa, I guess. :)

sardbaba’s picture

lol! Yep but today is time to drink some wine, especially Cannonau ;)

sardbaba’s picture

Just one last doubt: I've been able to create a release for the project but I don't see any downloadable file in the Download section of the project page. Any thought about it?

drupik’s picture

Hi sardbaba.
I'm not sure, but I think you should add tag to project: git tag 7.x-1.0 or for dev git tag 7.x-1.x and push the changes.

lolandese’s picture

Go to http://drupal.org/node/1821032/edit/releases. Check "Show snapshot release".

To create a stable relaease follow the instructions under "Version control", then http://drupal.org/node/add/project_release/1821032 (also at the bottom of the project page (in View mode). It takes some time for a new release to show up. Look at http://drupal.org/node/1821032/release. If they are red, they're not published yet (visible for you but not for others).

sardbaba’s picture

Thanks again guys! the dev version is now on the main page and I'm waiting for the stable one (done just now the tagging).
Cheers!

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

add review bonus