enhancement
critical
major
minor
minor
minor
#26263
No configuration defaults for `content-layouting` in layout configurations
The content-layouting (getContentLayouting) configuration of the tl:LayoutComponent has a tl:InstanceFormat and tl:InstanceDefault annotation. The default value corresponds to tl:ContentLayouting. However, ContentLayouting does not have its own config interface. When creating a new instance of LayoutComponent.Config, for example, the default values are initialized—including ContentLayouting. To do this, it creates a new instance of AbstractContentLayouting.Config and sets the implementation class to ContentLayouting. Therefore, the `valueSet` of the implementation class is `true`. Since the implementation class has been changed, the `tl:ConfigurationWriter` also writes out the ` content-layouting ` property. This is undesirable and results in configurations that are very difficult to read.
For example:
#!xml
<components>
<layout-reference resource="foobar.layout.xml">
<content-layouting class="com.top_logic.layout.structure.ContentLayouting">
<contextMenuFactory class="com.top_logic.layout.basic.contextmenu.component.factory.PlainComponentContextMenuFactory">
<customCommands class="com.top_logic.layout.basic.contextmenu.config.NoContextMenuCommands"/>
</contextMenuFactory>
</content-layouting>
</layout-reference>
<layout-reference resource="foobar2.layout.xml">
<content-layouting class="com.top_logic.layout.structure.ContentLayouting">
<contextMenuFactory class="com.top_logic.layout.basic.contextmenu.component.factory.PlainComponentContextMenuFactory">
<customCommands class="com.top_logic.layout.basic.contextmenu.config.NoContextMenuCommands"/>
</contextMenuFactory>
</content-layouting>
</layout-reference>
</components>
As you can see, the result is very unattractive for tab bars. Instead, you would use
#!xml <components> <layout-reference resource="foobar.layout.xml"/> <layout-reference resource="foobar2.layout.xml"/> </components>
a much clearer way to serialize the configuration.
Solution
Explicit config interfaces for the implementation classes, even though no configuration properties can be set.
Code Migration
The Ant task ` z_remove_default_content_layouting ` adjusts the layouts in the file system as described above. Code migration is not strictly necessary; the old layouts remain valid, of course.
Test
Refactoring, no testing.