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

As a web developer I can add a field of type colorPalette to my fragment configuration

    Details

      Description

      Context

      LPS-96685 has introduced the ability for fragments to have configuration. This configuration needs to support several field types to support all common needs.

      This Feature

      The goal of this Story is to provide support for type of field of type color-palette.

      Non-technical users adding a configurable fragment to a page should be able to select the desired color from the site palette. The UI widget should be the same as the one already used to select the background color of fragments created with Section Builder.

      Web Developers must have access to the value selected by users through the freemarker context. In particular they should have access to both the cssClass associated with the palette color as well as a computed RGB color.

      Acceptance Criteria:

      • Given the web developer has provided a fragment with a configuration field of type "colorPalette", when the fragment is added to a page, then the page author will be shown a configuration a floating panel which allows the author to select the configuration field value among the colors of the palette.
      • Given the web developer has provided a fragment with two or more configuration fields of type "colorPalette", when the fragment is added to a page, then the page author will be shown a configuration a floating panel which allows the author to select among the colors of the palette for each of the fields
      • Given the web developer has provided a fragment with two or more configuration fields of type "colorPalette", when the fragment is rendered then the value of the configuration si available in the freemarker context as configuration.{fieldName}.cssClass and configuration.{fieldName}.rgbValue
      • Web developers can specify the default value in the configuration definition JSON providing the RGB and/or CSS value:
           "defaultValue": {
               "rgbValue":"rgb(255, 255, 255)",
               "cssClass": "dark"
            }

      Design Deliverables

      Not needed

      Features that doesn't need to be implemented (yet)

      Support for a color-picker that allows page authors to select any color.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marta.elicegui Marta Elicegui
              Reporter:
              jorge.ferrer Jorge Ferrer
              Engineering Assignee:
              SE Support
              Recent user:
              Jason Pince
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  7.2.X
                  Master