Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-140717

As a fragment developer I would like to be able to use css variables when adding a configuration of type color picker

    Details

      Description

      Intro/Context:

      Currently you can define a fragment configuration field of type colorPicker:

      {
         "label": "hovered-item-color",
         "name": "hoveredItemColor",
         "type": "colorPicker"
      },
      

      In the page editor the color picker is displayed allowing the user to select between some of the colors belonging to the stylebook, but when used in the freemarker, the value provided is the name of the token, which it is not useful in freemarker. If we want to make this useful we will need to inject the css variable associated to the token.

       

      Requirements 

      When using the color picker configuration type the user should have the css variable accesible in the fragment's freemarker (eg. "var(--primary)") 

       

      Sample

      There is a exported fragment attached for testing sake, before this change. It is a fragment that have a configuration for changing the color of the two headings it contains. Before this story it didn't work

      Test Scenarios

      Test Scenarios Test Strategy Kind of test Is it covered by FrontEnd ? (JS-Unit) Is it covered by BackEnd ? (unit or integration) Could it be covered by POSHI?
      Able to change heading color via color picker configuration CRITICAL Manual No No Yes

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marta.elicegui Marta Elicegui
              Reporter:
              victor.galan Victor Galan
              Engineering Assignee:
              Victor Galan
              Recent user:
              Sophia Zhang
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  7.4.3.5 CE GA5
                  7.4.13 DXP U1
                  Master