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

As a fragment developer I can create a fragment using a layout (of columns) and other fragments

    Details

      Description

      Context 

      Currently developers can develop fragments using HTML, CSS and Js. This gives them full flexibility to use these web technologies to their full extend. However, the resulting fragment is quite fixed and can only be adapted as explicitly allowed by the page author. While this is desired in many cases, in some others it is better to provide much more flexibility to the page author. This can be achieved by supporting the creation of fragments starting with a layout of columns and placing existing fragments (with their configuration) inside the columns.

      This feature is related to LPS-101255 which allows page authors to save as fragments sections created with Section Builder (that is, with a layout of columns which is filled with fragments). In that case the "format" in which the fragment is hidden, while in this story it is necessary to have a well defined format for a web developer to define the fragment.

      Technical Note

      One possible way to achieve this is to create a new JSON file (i.e. fragment-body.json) which will replicate the column configuration and the fragments inside it:

      {
        columns: [{
          fragments: [{
             key: "heading",
             configuration: {}
          },{
            key: "paragraph",
            configuration: {}
          }]
        },
        {
          fragments: [{
            key: "image",
           configuration: {}
          },{ 
            key: "button", 
            configuration: {} 
          }
        }]
      }
        

      Test Scenarios

      Test Scenarios Test Strategy Kind of test Is it covered by FrontEnd ? (JS-Unit) Is it covered by BackEnd ? (unit or integration)
      The changes from HTML, CSS, JS and JSON of fragment should be propagated to composition Sanity Manual No No
      Can set configuration of fragment in composition Sanity Manual No Yes
      Can edit inline content of fragment in composition Sanity Manual No No
      Can set configuration of layout elements in compositon Smoke Manual No Yes
      Can duplicate fragment in layout elements in composition Smoke Manual No No

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              yang.cao Yang Cao
              Reporter:
              jorge.ferrer Jorge Ferrer
              Engineering Assignee:
              Pavel Savinov
              Recent user:
              David Gutiérrez Mesa
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  Master