[MGNLUI-6771] Implement tab with fields form definition for M6 Created: 16/Jul/20  Updated: 10/Mar/22  Resolved: 22/Jul/21

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.2.1, 6.2.3
Fix Version/s: 6.2.11

Type: New Feature Priority: Neutral
Reporter: Viet Nguyen Assignee: Sang Ngo Huu
Resolution: Fixed Votes: 11
Labels: VN-Implementation, VN-Testing, cs-bk, light-development
Remaining Estimate: Not Specified
Time Spent: 1d
Original Estimate: Not Specified

Attachments: File minimal-snippet-1.yaml     File minimal-snippet-2.yaml     File my-page-new.yaml     Text File yaml-error.log    
Issue Links:
Relates
relates to MAGNOLIA-7887 Reload resource when an included file... Closed
causality
documentation
to be documented by MGNLUI-6801 DOC: New 'tabbedForm' in form definition Closed
relation
is related to MGNLUI-7055 Definitions with tabbedForm loading a... Closed
is related to MAGNOLIA-8006 Multiple !include file support Closed
Template:
Acceptance criteria:
Empty
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Epic Link: UI framework implementation
Sprint: UI FW 33
Story Points: 5

 Description   

Base on DEV-1772 to support:

form:
  $type: tabbedForm
  tabs:
   tabMain:
     fields:
       text:
         $type: textField
  • we might use tabbedForm in compatibility converter (same UI result as now, just the code might be more compact)
  • we can still spend time to make the amount of new code minimal
  • -i18n keys from the old framework could work without changes-


 Comments   
Comment by Christopher Chard [ 07/Aug/20 ]

+1 for this. This is a real downer for us as we heavily rely on snippets. As it stands, we can only use one snippet per dialog

Comment by Mercedes Iruela [ 13/Aug/20 ]

May be related to MGNLRES-353

Comment by Christopher Chard [ 13/Aug/20 ]

I dont think so as it is not an issue of "reloading".

An error occurs when rendering the ftl as soon as the "double include" is done:
Failed to parse YAML file: Parser: while parsing a block mapping in 'reader', line 2, column 3: properties: ^ expected , but found '' in 'reader', line 4, column 5: !include:/website/includes ... ^
Title: Parsing configuration data from [/website/dialogs/components/teaser.yaml] failed
Path: /

Comment by Mercedes Iruela [ 19/Oct/20 ]

I updated this ticket to improvement since this is something not supported nowadays, but it would be a nice improvement to have.

Comment by Roman Kovařík [ 03/Aug/21 ]

Hi lstaniorski,

The i18n keys don't include the tab names (the old framework would include it). So for both

form:
  properties:
    myTextField:
      $type: textField
form:
  $tabbedForm
  tabs:
    tabMain:
      fields:
        myTextField:
          $type: textField

The generated i18n keys are:

  • myLightModule.myDialog.myTextField(.label)
  • fields.myTextField(.label)

 

Comment by Ueli Scheidegger [ 09/Mar/22 ]

And what would be the i18n key for the label itself? If I set a `label` on the tab, the key is used as label (untranslated). When I don't add a `label` property in the tab, then the label name is used. To me it seems as if i18n keys would simply not be resolved for the tabs. Can anyone shed some light on this before I open a support ticket? Thanks!

form:
  $type: tabbedForm
  tabs:
    tabOne:
      fields:
        ...

"tabOne" will be used as label in the tab.

form:
  $type: tabbedForm
   tabs:
     tabOne:
       label: some.existing.i18n.key
       fields:
... 

"some.existing.i18n.key" will be used as label in the tab.

Comment by Roman Kovařík [ 10/Mar/22 ]

Hi Ueli,

I've found https://jira.magnolia-cms.com/browse/MGNLUI-6866.

Roman

 

Comment by Ueli Scheidegger [ 10/Mar/22 ]

Yep, that's it. Very good that this is already on the radar then.

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