Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Feb 2012 at 23:00 UTC
Updated:
4 Jan 2014 at 01:39 UTC
Jump to comment: Most recent
Comments
Comment #1
mkadin commentedHere's the results of the automated review, you've got some work to do to make your module meet Drupal's coding standards.:
http://ventral.org/pareview/httpgitdrupalorgsandboxhenry1457180git
You can click on "repeat review" there once you've committed any changes and pushed them to drupal.org.
This module seems to collapse any header tags h2-h6 within the .content section and make the content beneath them collapsible by clicking on that header. This is a good idea, but I think for a generic drupal module, you should have more control over what is collapsible and what isn't. Maybe themers could add a class to the headers to make them collapsible with your module?
Also, from a usability perspective, you may want to add "cursor:pointer" to your css for the headers, to make sure that people realize that the headers are clickable. Consider adding a little triangle or something (like drupal core's fieldsets) to indicate to the user that there's content hidden beneath the header.
Speaking of which, given the collasible fieldsets in drupal core, is this module repeating existing core behavior?
Comment #2
farald commentedHey!
I did an online code review of your sandbox here. Take a look at this page.
First of all, you should fix the errors with branches, creating 6.x-1.x branch and deleting everything but readme in master. Then you should fix the coding errors. After pushing the changes, do a review of your own at http://ventral.org/pareview to check that stuff is OK. :)
Comment #3
henryhu commentedThanks a lot for your reviewing. I've fixed it. Please check it out again.
Comment #4
anilbhatt commentedHey,
I did a manual review of your code, and found :-
1) This module is too short, we can easily do this by adding a simple Js file, so why we require this module?
2) You had fixed the Tags in your JS file (
$('.content h2, .content h3, .content h4, .content h5, .content h6')), in this manner you are binding user for using specific Tag.3) I think you have to extend your module by creating admin form.
4) Add package information in .info file, don't give other, try to find out which package suits your module.
Comment #5
anilbhatt commentedComment #6
patrickd commentedThis is really short, but at least a single project promotion should be OK.
As there are currently many applications in queue we need more reviewers,
so think about getting a review bonus and we will come back to your application sooner.
Comment #7
henryhu commentedThanks for your reviewing.
1. I do not suppose that the functionality of the module is just limited to what it can do currently. In my plan, it will provide more configurable settings, including a cck field for setting default shrinked level. And it will provide more friendly clues, like plus/minus or hand icons.
2. Now it has a configuration page and a plus icon for shrunk sections.
3. Package has been changed to User interface.
Comment #8
nmudgal commentedAfter a quick look over the code, I found these :
Thanks.
Comment #9
henryhu commented1. Removed t() from menu itmes.
2. There is an 'access arguments' for configuration. Due to no new content that allows use to manipulate, I suppose there is no need to use hook_perm(). If you don't think so, please tell me the reason.
Thanks for your reviewing.
Comment #10
chhavik commentedSee http://api.drupal.org/api/drupal/modules--system--system.module/function...
Comment #11
henryhu commentedThanks a lot!
I can't find the link of system_settings_form() you gave. And now customized submit works well.
Comment #12
chhavik commentedRefer system_settings_form
Just add - return system_settings_form($form); in your setting form, line 57 and remove the submit handler.
Comment #13
henryhu commentedThanks chhavik.
I've got a question: if using system_settings_form(), does it mean there is no need to use .install file to delete variables? Or, which variables are supposed to delete in .install file?
Comment #14
chhavik commentedsystem_settings_form saves the variables automatically which you were doing in your submit handler. But you do need a .install file to delete them from variable table when you uninstall the module.
Made the above suggested changes and enable your module by uninstalling it first. Then you can have a look in your variable table, that how this work.
Comment #15
henryhu commentedThank you, chhavik. I've used system_settings_form() instead of submit handler.
Comment #16
chhavik commentedHi,
Your module is working fine, thus marking it RTBC. You can also improve the options value in the admin form as h1,h2... instead of just 2, 3, 4. It is just a suggestion and a minor change.
Regards.
Comment #17
patrickd commentedLet's get this done.
But this module looks good enough for me to be promoted.
Thanks for your contribution!
I've promoted this module to a full project and now your able to create releases.
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.
As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.
Thanks to the dedicated reviewer(s) as well.
New URL: http://drupal.org/project/shrinksections
Comment #18
henryhu commentedThanks everyone!
@chhavik
I intended to make h2, h3, ..., h6 shrinkable, no h1, because I suppose that nobody would like to shrink all article, just left the title(h1) shown. Thank you again.
@patrickd
I'll do what you've mentioned as soon as possible. Thank you.
Comment #19.0
(not verified) commentedAdd demo info