Skip to content

Commit 7b709e9

Browse files
authored
Merge pull request #128 from ModusCreateOrg/ADE-200
ADE-200
2 parents 0fe5c82 + 3cff2eb commit 7b709e9

File tree

7 files changed

+73
-32
lines changed

7 files changed

+73
-32
lines changed

frontend/src/common/utils/i18n/resources/en/home.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"greeting": "Welcome, {{name}}!",
1414
"howAreYou": "How Are You Today?",
1515
"aiAssistant": {
16-
"title": "MedReport AI is with you!",
16+
"title": "MedReport AI\nis with you!",
1717
"description": "Ask questions about your medical reports and get instant answers.",
1818
"button": "Ask Questions"
1919
}

frontend/src/pages/Home/HomePage.scss

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
}
2020

2121
&-title {
22+
font-family: 'Merriweather', serif;
2223
font-size: 1rem;
2324
color: var(--ion-color-medium);
2425
margin: 0 0 0.25rem;
@@ -70,7 +71,7 @@
7071
font-weight: 700;
7172
margin: 0 0 0.25rem;
7273
text-align: left;
73-
white-space: normal;
74+
white-space: pre-line;
7475
word-wrap: break-word;
7576
}
7677

@@ -251,16 +252,18 @@
251252

252253
// Add a more specific selector to override Ionic's default styles
253254
ion-card.home-page__ai-card ion-card-content h3.home-page__ai-card-title {
255+
font-family: 'Inter', serif;
254256
color: white;
255-
font-size: 1rem;
257+
font-size: 1.25rem;
256258
font-weight: 700;
257259
margin: 0 0 0.25rem;
258260
text-align: left;
259-
white-space: normal;
261+
white-space: pre-line;
260262
word-wrap: break-word;
261263
}
262264

