fix(mobile): stop double bottom-padding hijacking scroll in message thread
MessageThread's wrapper reserved its own pb-32 for the fixed mobile nav on top of the h-[100dvh] sizing, while the app shell's <main> already reserves the same space via its own pb-32. The combined mismatch made <main> itself scroll as a rigid block instead of just the message list. Switch to h-full so the thread fills main's actual available height. Also nudge the floating mail shortcut up (top-3 -> top-1.5) so it's vertically centered against the transparent feed header instead of sitting visibly lower than it.
This commit is contained in:
1 parent
b3d0551bd8
commit
25f27c5b35
3 files changed
+4
-4
No files matched your search
@@ -23,7 +23,7 @@ export default function ConversationPage() {
|
||||
|
||||
if (isLoading || !activePetId) {
|
||||
return (
|
||||
<div className="flex items-center justify-center h-[100dvh]">
|
||||
<div className="flex items-center justify-center h-full">
|
||||
<Loader2 className="h-6 w-6 animate-spin text-muted-foreground" />
|
||||
</div>
|
||||
);
|
||||
@@ -31,7 +31,7 @@ export default function ConversationPage() {
|
||||
|
||||
if (!conversation) {
|
||||
return (
|
||||
<div className="flex items-center justify-center h-[100dvh] text-muted-foreground text-sm">
|
||||
<div className="flex items-center justify-center h-full text-muted-foreground text-sm">
|
||||
Conversation not found.
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -83,7 +83,7 @@ export function MobileNav({ pets }: MobileNavProps) {
|
||||
<Link
|
||||
href="/messages"
|
||||
aria-label={t("messages")}
|
||||
className={`fixed top-3 right-3 z-[51] flex items-center justify-center w-10 h-10 rounded-full bg-background/90 backdrop-blur-sm border border-border shadow-md ${
|
||||
className={`fixed top-1.5 right-3 z-[51] flex items-center justify-center w-10 h-10 rounded-full bg-background/90 backdrop-blur-sm border border-border shadow-md ${
|
||||
isMessagesPage ? "text-orange-500" : "text-foreground/75"
|
||||
}`}
|
||||
>
|
||||
|
||||
@@ -110,7 +110,7 @@ export function MessageThread({ conversationId, otherPet }: MessageThreadProps)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex flex-col h-[100dvh] max-h-[100dvh] pb-32 lg:pb-0">
|
||||
<div className="flex flex-col h-full">
|
||||
{/* Header */}
|
||||
<div className="flex items-center gap-3 px-4 py-3 border-b bg-card shrink-0">
|
||||
<button
|
||||
|
||||
Reference in new issue
Block a user