Hello,
Ive been creating a module to implement this solution.
I started around a couple of months ago at my sandbox,
and after having some feedback and worked on fixing issues,
when i was just about to have a stable release and asking for drupal.org to aprove and oficialize my module,
I came to find out about the Responsive Menus module.
As we know, Drupal values collaboration over competition, so being that this two modules does similar things, i must reside if there is a justification for releasing the module that i have been developing as another module or if there is a possibility of merging the projects.
Here is the link to the project sandbox: https://drupal.org/sandbox/x7ian/1996698

I believe there are some differences between the modules, Mobile Navigation has some more personalization options in an attempt to make the behaviour of the menu configurable.

I tested Responsive Menus and i see this differences and similarities:
* Responsive menus is much lighter, with less configuration options.
* Is Responsive Menus intended to work with multiple levels on menus?
* Functionality seems quite different. Mobile Navigation Makes a clone of the menu. I had to do this cause one of the goals of Mobile Navigation is to work with any menu, regardless of what plugin is being used on that menu. Given that all this menus will have their special classes and binded javascript depending on the plug-in used, That JS was conflicting with Mobile Navigation JS, so the solution i found was to create a clone of the original menu and work the mobile version on this clone.
Ill be reviewing more on differences and similarities of this modules and posting my impressions here.

Please test the Mobile Navigation module and comment your impressions on this issue,
so we get to a conclusion on whether this two modules must exist as independent or they should be merged into a centralized solution for the displaying of nice functional adaptive responsive menus.

Comments

jwjoshuawalker’s picture

Hi x7ian,

Thank you for informing me of this. I see 2 paths you could take, both of which result in you publishing an independent project page (module) here on d.o, which I will get to at the end.

I have downloaded your module, looked through the code and tested on a site.

You are correct, that Responsive Menus at it's core, is designed to be very lightweight and simple. The path that Responsive Menus is taking, is as a parent container for responsive menu options. Think of the WYSIWYG module for Drupal. A centralized solution. It currently comes with a very lightweight responsive menu style out of the box, and will come with more options as time goes on.

The next version will see many changes, most are noted in the feature request tickets currently open on the Reponsive Menus project.
The addition of a 'hook_responsive_menus_info()' or similar, will be the method which other styles are added. The basic responsive style provided with the Responsive Menus module will also be switched to use this hook.

Already one major difference I see between ours, is Responsive Menus has no limit to the amount of menus you can apply it to. For that matter, they don't even have to be a menu, you can affect any element - if you wanted to collapse certain blocks, content or other items at a given width.

From there, the other big change will be 'sets of settings', like many modules around Drupal: Context, jwplayer, breakpoints, etc. Responsive Menus will allow you to choose your elements to affect, several style settings, and then save those as a 'set', and you could then add another set to use a different responsive menu style for some other element on the page (independent of the other).

Responsive Menus' main aim, again is to be a parent container for other options, providing hooks and a 'plug yours in' type ability. I will be adding the popular 'MeanMenus' javascript library as a style option, as well as others down the road.

Back to your 2 options as I see them:
1) Release your module as you planned.
2) Release your module as a style plugin for Responsive Menus module.

izmeez’s picture

Well, thank you both. Because I was following the thread on the sandbox mobile_navigation module I have discovered the responsive menus module. This is good timing. I will be able to test these things out soon.

I'm also tagging along for this discussion. At first blush it would sound like a style plugin would be the best way to go wouldn't it?

jwjoshuawalker’s picture

Also, yes the currently included 'basic' style for Responsive Menus does handle multi-level menus.
Right now it just indents each level a little bit. I will also be adding a setting for that style to use indent or to have (+) and (-) expanding buttons for multi-level menus.

I changed the demo page for the module to show multi-level: http://drastikbydesign.com/page/responsive-menus-demo

If you wanted to go the plugin route, I would have to finish up that concept and get the specs to you. In the info hook, you'll return an array that specifies something like:

  • Name
  • Files (JS / CSS)
  • Settings options (some way to spec out options you want available - maybe just via a form_name to use)
  • Other stuff....

Just as an example.

izmeez’s picture

Title: Diferences and Similarities with Mobile Navigation Module » Differences and Similarities with Mobile Navigation Module

This sounds great, just fixing spelling in title of post.

izmeez’s picture

Testing both modules.

The mobile_navigation README.txt is more helpful. With the additional details it includes I found it helped me understand what to do to get both responsive_menus and mobile_navigation working. Yes, I appreciate it's very simple once you get it but for beginners more detail is helpful and mobile_navigation provides that.

I encountered an issue with mobile_navigation but I will open that in the correct issue queue.

