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 SA1
- Setting SB1
- [field] field_b1
- [field] field_b2
Steps to reproduce
Create 1 nested field_group and see if parent settings are accessible.
Issue fork ui_patterns-3530144
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
julien tekrane commentedComment #4
pdureau commentedEdouard, do you want to have a look?
Comment #5
duaelfr@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.
Comment #6
julien tekrane commented@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 the value 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 have to be declared in the accordion_item.ui_patterns.yml file. If it is set in a child item 🔷, it overrides the parent🟦 setting.
Comment #7
pdureau commentedComment #8
duaelfr@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?
Comment #9
julien tekrane commented@duaelfr: I am talking about "ui_patterns_settings" (ie. defined in the .ui_patterns.yml).