[MGNLUI-7711] HorizontalLayout doesn't show validation errors Created: 02/Jan/23  Updated: 21/Feb/23  Resolved: 11/Jan/23

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

Type: Bug Priority: Neutral
Reporter: Roman Kovařík Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
duplicate
duplicates MGNLUI-7668 Validation message not displayed in h... 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
Team: Nucleus

 Description   

Steps to reproduce

  1. Use a  field with a validator https://nightly.magnolia-cms.com/.magnolia/admincentral#app:resources:edit;/ui-framework-jcr/dialogs/rename.yaml:edit
  2. Wrap the field into horizontalLayout 
        jcrName:
          $type: compositeField
          itemProvider:
            $type: currentItemProvider
          layout:
            $type: horizontal
          properties:
            someField:
              $type: textField         
            name:
              $type: textField
              required: true
              validators:
                - $type: nodeNameValidator
    
  1. Open https://nightly.magnolia-cms.com/.magnolia/admincentral#app:tours:browser;/magnolia-travels/Vietnam--Tradition-and-Today::
  2. Click rename action
  3. Write Hut-to-Hut-in-the-Swiss-Alps into the new name field

Expected results

Validation error is shown below the correct field.

Actual results

Validation error is shown at below the first field.

Workaround

Use the default stacked layout.
 

Development notes

https://git.magnolia-cms.com/projects/PLATFORM/repos/ui/browse/magnolia-ui-framework/src/main/java/info/magnolia/ui/framework/layout/HorizontalLayoutProducer.java?at=release%2F6.2 doesn't use the field layout producer as the default layout https://git.magnolia-cms.com/projects/PLATFORM/repos/ui/browse/magnolia-ui-framework/src/main/java/info/magnolia/ui/framework/layout/StackedLayoutProducer.java#59


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