From 06fe117ebc8f4121e5875191872c4f6ed50e38ef Mon Sep 17 00:00:00 2001 From: TerryM Date: Sun, 31 May 2026 18:35:57 +0800 Subject: [PATCH] feat: render desktop latest section as 3-column masonry - Matches Figma design (file uHDZkVHjAp7BXDKQKB0PM4, node 4367-11405). - Mobile keeps the existing 5-post single column unchanged. - Desktop (md+) renders all 12 latest posts in a CSS-columns masonry with break-inside-avoid so each card's height stays content-driven. - Adds an optional 'fluid' prop to MessageBubble that drops the standalone-feed max-widths so bubbles fill the masonry column. The /browse stream keeps the default non-fluid widths. --- src/components/messageStream/MessageBubble.tsx | 16 ++++++++++++++-- src/pages/Home/index.tsx | 14 +++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/components/messageStream/MessageBubble.tsx b/src/components/messageStream/MessageBubble.tsx index 5312977..d8fe2f9 100644 --- a/src/components/messageStream/MessageBubble.tsx +++ b/src/components/messageStream/MessageBubble.tsx @@ -23,7 +23,15 @@ export function pickBubble(post: Post): BubbleComponent { return FileDocBubble; } -export function MessageBubble({ post }: { post: Post }) { +export function MessageBubble({ + post, + fluid = false, +}: { + post: Post; + /** When true, fill the parent container instead of applying the standalone + * feed max-widths. Used by the desktop 3-column masonry on the home page. */ + fluid?: boolean; +}) { const Bubble = pickBubble(post); const isVisual = Bubble === AlbumBubble || @@ -34,7 +42,11 @@ export function MessageBubble({ post }: { post: Post }) { return (
-
+
{latestPosts.slice(0, 5).map((post, index) => ( ))}
+ {/* Desktop: 3-column masonry that matches the Figma layout. */} +
+ {latestPosts.map((post, index) => ( + + + + ))} +