Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Initial patch
Comment | File | Size | Author |
---|---|---|---|
#33 | shortcut_doc_cleanup-29.patch | 19.98 KB | jhodgdon |
#29 | shortcut_doc_cleanup-29.patch | 19.98 KB | aspilicious |
#27 | shortcut_doc_cleanup-27.patch | 16.71 KB | aspilicious |
#23 | shortcut_doc_cleanup-23.patch | 17.03 KB | vaidik |
#20 | shortcut_doc_cleanup-20.patch | 15.62 KB | aspilicious |
Comments
Comment #1
aspilicious CreditAttribution: aspilicious commentedWhitespace fixes
Comment #2
aspilicious CreditAttribution: aspilicious commentedAdding tag
Comment #3
xjmYay! The docs sprint is now officially awesome.
I think these should probably have periods?
For the access callbacks (or menu callbacks generally), we probably want to add their paths and @see as per the new standard: http://drupal.org/node/1354#menu-callback.
Comment #4
aspilicious CreditAttribution: aspilicious commentedAnother try, now with actually reading the docs again.
Woow they are clear these days :)
Comment #5
aspilicious CreditAttribution: aspilicious commentedstatus change
Comment #6
xjmAwesome. Two more things:
@return
for the access callbacks. It's always the same.RTL styling for the Shortcut module.
Or, hmm. RTL should definitely be capitalized if we use it, but maybe we want to explain further?
Right-to-left language styling for the Shortcut module.
We should check and see what the HTML5 CSS cleanup docblocks are using, maybe?
jQuery behaviors for the Shortcut module.
Styling for the Shortcut module administration pages.
Styling for the Shortcut module.
Etc. What do you think?
Comment #7
aspilicious CreditAttribution: aspilicious commented1) While verifying your first concern I found a mistake :)
This is wrong shortcut must be shortcut set. And while writing this I found ot very usefull what exactly has been checked.
But I can be wrong.
Will wait for some more feeback before I reroll.
2) I'll expand the file headers a bit more in a reroll
Comment #8
xjmWell, per http://drupal.org/node/1354#menu-callback -- the parameter and return values are omitted for menu callbacks (like with hook implementations and form constructors), because they are predefined. In the case of access callbacks, it's always "TRUE if the user can access this path." But maybe in the example you found we should put clarification in the extended description instead?
Comment #9
jhodgdonDue to above comments, changing status so I don't keep looking to see if this needs a review. :)
Comment #10
aspilicious CreditAttribution: aspilicious commentedComment #11
jhodgdonThanks! A few things still need to be fixed here:
a)
The @see should point to the submit function, and the submit function should @see the validate function. See
http://drupal.org/node/1354#forms
This needs to be fixed in several other form/validate/submit function groups in the patch. If there is no validate, then the submit handler does not need @see at all.
Also, in a couple of places in the patch, it says "form submit handler" instead of "form submission handler"
b)
Menu page callback -> Page callback
(this is in a couple of places in the patch). See
http://drupal.org/node/1354#menu-callback
c)
In other patches in this cleanup effort, we've gotten rid of saying "Helper function:". It's not really very informative. Can probably just omit it.
d)
This is not really the path. It looks like this is used for several paths -- list them rather than using "%" where it is not really part of shortcut_menu() -- use the exact string that's in hook_menu(). See
http://drupal.org/node/1354#menu-callback
Also, the first line should be "Access callback: Checks permission for editing a shortcut set." I think, since this function is not editing a shortcut set. This applies to the next few access callbacks too.
e)
This function should be documented as a hook_menu() title callback.
Comment #12
David_Rothstein CreditAttribution: David_Rothstein commentedThere are a few places in the patch that use this sentence structure, but this one illustrates the problem better than most of the others... I really have trouble reading and parsing the above sentence. How about "Form constructor for the confirmation form for deleting a shortcut link"? That's a little hard to read too, but it seems better. And the same pattern throughout the patch.
Needs a period at the end. Also, per #7, this sentence is incorrect; it should be "shortcut set" instead?
I do not believe that menu links are sentient beings (although sometimes after doing Drupal for a while I've had my doubts). How about "The menu link whose access will be checked"?
Would be great to get #1363358: Shortcut set titles are double-escaped with check_plain() in; then we don't need the word "sanitized"...
Comment #13
aspilicious CreditAttribution: aspilicious commentedNew patch
Comment #14
aspilicious CreditAttribution: aspilicious commentedHopefully without tabs
Comment #15
David_Rothstein CreditAttribution: David_Rothstein commentedLooks pretty close, but I think it's still missing a bit of the feedback from #11 ("form submit handler" vs. "form submission handler").
Also, the @see statements for shortcut_set_edit_form_validate() and shortcut_set_edit_form_submit() look like they're reversed...
Finally:
Is the above really the correct way to do it?
Comment #16
xjmAn example of how we've been doing those is in http://drupal.org/node/1347890#comment-5284442. I don't think we've put it in 1354 yet though.
Comment #17
jhodgdonIt's in 1354 now (reviews welcome):
http://drupal.org/node/1354#render
Comment #18
xjm#17 looks good to me. I wonder if we should put the paragraph about how the callback is defined immediately after the summary for consistency? But a minor question and OT here. :)
Comment #19
jhodgdonProbably a good idea, but that wasn't how it was done in the example I copied from the other patch.
Comment #20
aspilicious CreditAttribution: aspilicious commentedAnother try
Comment #21
jhodgdonWe recently had a discussion on [#1315992]and we have (unfortunately) changed the standard for hook_menu() callbacks:
http://drupal.org/node/1354#menu-callback
So this patch will need an update.
Comment #22
jhodgdontagging
Comment #23
vaidik CreditAttribution: vaidik commentedPatch according to the new standards for hook_menu() callbacks.
Comment #24
xjmThanks @vaidik for removing those!
I found a few other things:
This path still needs to be removed.
I am actually not sure these are legitimate changes. It seems to be replacing an infomative description with a vague and unhelpful one.
Typo: "TRUE f."
Hmm, if we are adding the data type to the @param here, shouldn't we add it on the @return too? Though IIRC we wanted to leave those off the sprint. Either way. :)
Comment #25
jhodgdonI'm going through these issues and un-assigning any without activity for several weeks. If you still want to work on this issue, please feel free to assign it back to yourself. Thanks!
Comment #26
aspilicious CreditAttribution: aspilicious commentedI'll dot it now :)
Comment #27
aspilicious CreditAttribution: aspilicious commentedComment #28
jhodgdonThis looks really good -- and thanks for picking it up again! I only found a couple of things that need to be fixed:
a)
This needs to have a link to shortcut_link_edit() and shortcut_link_add(). Normally that would be in the first line ("Form validation handler for shortcut_link_add() and shortcut_link_edit().").
b) By convention, form constructor, validation, and submission handler functions do not contain @param/@return for the standard parameters and return values, so those should be removed (there are a lot in the admin.inc file). See http://drupal.org/node/1354#forms
c) Could we improve the description of this parameter (actually say what it is):
d) shortcut.module
if -> whether
e) I took a quick look at some of the other files in the core/modules/shortcut directory that are not included in this patch. They all look good, except that a few files have a capitalization problem in their @file headers. Since modules are considered proper nouns, they should say "the Shortcut module", rather than "shortcut module", as in this example in shortcut.admin.css (the other CSS files and shortcut.install have the same problem):
Comment #29
aspilicious CreditAttribution: aspilicious commentedComment #31
aspilicious CreditAttribution: aspilicious commented#29: shortcut_doc_cleanup-29.patch queued for re-testing.
Comment #33
jhodgdonThe most recent test run above (about 8 hours ago) said that this test failed:
Drupal\statistics\Tests\StatisticsBlockVisitorsTest->testIPAddressBlocking()
So I'm going to preserve that test run and file an issue (in case there's an actual problem), and re-upload the patch above so we can try the tests again.
Comment #34
jhodgdonComment #35
jhodgdon#33: shortcut_doc_cleanup-29.patch queued for re-testing.
Comment #37
jhodgdonThese issues are a lot of work with very little tangible payoff, so I'm closing the rest of them as "won't fix". Your efforts on working on this issue were appreciated... it was just my fault for starting a task that was very difficult to get right.
Let's instead put our effort into fixing and reviewing documentation that is really unclear and/or wrong, and I hope that the people who worked on these issues are not afraid to jump into a more reasonable issue!