Skip to content

Commit 64c4c11

Browse files
committed
fix: Mobile UI fixes
1 parent 6b0bc86 commit 64c4c11

4 files changed

Lines changed: 5 additions & 14 deletions

File tree

client/app/components/ChatHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function ChatHeader({
4545
}, []);
4646

4747
return (
48-
<div className="flex items-center justify-between px-4 py-3 border-b border-[var(--border-subtle)] bg-[var(--color-elevated)] transition-colors relative">
48+
<div className="flex items-center justify-between px-3 md:px-6 py-3 border-b border-[var(--border-subtle)] bg-[var(--color-elevated)] transition-colors relative">
4949
<div className="flex flex-col min-w-0">
5050
<div className="flex items-center gap-3">
5151
<div className="text-h6 font-bold tracking-tight text-[var(--text-primary)] truncate leading-none">{roomName}</div>

client/app/components/GlobalHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default function GlobalHeader({ onMenuClick }: GlobalHeaderProps) {
4141
}, []);
4242

4343
return (
44-
<header className="app-header z-50 px-6 relative">
44+
<header className="app-header z-50 px-3 md:px-6 relative">
4545
<div className="flex items-center gap-4">
4646
{/* Mobile Menu Button */}
4747
<button

client/app/components/MsgList.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export function MessageList({
9999
return (
100100
<div
101101
ref={scrollRef}
102-
className="flex-1 overflow-y-auto overflow-x-hidden px-4 pb-4 space-y-0 bg-[var(--color-base)] scroll-thin min-w-0"
102+
className="flex-1 overflow-y-auto overflow-x-hidden px-2 md:px-4 pb-4 space-y-0 bg-[var(--color-base)] scroll-thin min-w-0"
103103
>
104104
{messages.length === 0 ? (
105105
loadingMore ? (
@@ -157,15 +157,15 @@ export function MessageList({
157157
animate={{ opacity: 1, y: 0 }}
158158
exit={{ opacity: 0, y: -10 }}
159159
transition={{ duration: 0.15 }}
160-
className={`group flex items-start gap-2.5 w-full ${mine ? 'flex-row-reverse pl-6 md:pl-20' : 'flex-row pr-6 md:pr-20'} ${marginClass}`}
160+
className={`group flex items-start gap-1 w-full py-1.5 px-0 md:px-0 ${mine ? 'flex-row-reverse' : 'flex-row'} ${marginClass}`}
161161
>
162162
{/* Time Marker - Only show for first in group */}
163163
<div className={`w-6 flex-shrink-0 text-[10px] text-[var(--text-muted)] font-medium pt-2 ${mine ? 'text-left' : 'text-right'}`}>
164164
{isFirstInGroup && format.time(m.createdAt)}
165165
</div>
166166

167167
{/* Message Content Container */}
168-
<div className={`flex flex-col ${mine ? 'items-end' : 'items-start'} max-w-[85%] sm:max-w-[70%] lg:max-w-[60%]`}>
168+
<div className={`flex flex-col ${mine ? 'items-end' : 'items-start'} max-w-[calc(100%-140px)] sm:max-w-[70%] lg:max-w-[60%]`}>
169169
<div
170170
id={`msg-${m.id}`}
171171
onClick={() => {

client/app/globals.css

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,6 @@ body {
142142
box-shadow: var(--shadow-soft);
143143
}
144144

145-
@media (max-width: 768px) {
146-
.group.flex.items-start.w-full {
147-
padding-left: 1.5rem !important;
148-
/* pl-6 */
149-
padding-right: 1.5rem !important;
150-
/* pr-6 */
151-
}
152-
}
153-
154145
.prose-constrained {
155146
max-width: 60ch;
156147
/* line length comfort */

0 commit comments

Comments
 (0)