263265
ion-card.home-page__ai-card ion-card-content span.home-page__ai-card-button-inline {
266+
font-family: 'Merriweather', serif;
264267
font-size: 0.875rem;
265268
color: #ffbe5b;
266269
font-weight: 500;

frontend/src/pages/Home/components/ReportItem/ReportItem.scss

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,36 @@
88

99
&__content {
1010
flex: 1;
11-
margin-left: 16px;
11+
margin-left: 8px;
12+
width: 60%;
13+
}
14+
15+
&__status-bullet {
16+
width: 8px;
17+
height: 8px;
18+
margin-top: 5px;
19+
display: inline-block;
20+
background-color: #fead7f;
21+
border-radius: 50%;
22+
vertical-align: middle;
1223
}
1324

1425
&__category-label {
1526
font-size: 13px;
1627
color: #4355b9;
1728
margin-bottom: 4px;
1829
font-weight: 700;
19-
20-
// Add a small bullet before brain category
21-
&:before {
22-
content: '';
23-
display: inline-block;
24-
width: 6px;
25-
height: 6px;
26-
background-color: #fd6a6a;
27-
border-radius: 50%;
28-
margin-right: 8px;
29-
vertical-align: middle;
30-
}
3130
}
3231

3332
&__title {
3433
font-weight: 600;
3534
font-size: 16px;
3635
color: #111;
3736
margin-bottom: 4px;
37+
white-space: nowrap;
38+
overflow: hidden;
39+
text-overflow: ellipsis;
40+
max-width: 100%;
3841
}
3942

4043
&__date {
@@ -51,11 +54,11 @@
5154
margin-right: 6px;
5255

5356
&-icon {
54-
font-size: 12px;
57+
font-size: 11px;
5558
color: #aaa;
5659
transition: all 0.2s ease;
57-
width: 12px;
58-
height: 12px;
60+
width: 34px;
61+
height: 34px;
5962
display: flex;
6063
align-items: center;
6164
justify-content: center;
@@ -67,7 +70,8 @@
6770

6871
&--active {
6972
color: white;
70-
background-color: #4355b9;
73+
/*background-color: #4355b9;*/
74+
background-color: #4765ff;
7175
box-shadow: none;
7276
}
7377
}

frontend/src/pages/Home/components/ReportItem/ReportItem.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const ReportItem: React.FC<ReportItemProps> = ({
2828
}) => {
2929
const { t } = useTranslation(['common', 'report']);
3030
const { title, category, createdAt, status, bookmarked } = report;
31-
console.log('status', status);
3231

3332
// Treat category as string
3433
const categoryStr = category.toString().toLowerCase();
@@ -85,7 +84,11 @@ const ReportItem: React.FC<ReportItemProps> = ({
8584
return (
8685
<div className="report-item" onClick={onClick}>
8786
{getCategoryIcon()}
88-
87+
{status === 'UNREAD' && (
88+
<div className="report-item__status-bullet">
89+
<figure className="circle"></figure>
90+
</div>
91+
)}
8992
<div className="report-item__content">
9093
<div className="report-item__category-label">
9194
{t(getCategoryTranslationKey(), { ns: 'report' })}
Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
.filter-panel {
2+
font-family: 'Inter', serif;
23
padding: 1.5rem 1rem;
34
display: flex;
45
flex-direction: column;
56
height: 100%;
67
background-color: white;
78

89
&__title {
9-
font-size: 1.5rem;
10+
font-size: 1.25rem;
1011
font-weight: 600;
1112
margin: 0 0 1.5rem;
1213
color: var(--ion-text-color);
1314
}
1415

1516
&__category-section {
1617
flex: 1;
17-
margin-bottom: 1.5rem;
18+
margin-bottom: 3rem;
1819
}
1920

2021
&__category-title {
@@ -25,23 +26,31 @@
2526
}
2627

2728
&__category-container {
28-
display: flex;
29-
flex-wrap: wrap;
30-
gap: 0.75rem;
29+
display: grid;
30+
grid-template-columns: repeat(3, 1fr);
31+
gap: 0.5rem;
32+
width: 100%;
3133
}
3234

3335
&__category-button {
3436
background-color: white;
35-
border: 1px solid #e0e0e0;
37+
border: 1px solid #838B94;
3638
border-radius: 8px;
37-
padding: 0.75rem 1.25rem;
39+
padding: 0.75rem 0.5rem;
3840
font-size: 14px;
3941
font-weight: 500;
4042
color: var(--ion-color-medium);
4143
transition: all 0.2s ease;
4244
cursor: pointer;
45+
text-align: center;
46+
width: 100%;
47+
height: 41px;
48+
display: flex;
49+
align-items: center;
50+
justify-content: center;
4351

4452
&--selected {
53+
font-weight: 600;
4554
background-color: #313E4C;
4655
color: white;
4756
border-color: #313E4C;
@@ -50,16 +59,20 @@
5059

5160
&__actions {
5261
padding-bottom: env(safe-area-inset-bottom);
62+
margin-top: auto;
5363
}
5464

5565
&__apply-button {
66+
font-family: 'Inter', serif;
5667
--background: #435FF0;
5768
--color: white;
5869
height: 48px;
5970
font-weight: 600;
6071
margin: 0;
61-
--border-radius: 8px;
72+
--border-radius: 12px;
6273
text-transform: none;
6374
font-size: 16px;
75+
letter-spacing: 0;
76+
box-shadow: none;
6477
}
6578
}

frontend/src/vitest.d.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// This declaration file adds the global types for Vitest testing functions
2+
// that TypeScript cannot find automatically
3+
4+
import 'vitest';
5+
import type { TestContext } from 'vitest';
6+
7+
declare global {
8+
// Declare global testing functions
9+
const describe: typeof import('vitest')['describe'];
10+
const it: typeof import('vitest')['it'];
11+
const test: typeof import('vitest')['test'];
12+
const expect: typeof import('vitest')['expect'];
13+
const beforeEach: (fn: (context: TestContext) => void) => void;
14+
const afterEach: (fn: (context: TestContext) => void) => void;
15+
const beforeAll: (fn: (context: TestContext) => void) => void;
16+
const afterAll: (fn: (context: TestContext) => void) => void;
17+
const vi: typeof import('vitest')['vi'];
18+
}

frontend/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
"test/*": ["./src/test/*"]
2626
}
2727
},
28-
"include": ["src", "src/types"],
28+
"include": ["src", "src/types", "src/vitest.d.ts"],
2929
"references": [{ "path": "./tsconfig.node.json" }]
3030
}

0 commit comments

Comments
 (0)