overview
provides a views plugin to display content items form 8 different locations and 4 directions while scrolling. Can be used to display a single page or to build a whole website with multiple sections.
Sounds confusing?
check the views COSCEV basic demo that gives an out of the box overview of the module, views COSCEV advanced demo that shows the different options in action or the matrix picture supplied with the module.
Project Page
https://drupal.org/sandbox/stred/2123119
Git Repository
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/stred/2123119.git views_coscev
cd views_coscev
note: the short name of the module is views_coscev, the long one is Views COntent SCroll from EVerywhere
pareview still shows errors but they are only related to the views API
reviews
https://drupal.org/comment/8705207#comment-8705207
https://drupal.org/comment/8705389#comment-8705389
https://drupal.org/comment/8708663#comment-8708663
Comment | File | Size | Author |
---|---|---|---|
#24 | coder-results.txt | 2.37 KB | klausi |
#10 | Selection_045.png | 71.04 KB | gaurav.goyal |
Comments
Comment #1
xiukun.zhou CreditAttribution: xiukun.zhou commentedReview 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.
if you have define hook_views_api.them remove
http://drupalcode.org/sandbox/stred/2123119.git/blob/HEAD:/views_coscev....
Comment #2
stred CreditAttribution: stred commentedthanks for your review and the tip about the info file xiukun.zhou !
module has been updated.
Comment #3
jgullstr CreditAttribution: jgullstr commentedHi stred,
Initial Impressions
Whaaat? Haha, chaotic, I like it. I think there might be use for a module like this.
Administration
Works as expected, got it up and running without reading any documentation, setup was intuitive. Administrative texts could use some polishing but overall good.
Browser compability
Tested and working in FF 25, Chrome, IE11
Code
Coding standards are followed thorughly.
You're missing a reference operator on line 10 of views_coscev_style_plugin.inc
Strict warning: Declaration of views_coscev_style_plugin::options_validate() should be compatible with views_plugin_style::options_validate(&$form, &$form_state)
You should review your function block comments, some of them are incorrect.
views_coscev.module(#24) should be hook_coscev_views_pre_view for example.
I do not understand the use of $GLOBALS['views_coscev_displays'], can you elaborate on that?
Other
I think you need to specify the theming part on the project page as it limits the scope
of the module to a large extent.
All in all - nice module, but needs some work!
Comment #4
stred CreditAttribution: stred commentedhi jgullstr,
thanks for you enthusiast comment and your deep review. I've modified the code, mainly the comments and the project page, as well for the $GLOBALS usage.
I don't see what you mean by "You're missing a reference operator ..." anyway thank you for your great comment!
Comment #5
gaurav.goyal CreditAttribution: gaurav.goyal commentedHey Stred,
Good module but needs a little work, i was looking for something like this since a few days, hope to see this soon as a full project, Effects are working nicely.
My Reviews :
1. I got a strict warning after creating a view and this warning is on the page also. what i understood this warning is coming from the function options_validate parameters. (https://api.drupal.org/api/views/includes%21plugins.inc/function/views_p...),
here replace $form with &$form solves the problem, (correct me if i am wrong.).
2. Coder module gives some warning for incorrect coding standards.
3. In the view, under format settings, as i understood the title settings are for view title, and these settings seems to have some problem with them, they didnt worked for me.
else everything looks good from user perspective.
Overall Awesome work and a nice module.
Comment #6
gaurav.goyal CreditAttribution: gaurav.goyal commentedComment #7
jgullstr CreditAttribution: jgullstr commentedHello again,
The reference operator is, as gaurav.goyal pointed out, the "&" in front of $form.
Another suggestion would be to replace $GLOBALS['views_coscev_displays'] with a static variable instead, since you seem to reset it each page call anyway. That would remove the need of hook_init. Also, unless I'm mistaken, can't you increment the variable in the process function instead, or should it be incremented for each view, even those not associated with this module? If that's possible, you can remove hook_views_pre_view as well.
Comment #8
stred CreditAttribution: stred commentedthanks for your reports and your comments gaurav.goyal and jgullstr.
it is solved for the strict warning. Even when i change the error reporting to E_ALL I don't see it... ? anyway should be fine now.
For the use of the $GLOBALS['views_coscev_displays'] it is quite complicated because I need to know the number of displays (attachments) BEFORE processing the view (views_coscev_process_views_coscev_view) so static variables don't help. and i didn't see anything in views API that brings this information... the only solution i have found is the one implemented ... quite nasty...
@gaurav.goyal
2/ coder outputs errors but they are related to views, nothing that I can change.
3/ title options are for the title of the attachment, not the main title of the view itself. You can see title options in action here http://thomas.lemaire.name/views-coscev/advanced titles are on a black background, top left. if you still encounter any errors, please report it more precisely please!
Comment #9
jgullstr CreditAttribution: jgullstr commentedAh, I see why a static won't work in the process function. Sorry for the confusion. How about removing hook_init() and using a static in hook_views_pre_view() instead?
Does the process function implement hook_process_HOOK? Block comment says hook_process, but that doesn't seem right.
I would also like to see a condition in hook_views_pre_view() that the view in question actually uses this module (otherwise there will be problems if and when the requirement of a blank page is resolved). I checked the data provided to the hook and something along the lines of this might work;
Then check if &drupal_static('views_coscev_displays') is greater than zero in your process function, as plugin_name wont be set in the page display. I cannot, however, guarantee that this is sound, but it might give you some ideas.
I would have someone more familiar with Views API have a second look before changing status to RTBC, as my limited knowledge of it prevents me from doing it with a clear conscience. Consider getting a review bonus by reviewing other applications (shameless plug) to lure the experts out of their lairs.
Also, providing database dumps of your examples would make it easier to test the functionality.
I'll leave status as "Needs review" as I don't think any of my blabberings are blocking issues.
Comment #10
gaurav.goyal CreditAttribution: gaurav.goyal commentedHey Stred,
#2. On reviewing with coder it gaves error in your .module file, attached is the screenshot. There should only a single space before and after any operator (https://drupal.org/coding-standards#operators), In Line no. 50-55 of .module file, there are more then one spaces with "." operator.
there are also some comment block missing related issue in views_coscev_style_plugin.inc, views_coscev.test, views_coscev.js files.
#3. yes, titles are working fine :).
Comment #11
gaurav.goyal CreditAttribution: gaurav.goyal commentedComment #12
stred CreditAttribution: stred commented@gaurav.goyal .module updated, I rely on pareview that doesn't output those errors ...
@jgullstr thanks for pointing me out in the right direction for not using $GLOBALS and hook_init(). The code will be now only executed when the module needs it. great!
Comment #13
pijus CreditAttribution: pijus commented1. Functions and methods should be named in lowerCamelCase in the
views_coscev.js
. Like -function pxOrPercent(field, settings) {
2. Control statements should have one space between the control keyword and opening parenthesis, to distinguish them from function calls in the
views_coscev.js
. Like -3. Variables in JavaScript should be lowerCamelCased in the
views_coscev.js
. Like -var
diff_scroll
should bediffScroll
.Please see the javascript coding standard. https://drupal.org/node/172169
Comment #14
pijus CreditAttribution: pijus commentedThis definitely does not implements hook_process(). The module is views_coscev, so the function-name would be views_coscev_process, not views_coscev_process_views_coscev_view().
-----------------
- Each parameter of a function must be documented with a @param tag.
- If a function has a return value, it must be documented with a @return tag.
This should be -
See the API documentation and comment standards https://drupal.org/node/1354#functions
Comment #15
stred CreditAttribution: stred commentedthanks for you report pijus. Coding standard issues have been fixed
Comment #16
alinouman CreditAttribution: alinouman commentedI have tested your module and its working fine. A little performance issue in your js file you are using $('body') quite a times on line 8,9,56,126,127,157,158 . Good javascript method would be
Thanks for your contribution.
Comment #17
stred CreditAttribution: stred commentedthanks for your suggestion alinouman but this is far from a blocking issue... !!
Comment #18
heddnNot a lot left on this module. Some very small stuff and this can get marked RTBC. Really only the version in the .info file and whitespace around == is required. But the rest of my comments are good info and should be followed-up on.
.info file is missing version details:
version = 7.x-1.x
css file:
0% for top, bottom, etc is redundant.
Whitespace around the equals:
js file:
$.fn.position_me, $.fn.title_reset, etc.
$.fn namespace is on the root. This can / maybe will causes issues with other modules. Namespace them to the module and you'll be certain not to step on other's toes.
For goodness sake, assign body to a variable and pass it 'context'.
$('body', context)
Comments in js should start with a capital letter and end with a full stop. i.e. be sentences.
tpl files:
Make it easier on themers and format the if statements with some more whitespace.
* Count the amount of displays used (see line 113).
A little more helpful comments would be great. Line 113 has nothing to do with counts.
Test file:
Ln 90: Avoid unused local variables such as '$node'.
Comment #19
stred CreditAttribution: stred commentedHi heddn,
First thank you for your review and your tips!
Putting the version in the .info file is Discouraged https://drupal.org/node/542202#version . I'll check the rest and come back to you.
Comment #20
gobinathmstred, you are right. Normally version numbers are generated by Drupal.org package manager script. Hence its not necessary to include in .info
FYI, These numbers are generated by referring tag (or) branch name of current release.
Comment #21
stred CreditAttribution: stred commented@heddn I've changed a couple of things accordingly to your suggestions.
can you please elaborate
thanks again
Comment #22
heddnCSS:
0% is the default.
JS:
$('body', context).hide()
See http://api.jquery.com/jQuery/#jQuery-selector-context
tpl:
I won't argue with what's in core, however its hard to read :)
Comment #23
stred CreditAttribution: stred commentedjs fixed in latest commit
review bonus tag added
Comment #24
klausiReview 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:
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 #25
stred CreditAttribution: stred commentedHi klausi,
thanks for your review. coder issues have been fixed.
- for the implementation of the function, no idea... I picked it up from another module that didn't document it and it just works as expected... but I'm interested if someone can explain it!
- I've added a check_plain to the $title. I thought it was sanitized by views.
Comment #26
klausino objections for more than a week, so ...
Thanks for your contribution, stred!
I updated your account so you can 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 stay 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.