Problem/Motivation
As discussed in #1592632: Merge List field types into Options module, specifically #64 and #75, the Options module is poorly named. Also, assuming that the patch is committed, the Options module will now contain the code formerly in the List module. So, it could definitely benefit from a new name that gets across its functionality:
- Provide the ability to make a list of static allowed values on a field.
- Provide widgets for editing fields with a list of allowed values (whether static allowed values or dynamic ones like Taxonomy fields).
Proposed resolution
Choose from one of the following names:
- Options [no change]
- Static Allowed Field Values [loooonnnnggg name, but gets the point across of what it does]
- Allowed Value Sets [or Allowed Value Lists? I guess technically they are lists in the sense that they have an order, rather than sets]
- Allowed Values for Options
- Option Values [this one would be my favorite -- then it kind of gets across the point that it's for use with the Options module?]
- Option List
- Listing
- Value List
- Allowed Values [since this basically is the API for allowed values lists]
Remaining tasks
Come to consensus.
User interface changes
The module will be renamed
API changes
The module will be renamed, as will all of its functions
Comments
Comment #1
tim.plunkettI think my vote would be for "Allowed Values".
Comment #2
droplet CreditAttribution: droplet commentedOption controls ?
http://www.w3.org/TR/html401/interact/forms.html#control-name
My Best -> Worst order:
1. Options Values / Option controls
2. Option List
..
..
(Worst: non-listed candidates)
Comment #3
xjmWhy not something like
field_options
orfield_allowed_values
orallowed_values_field
or something? Neither "Options" nor "Allowed Values" by themselves tell me WTF they're for. :)Edit 2: No, not what I said in edit 1.
Comment #4
jerryitt CreditAttribution: jerryitt commented#2 Option Controls sounds good it makes sense to me.
What about allowed field values / allowed field controls ?
But given the current options in order of preference I would go for.
1. Option Controls / Options Values
2. Allowed Values
3. Options list
Comment #5
KarenS CreditAttribution: KarenS commentedAllowed Values Controls or Option Controls imply the control widget is the primary functionality, when in fact the primary functionality of the new module that has both the field and the widget is the API for creating and displaying a list of values. The widget is secondary, IMO.
Another possibility, 'Allowed Values List', which is slightly more descriptive than just 'Allowed Values'.
Comment #6
jhodgdonWe're talking about a name for the module that contains the both the allowed value lists field, and the option widgets, right? [YES, tim just confirmed that in IRC]
In any case, I vote against "Listing" for sure, since I never understood the "List" name for the old module in the first place.
My preference for a name for the combined module would be for one of the following:
Option Values
Allowed Values
Option Lists
I will also update the issue summary to clarify we are looking for a name for the combined module.
Comment #7
jhodgdonComment #8
KarenS CreditAttribution: KarenS commentedI'm starting to lean toward something like 'Option list' (singular, it's one list with a bunch of values). It's fairly descriptive and it also hints that it contains both the 'Options' and the 'List' module functionality.
Comment #9
sunMy proposal in #1592632-82: Merge List field types into Options module was:
What are allowed values?
An allowed value is a value of a selected list of valid values; a selection.
Alternatives for: "selection"
Apparently, "Choice" also applies to option widgets a.k.a. "Options". — Why is that plural to begin with? ;)
I'd assume that even end-users can make sense of what a "Choice (number)" field is in the UI. Happy end-users++ ? :)
Comment #10
jhodgdonRE #9 - I am not in favor of having the module name have "select*" in it, because it sounds too much like it's specifically for HTML "select" input fields, and this also applies to radios and checkboxes.
So... Just about everyone who has commented here has included "Option List" (or something close to that) as one of their top picks. I would like to propose that as the name. Thoughts?
Comment #11
sun@jhodgdon: The proposal in #9 is "choice".
Comment #12
jhodgdonRE #11 - you mean you want to propose "Choice" as the name of the module, or combine it with another word? To me "Choice" alone doesn't tell me much.
Comment #13
KarenS CreditAttribution: KarenS commentedNote that once this module is re-named, both the field module and the widget module names need to be updated in the field_config and field_config_instance tables, as noted in #1697408: Update module name in field/instance config for List fields
Comment #14
mitchell CreditAttribution: mitchell commentedOut of all the proposed alternatives, Choice strikes me as the only viable change, mostly because every other module, except Field UI, is one word.
Are there any other possible changes on the horizon for how fields get user entered data, or to how Options module could be used more widely?
One important development which may inform this issue is that #1801304: Add Entity reference field recently added support for using Views to control its options list.
Comment #15
sunYes, Choice still makes the most sense to me. I'd love if someone could take this on.
(I started to do this, but my local branch is from months ago and merging HEAD results in conflicts only.)
Comment #16
mitchell CreditAttribution: mitchell commentedThis script should do the trick. I would've supplied a patch too, but I had trouble adding the new files.
Comment #17
jhodgdonI am still not convinced about Choice as being the best name for this module, but I guess it is not any worse than any of the other field modules, like Text and Number for instance, and it's kind of consistent with those kind of lame (IMO) names....
But I'm just wondering why anyone thinks that the module name needs to be one word? Do we have a standard for that? I don't think so. Why couldn't we choose a longer name (I'm talking about the user-facing name that you'd see on the Modules page) that makes more sense?
Comment #18
swentel CreditAttribution: swentel commentedMoving to options.module
Comment #18.0
swentel CreditAttribution: swentel commentedClarify we are naming the combined list/option module
Comment #19
tim.plunkettComment #26
colanWhat about simply deprecating the module in favour of Taxonomy? Are there any reasons to keep it around when Taxonomy always seems to be the better choice?
Comment #27
BerdirIt's not always the better choice, one advantage is that a list field is far more performant than a taxonomy reference because it doesn't require a separate entity/entities to be loaded when editing/viewing the entity. That's considerable overhead.
If you have a fixed, limited set of options, then using a list field is fine, it can also be extended later, the only thing that's not allowed is removing used options.
That said, this might be a won't fix now because doing it now would be a lot of pain for little gain, looks like nobody found it important enough to complain about this in the last 5 years.
Comment #28
BerdirThe only thing that might be worth it is just moving the stuff into Drupal\Core\Field/text.module/views.module and not requiring a separate module for it. There really isn't a lot of code left.
Comment #29
andypostExcept few functions in options.module everything could be moved to
Drupal\Core\Field
and other modulesComment #30
neeravbm CreditAttribution: neeravbm at Red Crackle commentedI agree with @Berdir that list/options module might be more performant than taxonomy reference since Drupal doesn't have to load terms from DB, as long as it's not already in memcache. But as a service provider, I almost always prefer to use taxonomy terms than list/options. The problem is that once an option is used, it can not be deleted. If the client still wants to delete an option, we first have to delete it from wherever it has been used. That's a major headache that we want to avoid down the line.
Comment #31
colanSee my proposal at #3022862: Consider deprecating the Options module in favour of Taxonomy.
Comment #32
andypost