Translating options from a list_string field is limited to 127 characters, while the base values are not

Created on 16 May 2018, over 6 years ago
Updated 6 February 2024, 7 months ago

Problem/Motivation

When you create a field as "List (text) (id: list_string)" You can create values for the keys that are "unlimited" in length. There is a limit because the input field is a textarea covering all the key/value pairs.
But, when translating this field, al the key/value pairs are split into separate textfields and the value for the textfield is defined as a "label" (in options.schema.yml), limiting it to 127 characters.

field.storage_settings.list_string:
  type: mapping
  label: 'List (text) settings'
  mapping:
    allowed_values:
      type: sequence
      label: 'Allowed values list'
      sequence:
        type: mapping
        label: 'Allowed value with label'
        mapping:
          value:
            type: string
            label: 'Value'
          label:
            type: label
            label: 'Label'
    allowed_values_function:
      type: string
      label: 'Allowed values function'

This limitation is "wrong", because the actual values can be much longer without causing any problems.

Proposed resolution

Change the type of "Label" in options.schema.yml from "label" to "text".

Remaining tasks

Review the proposed solution.

User interface changes

The user interface for translating list_string field types changes so that labels are input in a textarea rather then a textfield.

API changes

None

Data model changes

Change the type of "Label" in options.schema.yml from "label" to "text.

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Options 

Last updated 23 days ago

No maintainer
Created by

🇧🇪Belgium weseze

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024