Skip to content

Hierarchy list ​

A panel on a detail page that lists the record's parents, from the top level down to the nearest one.

entityelements-entityelementhierarchylistviewer--defaultOpen in Storybook ↗

When to use ​

  • Records that sit in a fixed chain of parents, such as an inscription in a point, a site, an area and a region. People see where the record belongs and open any level.
  • The parents have a location: the same panel shows them on a map.

When not to use ​

  • Children or other relations of a record: use an entity list element in a panel.
  • Picking a folder to import from: that is the folder tree, an expandable tree of folders. The hierarchy list is a flat list of one record's parents, not a tree.

Anatomy ​

  1. Panel: an element panel from the panel and block shells: a --color-surface-panel-header header band with the title in --text-panel-title, --color-text-panel-header, and a --panel-body-pad body.
  2. Results band: the count, 4 results, and the view switch when the parents allow more than one view mode. There are no filters, search, sort or pager.
  3. Rows: one row per parent, the top level first and the nearest parent last. The record itself is not in the list. Rows are the list rows of the entity list element, without checkboxes: the whole row is a link that opens that parent, with the first field styled as the link, and the preview eye opens the preview panel.

Variants ​

VariantWhat you seeWhere
Listthe parents as list rowsdefault
Shorter chainonly the levels that could be read, up to the first one that could nota parent is missing or not readable
Mapall parents on a map, fitted to their areas, with a pin on the configured levelthe parents allow the map view
entityelements-entityelementhierarchylistviewer--shorter-chainOpen in Storybook ↗
entityelements-entityelementhierarchylistviewer--mapOpen in Storybook ↗

The panel reads the chain one level at a time: the record's nearest parent first, then that parent's parent, and so on. It stops at the first level it cannot read, so the list never skips a level.

States ​

StateWhat you seeTrigger
Loadingan accent ring spinner (--color-accent-light track, --color-commit edge) centred in a tall empty bodythe parents are being read
Loadedthe parents as rowsevery level read, or the chain stopped
EmptyNo results match your filters, centredthe record has no parent, or the nearest one could not be read
entityelements-entityelementhierarchylistviewer--statesOpen in Storybook ↗

A failed read looks the same as a missing parent: the list shows the levels read before it, or the empty text.

Keyboard & accessibility ​

  • Tab reaches the view switch, then each row and its preview eye, in order. Enter on a row opens that parent.
  • The count sits in a role="status" region.
  • The list is a flat list, not a tree: there are no tree roles and nothing to expand or collapse inside the panel.
  • The loading spinner is hidden from screen readers.

Content ​

  • Name the panel after what the chain is: Hierarchy, Location.
  • Each row's first field is the name people know the parent by; add the level (Region, Site) as a field so the rows read top-down.

Entity list element · Panel & block shells · View modes · Map viewer · Preview panel · Folder tree

Powered by Elody - Open Source Semantic Data Platform