Type: User story
Affects Version/s: None
Fix Version/s: 3.22.0
In order to get a better consistency
As a studio user, when configuring a layout, Designer takes as a basis the parent document type layout instead of generating something generic.
In general either the parent layout has been generated and we can take that as a source. Or we have to go upper recursively until we find something that is generated. If there isn't anything, we use the default doctype.
- if the parent is a default doctype
Either people did generate the layout in designer because they wanted to override it and we can take this as a source. Or they didn't and we can use the source used to scaffold that default doctype as a basis.
- if the parent layout is not scaffolded
Designer recursively looks upper for the first available basis and uses that one. Either a parent will have something (that will be closer to what users expect since they explicitly chose to generate it), or we'll end up using the default doctype as a source (see point above).
- if the parent layout is not scaffolded but the grandparent one is
Similar to answer above.
- if the parent is the child of a default doctype
Still the same: either the parent layout has been generated and we can take that as a source, or we have to go upper until we find something generated. If there isn't, we use the default doctype.