Module Description
This module adds additional layouts for Display Suite. The extra layouts are more reusable than the custom layouts because it is packaged as a module. Since these layouts are provided as a module there is no dependency on the active theme. It also allows for a site builder or theme developer to more quickly use a layout that better fits the need of their project. This does not completely eliminate the need for a custom DS layouts, however, it does reduce it.

Personal Motivation
I'm personally a huge fan of Display Suite and frequently use it in many projects. In addition to the layouts provided by DS I frequently use custom layouts which are typically included inside the theme. I found that I often use the same custom layouts over and over again, copying them into a each new theme. To be more efficient with time and productivity I decided to package the most common custom layouts into a module making nearly any layout readily available regardless of the theme or project I'm working on.

Similar Modules
There is a very similar module called Display Suite Bootstrap Layouts which also provides additional layouts. The difference is that DS Bootstrap Layouts also requires your project to be using Bootstrap. Where the module I've created only depends on Display Suite.

Project Overlap
I've also posted in the Display Suite issue queue to make sure I was not duplicating or overlapping any efforts there. It sounds like there is no intention to include additional layouts into DS Core per this issue: https://drupal.org/node/2230277

PAReview
I've run my poject through PAReview.sh and have fixed all critical problems as well as complying with all but two coding standards. The remaining issues are lines longer than 80 cols and an inline comment. I'm curious to hear feedback on if these should be changed and how, otherwise, I feel everything is on par with the standard. You can see the last review here for reference: http://pareview.sh/pareview/httpgitdrupalorgsandboxjeremyr2224061git

Project Link
https://drupal.org/sandbox/jeremyr/2224061

Git
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/jeremyr/2224061.git ds_extra_layouts
cd ds_extra_layouts

Reviews of other projects
https://drupal.org/node/2260867#comment-8756051
https://drupal.org/node/2256993#comment-8756107
https://drupal.org/node/2254379#comment-8756113

Comments

jeremyr’s picture

Issue summary: View changes

Adding Git info

jeremyr’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus

Adding manual reviews and issue tag.

Mixologic’s picture

Status: Needs review » Needs work

Looks like there's an empty .gitignore that got accidentally added as part of commit a9c460f

Also, you should fix all of the discrepancies that pareview.sh is reporting. All of the comments that are over 80 chars should be split up into multiple lines.

The reason for this is that the codesniffer tool that pareview uses to verify the coding standard is a file that people *also* use in their editors.

In my editor, I get a slew of "warnings" along side the side of the window indicating problems. While they might not be that big of a deal, I would still have to check and see what kinds of problems they were. https://www.dropbox.com/s/q4hwdem5qai4ghk/Screenshot%202014-05-07%2023.4...

Keeping those things clean means if I ever wanted to submit a patch (say to add another layout) I would need to make sure I didnt introduce any issues myself...

Finally the 'full stop' one is really easy, its just worded silly. Just put a period after the comment, and it makes it compliant.

I didnt actually get to install this, as I dont use display suite, but LGTM. This module will probably save somebody a ton of gruntwork. Nice one.

heddn’s picture

There's also a lot of comments in the tpl.php files that don't end in full stops.

  <!-- Needed to activate contextual links -->
...
<!-- Needed to activate display suite support on forms -->

Not really a lot else besides, this module is a good idea.

jeremyr’s picture

Status: Needs work » Needs review

I've corrected the full stop errors (now that I know that means I need a period at the end and removed the the empty gitignore file.

Any other items I should clean up or is this read to move to the next step?

Mixologic’s picture

All of the comments that are over 80 chars should be split up into multiple lines.

Im still showing that theres 51 examples of lines over 80 chars. These are all in the comments at the beginning of every file. These are the same errors reported by pareview.sh - so, they still need to be fixed.

Do a search and replace for "String of classes that can be used to style" and replace it with "Classes for styling" and it will cut down *all* of those lines to something that doesn't throw any errors.

Additionally, I just noticed another issue: if you *did* have additional classes, you're going to need a space between the classes and the class thats already there in your template:

So, for example, if $below_right_classes = "customer-area", then the following line:

<<?php print $below_right_wrapper; ?> class="ds-below-right<?php print $below_right_classes; ?>">

will print something like

< div class="ds-below-rightcustomer-area"> 

which ends up with the ds-below-rightcustomer-area being mashed together) so you need a space between the classname and the <?php tag


Finally, *somebody else* needs to actually install this module and make sure it works, as I dont actually use display suite.

jeremyr’s picture

Aaahh, now I see... I've dropped all the comments in excess of 80 cols to the next line (for real this time).

Nice catch on the extra classes thing, I didn't think about that. However, in testing Display Suite core seems to take care of it for me. If I add a space then it will print out with two spaces, so what I have is correct.

https://dl.dropboxusercontent.com/u/32976550/Screen%20Shot%202014-05-10%...
https://dl.dropboxusercontent.com/u/32976550/Screen%20Shot%202014-05-10%...

Thanks for your help Mixologic!

Mixologic’s picture

Right on. I wasnt sure if that was an issue or not, as I assumed you had it working.

So, now, every file is green in my IDE, no errors whatsoever. All you need now is somebody with display suite to try this out. From a code style and formatting perspective this it totally RTBC.

parisek’s picture

I installed your module and successfully tested that it's working properly. Simple but useful module.

jeremyr’s picture

@parisek would you consider this "Reviewed & tested by the community", or is there need of a more testing?

bburg’s picture

I've installed this module and tested a a couple of layouts and they seem to work well. Might want to consider RTL language support sometime since it is something ds also offers. Looks good to me.

Mixologic’s picture

Status: Needs review » Reviewed & tested by the community

LGTM based on all the reviews.

jeremyr’s picture

@johnbburg RTL is a good idea, adding to the todo list
@Mixologic Thanks!

dman’s picture

Status: Reviewed & tested by the community » Fixed

I like the project idea, it's useful.
Good project page, well presented.
Thanks for following up the coder review issues. comment length seems trivial, but it's so much nicer and easier to green-light something that gets a 100% on the automated tests.

Behaves as promised. I sort of expected to see some attention paid to margins and other details when you publish a 66/33 layout etc, but that can be refined.
Nothing much that could go wrong with the code. It's a DS plugin that uses the published API correctly and does not introduce any new issues.

Suggest adding references to Panels Extra Layouts also, as it's a direct competitor, due to the way DS re-uses panels layouts automatically.

Based on the above reviews by others your co-operation through the process, clear introduction at the top of this issue, my own visual and (light) testing, and the previous RTBC :

-----------------------

Thanks for your contribution, jeremyr !

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.

jeremyr’s picture

That's Great! Thank you everyone for helping review this project... I actually learned a whole lot.

Status: Fixed » Closed (fixed)

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