# Result details list

The **result details list** component allows to visualize a set of steps as part of a procedure or process as well as their current status.

## Usage

It helps to visualize and communicate the steps (including status and results) of a procedure or process. This can be used for scenarios like self-test procedures, onboarding processes and more.

![Result details list](<../images/result-details-list.png>)

### When to use

- To visualize test procedures which require multiple steps that need to be performed in a specific order.
- For clear and effective communication of the current status and results.
- To communicate a timeline.

## Design

![Result details list specification](<../images/result-details-list-usage-construction.png>)

> 1. Icon, 2. Label, 3. Feedback (Optional), 4. Result value (Optional)

### Icon

- Icons give a visual cue about the current state or the kind of step.
- Basic icons are offered for the following steps: `Open`, `In Progress`,`Done`, `Issue` or `Unsupported`.
- The component allows also to use customized icons.

### Variations

![Result details list variations](<../images/result-details-list-usage-variations.png>)

> 1. Open step, 2. In progress, 3. Done, 4. Issue with optional feedback, 5. Unsupported step, 6. Customized icon

## Code

This component can be used to display a list of chronological steps for a specific process.

Each step contains a `description` and a `state`. Optionally a step can have a `value` as well as an `error message`. Each step can also define a `custom icon` to be displayed.

The list is vertical by default; set `orientation="horizontal"` to display the steps in a single row. Horizontal labels are clipped after two lines, so use the vertical orientation when space is limited.

This component requires an array of `ResultDetailStep` objects as an input. The possible states are defined in the enum `ResultDetailStepState`. More information can be found below.

### Usage

```
import { SiResultDetailsListComponent } from '@siemens/element-ng/result-details-list';

@Component({
  imports: [
    SiResultDetailsListComponent, ...
  ]
})
```

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component } from '@angular/core';
import {
  ResultDetailStep,
  SiResultDetailsListComponent
} from '@siemens/element-ng/result-details-list';

@Component({
  selector: 'app-sample',
  imports: [SiResultDetailsListComponent],
  templateUrl: './si-result-details-list.html',
  host: { class: 'p-5' }
})
export class SampleComponent {
  steps: ResultDetailStep[] = [
    {
      description: 'Volume flow sensor',
      state: 'passed',
      detail: 'Additional detail about state'
    },
    {
      description: 'Maximum differential pressure',
      state: 'passed',
      value: '4 kPa'
    },
    {
      description: 'Maximum volume flow',
      state: 'failed',
      errorMessage: 'Cannot reach maximum volume flow',
      value: '20 m³/h'
    },
    {
      description: 'Nominal volume flow',
      state: 'running'
    },
    {
      description: 'Nominal differential pressure',
      state: 'not-started'
    },
    {
      description: 'A not supported step',
      state: 'not-supported'
    },
    {
      description: 'A step with a custom icon',
      state: 'failed',
      icon: 'element-lock'
    }
  ];
}
```

Template:

```html
<si-result-details-list class="d-block background-1" [steps]="steps" />
```

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component } from '@angular/core';
import {
  ResultDetailStep,
  SiResultDetailsListComponent
} from '@siemens/element-ng/result-details-list';

@Component({
  selector: 'app-sample',
  imports: [SiResultDetailsListComponent],
  templateUrl: './si-result-details-list-horizontal.html',
  host: { class: 'p-5' }
})
export class SampleComponent {
  readonly steps: ResultDetailStep[] = [
    {
      description: 'Supply voltage',
      state: 'passed',
      detail: 'Within the configured range',
      value: '24 V'
    },
    {
      description: 'Verify communication with the backup control unit',
      state: 'running'
    },
    {
      description: 'Cooling circuit',
      state: 'failed',
      errorMessage: 'Flow is below the required minimum',
      value: '8 L/min'
    },
    {
      description: 'Safety relay',
      state: 'not-started'
    },
    {
      description: 'Optional sensor',
      state: 'not-supported',
      detail: 'This installation has no optional sensor'
    },
    {
      description: 'Service access',
      state: 'passed',
      icon: 'element-lock',
      value: 'Locked'
    }
  ];
}
```

Template:

```html
<si-result-details-list class="d-block background-1" orientation="horizontal" [steps]="steps" />
```

### [SiResultDetailsListComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/result-details-list/si-result-details-list.component.ts#L26-L48>)

**Kind:** component

**Selector:** `si-result-details-list`

```
import { SiResultDetailsListComponent } from '@siemens/element-ng/result-details-list';
```

```
component SiResultDetailsListComponent
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [orientation](<https://github.com/siemens/element/blob/main/projects/element-ng/result-details-list/si-result-details-list.component.ts#L39-L39>) | `"horizontal" \| "vertical"` | `'vertical'` | Orientation of the result steps. |
| [steps](<https://github.com/siemens/element/blob/main/projects/element-ng/result-details-list/si-result-details-list.component.ts#L32-L32>) | `ResultDetailStep[]` | `[]` | Array of steps to show in the list. |

### Types Documentation

### [ResultDetailStep](<https://github.com/siemens/element/blob/main/projects/element-ng/result-details-list/si-result-details-list.datamodel.ts#L9-L38>)

**Kind:** interface

```
import type { ResultDetailStep } from '@siemens/element-ng/result-details-list';
```

```
interface ResultDetailStep
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [description](<https://github.com/siemens/element/blob/main/projects/element-ng/result-details-list/si-result-details-list.datamodel.ts#L13-L13>) | `TranslatableString` | A description of the step. |
| [detail](<https://github.com/siemens/element/blob/main/projects/element-ng/result-details-list/si-result-details-list.datamodel.ts#L33-L33>) (optional) | `TranslatableString` | Optional detail text which appears below description. |
| [errorMessage](<https://github.com/siemens/element/blob/main/projects/element-ng/result-details-list/si-result-details-list.datamodel.ts#L25-L25>) (optional) | `string` | Optional error message to display. |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/result-details-list/si-result-details-list.datamodel.ts#L29-L29>) (optional) | `string` | Optional custom icon to display. Otherwise a default icon will be shown based on the state property. |
| [state](<https://github.com/siemens/element/blob/main/projects/element-ng/result-details-list/si-result-details-list.datamodel.ts#L17-L17>) | `ResultDetailStepState` | A state object defining the state of the step. |
| [translationParams](<https://github.com/siemens/element/blob/main/projects/element-ng/result-details-list/si-result-details-list.datamodel.ts#L37-L37>) (optional) | `Record<string, unknown>` | Optional translation params to be used with translate pipe. |
| [value](<https://github.com/siemens/element/blob/main/projects/element-ng/result-details-list/si-result-details-list.datamodel.ts#L21-L21>) (optional) | `string` | Optional value to be displayed for the step. |

### [TranslatableString](<https://github.com/siemens/element/blob/main/projects/element-translate-ng/translate-types/global.types.ts#L18-L18>)

**Kind:** type alias

```
import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';
```

Represents a translatable string. This can either be a translation key, e.g. `ACTIONS.EDIT` that will be automatically translated when displayed on the UI or a pre-translated string, e.g. `Edit`. Equivalent to a normal string in usage and functionality.

```
type TranslatableString = string & Translatable
```

### [ResultDetailStepState](<https://github.com/siemens/element/blob/main/projects/element-ng/result-details-list/si-result-details-list.datamodel.ts#L43-L44>)

**Kind:** type alias

```
import type { ResultDetailStepState } from '@siemens/element-ng/result-details-list';
```

This type defines the state that a detailed result step can have.

```
type ResultDetailStepState = 'passed' | 'failed' | 'running' | 'not-supported' | 'not-started'
```
