As a user I can organize an existing schema by adding a record and assigning existing fields as children to that parent record.
There are two use cases for adding a record:
- Flat schema: the input schema has a flat structure and I want to add one of more records to organize the existing field in a hierarchical structure (nested schema).
- Nested schema: the input schema is organized hierarchically and it already contains field with data type as record.
Flat schema - the plug-in displays both input and output schema (both look the same). In the middle (the properties area) the user can change the label for the plug-in and can add records. In this use case, the input schema has a flat structure, the area of the hierarchy widget is displayed as empty.
Nested schema - in this use case, the input schema is structured hierarchically. The existing "records" fields are displayed in the widget area. If a record is parent to other record children, those records will be displayed. The record counter displays the total number of records displayed.
Nested (aka parent/child) field will be represented using the same visual treatment as the one used for the representation of the schema.
ADD A RECORD
As user, I can add a record by either clicking on the "+ ADD RECORD" link or by clicking on the "+" icon displayed on each of the record field row.
"+ADD RECORD" Displays a new record row on top of the page. The input text for the field name is in focus so that the user can immediately start writing the name, without any further action.
New records are represented as editable rows. The user can either:
- Edit the name - Action: the user has to hover over the name field and click to display the text area.
- Add a child record - Action the user selects the [+] icon
- Delete the record - Action: the user selects the trash can icon
"+" Adds a child record to an existing record, which become the parent record.
NOTE: only records added using the Hierarchy widget can be deleted.
The user can edit the name of existing records from the widget as well. Action: the user has to hover over the name field and click to display the text area.