Skip to content

Commit be10e19

Browse files
committed
PM-1906 - mobile ui
1 parent e35179f commit be10e19

File tree

10 files changed

+113
-8
lines changed

10 files changed

+113
-8
lines changed

src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardGroup/ScorecardGroup.module.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@
3636
}
3737
}
3838
}
39+
40+
@include ltemd {
41+
flex-wrap: wrap;
42+
row-gap: $sp-2;
43+
44+
.score {
45+
order: 7;
46+
width: 100%;
47+
margin-left: $sp-10;
48+
}
49+
}
3950
}
4051

4152
.index {

src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardGroup/ScorecardGroup.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ const ScorecardGroup: FC<ScorecardGroupProps> = props => {
3535
{props.index}
3636
.
3737
</span>
38-
<span>
38+
<span className={styles.name}>
3939
{props.group.name}
4040
</span>
4141
<span className={styles.mx} />
42-
<span>
42+
<span className={styles.score}>
4343
<ScorecardScore
4444
score={score}
4545
scaleMax={1}

src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedback/AiFeedback.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@
33
.wrap {
44
p {
55
margin-bottom: $sp-4;
6+
7+
@include ltemd {
8+
margin-bottom: $sp-2;
9+
}
610
}
711
}

src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/ScorecardQuestionRow/ScorecardQuestionRow.module.scss

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,42 @@
1111
font-size: 14px;
1212
line-height: 20px;
1313
color: #0A0A0A;
14+
15+
@include ltemd {
16+
display: flex;
17+
gap: $sp-2 $sp-4;
18+
flex-wrap: wrap;
19+
20+
.icon {
21+
width: 24px;
22+
flex: 0 0 auto
23+
}
24+
25+
.index {
26+
width: 128px;
27+
flex: 0 0 auto
28+
}
29+
30+
.content {
31+
flex: 100%;
32+
padding-left: $sp-10;
33+
}
34+
35+
.score {
36+
width: 100%;
37+
padding-left: $sp-10;
38+
39+
&:empty {
40+
display: none;
41+
}
42+
&:not(:empty)::before {
43+
content: 'Score';
44+
display: block;
45+
font-weight: bold;
46+
margin-bottom: $sp-2;
47+
}
48+
}
49+
}
1450
}
1551

1652
.content {

src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/ScorecardQuestionRow/ScorecardQuestionRow.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ interface ScorecardQuestionRowProps extends PropsWithChildren {
1212

1313
const ScorecardQuestionRow: FC<ScorecardQuestionRowProps> = props => (
1414
<div className={classNames(props.className, styles.wrap)}>
15-
<span>{props.icon}</span>
16-
<span>{props.index}</span>
15+
<span className={styles.icon}>{props.icon}</span>
16+
<span className={styles.index}>{props.index}</span>
1717
<span className={styles.content}>{props.children}</span>
18-
<span>{props.score}</span>
18+
<span className={styles.score}>{props.score}</span>
1919
</div>
2020
)
2121

src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardScore/ScorecardScore.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@
88
margin-left: $sp-1;
99
opacity: 0.75;
1010
}
11+
12+
@include ltemd {
13+
text-align: left;
14+
}
1115
}

src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardSection/ScorecardSection.module.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818
color: #0A0A0A;
1919

2020
padding-right: 56px;
21+
@include ltemd {
22+
flex-wrap: wrap;
23+
row-gap: $sp-2;
24+
25+
.score {
26+
order: 7;
27+
width: 100%;
28+
margin-left: $sp-10;
29+
}
30+
}
2131
}
2232

2333
.mx {

src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardSection/ScorecardSection.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ const ScorecardSection: FC<ScorecardSectionProps> = props => {
2424
return (
2525
<div className={styles.wrap}>
2626
<div className={styles.headerBar}>
27-
<span>
27+
<span className={styles.index}>
2828
{props.index}
2929
.
3030
</span>
31-
<span>
31+
<span className={styles.name}>
3232
{props.section.name}
3333
</span>
3434
<span className={styles.mx} />
35-
<span>
35+
<span className={styles.score}>
3636
<ScorecardScore
3737
score={score}
3838
scaleMax={1}

src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardViewer.module.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,22 @@
66
font-weight: bold;
77
}
88
}
9+
10+
.conclusion {
11+
padding: $sp-4;
12+
background: #E0E4E8;
13+
color: #0A0A0A;
14+
margin-bottom: $sp-4;
15+
16+
> strong {
17+
font-size: 16px;
18+
line-height: 22px;
19+
20+
margin-bottom: $sp-2;
21+
}
22+
23+
p {
24+
font-size: 14px;
25+
line-height: 20px;
26+
}
27+
}

src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardViewer.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,27 @@ const ScorecardViewer: FC<ScorecardViewerProps> = props => (
1919
scorecard={props.scorecard}
2020
aiFeedbackItems={props.aiFeedback}
2121
>
22+
{!!props.score && (
23+
<div className={styles.conclusion}>
24+
<strong>Conclusion</strong>
25+
<p>
26+
Congratulations! You earned a score of
27+
{' '}
28+
<strong>
29+
{props.score.toFixed(2)}
30+
</strong>
31+
{' '}
32+
out of the maximum of
33+
{' '}
34+
<strong>
35+
{props.scorecard.maxScore.toFixed(2)}
36+
</strong>
37+
.
38+
You did a good job on passing the scorecard criteria.
39+
Please check the below sections to see if there is any place for improvement.
40+
</p>
41+
</div>
42+
)}
2243
{props.scorecard.scorecardGroups.map((group, index) => (
2344
<ScorecardGroup key={group.id} group={group} index={index + 1} />
2445
))}

0 commit comments

Comments
 (0)