Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Apr 2013 at 13:29 UTC
Updated:
31 Aug 2013 at 21:41 UTC
The Message Toggle module adds SHOW/HIDE links to all Drupal messages. Clicking these links within a message will toggle the visibility of that message. It is powered by jQuery and there is no configuration. Keeping it simple.
The module was developed out of the need to toggle the visibility of messages rather than hide them (see Dismiss). This was not provided by the other, often more complex, message-related modules.
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/guschilds/1961192.git message_toggle
Comments
Comment #1
SamChez commentedThis 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.
Not too much to worry about as far as errors go and after a manual review it seems your commenting was quite thorough. Aesthetically it's quite clean looking and is looking good, personally I think this should have been made sooner (although ideally we don't want to hide errors in the first place).
Comment #2
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://ventral.org/pareview/httpgitdrupalorgsandboxguschilds1961192git
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
deviantintegral commentedJust wanted to chime in that we're using this on a large site in production and it's working beautifully. Once these minor style issues are cleaned up I don't see a reason to approve this.
Comment #4
guschilds commentedThanks for the reviews, SamChez.
I've corrected the errors reported by PAReview.sh. See http://ventral.org/pareview/httpgitdrupalorgsandboxguschilds1961192git
Because of the first sentence, I'm assuming deviantintegral meant to say "I don't see a reason to not approve this"...?
Comment #5
guschilds commentedForgot to change the status. See previous comment.
Comment #6
c_lehel commented@guschilds
Nice little module. Works fine for me.
An idea for future improvement: once I hide a message, the next message shows expanded. You should save the state (hidden/shown), and display the messages after that point in the desired state (expanded/rolled up). But I repeat, this is more of an idea/future feature request.
Comment #7
pagolo commentedThe module works fine, however it can be improved by localizing the HIDE and SHOW strings.
For this purpose see Drupal.t(), the javascript counterpart of php t() function.
Comment #8
guschilds commentedc_lehel, I've definitely considered adding that. I'd love to hear what others think. Will definitely keep it on the radar.
pagolo, Great idea. I've implemented and committed the suggestion.
Thanks to everyone for the feedback thus far!
Comment #9
pranit84Module works fine. but while doing the manual review i found their is no code in .module file. So why you added this file? Even without this .module file the functionality will work.
Comment #10
bulat commentedI would rather have a custom
theme_status_messages()implementation or some other way of theming messages first instead of building HTML with jQuery.Comment #11
federiko_ commentedNice simple module. Works fine for me.
Comment #12
delta commentedManual review:
This module works for me, just make sure it's very clear on the projet page that this module works ONLY with javascript enabled. I didn't see any note about that in the README file.
That's all, i found no major flaws.
Thanks
Comment #13
guschilds commentedMany thanks to everyone who has reviewed this!
To address the latest feedback:
theme_status_messages()(I was already overriding it on the project this was created for). Also, perhaps more importantly, I did not want to add markup that wouldn't make sense or function if the user does not have JS enabled. This technique ensures messages will not be affected in any way should JS be disabled.Gus
Comment #14
kscheirerIt's an interesting idea, can you flesh it out a little more? I see you listed a comparison node at https://groups.drupal.org/node/51088, can you add your module and tell us how it's different? Currently, this is not enough code to approve you as a git vetted user, however we can still promote the project itself if you'd rather do that.
----
Top Shelf Modules - Crafted, Curated, Contributed.
Comment #15
guschilds commentedkscheirer,
Thanks for having a look! I understand your concerns with promoting me as a git vetted user after having seen such little code. I did notice that guideline and wondered if it would play against me here.
This project is different than the others in that comparison node because it simply provides a SHOW/HIDE toggle effect to messages, while the others provide similar, but never the same, effects. I'd be happy to add it there should it get promoted to a full project. When I wrote it I only needed to solve that small need and don't really have any plans to add much more to it unless a reasonable request comes about in the issue queue.
I figure it's worth asking if work elsewhere can be considered when granting git rights. I've already spent a decent amount of time providing support in the issue queue for the YouTube module that I co-maintain with jenlampton. I've also contributed to the recently approved Webform Hints module. If that doesn't matter, I can respect that.
I'd be happy to see this promoted as a project regardless! Thanks again.
Comment #16
kscheirerI'll look at this now in the Project applications sprint.
Comment #17
kscheirerThanks for your response guschilds!
Regarding the not enough code issue - I think the easiest solution is to add some more bits to the module. Implementing a hook_help() or adding simpletests is an easy way to show more lines. Making the show/hide text configurable would allow you to have an admin page with a small form and validate/submit handlers. If you use variable_get() and set the defaults to "Show" / "Hide", then your module still requires 0 configuration and will work just the same.
There are a lot of other modules that theme drupal messages, but they usually do a lot more like formatting is as Growl or some other more complicated implementation. I think your module is nice for being so simple, but if klausi has time I'd like to ask for a second opinion. I'm also not sure whether we can use your other code to evaluate your application.
Setting to "needs work" for the code being too short and assigning to klausi for a second opinion.
----
Top Shelf Modules - Crafted, Curated, Contributed.
Comment #18
klausiNot enough code is not a problem, and I would advise against artificially blowing up the size of a module. We can always promote short projects manually, and applicants can always come back to us with new projects for approval.
Please add the reason for yet another module of this kind to the project page and specify the exact difference to existing modules so that users can make better decisions which module to use.
Thanks for your contribution, guschilds!
I promoted this project for you: https://drupal.org/project/message_toggle
Now that this experimental project has been promoted, you'll need to update the URL of your remote repository or reclone it.
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.
Comment #19
guschilds commentedThanks so much, klausi! I've created the 7.x-1.0 release.
As requested, I've emphasized the Drupal message effect comparison node in the project description. I've also added Message Toggle to that node's table.
Thanks to kscheirer and all other reviewers as well.