Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Jul 2012 at 19:23 UTC
Updated:
29 Jul 2014 at 20:56 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
joachim commentedThe code is also wrong... in that the table produced is empty because there is no #header property.
Perhaps I should remove the Novice tag...?
Comment #2
eddie_c commentedI am a novice, but I'll have a go ;) How about something like this?
Comment #3
jhodgdonThanks! This is a good start... Someone needs to test the code to verify that it actually works now.
Also, I would prefer to see a code style more like:
(that would be more consistent with what we normally do in Drupal Core).
Please also use the American spelling "color" instead of "colour". And we don't normally leave a space between array and the opening (.
Comment #4
eddie_c commentedThanks for the review jhodgdon. Here's another patch incorporating your suggestions.
Comment #5
jhodgdonLooks pretty good, formatting-wise anyway... Someone needs to test the code and verify that it works.
Also, doesn't this need a t() on the title and empty text?
Comment #6
ivan zugec commentedI have rerolled the patch with a few updates thanks to jhodgdon and I tested the code.
Comment #7
jhodgdonBetter!
I guess I must not have looked too carefully at the formatting on the previous patch. I think there are a couple of things that need fixing here:
- array(...) should not have a space between array and (
- I think we could do away with all of the blank lines in the code sample. They take up a lot of space and I don't think they add a lot of clarity.
I am also confused about this example. This is a table-select... maybe we could use something that is more realistic? What is this treacle and corkscrew meant to be? I don't even think most people in the world would know what "treacle" is -- I'm not really sure myself. Also, what is the empty text meant to be saying?
Comment #8
ivan zugec commentedThanks for the review jhodgdon. I have implemented the requested changes.
- Fixed up the spacing issue between array and (
- Cleaned up the white spaces
- Made the content a bit more realistic
Comment #9
ivan zugec commentedComment #10
jhodgdonMuch better, thanks! I was about to commit this patch, but I realized it pertains to the @param, so it should be included in the @param instead of where it is now in the main body of the function docs (which doesn't make much sense, since it lacks context).
Comment #11
ivan zugec commentedYes that does make sense. I have moved the
@codebelow the@param.Comment #13
jhodgdon#11: form-codeexample-1706926-11.patch queued for re-testing.
Comment #14
jhodgdonThe blank line between the existing @param text and the new text needs to be removed, and the new text should be wrapped with the previous text. Thanks!
Comment #15
ivan zugec commentedHere's another patch with the requested changes.
Comment #16
jhodgdonThanks! The only thing is, these two lines should be wrapped together:
Comment #17
ivan zugec commentedSorry about that, I have wrapped the text onto a single line:
Comment #18
jhodgdonLooks good! I'll get this committed shortly.
Comment #19
jhodgdonActually, that line needs to be wrapped at 80 characters. It goes over by a few currently.
Comment #20
ivan zugec commentedRe-rolled the patch and wrapped the line at 80 characters.
Comment #21
jhodgdonThis time I think I'll be able to commit it. Thanks!
Comment #22
jhodgdonThanks! Committed to 8.x and 7.x.