Skip to content

Specification ‐ Indent States and Behaviors

Brian Ruf edited this page Aug 21, 2023 · 1 revision

Indent States and Behaviors

There are several places within the application where it is possible to increase and decrease indent levels within information types, such as catalog groups, controls, and statement parts within a control. Unless otherwise cited in a specific issue, the following guidance applies anyplace indent functionality exists in the application.

Indentation states

The following states apply to any indented list of like items.

STATE Decrease
Indent
Active?
Decrease
Indent
Behavior
Increase
Indent
Active?
Increase
Indent
Behavior
[R1] First item at the root of a list No N/A No N/A
[R+] Subsequent item at the root of a list No N/A Yes Becomes a child of the item above it.
If the item above already has children
this item becomes the last child.

See below for details
[C1] First child of another item Yes Becomes a sibling of its parent.

See below for details
No N/A
[C+] Subsequent item of another child Yes Becomes a sibling of its parent.

See below for details
Yes Becomes a child of the item above it.
If the item above already has children
this item becomes the last child.

See below for details

Increasing Indent Behavior

When Increase Indent button is selected and the new parent has other children, the following happens:

In OSCAL:

  • the item is moved from being a sibling of the item above it, to being a child of that item.
  • if the new parent has other children, the item being moved becomes the last child. NOTE: All content within the item is moved, including any children the moved item has.

In the UI:

  • after the OSCAL is updated above, the list is updated, such that the vertical position of the list does not appear to change
  • the item now appears as a child to its former sibling.
  • if the former sibling (new parent) already has other children, this becomes the last child.

Example: Increasing Indent

In this example, Increase Indent was initiated for root item #2. It becomes the last child of root item #1

BEFORE

- root item #1
  - child item #1.1
    - grandchild item #1.1.1
- root item #2                <== Increasing Indent
  - child item #2.1
  - child item #2.2
    - grandchild item #2.2.1
    - grandchild item #2.2.2
  - child item #2.3
- root item #3

AFTER

- root item #1
  - child item #1.1
    - grandchild item #1.1.1
  - root item #2             <== Now a sibling to child item #1.1
    - child item #2.1
    - child item #2.2
      - grandchild item #2.2.1
      - grandchild item #2.2.2
    - child item #2.3
- root item #3

Decreasing Indent Behavior

When an item is a child of another item and the Decrease Indent button is selected, the following happens:

In OSCAL:

  • the item is moved from being a child of its parent to being at the same level as the parent
  • the item is inserted between its former parent and the next former parent's sibling. NOTE: All content within the item is moved, including any children the moved item has.

In the UI:

  • after the OSCAL is updated above, the list is updated, such that the vertical position of the list does not appear to change;
  • the item now appears as a sibling to its former parent;
  • ideally we signal the new location to the user, such as:
    • an animation showing the row moving; OR
    • by temporarily flashing the item's row at its new location; AND/OR
    • if the item was in edit mode, it remains in edit mode at the new location.

Example: Decreasing Indent

In this example, Decrease Indent was initiated for child item #2.2

BEFORE

- root item #1
- root item #2
  - child item #2.1
  - child item #2.2           <== Decreasing Indent
    - grandchild item #2.2.1
    - grandchild item #2.2.2
  - child item #2.3
- root item #3

AFTER

- root item #1
- root item #2
  - child item #2.1
  - child item #2.3
- child item #2.2             <== Now a sibling of root item #2, inserted between it and root item #3
  - grandchild item #2.2.1
  - grandchild item #2.2.2
- root item #3