[MGNLUI-6239] DOC: Where to place common field properties in complex fields Created: 23/Sep/20  Updated: 02/Dec/20  Resolved: 02/Dec/20

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.2
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Carlos Cantalapiedra Assignee: Ashraf Khamis
Resolution: Done Votes: 0
Labels: fields, new-UI-framework, new-form
Remaining Estimate: Not Specified
Time Spent: 0.75h
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLUI-6319 DOC: Separate tables for common compl... Closed
relates to MGNLUI-6243 Validation error in fields within swi... Closed
causality
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: DOC: Restructure common field properties
Sprint: UI FW 16
Story Points: 3

 Description   

Support

New ConfiguredSwitchableFieldDefinition does not implement info.magnolia.ui.field.FieldDefinition, so properties like required or readOnly are never applied.

Steps to reproduce:

Override HTML dialog definition with the following snippet:

form:
  properties:
    switchable:
      $type: switchableField
      required: true
      field:
        $type: radioButtonGroupField
        layout: horizontal
        datasource:
          $type: optionListDatasource
          options:
            - name: foo
              value: foo
            - name: bar
              value: bar
      itemProvider:
        $type: jcrChildNodeProvider
      forms:
        - name: foo
          properties:
            foo:
              $type: textField
        - name: bar
          properties:
            bar:
              $type: richTextField

Check the Problems tab in the Definitions app to see the required property is not recognized.

DOCS

https://documentation.magnolia-cms.com/display/DOCS62/Switchable+field

When configuring a switchable field, many of the common field properties will be configured at the top level. This means that the inner fields will share some of those common configurations.

This part is probably obsolete and should be removed.

We are missing a description of how common field properties can be used in the context of switchable fields and probably also other complex fields (composite and multi fields). For example, the switchable field itself cannot be marked as required=true, but its two parts (field and forms) can. This distinction should be made clear in DOCS. Consider updating the YAML examples to make this more obvious.

Other pages that are probably affected:

https://documentation.magnolia-cms.com/display/DOCS62/Composite+field

https://documentation.magnolia-cms.com/display/DOCS62/Multi+field



 Comments   
Comment by Roman Kovařík [ 23/Sep/20 ]

Check Problems tab at Definitions app to see required property is not recognized.

Isn't this correct? Shouldn't the radioButtonGroupField be set as required instead?

Generated at Mon Feb 12 09:34:30 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.