Skip to content

$colorPrefix not properly replaced and custom color for repeaters not applied to the border (Konkat theme) #2144

@romaincazier

Description

@romaincazier

I noticed two bugs regarding InputfieldRepeater and have one more request:

  • if the color is specified first in the repeaterTitle configuration field, the \t in $colorPrefix is removed because of a call to trim()
Image
  • the custom color is not applied to the border (but it is when opened). You could edit this line InputfieldRepeater.module#L517 to add --pw-border-color: #$matches[1];
Image
  • not sure if this is an issue but shouldn't this regex match this one?

Lastly regarding my request: I would like to be able to set different colors based on some conditions within the InputfieldRepeater::renderRepeaterLabel hook. However the way the color is applied in CSS (based on the data-typeName) makes it so only the last repeater’s color is applied (because data-typeName is empty for a regular repeater). One potential fix could be to make InputfieldRepeater::getRepeaterItemTypeName hookable?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions