From f65a35762e4028217d44d7112a77cf9050a1fc28 Mon Sep 17 00:00:00 2001 From: "juancarlos.cavero" Date: Sat, 18 Jul 2026 14:45:48 +0200 Subject: [PATCH] feat(ui): compact one-line description rows with full-text modal on clip cards --- dashboard/src/components/ResultCard.jsx | 103 +++++++++++++++++------- 1 file changed, 74 insertions(+), 29 deletions(-) diff --git a/dashboard/src/components/ResultCard.jsx b/dashboard/src/components/ResultCard.jsx index eaa5c26..46470ae 100644 --- a/dashboard/src/components/ResultCard.jsx +++ b/dashboard/src/components/ResultCard.jsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from 'react'; -import { Download, Share2, Instagram, Youtube, Video, AlertCircle, Loader2, Copy, Check, Wand2, Type, Calendar, Languages } from 'lucide-react'; +import { Download, Share2, Instagram, Youtube, Video, AlertCircle, Loader2, Copy, Check, Wand2, Type, Calendar, Languages, FileText } from 'lucide-react'; import { getApiUrl } from '../config'; import { apiFetch } from '../lib/api'; import SubtitleModal from './SubtitleModal'; @@ -25,6 +25,7 @@ function formatDuration(clip) { export default function ResultCard({ clip, index, jobId, durableUrl, uploadPostKey, uploadUserId, geminiApiKey, elevenLabsKey, isManaged, onPlay, onPause, onBulkSubtitle, clipCount = 1, bulkProgress, initialState = null, onStateChange }) { const [showModal, setShowModal] = useState(false); + const [showDescModal, setShowDescModal] = useState(false); const [showSubtitleModal, setShowSubtitleModal] = useState(false); const videoRef = React.useRef(null); // Pristine base clip (no burned subtitles/hook), stable regardless of how @@ -566,41 +567,42 @@ export default function ResultCard({ clip, index, jobId, durableUrl, uploadPostK - {/* Scrollable Descriptions Area */} -
- {/* YouTube */} -
-
- YOUTUBE - -
-

+ {/* Descriptions (compact) — full text lives in the modal */} +

+
+ YOUTUBE +

{clip.video_title_for_youtube_short || "Viral Short Video"}

+
- {/* TikTok / IG */} -
-
- TIKTOK · IG - -
-

+

+ TIKTOK · IG +

{clip.video_description_for_tiktok || clip.video_description_for_instagram}

+
+ +
{/* Error Message */} @@ -683,6 +685,49 @@ export default function ResultCard({ clip, index, jobId, durableUrl, uploadPostK
+ {/* Descriptions Modal */} + setShowDescModal(false)} + eyebrow="GENERATED COPY" + title="descriptions" + size="md" + > +
+
+
+ + +
+

+ {clip.video_title_for_youtube_short || "Viral Short Video"} +

+
+ +
+
+ + +
+

+ {clip.video_description_for_tiktok || clip.video_description_for_instagram} +

+
+
+
+ {/* Post Modal */}