Skip to content

Commit 728a779

Browse files
authored
Merge pull request #26 from keepsimpleio/chore/uxcat-test-improvements
chore: - Improve UXCat ongoing test page
2 parents 284b885 + 8a8cb73 commit 728a779

12 files changed

Lines changed: 180 additions & 99 deletions

File tree

Lines changed: 10 additions & 0 deletions
Loading

src/components/Box/Box.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
width: 100%;
88
max-width: 450px;
99
background-color: #fff;
10-
z-index: 2147483647;
10+
z-index: 45;
1111
border-radius: 8px;
1212
box-shadow:
1313
0px 8px 17px 0px rgba(0, 0, 0, 0.05),

src/components/Box/Box.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { FC } from 'react';
22
import { useRouter } from 'next/router';
3+
import cn from 'classnames';
34

45
import Button from '@components/Button';
56

@@ -8,7 +9,6 @@ import cookieData from '@data/cookies';
89
import { TRouter } from '@local-types/global';
910

1011
import styles from './Box.module.scss';
11-
import cn from 'classnames';
1212

1313
interface CookiesBoxProps {
1414
setIsSeen?: () => void;

src/components/ToolHeader/ToolHeader.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ $headerHeight: 46px;
6666
--pill-w: 157px;
6767
}
6868

