Enhancement
When a form is created from a tl:ConfigurationItem, it is possible to collapse the UI for a list or map valued property. If the list (or map) itself contains many entries, this list can still become very confusing.
As an example the list of paths of an OpenAPI definition can be taken. Here the individual path entries have a relatively extensive UI so that the whole path configuration becomes unüberschualich. Often the details of the individual paths are not of interest; it is more interesting to have an overview of which paths exist.
Improvement
It should be possible to collapse the single entries of a list (or map). In the header of each entry a title is written that identifies the entry.
Implementation
- Individual entries of a list or map should be collapsible.
- If a key is annotated to the list property, or if it is a map property, the key property is displayed in the header of the entry, if it would otherwise be displayed in the "body".
- It is possible to annotate a @TitleProperty(<PropertyDescriptor>)(<title-property name="..." />) to the content type of the list or map. Then this property will be displayed in the header. The TitleProperty can also be set at list- or map-value properties to override at this point.
- It is possible to collapse or expand all properties at once.
- With the annotation @CollapseEntries(<Boolean>)(<collapse-entries value=""/>) it can be configured that the entries are initially collapsed.
Test
- Edit the OpenAPI server in the service editor administration.
- Add a new path.
- Expectation: During editing the new path is collapsed.
- Save.
- Expectation: The path is collapsed.
- Expand path, edit.
- Expectation: The path is expanded.
- Log in again.
- Expectation: The path is expanded.
- Reset personal configuration. Log in again.
- Expectation: The path is collapsed.