[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: |
|
||||||||||||||||
| 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 |
SupportNew 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. DOCShttps://documentation.magnolia-cms.com/display/DOCS62/Switchable+field
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 ] |
Isn't this correct? Shouldn't the radioButtonGroupField be set as required instead? |