feat(viewer): compact status and severity table icons

This commit is contained in:
2026-04-22 21:19:12 +03:00
parent 2fb01d30a6
commit 34ebaa524d
9 changed files with 322 additions and 241 deletions
+2 -1
View File
@@ -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
+10 -1
View File
@@ -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