From 146aa85e7694d4e90d4bab2b5df3906a034eee90 Mon Sep 17 00:00:00 2001 From: Gigi Date: Mon, 13 Oct 2025 17:27:25 +0200 Subject: [PATCH] feat(bookmarks): make entire bookmark cards clickable; stop propagation on internal controls --- src/components/BookmarkViews/CardView.tsx | 28 ++++++++++++++++++---- src/components/BookmarkViews/LargeView.tsx | 24 ++++++++++++++++--- 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/src/components/BookmarkViews/CardView.tsx b/src/components/BookmarkViews/CardView.tsx index 7abff35f..cb802c16 100644 --- a/src/components/BookmarkViews/CardView.tsx +++ b/src/components/BookmarkViews/CardView.tsx @@ -67,8 +67,24 @@ export const CardView: React.FC = ({ } }, [firstUrl, articleImage, instantPreview, ogImage]) + const triggerOpen = () => handleReadNow({ preventDefault: () => {} } as React.MouseEvent) + + const handleKeyDown: React.KeyboardEventHandler = (e) => { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault() + triggerOpen() + } + } + return ( -
+
{cachedImage && (
= ({ rel="noopener noreferrer" className="bookmark-date-link" title="Open event in search" + onClick={(e) => e.stopPropagation()} > {formatDate(bookmark.created_at)} @@ -115,7 +132,7 @@ export const CardView: React.FC = ({
) @@ -134,7 +151,7 @@ export const CardView: React.FC = ({ {extractedUrls.length > 1 && (