From e12aaa2b6cebd9115712bf3c8f7416228d2c3313 Mon Sep 17 00:00:00 2001 From: Gigi Date: Sat, 25 Oct 2025 01:44:16 +0200 Subject: [PATCH] feat: remove text expansion mechanic from medium-sized cards - Remove expanded state and shouldTruncate logic - Remove chevron icons and expand/collapse buttons - Simplify content display to show full content without truncation - Remove unused faChevronDown and faChevronUp imports - Streamline card interface for cleaner, simpler design --- src/components/BookmarkViews/CardView.tsx | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/components/BookmarkViews/CardView.tsx b/src/components/BookmarkViews/CardView.tsx index 93c097d8..ac4cbb88 100644 --- a/src/components/BookmarkViews/CardView.tsx +++ b/src/components/BookmarkViews/CardView.tsx @@ -1,7 +1,6 @@ import React, { useState } from 'react' import { Link } from 'react-router-dom' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -import { faChevronDown, faChevronUp } from '@fortawesome/free-solid-svg-icons' import { IconDefinition } from '@fortawesome/fontawesome-svg-core' import { IndividualBookmark } from '../../types/bookmarks' import { formatDate, renderParsedContent } from '../../utils/bookmarkUtils' @@ -47,10 +46,7 @@ export const CardView: React.FC = ({ const instantPreview = firstUrl ? getPreviewImage(firstUrl, firstUrlClassificationType || '') : null const [ogImage, setOgImage] = useState(null) - const [expanded, setExpanded] = useState(false) - const contentLength = (bookmark.content || '').length - const shouldTruncate = !expanded && contentLength > 210 const isArticle = bookmark.kind === 30023 // Extract title from tags for regular bookmarks (not just articles) @@ -148,23 +144,10 @@ export const CardView: React.FC = ({ ) : bookmark.parsedContent ? (
- {shouldTruncate && bookmark.content - ? - : renderParsedContent(bookmark.parsedContent)} + {renderParsedContent(bookmark.parsedContent)}
) : bookmark.content && ( - - )} - - {contentLength > 210 && ( - + )}