Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-6168

Override directive not disabling tabs under new UI config

XMLWordPrintable

      Overriding (disabling) a tab using new YAML syntax doesn't work.

      Steps to reproduce:

      1. Create a dialog like
        form:
          tabs:
            tabMain:
              label: Main
              fields:
                - name: title
                  class: info.magnolia.ui.form.field.definition.TextFieldDefinition
                  label: Title
            tabCookie:
              label: Cookie
              fields:
                - name: showCookieMessage
                  class: info.magnolia.ui.form.field.definition.CheckboxFieldDefinition
                  defaultValue: false
                  type: Boolean
                  label:  Cookies
                  buttonLabel: Set Cookies
      1. At other dialog, include the dialog above and override the tabCookie:
        !include:/my-module/dialogs/components/myDialog.yaml
        form:
          tabs:
            tabCookie: !override
      1. Check that if you open the dialog, tho the tabCookie shouldn't appear, it does.

      Actual result:
      The tabCookie is visible

      Expected result:
      The tabCookie is not shown

      Dev notes:
      Using the old YAML syntax, the tab is hidden:

      form:
        tabs:
          - name: cookie
            label: My Cookie tab
            fields:
              - name: showCookieMessage
                class: info.magnolia.ui.form.field.definition.CheckboxFieldDefinition
                defaultValue: false
                i18n: false
                type: Boolean
                label: Cookies
                buttonLabel: Label button
      

        Acceptance criteria

              oanh.thai Oanh Thai Hoang
              ccantalapiedra Carlos Cantalapiedra
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 0.75d
                    0.75d