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

tim.plunkett’s picture

I think my vote would be for "Allowed Values".

droplet’s picture

Option 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)

xjm’s picture

Why not something like field_options or field_allowed_values or allowed_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.

jerryitt’s picture

#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

KarenS’s picture

Allowed 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'.

jhodgdon’s picture

We'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.

jhodgdon’s picture

Title: Rename the Options module » Rename the Options module (which contains the former List module as well)
KarenS’s picture

I'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.

sun’s picture

My 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"

Main Entry:     assortment
Part of Speech: noun
Definition:     variety
Synonyms:       array, choice, collection, combination, combo, diversity, garbage, group, hodgepodge, jumble, kind, medley, miscellany, mishmash, mixed bag, mixture, mélange, potpourri, selection , sort 

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++ ? :)

jhodgdon’s picture

RE #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?

sun’s picture

@jhodgdon: The proposal in #9 is "choice".

jhodgdon’s picture

RE #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.

KarenS’s picture

Note 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

mitchell’s picture

Out 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.

sun’s picture

Issue tags: +Usability

Yes, 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.)

mitchell’s picture

This script should do the trick. I would've supplied a patch too, but I had trouble adding the new files.

cd core/modules/field/modules
mv options choice
cd choice
find ./ -name '*' -exec rename 's/options/choice/g' {} \;
find ./ -name '*' -exec rename 's/Options/Choice/g' {} \;
find . -type f | xargs sed -i 's/options/choice/g'
find . -type f | xargs sed -i 's/Options/Choice/g'

jhodgdon’s picture

I 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?

swentel’s picture

Component: field system » options.module

Moving to options.module

swentel’s picture

Issue summary: View changes

Clarify we are naming the combined list/option module

tim.plunkett’s picture

Issue summary: View changes
Issue tags: +rename module

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

colan’s picture

What 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?

Berdir’s picture

It'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.

Berdir’s picture

The 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.

andypost’s picture

Except few functions in options.module everything could be moved to Drupal\Core\Field and other modules

neeravbm’s picture

I 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.

colan’s picture

andypost’s picture

Version: 8.6.x-dev » 9.1.x-dev

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.