Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Oct 2011 at 18:39 UTC
Updated:
4 Jan 2014 at 01:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jhodgdonDo you plan to patch this module? If so can you assign the issue to yourself and also add your name to the summary issue? Thanks!
Comment #2
sven.lauer commentedSince there hasn't been any word from Lars, I claim this one for now.
Comment #3
lars toomre commentedGo ahead sven. As I explained in one of the other threads, I simply created the issue, but did not assign it to myself. (Same with another of the other modules too.)
Comment #4
sven.lauer commentedPatch attached.
I opened #1347888: @param / @return docs missing in much of Field UI module, as there are @param/@return missing almost everywhere (I assigned that issue to myself, but won't roll a patch until this patch here is in --- as conflicts are virtually guaranteed).
I had to get creative, as many of the paths of page callbacks and form constructors vary by entity --- and this is not handled via %-placeholders. So I went with the PLACEHOLDER_IN_CAPS convention. Downside: The meaning of the placeholder has to be explained in every function. Alternative ideas welcome.
Comment #5
sven.lauer commentedComment #7
xjmTest failed because of #1346772: StatisticsLoggingTestCase->testLogging() fails with clean URLs in some environments. I requeued it.
Comment #8
jhodgdonLooks pretty good! A few things to fix:
a)
field_ui_table should have () after it I think, to make a link to this function (or should be changed to the actual function name if that is not correct)?
Other places need () too, such as:
b)
Hmmm... You had asked about whether this was a good structure... I think it's OK, except I guess I would move the "where BUNDLE..." up onto the same line as Path:. It shouldn't be a new paragraph? In the case of the ones where the paths are a list, I would just remove the blank line between the paths list and the "where..." sentence.
c) Typo (spelling of "row"):
d) Not following standards:
Should include the form function name rather than "on the manage display screen". Probably the following doc block for the Ajax handler should too?
e) Typo (not your fault) field -> fields
f) Should follow the form submission template:
This one too:
g)
Normally we don't need return value docs in menu callbacks... but I could be convinced that it is OK here. Maybe it should say "the field instance array" rather than "the instance array" though?
h) Missing period at the end:
i) Duplicated word "formatter":
Comment #9
sven.lauer commentedArg, I should have caught at least some of these things.
Addressed all of the, one way or another. Comments:
(a) 'field_ui_table' is an element #type. I went with the format we agreed on in #1347890: Clean up API docs for file module, and changed the summary to "Render API callback: Performs pre-render tasks on field_ui_table elements." and then included a line in the docblock saying "This function is assigned as a #pre_render callback in field_ui_element_info()."
Made the parallel change for field_ui_field_edit_instance_pre_render() for consistency.
(g) I really think it makes sense to document the return value here, as this is a menu loader function---and these do not have a common return value. Rather, it varies by loader what they return. I did change the return to to "The field instance array." and also added a @ingroup field (though perhaps an @see or a link would be better?). The docgroup page of the field group is where the keys of instance arrays are documented.
Comment #10
sven.lauer commentedComment #11
jhodgdonThis is looking really good! I only found this:
a)
(extra space between new and view).
b)
Proves -> Provides
c)
bunde -> bundle
Since these were all simple typos, I just edited the patch file directly and re-uploaded it (after verifying I only made those three changes). Unless the testbot objects, I think we can call this done!
Comment #12
catchLooks good to me. Committed/pushed to 8.x.
Comment #14
xjmAttached removes the menu callback changes, plus a hunk for
field_ui_field_edit_form_delete_submit(), which does not exist in D7.Comment #15
jhodgdonThese all look like good changes to get into D7. Thanks!
My personal favorite piece of this patch:
ro ro ro your boat!
Comment #17
xjmBot goof.
Comment #18
webchickCommitted and pushed "ro" 7.x! ;) Thanks.
The only thing I found in glancing through was:
That extra indentation shouldn't be there, so I removed it, both in D7 and D8.
Comment #19
jhodgdonHmmm. Are you saying that CSS files should not have @file comments at the top?
It looks like right now some do and some don't. My opinion is that all files should have them... thoughts?
There's nothing specific on
http://drupal.org/node/302199
about @file blocks, but it does basically say to follow the PHP block doc standards when documenting sections of your CSS file...
Comment #20
jhodgdonShould we open a separate issue to discuss that?
Comment #21
sven.lauer commentedI think webchick simply meant that
should have been
And not that there should not be any @file header.
Comment #22
webchickYep, that's right.
Comment #23
jhodgdonDuh. I can't read. :)