Name: Featurelist
Sandbox: http://drupal.org/sandbox/Anybody/1106696
Drupal core Version 6.x
----------------
Featurelist extends the cck "tablefield" module to be able select icons (available, not avaliable, optional, none) for creating a feature List as CCK field plus optional textual description.
It wouldn't make sense to deliver this feature strongly coupled within the "tablefield" module, because the use cases may differ a lot.
Now I'd like to give it to the drupal community.
All in all I think that this module is very interesting for many use cases to show differences between configurations, offers and others in a nice styled way and easy to maintain.
You may want to have a look at the demonstration site to see live use cases.
Important notice: This module has nothing to do with the "Features" module!
Future Plans:
- Drupal 7.x Port
- Draggable rows
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | featurelist-1203208-11.patch | 34.55 KB | tim.plunkett |
| featurelist_full_output.png | 36.38 KB | anybody | |
| featurelist_drupal_result_screenshot.png | 11.06 KB | anybody |
Comments
Comment #1
alexreinhart commentedCould you push the module's code to git? Currently your git repository only contains the .info file, and that's rather hard to review by itself.
Once you have the code up, just set the status on this issue to "needs review" and someone will come along and take a look.
Comment #2
anybodyAaaaaah sorry my mistake! Thank you for your comment!
I forgot to push... It's online now.
Comment #3
alexreinhart commentedOkay, some comments on your module:
Apart from these issues, the module looks fairly good. Just give your HTML output a thorough look-over to be sure there's no way that unwanted HTML could creep in. Once these issues are fixed, set the status here back to "needs review" and someone will take another look through.
Comment #4
anybodyThank you very much for your friendly advice! It's really friendly, that you took the time :)
I resolved all the mentioned problems. It would be nice if somebody could have a look again.
Comment #5
alexreinhart commentedLooks good. I'm still a bit nervous about featurelist_field() and how it builds CSS classes and HTML, and I hope you've tested it thoroughly to be sure unwanted HTML can't get through. Otherwise, my only comment is that when you use the ternary operator ($condition ? $something : $something_else) there should be spaces around the ? and : operators.
Comment #6
anybodyThank you, I did this in most cases but indeed I've forgotten some.
Furthermore I added some more check_plains and am absolutely sure now that everything is allright about that.
Comment #7
alexreinhart commentedI'm fairly certain that #default_value and #value are automatically passed through check_plain() for you, so you don't need to do it yourself. The documentation is somewhat unclear, but I checked the code and it should be done automatically.
Otherwise the module looks good. Thanks for following up quickly.
Comment #8
anybodyThank you, I will fix that soon. I wanted to be sure first.
Comment #9
anybodyHi,
can anybody tell when full project access might be granted?
Or do I have to change anything?
Comment #10
alexreinhart commentedOne of the Git administrators will have to review the request and grant you permission. There's a rather large backlog at the moment, so I'm not sure when that will happen.
Comment #11
tim.plunkettThere are large sections of code that is commented out, and other functions that are only called by the commented out code.
For example, when is
featurelist_import_csv()used? Orfeaturelist_delete_table_values()?Also, in the case of
featurelist_field(), that runs on every field? Is it supposed to? I expected to see a check for the field type. Or documentation explaining why such a check isn't needed.Also, there are some coding standards issues. Here's a patch to get you started, but I added a couple @TODOs as well.
Comment #12
anybodyHi Tim,
thank you very much!
I will have a look at it soon. The reason for the parts commented out is, that the module is based on the tablefield module and these code parts are currently not used. I will remove them.
Thanks again :)
Comment #13
anybodyHi,
I've applied the patch and worked on it.
Might somebody have a look again?
The TODO's left have nothing to do with release, because I'm planning to add draggable rows and prepared that a bit.
One thing I really wonder about, and honestly I am a fan of clean code and good documentation: Most of the criticism is based on things from the tablefield module. Wasn't there such a strong quality assurance in former times?
(I'm just interested. It's really great that modules are deeply checked like that now!)
@Tim or someone else: Could you please explain the problem with featurelist_field()? I've once again read the CCK API Doc (especially http://drupal.org/node/106716) and could not find any hint there.
Any links or code examples?
Thanks to all of you.
Comment #14
gregglesCoder found 1 projects, 2 files, 1 normal warnings, 5 minor warnings. I noticed some very small code style issues. Please run the coder module on "minor" setting to help catch these. The coding standards have even more information in this area.
Your featurelist_install and featurelist_enable are the same - is that really appropriate? It seems odd to me.
This will end up escaping the data multiple times and is unecessary. To see the problem create a path with an ampersand in it and then save the page over and over and over. It will become &
check_plain is not appropriate to use directly for urls.
Instead of:
check_plain(base_path() . $path_to_module) . '/icons/ico_check_green.png',You should do something more like:
url($path_to_module . '/icons/ico_check_green.png'),Similarly, instead of:
<img src="' . check_plain($featurelist_icon_path_y) . '" alt="' . t('Feature available') . '" />',you can use theme_image which provides protection against malicious URLS and allows for overriding via a theme function.
It's not common to include comments like "#JP111210" - I suggest removing those or replacing them with explanations of what is happening in the code.
Yes and no...the process has changed a bit, but also once someone can create a project they can do whatever they want inside of it. This process is meant to help new maintainers learn the process very well so they are more likely to create high quality modules in the future.
Thanks for sticking with this project! It seems like a useful feature.
Comment #15
anybodyHi greggles, thank you very much for your review, I will work on that. Sorry for my learning curve. I'm improving my workflow now to have better checks by coder module and other helpers.
This review process is really great and largely slowed down by myself and my mistakes I suppose. I already learned a lot.
Comment #16
gregglesHi Anybody - no need to apologize. I'm glad this is a learning experience for you - I look forward to reviewing the module after your changes.
Comment #17
anybodyHi greggles,
my CI is not ready yet but I ran coder module and other contributed modules for checks now and took the time to have a look again.
Some answers though:
I don't think so! Install calls with the "install" parameter and enable with the "enable" parameter. Documentation here: http://drupalcontrib.org/api/drupal/contributions--cck--content.module/f...
I think it's correctly used!
Regarding the "check_plain":
You are right, the #default_value should not be check_plain'ed as explained here: http://drupal.org/node/28984
I fixed that.
In many other cases I also applied your improvements. Would you take some minutes to have a look again, if it looks better (and perhaps ready for full project access) now?
Thank you so much for your instructions and time.
Comment #18
klausiIt appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
Review of the master branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Please report any bugs to klausi.
Comment #19
anybodyHi klausi,
thank you so much for your help. The information given was really helpful. I just moved from master to the 6.x-1.x Branch. Hope everything is all right now? Learned a lot again.
Anyway I ask myself why coder didn't show me the warnings you listed above. :$ Sorry!
I've now fixed them and will have another look at my testing environment. Furthermore your shell script is really interesting, I will try it out too very soon.
Could you have a look again perhaps?
Comment #20
klausiReview of the 6.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Please report any bugs to klausi.
manual review:
Otherwise this looks nearly ready to me.
Comment #21
anybodyThanks a lot again. Should be fixed now.
UltraEdit already told me last time that the document has LF line endings, is this correct now? I checked them with eclipse too.
I promise I'll take the time soon to create a useful CI environment using your shell tool. Sorry.
Comment #22
doitDave commentedHi, some few issues remain:
Review of the 6.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
HTH, dave
Comment #23
anybodyThanks, should be fixed now!
Comment #24
doitDave commentedHi,
Automated review (Please keep in mind that this is primarily a high level check that does not replace but, after all, eases the review process. There is no guarantee that no other issues could show up in a more in-depth manual follow-up review.)
Review of the 6.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
Manual:
Just checked your recent changes... I think there is still some confusion with the doxygen comment style; please take another look at http://drupal.org/node/1354#functions
IMO you missed out some empty lines between @param and @return. It's a bit tricky. (The param type is not yet required, but of course it is appreciated that you provide it though.) :)
Comment #25
anybodyComment #26
anybodyWould somebody please be so kind to have a look again so that we can probably set this reviewed and tested, if there are no more problems?
Thanks a lot.
Comment #27
frobReview of the 6.x-1.x branch:
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. Get a review bonus and we will come back to your application sooner.
Source: http://ventral.org/pareview - PAReview.sh online service
Manual Review
The meat an potatoes of this module seem to happen at line 385.
That has got to be more that can be said about this function than "process the featurelist" at the very least all the input paramaters should be described.
I really look forward to a d7 release of this module. I could see many use cases.
Comment #28
frobComment #29
anybodyConcerning the automated review everything should be fixed now:
------------------
Review of the 6.x-1.x branch:
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. Get a review bonus and we will come back to your application sooner.
Source: http://ventral.org/pareview - PAReview.sh online service
------------------
Further I've just documented the mentioned function definition.
Would you be so kind to have a look again and set it done if ready? :)
Thanks a lot again to all of you! I've learned a lot.
Comment #30
c-logemannHello,
I have just used pareview and there are still errors:
http://ventral.org/pareview/httpgitdrupalorgsandboxanybody1106696git
I think the new error report is based on the improvement of the tools but the errors are older.
See http://drupal.org/node/318#controlstruct for "BREAK statements must be followed by a single blank line"
Greetings,
Carsten
Edit: I just installed the module in a test system and it seems that it works as suggested.
Comment #31
anybodyThanks a lot.
These Code style checks are also fixed now. It would be nice if you could have a final look again. Thanks!
You may look here: http://ventral.org/pareview/httpgitdrupalorgsandboxanybody1106696git
Comment #32
lucascaro commentedIt's minor but re-running the automated test gave an issue:
also minor: Theme function comments are not formatted exactly according to http://drupal.org/node/1354#themeable and the form constructor does not follow exactly http://drupal.org/node/1354#forms
Line 392: The comment should start with "Processes" instead of "Process" according to http://drupal.org/node/1354#functions
I'd correct the indentation on line 261 so nobody complains :)
Otherwise it looks good!
Comment #33
aaronelborg commentedHi Anybody.
It looks, to me, like you're repo is a bit outta whack.
Each branch I switch to looks to be empty.
You probably want to fix that, eh?
;-)
-Aaron
Comment #34
lucascaro commentedHey @AaronELBorg again, it seems like there's something wrong with your git setup. The branches look file to me, see:
http://drupalcode.org/sandbox/Anybody/1106696.git/tree/refs/heads/6.x-1.x
and
http://drupalcode.org/sandbox/Anybody/1106696.git/tree/refs/heads/master
(Actually master is empty and it's supposed to habe a README.txt pointing to the branches)
Comment #35
aaronelborg commentedWeird. I re-git-cloned the module and it worked.
I had to switch to the 6.x branch manually (it was on 'master' when I got it) but, yeah, not too sure what the deal was? Thanks for the heads-up, lucascaro.
To me, the code looks really good. My local install of code-sniffer didn't find any issues and my install of the module on my local box seems fine.
The only things I can report worth fixing are simple things like spelling/grammar mistakes and maybe a better explanation as to why someone might want to use this module?
On line 24 of featurelist.module the contents of the $output variable reads:
Probably should be:
Actually, that same problem happens on line 45 as well, fyi.
Line 138 is somewhat confusing:
"Select the default icon, which is preselected"
...but perhaps it's one of those situations where this kind of ackward help-text is unavoidable?
On line 175 of featurelist.module, in hook_field_info() the description's value is "Provides a configurable table of feature states". That seems a bit more grammatically correct to me than the stuff in hook_help() and hook_menu() ("Featurelist provides a configurable table of feature status, for example you products or services features".) Nothing major. Just putting it out there.
To be honest, Anybody's module looks pretty solid to me. It looks like he/she has taken the advice from everyone prior and followed it to the t. I have to admit that reviewing someone's module this late in the game usually gives me a good opportunity to learn more than offer advice but that's not a bad thing at all.
NIce work, Anybody.
Comment #36
anybodyHello @all!
Thanks a lot for all your comments. I've just fixed all that the mentioned aspects.
I've also corrected the typing mistakes and grammar bugs (as I hope). There are no more codestyle warnings as you can see here:
http://ventral.org/pareview/httpgitdrupalorgsandboxanybody1106696git
It would be great, if we could put it online soon.
Thanks a lot again for your time and consideration, I've learned a lot (and of course am still learning and looking forward to further developments)!
Comment #37
greenrover33 commentedI did a complete manuel code review and test.
The only one small issue i would have is:
How many data columns: and
How many data rows:
Should throw an errors when something else as numbers where enterd.
For me its a realy usefull modul for every body who have products in different version.
Comment #38
misc commentedA minor note - you have and dependency on content - which is a part of cck, the dependency should be like:
Else I think you our going to have problems with drush, because it would not find content and download it, it needs cck. You should also fix what greenrover33 says in comment #37.
Else, thanks for your contribution, Anybody! Welcome to the community of project contributors on drupal.org.
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
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.
Comment #39
patrickd commentedComment #40
anybodyThanks a lot to all of you, I've learned so much and I'm very proud to be part of your community.
Comment #42
avpaderno