[MGNLUI-5814] Using labels at the form level is now broken Created: 09/Apr/20  Updated: 10/Aug/20  Resolved: 07/May/20

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

Type: Bug Priority: Normal
Reporter: Richard Gange Assignee: Adam Siska
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: 56m
Time Spent: 0.6h
Original Estimate: Not Specified

Attachments: PNG File dummy-dialog.png    
Issue Links:
Problem/Incident
causes MGNLUI-6089 Title is mandatory in dialogs Closed
relation
is related to MGNLUI-6122 Dialog: Label of the form is ignored ... Closed
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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Epic Link: Dialog UX improvements
Sprint: UI FW 1
Story Points: 1

 Description   

We broke backwards compatibility. It used to be you could have the dialog label at the form level.

Example:

Dialog definition:

form:
  label: Dummy page properties
  tabs:
    - name: tabMain
      label: Dummy page
      fields:
        - name: title
          class: info.magnolia.ui.form.field.definition.TextFieldDefinition
          label: Title
actions:
  commit:
    class: info.magnolia.ui.admincentral.dialog.action.SaveDialogActionDefinition
  cancel:
    class: info.magnolia.ui.admincentral.dialog.action.CancelDialogActionDefinition


 Comments   
Comment by Richard Gange [ 09/Apr/20 ]

I assume I could use ui compatibility to fix it. But then we still need to adjust the archetype and it would create a headache for those who have already been putting the label there.

<!-- https://mvnrepository.com/artifact/info.magnolia.ui/magnolia-ui-framework-compatibility -->
<dependency>
    <groupId>info.magnolia.ui</groupId>
    <artifactId>magnolia-ui-framework-compatibility</artifactId>
    <version>6.1.4</version>
</dependency>

Maybe we could add back the setter at the form level and have it call the dialog #setLabel()

Comment by Richard Gange [ 09/Apr/20 ]

Double checked the archetype. I was wrong. It uses a proper i18n file. So no issue there

# Add key/value pairs here!
# key=value
# If you are new to i18n, read https://documentation.magnolia-cms.com/display/DOCS/Internationalization
magnolia-templates.templates.pages.dummy-page=Dummy page
magnolia-templates.pages.dummy-page-properties.label=Dummy page properties
magnolia-templates.pages.dummy-page-properties.tabMain.label=Main tab
magnolia-templates.pages.dummy-page-properties.tabMain.title.label=Title

magnolia-templates.templates.components.dummy-component=Dummy component
Generated at Mon Feb 12 09:30:19 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.