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.
Background:
This issue is part of the task to update the hook_help texts of the Drupal 8 modules:
#1908570: [meta] Update or create hook_help() texts for D8 core modules
Tasks:
- review / write the hook_help text according to help guidelines
Comment | File | Size | Author |
---|---|---|---|
#15 | drupal8x-update-help-options-module-2091347-15.patch | 2.81 KB | batigolix |
#15 | interdiff.txt | 3.65 KB | batigolix |
#12 | interdiff.txt | 2.47 KB | batigolix |
#12 | drupal8x-update-help-options-module-2091347-12.patch | 2.66 KB | batigolix |
#10 | drupal8x-update-help-options-module-2091347-10.patch | 2.67 KB | batigolix |
Comments
Comment #1
surendramohan CreditAttribution: surendramohan commentedI am looking into this issue.
Comment #2
surendramohan CreditAttribution: surendramohan commentedUpdated:
"About" section
Added:
"Uses" section ie. "Managing select list" and "Managing checkboxes/radio buttons" section
Attached patch for your reference.
Comment #3
jhodgdonThanks! However, This patch has a couple of problems:
- Includes unrelated stuff from System module.
- Has indentation problem.
- Does not follow URL guidelines:
https://drupal.org/node/632280#url-note
I also don't think that we actually want a Uses section here. This module cannot really be used by itself, and I think it will be confusing to have this help here. Besides, I don't really think the explanation here is necessary?
Comment #4
surendramohan CreditAttribution: surendramohan commentedThanks for your feedback along with your suggestions.
I will make the suggested modifications and update you with my latest version.
Comment #5
batigolixPatch addresses points from #3 and adapts text to standard for field type modules set in Link module #2091311: Update hook_help for Contextual Link module
Comment #6
batigolixComment #7
batigolixtiny improvement.
interdiff is against #2
Comment #8
batigolixRemoved some references to module that I copy-pasted from
Comment #9
jhodgdonI don't think this help matches the UI of the module. It seems to create 3 fields: List (integer), List (float), and List (text). There is not really a "list" field, so "The settings and the display of the list field" isn't really very accurate? And maybe the help should explain what the 3 field types are used for, and something about how you can have labels that do not match the stored values?
Comment #10
batigolixThis patch adds a description for the 3 different list types and a section on key - label options as suggested in #9
Text is based on the proposed help text for the Number module: #2091345: Update hook_help for Number module
Comment #11
jhodgdonThis is mostly great, thanks! A few small things to fix:
a) As in the case of the Number module, I think we should refer to "the List fields" whenever we talk about the field(s), because there are several types and they are shown individually when you go to add a new field.
b) In a list with "or", we need a comma before the "or". (2nd Uses item).
c) I think the help text about choosing the type is a bit misleading, because what you are choosing is the value stored in the database, but it talks about letting the user choose this type of values from the list, and what they will actually see is the label. So maybe it would make sense to put the 3rd Uses item about option keys and labels in 2nd position, and then make it clear in the "choosing type" item that you are talking about the keys?
d) "When you define the list options you can define a key and a label. " Do you think this would be clearer if it said "... and a label for each item in the list"?
Comment #12
batigolixPatch addresses point in #11
Comment #13
jhodgdonLooking pretty close! A couple of suggestions:
a) First sentence of About:
... create fields for storing lists of items
I don't think this is really accurate? The information that is *stored* is not really a list, at least if the field is single-valued. You use a list for *selecting* a data value, but what is stored is a single value, not a list. Maybe it would be better to say:
The Options module allows you to create fields where data values are selected from a fixed list of options.
This will also mesh well with the 2nd uses item, which talks about how to define the options for the list. And maybe throughout we should make sure to always call them "options" rather than using other terminology?
b) In the last Uses item, I think it's still not quite clear that the type refers to what is stored rather than the label. Maybe the first sentence should say:
There are three types of list fields, which store different types of data:
And then at the end of that Uses item, add a sentence saying something like:
No matter which type of list field you choose, you can define whatever labels you wish for data entry.
Comment #14
jhodgdonComment #15
batigolixFixed the two points from #13
Comment #17
jhodgdonThis looks great to me!
It just needs a manual test:
- Verify that all the links work
- Verify that all mentions of pages/text within the UI match what is seen in the UI
- Verify that the formatting is OK.
I'll also hit "retest" because the test failures above were unrelated to this patch.
Comment #18
jhodgdon15: drupal8x-update-help-options-module-2091347-15.patch queued for re-testing.
Comment #19
jhodgdonI gave this a manual review today and it all looks good.
Comment #20
alexpottCommitted e6f381c and pushed to 8.x. Thanks!