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 a selection component on the left and a form on the right. The form reacts to the selection of the selection component. The configuration is carried out using the UI and the simplified templates. The resulting configuration is retained as the default configuration; no adjustments are made.
Furthermore, an "Object creation" dialog is added to the selection component and the dialog is configured to the generic handlers.
The domain model is a simple structure. Project root extends StructuredElementContainer; Project element extends StructuredElement; Project elementContainer extends StructuredElementContainer, project element; The hierarchy is homogeneously structured from project > work package > activity, children overwritten accordingly, activity is only a project element, not a container.
I then compared the behavior of the components.
The result is stable, but the behavior is inconsistent in detail.
Standard 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 the first object has no neighbors, then expand.
Standard 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: I don't know, both behaviors have their charm. From a performance point of view, it is probably generally better not to automatically expand nodes on selection.
Standard 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 the old object, the expanded state is retained, new object is inserted at the end of the children, sorting is only carried out after sorting has been activated again or the object has been collapsed/expanded
TreeTable: Selection remains on old object, expansion status of sub-nodes of the selection is lost, new object is inserted according to sorting
Tree: Selection remains on old object, expansion state is retained, new object is inserted at the end of the children (clear, no sorting available)
Suggestion for consistency: Selection remains on old object, expansion status is retained, new object is inserted according to the sorting.
Comparison of the 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 "Collapse selection" option for Tree is apparently without function.
For consistent behavior, you would need at least "Select a tree node by default" on the TreeTable and/or "Expand nodes on selection" on the TreeGrid.
Code migration
A TreeViewConfig configuration for tree-like components has been introduced as an abstraction. The option in the Grid, TreeTable and Tree has been renamed from root-visible to rootVisible.
Test
Test components can be found 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 nodes
- Expand root node