feat: redesign biomarker display as a vertical list with status indicators and scale bars

This commit is contained in:
2025-12-20 12:57:33 +05:30
parent 69bc5675dc
commit 89815e7e21
2 changed files with 105 additions and 9 deletions

View File

@@ -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;

View File

@@ -85,7 +85,7 @@ export function DashboardPage() {
}}
>
<div>
<span style={{ fontSize: '16px', fontWeight: 600 }}>{category.name}</span>
<span style={{ fontSize: '16px', fontWeight: 600, textTransform: 'uppercase' }}>{category.name}</span>
<span className="text-secondary text-sm" style={{ marginLeft: 'var(--space-sm)' }}>
({categoryBiomarkers.length} biomarkers)
</span>
@@ -102,15 +102,17 @@ export function DashboardPage() {
No biomarkers in this category
</p>
) : (
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 'var(--space-xs)' }}>
<div className="biomarker-list">
{categoryBiomarkers.map(biomarker => (
<div
key={biomarker.id}
className="biomarker-chip"
title={`${biomarker.name} (${biomarker.unit})`}
>
<span className="biomarker-name">{biomarker.name}</span>
<span className="biomarker-unit">{biomarker.unit}</span>
<div key={biomarker.id} className="biomarker-row">
<div className="biomarker-dot" title="No data"></div>
<div className="biomarker-info">
<span className="biomarker-name">{biomarker.name}</span>
<span className="biomarker-unit">{biomarker.unit}</span>
</div>
<div className="biomarker-scale">
<div className="scale-bar placeholder"></div>
</div>
</div>
))}
</div>