[MGNLUI-6591] Hide tabs without fields Created: 03/Mar/21  Updated: 16/Feb/22  Resolved: 10/Feb/22

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

Type: Improvement Priority: Neutral
Reporter: Richard Gange Assignee: Quach Hao Thien
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 1d 3h
Original Estimate: Not Specified

Attachments: PNG File image-2021-03-03-11-08-55-435.png     PNG File image-2021-03-03-11-09-25-022.png    
Issue Links:
relation
is related to MGNLUI-2967 Do not show empty form tabs / empty a... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Release notes required:
Yes
Date of First Response:
Sprint: Nucleus 3
Story Points: 2

 Description   

I have dialog A (homepageNewSyntax.yaml)

label: Seiteneigenschaften
form:
  properties:
    - name: name
      $type: textField
      i18n: true
      label: Seitenname
layout:
  $type: tabbedLayout
  tabs:
    general:
      label: Allgemein
      fields:
        - name: name
  • dialog B includes A at the very top of the YAML file with !include:/bn-main/dialogs/pages/homepageNewSyntax.yaml
  • In dialog B I want to hide a tab that is inherited from dialog A by doing this:
!include:/bn-main/dialogs/pages/homepageNewSyntax.yaml

form:
  layout:
    tabs:
      general:
        fields: !override

or even this:

!include:/bn-main/dialogs/pages/homepageNewSyntax.yaml

form:
  layout:
    tabs:
      general: !override
  • But it doesnt work

Actual
If I !override at tab level, I get an empty tab with a generated tab label like this:

If I !override at field level I get an empty tab with correct tab label:

Expected
No tab is displayed because it has no fields (like in 5.7)



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

For the record this works in the old framework because of a hidden magic ("hide tabs with no fields").
Generally !override doesn't work like this in any other definition/registry.

Comment by Richard Gange [ 03/Mar/21 ]

Ok, I changed the title to reflect that.

Comment by Quach Hao Thien [ 10/Feb/22 ]

For RN: TabbedLayout dialog will ignore to render tabs without fields

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