From 89815e7e21206ea3bdd2c3fa5858ff31cc2b6005 Mon Sep 17 00:00:00 2001 From: abhishekbhakat Date: Sat, 20 Dec 2025 12:57:33 +0530 Subject: [PATCH] feat: redesign biomarker display as a vertical list with status indicators and scale bars --- frontend/src/index.css | 94 ++++++++++++++++++++++++++++++++ frontend/src/pages/Dashboard.tsx | 20 ++++--- 2 files changed, 105 insertions(+), 9 deletions(-) diff --git a/frontend/src/index.css b/frontend/src/index.css index ad1d61a..0e93a5a 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -422,6 +422,100 @@ select.input { font-size: 11px; } +/* Biomarker List Layout */ +.biomarker-list { + display: flex; + flex-direction: column; + gap: 2px; +} + +.biomarker-row { + display: flex; + align-items: center; + gap: var(--space-md); + padding: var(--space-xs) var(--space-sm); + border-radius: var(--radius-sm); + transition: background-color 0.15s; +} + +.biomarker-row:hover { + background-color: var(--bg-primary); +} + +.biomarker-dot { + width: 10px; + height: 10px; + border-radius: 50%; + background: var(--text-secondary); + flex-shrink: 0; +} + +.biomarker-dot.status-low { + background: var(--warning); +} + +.biomarker-dot.status-normal { + background: var(--success); +} + +.biomarker-dot.status-high { + background: var(--error); +} + +.biomarker-info { + flex: 0 0 240px; + min-width: 0; + display: flex; + flex-direction: row; + align-items: baseline; + gap: var(--space-xs); +} + +.biomarker-info .biomarker-name { + font-size: 14px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.biomarker-info .biomarker-unit { + font-size: 11px; +} + +/* Biomarker Scale Bar */ +.biomarker-scale { + flex: 1; + display: flex; + justify-content: center; + position: relative; + height: 16px; +} + +.scale-bar { + width: 120px; + height: 6px; + border-radius: 3px; +} + +.scale-bar.placeholder { + background: var(--border); +} + +.scale-bar.range { + background: var(--accent); +} + +.scale-marker { + position: absolute; + top: 0; + bottom: 0; + width: 3px; + background: var(--text-primary); + border-radius: 2px; + transform: translateX(-50%); + box-shadow: 0 0 2px rgba(0, 0, 0, 0.3); +} + /* App Layout with Sidebar */ .app-layout { display: flex; diff --git a/frontend/src/pages/Dashboard.tsx b/frontend/src/pages/Dashboard.tsx index 005acfe..f325944 100644 --- a/frontend/src/pages/Dashboard.tsx +++ b/frontend/src/pages/Dashboard.tsx @@ -85,7 +85,7 @@ export function DashboardPage() { }} >
- {category.name} + {category.name} ({categoryBiomarkers.length} biomarkers) @@ -102,15 +102,17 @@ export function DashboardPage() { No biomarkers in this category

) : ( -
+
{categoryBiomarkers.map(biomarker => ( -
- {biomarker.name} - {biomarker.unit} +
+
+
+ {biomarker.name} + {biomarker.unit} +
+
+
+
))}