[MGNLUI-6166] Switchable field: change configuration "field" to "switcher" to avoid the confusion Created: 28/Aug/20  Updated: 29/Aug/22

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

Type: Improvement Priority: Neutral
Reporter: Sang Ngo Huu Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MGNLUI-7451 SwitchableField that allows EnumDatas... Open
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Documentation update required:
Yes

 Description   

In info.magnolia.ui.editor.SwitchableFormDefinition, field definition represents for the button groups or checkboxes, but the name is field makes user confusing. It should be rename to switcher (}}consider also{{ options)

In the example, the field makes me think about the whole field in switchable, then they can put the definition property in the wrong place. And the name somehow doesn't show clearly which part is in switchable field (we have 2 parts: the switcher and the subform)

   switchable:
          label: switchable haha
          i18n: true
          $type: switchableField
          field:
            $type: radioButtonGroupField
            defaultValue: foo
            layout: horizontal
            datasource:
              $type: optionListDatasource
              options:
                - name: foo
                  value: foo
                - name: bar
                  value: bar
          itemProvider:
            $type: jcrChildNodeProvider
          forms:
            - name: foo
            .....

Note: Make sure backward compatibility


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