Nested field_group inherits of parent field_group settings

Created on 13 June 2025, 11 days ago

Problem/Motivation

Nested field_group have not access to the parent settings. So each time we have to set manually the setting to the child/nested fieldgroup.

  • [field_group] Pattern A
    • Setting SA1
      • [field] field_fa1
      • [field_group] Pattern B
        • Setting SB1
        • [field] field_b1
        • [field] field_b2

Steps to reproduce

Create 1 nested field_group and see if parent settings are accessible.

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇫🇷France Julien Tekrane

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Julien Tekrane
  • Pipeline finished with Failed
    11 days ago
    Total: 247s
    #522005
  • Pipeline finished with Canceled
    11 days ago
    Total: 136s
    #522019
  • Pipeline finished with Success
    11 days ago
    Total: 290s
    #522020
  • 🇫🇷France pdureau Paris

    Edouard, do you want to have a look?

  • 🇫🇷France duaelfr Montpellier, France

    @julien tekrane: I don't get your need here. Your code overwrites the child field group settings by the parent ones. I'm quite sure this is not a behavior we want by default. Could you elaborate a bit on what you are trying to achieve here? Maybe give a specific example.

  • 🇫🇷France Julien Tekrane

    @duaelfr
    For example you have a Pattern Accordion🟦, and a Pattern Accordion item🔷.

    🟦Parent (Accordion patern)
    - Setting1 : "valueParent"
    🔷child item 1 (Accordion_item pattern)
    - Setting1 : empty, so th evalue is "valueParent"
    🔷child item 2 (Accordion_item pattern)
    - Setting1 : "valueChild2", so the value is "valueChild2"

    I want to only set a setting in the parent field_group using Accordion🟦 and this setting will be get by child field_group items🔷. Of course the setting should be declared in the accordion_item.ui_patterns.yml file. If it is set in a child item 🔷, it overrides the parent🟦 setting.

  • 🇫🇷France duaelfr Montpellier, France

    @julien tekrane: just to be sure I understand, are we talking about settings as in "ui_patterns_settings" (ie. defined in the pattern) or settings as in field_group settings (ie. group label, group shown when empty, etc.)?

    I both case, I'm not sure we want that inheritance to be the default behavior, so *if* it was to be implemented, it should be opt-in.

    @pdureau What do you think about this? I believe this kind of inheritance never existed and still don't exist in 2.x, is it?

  • 🇫🇷France Julien Tekrane

    @duaelfr: I am talking about "ui_patterns_settings" (ie. defined in the .ui_patterns.yml).

Production build 0.71.5 2024