From bcc167d7c20e451183a31c74b1c1dabe9bd12cf5 Mon Sep 17 00:00:00 2001 From: Mannu Date: Sun, 24 May 2026 08:18:02 +0530 Subject: [PATCH] fix: collapsed post card single-row layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Collapsed state now fits entirely in one row: [avatar] [name] · [truncated text] [tiny thumbnail] [▼] No second row needed. Expanded state shows the normal two-line author block (name + time) as before. Co-Authored-By: Claude Sonnet 4.6 --- src/app/circle/[id]/page.tsx | 41 ++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/src/app/circle/[id]/page.tsx b/src/app/circle/[id]/page.tsx index 4a97bad..f714d37 100644 --- a/src/app/circle/[id]/page.tsx +++ b/src/app/circle/[id]/page.tsx @@ -120,11 +120,23 @@ function PostCard({ className="flex items-center gap-2 flex-1 min-w-0 text-left" >
👨‍👩‍👧
-
-

{post.authorFamilyName}

-

{timeAgo(post.createdAt)}{post.sourceKind ? ` · shared a ${post.sourceKind}` : ""}

-
- {collapsed ? "▼" : "▲"} + {collapsed ? ( + /* Single-row collapsed: name · preview text · thumbnail · chevron */ + <> + {post.authorFamilyName} + {(post.body || post.imageUrl) && ·} + {post.body && {post.body}} + {!post.body && } + {post.imageUrl && } + + ) : ( + /* Expanded: two-line author block */ +
+

{post.authorFamilyName}

+

{timeAgo(post.createdAt)}{post.sourceKind ? ` · shared a ${post.sourceKind}` : ""}

+
+ )} + {collapsed ? "▼" : "▲"} {/* ⋯ menu — rendered outside overflow:hidden so it doesn't get clipped */}
@@ -158,24 +170,7 @@ function PostCard({
- {/* Collapsed preview row — centered under author line */} - {collapsed && (post.body || post.imageUrl) && ( - - )} - {/* Collapsed divider when no preview content */} - {collapsed && !post.body && !post.imageUrl && ( -
- )} + {/* Collapsed: no extra row needed — everything is in the author row */} {/* Expanded content */} {!collapsed && <>