Review main Merged

74121[FEATURE] Introduce TCA type "color"

Oli Bartsch CR +2 V +2 Hard +537 −114 updated 04/01/22, 13:21

Commit message

In the process of using dedicated TCA types,
the new TCA type "color" is introduced and
replaces "renderType=colorpicker" of TCA
type "input".

Notable changes to the previous behaviour:

- The maxlength is set to 7, since this is
  the maximum length for the hex color
  (#XXXXX | /#[0-9a-fA-F]{3,6}/)
- The only allowed eval is "null"
- "trim" is always done in DataHandler and FormEngine

Note: The maxlength might change again
as soon as we switch to another color
picker which supports e.g. opacity
specification.

The TCA type is now wrapped into a custom
element. Also does it now use the general
ValuePicker JS module, instead of duplicating
this functionality in the ColorPicker JS module.

The ColorPicker JS module is furthermore
refactored. Global initialization of the
color pickers is deprecated. To initialize
the ColorPicker for an element, it has to
be provided as first argument in the
initialize() method.

used command:
> composer u typo3/cms-styleguide

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 36

Show 16 more files