Modal (Next)
Modal is a container, not a chart. A Modal row in the layout adds a button to the dashboard header. Pressing it opens an overlay that renders the rows nested inside the Modal’s configuration, with a realm picker of its own. It is the way to put a second, self-contained dashboard behind the main one, for example one page per vignette inside a longer exercise.
Anything the Next dashboard can render in a page row can be rendered inside a Modal. The nested rows use the same column format as the page.
Summary
| Value | |
|---|---|
| Layout id | Modal |
| Widget config | modalItem |
| Channel shapes | Any. The Modal itself reads two value channels. Its nested widgets read whatever they need. |
| Playback | Yes, through nested widgets |
| Realm filter | Yes, with its own realm list |
| Dual column | Yes |
Migration status
migrated, full layout reference with nested Comms and ResponseTime rows: tools/arbex/reference/next/Modal.json. See Dataservice migration status.
Layout
The dashboard finds the Modal by looking for a row whose first column has "component": "Modal". Put it in its own row.
| Field | Required | Description |
|---|---|---|
name | Yes | Widget instance name |
titleContent | Yes | The label of the button in the header and the title of the overlay |
channels | Yes | May be empty. Nested widgets bind their own channels. |
rows[] | Yes | The rows rendered inside the overlay, in the same format as components.rows |
realms[] | No | The realm list for the overlay. When set, it replaces the page realm list inside the modal. |
defaultRealm | No | The realm selected when the overlay opens. Falls back to realms[0], then to the page default. |
showRealmFilterDropdown | No | Show the realm picker inside the overlay. Defaults to true. |
modalItem.usersChannel | No | Id of a value channel whose value is an array of participants to list in the overlay header |
modalItem.scenarioChannel | No | Id of a value channel whose value is a scenario instance object for the overlay header |
modalItem.filterLabel | No | Title of the realm picker inside the overlay. Defaults to the page realmFilterLabel or “Realms”. |
usersChannel and scenarioChannel are read together, in the realm selected inside the overlay. Set both or neither.
Schema: #/$defs/ModalSchema in heat-layout-schema.json.
Layout column example
{
"component": "Modal",
"colspan": 12,
"configuration": {
"name": "vignettes",
"titleContent": "Vignettes",
"channels": [],
"realms": ["vignette-1", "vignette-2"],
"defaultRealm": "vignette-1",
"showRealmFilterDropdown": true,
"modalItem": {
"usersChannel": "vignette-users",
"scenarioChannel": "vignette-scenario",
"filterLabel": "Vignette"
},
"rows": [
{
"cols": [
{
"component": "Comms",
"colspan": 12,
"configuration": {
"name": "vignette-comms",
"titleContent": "Comms",
"enablePlaybackControls": true,
"channels": ["comms-primary"],
"commsItem": {
"channels": ["Primary"],
"nodes": [
{ "text": "Commander", "color": "#EE7127", "strokeColor": "#642F10" }
]
}
}
}
]
}
]
}
}Data contract
| Channel | Shape | Payload |
|---|---|---|
modalItem.usersChannel | value | data.value is an array of participant entries shown in the overlay header |
modalItem.scenarioChannel | value | data.value is an object describing the scenario instance shown in the overlay header |
| Nested widgets | Per widget | Each nested widget follows its own page |
Publish the two header channels in every realm listed in realms, because the overlay reads them for the realm currently selected.
Behaviour notes
- The overlay shows the rows from
rows, never the page rows. The page rows are untouched. - The realm list inside the overlay is
realmswhen set. Page realms are kept out of the overlay so that vignette realms and page realms do not mix. - Pressing Escape or clicking outside the overlay closes it.
- Nested widgets that support playback follow the realm clock of the realm selected inside the overlay.
Related
- Next components index
- Layout reference
- Comms and ResponseTime, the widgets in the reference Modal
- Reference:
tools/arbex/reference/next/Modal.json