Skip to content

Commit 8a04d49

Browse files
authored
Merge pull request #470 from QueueLab/fix/mobile-chat-input-padding-18048805505961867280
Reduce padding in mobile chat input area
2 parents ba36e58 + 6431b41 commit 8a04d49

2 files changed

Lines changed: 6 additions & 62 deletions

File tree

‎app/globals.css‎

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189

190190
.mobile-chat-input-area {
191191
height: auto;
192-
padding: 10px;
192+
padding: 4px 10px;
193193
background-color: hsl(var(--background));
194194
/* border-top: 1px solid hsl(var(--border)); */ /* Removed for cleaner separation */
195195
border-bottom: 1px solid hsl(var(--border)); /* Added for separation from messages area below */
@@ -199,61 +199,6 @@
199199
align-items: center;
200200
}
201201

202-
.mobile-chat-input {
203-
/* position: relative; */ /* No longer fixed to bottom */
204-
/* bottom: 0; */
205-
/* left: 0; */ /* Handled by parent flex */
206-
/* right: 0; */ /* Handled by parent flex */
207-
width: 100%; /* Ensure it takes full width of its container */
208-
padding: 10px;
209-
background-color: hsl(var(--background));
210-
/* border-top: 1px solid hsl(var(--border)); */ /* Removed to avoid double border */
211-
/* z-index: 30; */ /* No longer needed */
212-
}
213-
214-
.mobile-chat-input input {
215-
width: 100%;
216-
padding: 8px;
217-
border: 1px solid hsl(var(--input));
218-
border-radius: var(--radius);
219-
background-color: hsl(var(--input));
220-
color: hsl(var(--foreground));
221-
box-sizing: border-box;
222-
}
223-
224-
.mobile-icons-bar-content .icon-button {
225-
display: flex;
226-
align-items: center;
227-
justify-content: center;
228-
width: 40px;
229-
height: 40px;
230-
border-radius: 50%;
231-
background-color: hsl(var(--secondary));
232-
color: hsl(var(--secondary-foreground));
233-
cursor: pointer;
234-
}
235-
236-
.mobile-icons-bar-content .icon-button:hover {
237-
background-color: hsl(var(--secondary-foreground));
238-
color: hsl(var(--secondary));
239-
}
240-
241-
.mobile-chat-input .icon-button {
242-
position: absolute;
243-
top: 50%;
244-
transform: translateY(-50%);
245-
background-color: transparent;
246-
border: none;
247-
cursor: pointer;
248-
}
249-
250-
.mobile-chat-input .icon-button.paperclip {
251-
right: 40px;
252-
}
253-
254-
.mobile-chat-input .icon-button.arrow-right {
255-
right: 10px;
256-
}
257202
}
258203

259204
/* Added for MapboxDraw controls */

‎components/chat-panel.tsx‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,12 @@ export const ChatPanel = forwardRef<ChatPanelRef, ChatPanelProps>(({ messages, i
199199
onSubmit={handleSubmit}
200200
className={cn(
201201
'max-w-full w-full',
202-
isMobile ? 'px-2 pb-2 pt-1 h-full flex flex-col justify-center' : ''
202+
isMobile ? 'px-2 pb-1 pt-0 h-full flex flex-col justify-center' : ''
203203
)}
204204
>
205205
<div
206206
className={cn(
207-
'relative flex items-start w-full',
208-
isMobile && 'mobile-chat-input' // Apply mobile chat input styling
207+
'relative flex items-start w-full'
209208
)}
210209
>
211210
<input type="hidden" name="mapProvider" value={mapProvider} />
@@ -241,10 +240,10 @@ export const ChatPanel = forwardRef<ChatPanelRef, ChatPanelProps>(({ messages, i
241240
value={input}
242241
data-testid="chat-input"
243242
className={cn(
244-
'resize-none w-full min-h-12 rounded-fill border border-input pl-14 pr-12 pt-3 pb-1 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
243+
'resize-none w-full rounded-fill border border-input pr-12 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
245244
isMobile
246-
? 'mobile-chat-input input bg-background'
247-
: 'bg-muted'
245+
? 'bg-background min-h-10 pl-4 pt-2 pb-1'
246+
: 'bg-muted min-h-12 pl-14 pt-3 pb-1'
248247
)}
249248
onChange={e => {
250249
setInput(e.target.value)

0 commit comments

Comments
 (0)