From 2ef26390be87aa4d74fa02fc3caaa6ec50064663 Mon Sep 17 00:00:00 2001 From: TerryM Date: Wed, 3 Jun 2026 21:20:53 +0800 Subject: [PATCH] feat(stream): bubble footer with timestamp and inline favorite/download Match the Figma 4206-6509 card layout for /browse: every bubble now renders a bottom row with the publish timestamp on the left and the action buttons on the right. Image, album, video, text and link cards show only the FavoriteButton; file-document cards show the FavoriteButton plus a new BubbleAttachmentDownloadButton sized to match. Removes the absolute-positioned favorite from the default variant, drops the right-aligned timestamp block, and strips the inline per-row download button from FileDocBubble's default variant since the download now lives in the footer. The 'latest' masonry variant is untouched so the home page continues to use LatestFileCard's existing internal footer. --- .../2026-06-03-bubble-footer-actions.md | 38 +++++++++++ .../BubbleAttachmentDownloadButton.tsx | 67 +++++++++++++++++++ .../messageStream/MessageBubble.tsx | 40 +++++++++-- .../messageStream/bubbles/FileDocBubble.tsx | 38 +---------- 4 files changed, 141 insertions(+), 42 deletions(-) create mode 100644 .unipi/docs/quick-work/2026-06-03-bubble-footer-actions.md create mode 100644 src/components/messageStream/BubbleAttachmentDownloadButton.tsx diff --git a/.unipi/docs/quick-work/2026-06-03-bubble-footer-actions.md b/.unipi/docs/quick-work/2026-06-03-bubble-footer-actions.md new file mode 100644 index 0000000..2615adb --- /dev/null +++ b/.unipi/docs/quick-work/2026-06-03-bubble-footer-actions.md @@ -0,0 +1,38 @@ +--- +title: "MessageBubble footer — timestamp + favorite + (file) download" +type: quick-work +date: 2026-06-03 +--- + +# MessageBubble footer — timestamp + favorite + (file) download + +## Task +Implement the 全部资料 card layout from Figma `4206-6509`: +- Each card shows a bottom row with the publish timestamp on the left and action buttons on the right. +- Image / album / video / text / link bubbles → 1 button (FavoriteButton). +- File-document bubbles (mp3, pptx, pdf, zip, …) → 2 buttons (FavoriteButton + Download). + +## Changes +- `src/components/messageStream/BubbleAttachmentDownloadButton.tsx` (new) — small circular download button visually matched to `FavoriteButton` (sm). Handles its own download/loading state and surfaces the `SaveToAlbumGuide` toast for media kinds. +- `src/components/messageStream/MessageBubble.tsx` + - Removed the absolute-positioned FavoriteButton for the default variant. + - Removed the right-aligned `