feat(viewer): compact status and severity table icons
This commit is contained in:
@@ -43,7 +43,8 @@ For array sections:
|
||||
|
||||
## Special Field Handling
|
||||
|
||||
- `status` is rendered as a colored badge
|
||||
- `status` is rendered as a colored badge; in table sections it may collapse to an icon-only presentation column
|
||||
- `severity` may render as both its source text field and a separate icon-only leading table column
|
||||
- arrays such as `mac_addresses` may be rendered as line-separated values or badges inside one cell
|
||||
- nested values such as `status_history` may be rendered in expandable detail blocks inside one cell
|
||||
|
||||
|
||||
@@ -15,7 +15,16 @@
|
||||
1. read the raw `status` value from the payload
|
||||
2. normalize only for presentation matching (`OK`, `Warning`, `Critical`, `Unknown`, `Empty`)
|
||||
3. apply status badge class
|
||||
4. do not change the raw value shown to the user
|
||||
4. in dense table layouts, render `status` as an icon-only column with an empty header when it improves scanning
|
||||
5. preserve the raw status value in accessible labeling even when the visible cell shows only a pictogram
|
||||
|
||||
## Severity Presentation Flow
|
||||
|
||||
1. read the raw `severity` value from the payload
|
||||
2. map the raw value only to a presentation glyph/color class
|
||||
3. when a table includes `severity`, add a leftmost icon-only column for it
|
||||
4. keep the original textual `severity` column visible in the table
|
||||
5. preserve the raw severity value in accessible labeling for the pictogram cell
|
||||
|
||||
## Unknown Field Invariant
|
||||
|
||||
|
||||
@@ -60,4 +60,6 @@ Preferred order:
|
||||
|
||||
- tables must remain readable on desktop and mobile
|
||||
- section navigation must work without JavaScript
|
||||
- color must not be the only status indicator; always show text
|
||||
- color must not be the only status indicator; pair it with a shape or glyph
|
||||
- table `status` columns may use icon-only cells and an empty header when that improves scanability, but the raw status value must remain available via accessible labeling
|
||||
- table sections with `severity` may add a separate leftmost icon-only column for fast scanning while keeping the textual `severity` field visible
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# Decision: Status Table Columns Use Icon-Only Presentation
|
||||
|
||||
**Date:** 2026-04-22
|
||||
**Status:** active
|
||||
|
||||
## Context
|
||||
|
||||
Dense hardware tables frequently repeat the same `status` values.
|
||||
|
||||
Showing a textual `status` header and textual badges in every row wastes horizontal space and reduces scan speed, especially in sensor subtables.
|
||||
|
||||
The viewer still needs to keep status meaning explicit and avoid relying on color alone.
|
||||
|
||||
## Decision
|
||||
|
||||
Table columns named `status` render as compact icon-only columns.
|
||||
|
||||
This includes:
|
||||
|
||||
- an empty visible header cell for the `status` column
|
||||
- a minimal-width table column sized for the pictogram
|
||||
- a glyph plus color to distinguish state
|
||||
- accessible labeling that preserves the raw status value without showing repeated text in the cell
|
||||
|
||||
Object sections may continue to show status as a regular field value.
|
||||
|
||||
## Consequences
|
||||
|
||||
- Table layouts gain more room for source fields such as `name`, `model`, and `location`.
|
||||
- Status meaning remains available to assistive technologies even when the visible cell is icon-only.
|
||||
- Future table UI work should keep `status` compact instead of reintroducing wide text badges by default.
|
||||
Reference in New Issue
Block a user