Enhancement
Critical
Major
Detail
Detail
Detail
#25907
Layout editor: inconsistent behavior of unfold state, selection and reaction to object creation
I have created a tab for each component type, consisting of selection component on the left and form on the right. The form reacts to the selection of the selection component. The configuration is done using the UI and the simplified templates. The resulting configuration is kept as default config, no customization is done.
Furthermore, an "object creation" dialog is added to the selection component and the dialog is configured to the generic handlers.
The compartment model is a simple structure. Project root extends StructuredElementContainer; Project element extends StructuredElement; Project elementContainer extends StructuredElementContainer, project element; The hierarchy is homogeneously built from project > work package > activity, children each overwritten accordingly, activity is only project element, no container.
Afterwards I compared the components on their behavior.
As a result it is stable, but in detail the behavior is inconsistent.
Default behavior after login
Tree: No selection, tree expanded to level 1
TreeTable: No selection, tree not expanded
TreeGrid: First row selected, tree not expanded
Table: First row selected
Grid: First row selected
Suggestion for consistency: First object is selected. If it is the root, then expand. Or if first object has no neighbors, then expand.
Default behavior for selection
Tree: Node is selected
TreeTable: Node is selected and node is expanded.
TreeGrid: Node is selected
Table: row is selected
Grid: row is selected
Suggestion for consistency: no idea, both behaviors have their charm. From a performance point of view, it is probably generally better not to automatically expand nodes on selection.
Default behavior after creating a new object
Grid: row selection remains on old object, new object is inserted according to the sort order
Table: row selection remains on old object, new object is inserted according to the sort order
TreeGrid: Selection remains on old object, expansion state is retained, new object is inserted at the end of the children, classification according to sorting is only carried out after the sorting has been activated again or collapsed/expanded
TreeTable: Selection remains on old object, expanded state of subnodes of the selection is lost, new object is inserted according to the sort order
Tree: Selection remains on old object, expansion state is preserved, new object is inserted at the end of the children (clear, no sorting available)
Proposal for consistency: selection remains on old object, unfolding state is preserved, new object is inserted according to sorting.
Comparison of configuration options for tree displays
Tree: Show root nodes, Show only selectable tree nodes, Expand nodes on selection, Collapse selection, Select a tree node by default
TreeTable: Show root nodes
TreeGrid: Show root nodes
The option "Collapse selection" in Tree is apparently without function.
For a consistent behavior you would need at least "Select a tree node by default" at TreeTable and/or "Expand nodes on selection" at TreeGrid.
Code migration
A TreeViewConfig configuration for tree-like components has been introduced as an abstraction. The option in the Grid, TreeTable and Tree was renamed from root-visible to rootVisible.
Test
Test components are located under Technical Demo > Components > Tables and Trees.
The tree-like components (TreeGrid, TreeTable and Tree) now have the same four configuration options in particular, which should also be tested:
- Select tree nodes by default
- Expand selection
- Show root node
- Expand root node