Project Name : Responsive Block
Synopsis
Responsive Blocks is a solution for Responsive Designing.
Device specific ( Resolution Specific ), content or Display of conditional content can be managed using this module
e.g. - A block of content need to be displayed only on IPAD ( ipad resolution).
- This can be configured in the configuration of that block. (Attached Image will give more idea.)
Known problems
Possibility of having multiple re-solutions for mobile devices needs to be taken care of.
One of the item in TODO list : Support multiple resolutions.
Similar projects and how they are different
Modules available in the community that provide similar functionality :
1. Mobile Detect
Mobile Detect module is built on top on mobile Detect - PHP Library
2. Context Mobile Detect
This is a Context module which integrates Context and PHP Mobile Detect library Mobile_Detect.
3. Browscap
Browscap provides an improved version of PHP's get_browser() function .
Whats Different in this module :
- This module is built using Javascript Library (Media Check)
Hence, All Clientside (Javascript) ; No server callback to detect device.
- Media check library works based on break points
Project Sandbox Details :
https://www.drupal.org/sandbox/swaps/2229089
Git Clone Details:
git clone --branch 7.x-1.x git.drupal.org:sandbox/SwapS/2229089.git responsive_blocks
Reviews of other projects:
https://www.drupal.org/node/2360537#comment-10020103
https://www.drupal.org/node/2362247#comment-10020301
https://www.drupal.org/node/2471060#comment-10020333
https://www.drupal.org/node/2506231#comment-10029191
| Comment | File | Size | Author |
|---|---|---|---|
| #39 | coder-results.txt | 7.6 KB | klausi |
| responsive-blocks.jpg | 55.83 KB | swaps |
Comments
Comment #1
swaps commentedComment #2
swaps commentedComment #3
PA robot commentedGit clone command for the sandbox is missing in the issue summary, please add it.
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.
Comment #4
swaps commentedUpdated Issue Summary with git Clone Details.
Comment #5
swaps commentedComment #6
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxSwapS2229089git
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #7
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #8
swaps commentedComment #9
Chandan Chaudhary commentedComment #10
naveenvalechaWe 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 :-)
Comment #11
slowflyer commentedAutomated Review
FILE: /var/www/drupal-7-pareview/pareview_temp/responsive_blocks.module
--------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------
123 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
124 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
125 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
183 | ERROR | [x] Array indentation error, expected 4 spaces but found 2
184 | ERROR | [x] Array indentation error, expected 4 spaces but found 2
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: /var/www/drupal-7-pareview/pareview_temp/responsive_blocks.module
---------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------
22 | WARNING | Do not use drupal_add_js() in hook_init(), move it to your
| | page/form callback or use hook_page_build() instead
---------------------------------------------------------------------------
Manual Review
Use hook__preprocess_html(&$vars) instead of hook_init(). Using hook_page_build() as suggested from pareview.sh will result in one more warning.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements. / No: List of security issues identified.
Comment #12
slowflyer commentedComment #13
kscheirerFixing priority, "Critical" is only for applications in "Needs Review". See https://www.drupal.org/node/539608#application-priorities.
Comment #14
swaps commentedFixed the review comments by Slowflyer and also other Pareview.sh observation.
Comment #15
swaps commentedComment #16
swaps commentedComment #17
jzasnake commentedAutomated Review
The automated found some small errors, check them out at https://www.drupal.org/node/2316301#comment-9707687
Manual Review
Individual user account
Yes: Follows
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
No: Does not follow the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
README.txt
(+) You don't have any introduction, installation or configuration sections
Misc
1) I found that the git clone details in the issue summary were trying to connect via your account, prompting me to enter your password.
Type it like this instead:
git clone --branch 7.x-1.x git.drupal.org:sandbox/SwapS/2229089.git responsive_blocks2) Also there is a file in your /js directory that is called 1 and is a copy of responsive_blocks.js except that it doesnt have a file extension. So you should delete this file since my guess is that it is not necessary.
Comment #18
jzasnake commentedComment #19
swaps commentedComment #20
swaps commented@jzasnake : Thanks for your review comments.
All the comments are addressed. Preview report looks Clean as well :)
Comment #21
swaps commentedComment #22
saurabh.tripathi.cs commentedManual Review.
Instead of using drupal_add_js(), It is always recommended to use $form['#attached']['js'].
Refrence:
http://drupal.stackexchange.com/questions/90040/what-is-the-difference-b...
Comment #23
swaps commented@saurah.tripathi.cs .. I dont have form to attach JS ... But Checking more on drupal_add_js and concept around drupal's caching based on render array ..this would really help when caching is enabled.
http://www.vdmi.nl/blog/drupal-attached https://api.drupal.org/api/drupal/modules%21block%21block.api.php/functi...
Will make the required changed.
Comment #24
swaps commentedImplemented required changes for #22.
Comment #25
e.bogatyrevHi SwapS,
Thanks for contributing.
Manual Review
There are some issues I found:
responsive_blocks.module
responsive_blocks.js
Comment #26
swaps commented@e.bogatyrev Thanks for your review.
Addressed all your comments .
Comment #27
swaps commentedComment #28
joachim commentedYou're putting the settings for ALL blocks into a single variable. That's going to be dreadful for performance on sites with a lot of blocks. You need a table for this.
This doesn't seem to get called at all.
Consider simply making Libraries module a dependency.
Slurping in the README file for your hook_help() isn't very good practice. Generally, a README contains details such as what the module does from a 'why should you use this?' POV, and installation instructions. Neither of these are relevant in hook_help(). Also, hook_help() should give links to admin pages, which a README can't.
You should really consider making use of existing contrib modules that let users define breakpoints. It's highly likely that users need to define breakpoints for other uses, and this makes them duplicate that information.
Additionally, there are some code formatting issues, especially around multi-line arrays.
Comment #29
swaps commented@joachim : Thanx for your review.
I have made required changes as suggested.
Comment #30
hussainwebAutomated Review:
Manual Review:
responsive_blocks.module
Line 16:
I think this return is extraneous and can be removed. Not a biggie.
Line 142:
Typo:
Select options if block needs to be displayed on specific resolutions( Specific devices )should beSelect options if block needs to be displayed on specific resolutions (specific devices).Comment #31
swaps commentedThanks @hussainweb for your review .
All your suggested comments are addressed .
Thanks,
SwapS !!
Comment #32
swaps commentedComment #33
swaps commentedComment #34
swaps commentedComment #35
swaps commentedComment #36
swaps commentedComment #37
swaps commentedComment #38
klausiReview of the 7.x-1.x branch (commit 78f371b):
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:
Although you should definitely fix those issues they are not critical application blockers, 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 Naveen as he might have time to take a final look at this.
Comment #39
klausiOops, forgot attachment.
Comment #40
swaps commentedComment #41
swaps commentedThanks Klausi.
I have incorporated your suggestions as well.
Regards,
SwapS
Comment #42
naveenvalechaReview of the 7.x-1.x branch (commit 4e94e77):
Manual Review :
Comment #43
naveenvalechaThanks for your contribution, SwapS!
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.