enhancement
When a form is created from a tl:ConfigurationItem, it is possible to collapse the UI for a property that holds a list or map. If the list (or map) itself contains many entries, the list can still become very cluttered.
Take, for example, the list of paths in an OpenAPI definition. Here, the individual path entries have a relatively extensive UI, making the entire path configuration difficult to navigate. Often, users aren’t interested in the details of the individual paths; they’re more interested in an overview of which paths exist.
Improvement
It should be possible to collapse the individual entries in a list (or map). A title identifying the entry is displayed in the header of each entry.
Implementation
- It should be possible to collapse individual entries in a list or map.
- If a key is annotated on the list property, or if it is a map property, the key property is displayed in the entry’s header if it would otherwise be displayed in the “body.”
- It is possible to annotate the content type of the list or map with an @TitleProperty(<PropertyDescriptor>) (<title-property name="..." />). This property is then displayed in the header. The TitleProperty can also be set on List- or Map-valued properties to override the default behavior at this point.
- It is possible to collapse or expand all properties at once.
- Using the @CollapseEntries(<Boolean>) (<collapse-entries value=""/>) annotation, you can configure the entries to be collapsed by default.
Test
- Edit the OpenAPI server in the Service Editor administration.
- Add a new path.
- Expected: While editing, the new path is expanded.
- Save.
- Expected: The path is collapsed.
- Expand the path and edit it.
- Expected: The path is expanded.
- Log in again.
- Expected: The path is expanded.
- Reset personal settings. Log in again.
- Expected: The path is collapsed.