From 40176ac60ee67f2b8b4c109f1cb394eb7d01a5da Mon Sep 17 00:00:00 2001 From: parsa aghaei Date: Wed, 26 Aug 2026 17:17:19 +0330 Subject: [PATCH] feat(media): add summary and view more toggle button for video and podcast descriptions --- .../components/PodcastInlinePlayer.tsx | 31 +- .../application/components/ProductPage.tsx | 25 +- graphify-out/.graphify_labels.json | 6 +- graphify-out/.graphify_labels.json.sig | 2 +- graphify-out/2026-08-26/.graphify_labels.json | 28 +- graphify-out/2026-08-26/GRAPH_REPORT.md | 194 +- graphify-out/2026-08-26/graph.json | 5954 +++++++++-------- graphify-out/2026-08-26/manifest.json | 1230 ++-- graphify-out/GRAPH_REPORT.md | 42 +- graphify-out/cache/stat-index.json | 2 +- graphify-out/graph.html | 4 +- graphify-out/graph.json | 796 +-- graphify-out/manifest.json | 1228 ++-- 13 files changed, 4847 insertions(+), 4695 deletions(-) diff --git a/frontend/application/components/PodcastInlinePlayer.tsx b/frontend/application/components/PodcastInlinePlayer.tsx index a9fe9f4..2056523 100644 --- a/frontend/application/components/PodcastInlinePlayer.tsx +++ b/frontend/application/components/PodcastInlinePlayer.tsx @@ -12,7 +12,9 @@ import { Check, Headphones, Loader2, - Sparkles + Sparkles, + ChevronDown, + ChevronUp } from "lucide-react"; import SafeImage from "./SafeImage"; @@ -44,6 +46,7 @@ export default function PodcastInlinePlayer({ podcast }: PodcastInlinePlayerProp const [showRateMenu, setShowRateMenu] = useState(false); const [isBuffering, setIsBuffering] = useState(false); const [isCopied, setIsCopied] = useState(false); + const [isExpandedDesc, setIsExpandedDesc] = useState(false); // Close rate menu when clicking outside useEffect(() => { @@ -265,9 +268,27 @@ export default function PodcastInlinePlayer({ podcast }: PodcastInlinePlayerProp

{podcast.title || "پادکست و بررسی صوتی بالینی مکمل"}

-

- {podcast.description || "توضیحات صوتی دامپزشک و کادر علمی درباره اثربخشی، مکانیسم اثر و نحوه مصرف دقیق"} -

+ {(() => { + const pDesc = podcast.description || "توضیحات صوتی دامپزشک و کادر علمی درباره اثربخشی، مکانیسم اثر و نحوه مصرف دقیق"; + const isLong = pDesc.length > 120; + return ( +
+

+ {isLong && !isExpandedDesc ? `${pDesc.slice(0, 120)}...` : pDesc} +

+ {isLong && ( + + )} +
+ ); + })()} {/* Soundcloud-Style Waveform Visualizer & Track */} @@ -344,7 +365,7 @@ export default function PodcastInlinePlayer({ podcast }: PodcastInlinePlayerProp {/* Central Controls: -15s on Left, Play in Center, +15s on Right in RTL */} -
+
+ )} +
+ ); + })()}