Skip to content

Commit 375d912

Browse files
feat(chat): improve UX with auto-scroll, scroll-to-bottom button, and responsive header
1 parent a4ae0c5 commit 375d912

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

application/frontend/src/pages/chatbot/chatbot.scss

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
flex-direction: column;
1111
position: relative;
1212
}
13+
1314
.chat-container.chat-active {
1415
height: calc(100vh - 179px);
1516
overflow: hidden;
1617
}
18+
1719
@media (max-width: 768px) {
1820
.chat-container {
1921
padding: 0 1rem;
@@ -80,7 +82,8 @@ h1.ui.header.chatbot-title {
8082
/* Very small phones */
8183
@media (max-width: 360px) {
8284
h1.ui.header.chatbot-title {
83-
margin-top: 3rem; /* extra breathing room */
85+
margin-top: 3rem;
86+
/* extra breathing room */
8487
}
8588
}
8689

@@ -375,6 +378,7 @@ h1.ui.header.chatbot-title {
375378
opacity: 1;
376379
transform: translateX(-50%) translateY(-2px);
377380
}
381+
378382
.scroll-icon {
379383
margin: 0 !important;
380384
display: flex !important;
@@ -387,6 +391,7 @@ h1.ui.header.chatbot-title {
387391
bottom: 160px;
388392
}
389393
}
394+
390395
.chat-surface {
391396
display: flex;
392397
flex-direction: column;
@@ -402,6 +407,7 @@ h1.ui.header.chatbot-title {
402407

403408
padding: 1.25rem;
404409
}
410+
405411
.chat-landing-state {
406412
text-align: center;
407413
margin: auto;
@@ -420,17 +426,20 @@ h1.ui.header.chatbot-title {
420426
margin: 0 auto;
421427
}
422428
}
429+
423430
/* =========================
424431
Animations
425432
========================= */
426433

427434
@keyframes typingBounce {
435+
428436
0%,
429437
80%,
430438
100% {
431439
transform: scale(0);
432440
opacity: 0.3;
433441
}
442+
434443
40% {
435444
transform: scale(1);
436445
opacity: 1;
@@ -442,18 +451,21 @@ h1.ui.header.chatbot-title {
442451
opacity: 0;
443452
transform: translateY(6px);
444453
}
454+
445455
to {
446456
opacity: 1;
447457
transform: translateY(0);
448458
}
449459
}
460+
450461
@keyframes fadeIn {
451462
from {
452463
opacity: 0;
453464
transform: translateX(-50%) translateY(6px);
454465
}
466+
455467
to {
456468
opacity: 0.85;
457469
transform: translateX(-50%) translateY(0);
458470
}
459-
}
471+
}

0 commit comments

Comments
 (0)