Skip to content

Commit 52bf733

Browse files
CopilotMohabMohie
andauthored
Fix AutoBot horizontal scrolling and update UI labels (#375)
* Initial plan * Implement AutoBot UX enhancements: width fixes and UI improvements Co-authored-by: MohabMohie <19201898+MohabMohie@users.noreply.github.com> * Clean up redundant CSS properties in AutoBot styles Co-authored-by: MohabMohie <19201898+MohabMohie@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: MohabMohie <19201898+MohabMohie@users.noreply.github.com>
1 parent 9657787 commit 52bf733

File tree

3 files changed

+268
-161
lines changed

3 files changed

+268
-161
lines changed

src/components/AutoBot/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ I searched the official documentation but could not find a verified reference fo
239239
title="Chat with AutoBot"
240240
>
241241
<FontAwesomeIcon icon="fa-solid fa-robot" size="2x" />
242-
<span className={styles.badge}>AI</span>
242+
<span className={styles.badge}>AutoBot</span>
243243
</button>
244244
)}
245245

@@ -270,10 +270,10 @@ I searched the official documentation but could not find a verified reference fo
270270
<button
271271
className={styles.iconButton}
272272
onClick={toggleChat}
273-
aria-label="Close chat"
274-
title="Close chat"
273+
aria-label="Minimize chat"
274+
title="Minimize chat"
275275
>
276-
<FontAwesomeIcon icon="fa-solid fa-times" />
276+
<FontAwesomeIcon icon="fa-solid fa-window-minimize" />
277277
</button>
278278
</div>
279279
</div>

src/components/AutoBot/styles.module.css

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,17 @@
5151
color: white;
5252
border-radius: 10px;
5353
padding: 2px 6px;
54-
font-size: 10px;
54+
font-size: 9px;
5555
font-weight: bold;
56+
white-space: nowrap;
5657
}
5758

5859
/* Chat Window */
5960
.chatWindow {
6061
width: 380px;
62+
max-width: calc(100vw - 40px);
6163
height: 600px;
64+
max-height: calc(100vh - 40px);
6265
background: #ffffff;
6366
border-radius: 16px;
6467
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
@@ -148,6 +151,7 @@
148151
.chatMessages {
149152
flex: 1;
150153
overflow-y: auto;
154+
overflow-x: hidden;
151155
padding: 16px;
152156
background: #ffffff;
153157
display: flex;
@@ -219,7 +223,8 @@
219223
padding: 10px 14px;
220224
border-radius: 12px;
221225
position: relative;
222-
word-wrap: break-word;
226+
overflow-wrap: break-word;
227+
max-width: 100%;
223228
}
224229

225230
.userMessage .messageBubble {
@@ -245,6 +250,8 @@
245250
.markdownContent {
246251
font-size: 14px;
247252
line-height: 1.5;
253+
max-width: 100%;
254+
overflow-wrap: break-word;
248255
}
249256

250257
.markdownContent p {
@@ -269,6 +276,7 @@
269276
border-radius: 6px;
270277
overflow-x: auto;
271278
margin: 0.5em 0;
279+
max-width: 100%;
272280
}
273281

274282
.markdownContent pre code {
@@ -455,8 +463,10 @@
455463
right: 0;
456464
left: 0;
457465
top: 0;
466+
max-width: 100vw;
458467
max-height: 100vh;
459468
max-height: 100dvh;
469+
overflow-x: hidden;
460470
}
461471

462472
.chatHeader {
@@ -477,6 +487,7 @@
477487
/* Ensure proper scrolling on mobile */
478488
-webkit-overflow-scrolling: touch;
479489
overflow-y: auto;
490+
overflow-x: hidden;
480491
flex: 1;
481492
min-height: 0; /* Important for flex scrolling */
482493
}

0 commit comments

Comments
 (0)