Skip to content

Commit 85f483d

Browse files
committed
Refactor results table header styles and structure for improved layout and readability
1 parent ff108c0 commit 85f483d

File tree

2 files changed

+70
-26
lines changed

2 files changed

+70
-26
lines changed

frontend/src/pages/Reports/ReportDetailPage.scss

Lines changed: 57 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -489,16 +489,21 @@
489489
}
490490

491491
&__results-header {
492+
background: #fff;
493+
}
494+
495+
&__results-header-row {
492496
display: flex;
493497
background: #f2f4f7;
494-
color: #838b94;
498+
color: #5c6d80;
495499
font-weight: 600;
496-
padding: 0 14px;
497-
min-width: 0;
500+
padding: 5px;
501+
width: 90%;
498502
border-bottom: 1.5px solid #e9eef6;
499-
min-height: 48px;
500-
height: 48px;
501503
align-items: center;
504+
margin-top: 15px;
505+
margin-right: auto;
506+
margin-left: auto;
502507
}
503508

504509
&__results-row {
@@ -533,33 +538,70 @@
533538
line-height: 1.2;
534539
}
535540

541+
&__results-cell-header {
542+
display: flex;
543+
align-items: center;
544+
font-size: 14px;
545+
font-weight: 400;
546+
padding: 0;
547+
background: none;
548+
min-width: 0;
549+
white-space: nowrap;
550+
max-width: 100%;
551+
line-height: 1.2;
552+
}
553+
536554
&__results-cell--test {
537555
flex: 2;
538-
font-weight: 500;
539-
color: #313e4c;
540-
max-width: 140px;
556+
font-size: 12px;
557+
min-width: 160px;
541558
overflow-wrap: break-word;
542559
white-space: normal; // Allow text to wrap
543560
word-break: break-word; // Ensure long words break
544561
}
545562

546563
&__results-cell--value {
547564
flex: 1.3;
565+
font-size: 12px;
548566
justify-content: flex-end;
549-
font-weight: 700;
550-
color: #313e4c;
567+
font-weight: 500;
551568
white-space: normal; // Allow text to wrap
552569
word-break: break-word; // Ensure long words break
553570
overflow-wrap: break-word;
554571
}
555572

556573
&__results-cell--ref {
574+
color: #5c6d80;
575+
flex: 1;
576+
justify-content: flex-end;
577+
font-size: 12px;
578+
min-width: 80px;
579+
white-space: normal; // Allow text to wrap
580+
word-break: break-word; // Ensure long words break
581+
overflow-wrap: break-word;
582+
}
583+
584+
&__results-cell-header--test {
585+
flex: 2;
586+
min-width: 160px;
587+
overflow-wrap: break-word;
588+
white-space: normal; // Allow text to wrap
589+
word-break: break-word; // Ensure long words break
590+
}
591+
592+
&__results-cell-header--value {
593+
flex: 1.3;
594+
justify-content: flex-end;
595+
white-space: normal; // Allow text to wrap
596+
word-break: break-word; // Ensure long words break
597+
overflow-wrap: break-word;
598+
}
599+
600+
&__results-cell-header--ref {
557601
flex: 1;
558602
justify-content: flex-end;
559603
font-size: 13px;
560-
color: #a0aec0;
561-
font-weight: 400;
562-
max-width: 60px;
604+
min-width: 80px;
563605
white-space: normal; // Allow text to wrap
564606
word-break: break-word; // Ensure long words break
565607
overflow-wrap: break-word;
@@ -574,9 +616,9 @@
574616
}
575617

576618
&__results-value {
577-
font-weight: 700;
619+
font-weight: 600;
578620
color: #313e4c;
579-
font-size: 14px;
621+
font-size: 13px;
580622
text-overflow: ellipsis;
581623
white-space: nowrap;
582624
max-width: 100px;

frontend/src/pages/Reports/components/OriginalReportTab.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,19 @@ const OriginalReportTab: React.FC<OriginalReportTabProps> = ({ reportData }) =>
2929
{/* Test results table */}
3030
<div className="report-detail-page__results-table">
3131
<div className="report-detail-page__results-header">
32-
<div className="report-detail-page__results-cell report-detail-page__results-cell--test">
33-
Test
34-
</div>
35-
<div className="report-detail-page__results-cell" style={{ width: '24px' }}>
36-
{/* Status column */}
37-
</div>
38-
<div className="report-detail-page__results-cell report-detail-page__results-cell--value">
39-
Results
40-
</div>
41-
<div className="report-detail-page__results-cell report-detail-page__results-cell--ref">
42-
Ref.
32+
<div className="report-detail-page__results-header-row">
33+
<div className="report-detail-page__results-cell-header report-detail-page__results-cell-header--test">
34+
Test
35+
</div>
36+
<div className="report-detail-page__results-cell" style={{ width: '24px' }}>
37+
{/* Status column */}
38+
</div>
39+
<div className="report-detail-page__results-cell-header report-detail-page__results-cell-header--value">
40+
Results
41+
</div>
42+
<div className="report-detail-page__results-cell-header report-detail-page__results-cell-header--ref">
43+
Ref.
44+
</div>
4345
</div>
4446
</div>
4547
{reportData.labValues.map((labValue, index) => (

0 commit comments

Comments
 (0)