Skip to content
  • Oliver Bartsch's avatar
    [FEATURE] Introduce TCA type "color" · 12a6613f
    Oliver Bartsch authored
    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
    
    Resolves: #97271
    Releases: main
    Change-Id: I1418b100ae214499be7b01f6c94539a6cb6baa3b
    Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74121
    
    
    Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
    Tested-by: default avatarcore-ci <typo3@b13.com>
    Tested-by: default avatarBenni Mack <benni@typo3.org>
    Tested-by: default avatarOliver Bartsch <bo@cedev.de>
    Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
    Reviewed-by: default avatarBenni Mack <benni@typo3.org>
    Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
    12a6613f