jwjoshuawalker’s picture

Ok! Lots of new stuff today. You should be able to see the direction of Responsive Menus now.

The hook_responsive_menus_style_info() is in place to define multiple styles. See below for details

I won't be creating a new release yet, but it is in dev & is stable to use. One of the features is to be able to customize the text for the toggler.
The width of the toggler was unlocked for this, so if you want it to look the old way, make a css width rule for:
.responsive-menus.responsified span.toggler

https://drupal.org/commitlog/commit/55563/0b6f03563c59de1722ce3f28665239...

Params when declaring hook_responsive_menus_style_info():
name        : Name displayed when choosing style.
form        : Drupal FAPI callback for admin form.
js_folder   : Folder to include any .js files from.
css_folder  : Folder to include any .css files from.
js_files    : Array of individual JS files to include.
css_files   : Array of individual CSS files to include.
js_settings : Function to generate settings to pass to JS.

I will add more documentation on the hook when it is closer to a new release. There are 2 examples in responsive_menus.module.

jwjoshuawalker’s picture

Now you can see responsive_menus.api.php in the module folder for example implementation.

x7ian’s picture

Hello,
Ive tested Responsive Menus module and found some issues. Ill post this issues in the module page so you deal with this things and might help improving the default style for Responsive Menus.

I love the idea of creating a pluggable module that can be expanded so we collaborate as a team instead of creating two modules that might end up competing.
However i think that Reponsive Menus becomes something like a wrapper for other modules to implement other plugins on Drupal.
I belive this give more work for users instead of making life easier for them since they will have to install two modules instead of only one.
The goal of Mobile Navigation is to have all mobile solutions by simply installing one module.

So being an addon will just have to implement the Hook_responsive_menus_style_info() to override everything Responsive Menus does.
This seems easy and very straitforward, however i dont see any features that Mobile Navigation can take advantage of if becoming a addon of Responsive Menus.
On the other hand i think it gives more work, might add some load to drupal by using resources when having to implement a hook declared in another module and also users will have to install a dependency.
For this reason i think i will try for the Mobile Navigation module to be accepted as an independent module.
However, i'm testing Responsive Menus and implementing a custom version of Mobile Navigation to study the Pros and Cons of becoming dependent on Responsive Menus, maybe in a future version of Mobile Navigation.
What do you think of this?

jwjoshuawalker’s picture

"However i think that Reponsive Menus becomes something like a wrapper for other modules..."
"...[versus] have all mobile solutions by simply installing one module."

This isn't true.
This is why Responsive Menus currently comes with 2 very different jQuery libraries for menu options already and will continue to add more.

"So being an addon will just have to implement the Hook_responsive_menus_style_info() to override everything Responsive Menus does."

No. It is much more akin to adding a payment processor to Commerce. Yes, you already get integration with several out of the box, paypal, etc. Then with a simple hook, another option is added.

"What do you think of this?"

I still revert to my original thought. I think you should definitely release your project, whether it be standalone or a plugin to this. I am an extreme believer in lightweight, 0-config modules. There is already so much interface clicking in Drupal. I like modules you turn on and forget.

x7ian’s picture

what i mean is that Responsive Menus seems like a module that comes with a very basic functionality and to have more stuff on it, it is used as a wrapper for other third party Plugins, like it has now support for MeanMenu which is a Jquery plugin that is out there and other third party plugins can be added on the way.
Mobile Navigation is instead a plugin that was born with the development of the drupal module and has been improved for the last months via issues in drupal.org.
This difference makes me think that there is no point in making it dependent on Responsive Menus.

It is much more akin to adding a payment processor to Commerce.

Adding a payment to commerce is a different situation since commerce is a big system and new features can be added to it via modules that depend on that big infrastructure. In this case i see no need to make the module dependent on another module. If Mobile Navigation was a third party jquery plugin, then it could take advantage of Responsive Menus to become a Drupal module.

There is already so much interface clicking in Drupal. I like modules you turn on and forget.

There is not much configuration on Mobile Navigation, no more that there is on Responsive Menus. In most cases is not as easy as just install and forget, at least the selector for the menu must be configured.

jwjoshuawalker’s picture

Status: Active » Closed (works as designed)

Responsive Menus now integrates with the Context module as a reaction option.

This issue queue had several requests for that ability, and honestly I wasn't sure how fast I'd get to that (edge case?) but oddly enough the project I'm on wound up needing it.

Now you can specify different menu styles, width/breakpoints, & other settings per Context conditions like path, view, node type, user roles, etc.

I'm going to close this thread. Good luck with Mobile Navigation! I like the implementation on the rootstack site.
The next style I write, I plan on adding a little animation.