Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-7080

Decorators: Provide possibility to define the order/location of a new configuration item

    XMLWordPrintable

Details

    Description

      Use case:
      A new data column should be added to the pages app's workbench.
      One can not define where the new data column would appear, its always the last one of the collection.

      Generally:
      It is important that when decorating configurations one can define where a new configuration item is added into a map/collection. Especially when its a configuration which is visible to the author -> people are very sensitive on visible items, so where it is located can matter a lot to the customer/author.
      Otherwise one ends up fast overriding the whole configuration.

      In extends it was solved to adding an empty sibling node before the configuration itself.
      This doesn't work for decorators.

      On inputs of @Sasha explicit tags might be the best solution:
      Something like:

      columns:
        sample: !orderAfter='page'
      

      Also we should think of wiping out/removing a node from the target configuration (comparable to the 'override=true' of extends)

      Reproduce:
      Use this configuration decorating the pages app (I also attach the 'decorations' folder that can be placed into any LM)

      subApps:
        browser:
          workbench:
            contentViews:
              tree:
                columns:
                  page:
                    label: test before
                  sample:
                    class: info.magnolia.ui.workbench.column.definition.PropertyColumnDefinition
                    propertyName: abstract
                    label: test
                  title:
                    label: test after
      

      See the result in the print screen.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                cringele Christian Ringele
                Votes:
                7 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                  Created:
                  Updated:

                  Checklists

                    Task DoD