69+
.Links.is-uxcat-ru {
70+
--pill-w: 187px;
71+
}
72+
6973
.Links.is-uxcore .Indicator {
7074
transform: translateX(calc((96px + 8px) * 0));
7175
color: #fff;

src/components/ToolHeader/ToolHeader.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,11 @@ const ToolHeader: FC<TToolHeader> = ({
306306
/>
307307
</a>
308308
</Link>
309-
<div className={cn(styles.Links, styles[`is-${activePage}`])}>
309+
<div
310+
className={cn(styles.Links, styles[`is-${activePage}`], {
311+
[styles[`is-${activePage}-ru`]]: locale === 'ru',
312+
})}
313+
>
310314
<span className={styles.Pill} />
311315
{navItems.map(({ label, href, page, icon }, index) => {
312316
return (

src/data/uxcat/ongoingTest/en.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const en = {
88
message:
99
'You are about to leave the page. Your test will continue until its time runs out',
1010
pickAnswer: 'Choose the answer',
11-
questionLabel: 'Question: ',
1211
};
1312

1413
export default en;

src/data/uxcat/ongoingTest/ru.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const ru = {
88
message:
99
'Вы собираетесь покинуть страницу, тест продолжится до истечения времени.',
1010
pickAnswer: 'Выберите ответ',
11-
questionLabel: 'Вопрос: ',
1211
};
1312

1413
export default ru;

src/layouts/CoreViewLayout/CoreViewLayout.module.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777

7878
.description {
7979
width: 218px;
80-
font-size: 12px;
80+
font-size: 14px;
8181
color: #000000a6;
8282
line-height: 1.3;
8383
text-align: center;
@@ -86,7 +86,7 @@
8686
}
8787

8888
.moto {
89-
font-size: 12px;
89+
font-size: 14px;
9090
color: #9e9e9e;
9191
line-height: 1;
9292
}

src/layouts/OngoingLayout/OngoingLayout.module.scss

Lines changed: 58 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $white: #fafafa;
1515
}
1616

1717
.questionWrapper {
18-
min-height: 348px;
18+
min-height: 223px;
1919
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
2020
background-color: #ffffff;
2121

@@ -37,8 +37,9 @@ $white: #fafafa;
3737
.questionTxt {
3838
font-size: 24px;
3939
font-weight: 800;
40-
color: #c4c4c4;
40+
color: #000;
4141
text-align: center;
42+
margin: 18px 0;
4243
}
4344

4445
.fadeInQuestionTxt {
@@ -126,9 +127,36 @@ $white: #fafafa;
126127
}
127128
}
128129

129-
.answers {
130+
.questionAnswers {
130131
padding-top: 24px;
131132

133+
.iconAndBias {
134+
display: flex;
135+
align-items: flex-start;
136+
gap: 10px;
137+
background: #f0f0f0;
138+
padding: 10px;
139+
border-radius: 4px;
140+
}
141+
142+
.biasTitle {
143+
font-size: 14px;
144+
margin: 0;
145+
padding: 0;
146+
}
147+
148+
.description {
149+
p {
150+
margin: 0;
151+
line-height: 1.6;
152+
font-size: 14px;
153+
154+
span {
155+
background-color: unset !important;
156+
}
157+
}
158+
}
159+
132160
.questionSkeleton {
133161
display: flex;
134162
justify-content: center;
@@ -254,7 +282,7 @@ $white: #fafafa;
254282
}
255283

256284
.question,
257-
.answers,
285+
.questionAnswers,
258286
.quizQuestion {
259287
width: 900px;
260288
max-width: 100%;
@@ -264,32 +292,20 @@ $white: #fafafa;
264292
}
265293

266294
.quizQuestion {
267-
padding: 16px 24px;
268-
font-weight: 700;
269-
border: 1px solid #c4c4c4;
270-
border-radius: 4px;
271-
background-color: #ffffff;
272-
width: 851px;
273-
max-width: 100%;
274-
min-height: 85px;
275-
overflow: hidden;
276-
margin-bottom: 10px;
295+
display: flex;
296+
justify-content: center;
297+
align-items: center;
298+
padding-bottom: 40px;
299+
gap: 8px;
277300

278-
.questionLabel {
279-
display: flex;
280-
align-items: center;
281-
gap: 12px;
282-
font-size: 24px;
301+
.quizQuestionTxt {
302+
font-size: 18px;
303+
margin: 0;
283304
font-weight: 700;
284-
line-height: 1.6;
285-
color: #000000d9;
286305
}
287306

288-
.questionTxt {
289-
margin: 0;
290-
padding-left: 44px;
291-
padding-top: 4px;
292-
font-size: 18px;
307+
.questionMark {
308+
padding-bottom: 5px;
293309
}
294310
}
295311

@@ -329,14 +345,15 @@ $white: #fafafa;
329345

330346
.questionWrapper {
331347
width: unset;
332-
padding: 15px 0 40px 15px;
348+
padding: 15px 0 0 15px;
333349
height: unset;
334-
min-height: 220px;
350+
min-height: 183px;
335351
}
336352

337-
.answers {
353+
.questionAnswers {
338354
.answerWrapper {
339355
-webkit-tap-highlight-color: transparent;
356+
340357
.input {
341358
width: -webkit-fill-available;
342359
}
@@ -347,7 +364,13 @@ $white: #fafafa;
347364

348365
@media (max-width: 800px) {
349366
.ongoing {
350-
.answers {
367+
.questionAnswers {
368+
.iconAndBias {
369+
flex-direction: column;
370+
align-items: center;
371+
margin: 8px;
372+
}
373+
351374
.answerWrapper {
352375
margin-top: 8px;
353376
}
@@ -364,19 +387,17 @@ $white: #fafafa;
364387

365388
.questionTxt {
366389
padding-top: unset;
390+
font-size: 16px;
391+
margin: 16px 0 5px 0;
367392
}
368393
}
369394
}
370395

371-
.answers,
396+
.questionAnswers,
372397
.question {
373398
width: unset;
374399
max-width: unset;
375400

376-
.question {
377-
text-align: center;
378-
}
379-
380401
.skeleton {
381402
border: unset;
382403
min-height: 62px;
@@ -390,9 +411,9 @@ $white: #fafafa;
390411
}
391412

392413
.quizQuestion {
393-
padding: 8px;
394414
min-height: unset;
395-
line-height: 1.4;
415+
flex-direction: column;
416+
padding: unset;
396417

397418
.questionLabel {
398419
padding-bottom: 8px;

0 commit comments

Comments
 (0)