From 4d2c464045992d6635724a414fd32dbba6fc147b Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 27 May 2026 14:30:04 -0400 Subject: [PATCH] feat(post-card): absorb PostModal into PostCard with click-to-expand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PostCard and PostModal competed for the same data and rendered redundant chrome (header twice, image grid twice, attachment list twice). The wider PostCard layout we shipped 2026-05-27 has enough real estate to be the canonical post surface, so collapse the two into one. Compact (default) state is unchanged: hero + 3-cell rail + truncated title + 3/5-line description + attachment count badge. Whole-card click expands in place. Expanded state shows: full title, mosaic of ALL post images via PostImageGrid (uncapped, lazy-loaded via getPostFull), full sanitized-HTML description with paragraph wrapping, attachments as downloadable pill links. Click the chevron in the header to collapse; mosaic image clicks open ImageViewer scoped to the post (modalStore's postImageIds path is preserved — only the comment changed). Per-card local state — no global modal store. Each PostCard owns its own expanded ref and lazy-loaded detail; collapsing a card discards neither (so re-expand is instant after the first fetch). Deleted: PostModal.vue, postModal.js store. Removed the App.vue mount. --- frontend/src/App.vue | 2 - frontend/src/components/posts/PostCard.vue | 254 ++++++++++++++++---- frontend/src/components/posts/PostModal.vue | 211 ---------------- frontend/src/stores/modal.js | 6 +- frontend/src/stores/postModal.js | 39 --- 5 files changed, 212 insertions(+), 300 deletions(-) delete mode 100644 frontend/src/components/posts/PostModal.vue delete mode 100644 frontend/src/stores/postModal.js diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 38a3ccf..5cfbdda 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -4,7 +4,6 @@ - @@ -14,7 +13,6 @@ import { onMounted, ref } from 'vue' import AppShell from './components/AppShell.vue' import AppSnackbar from './components/AppSnackbar.vue' import ImageViewer from './components/modal/ImageViewer.vue' -import PostModal from './components/posts/PostModal.vue' import { useModalStore } from './stores/modal.js' const modal = useModalStore() diff --git a/frontend/src/components/posts/PostCard.vue b/frontend/src/components/posts/PostCard.vue index c80a0ab..65194a0 100644 --- a/frontend/src/components/posts/PostCard.vue +++ b/frontend/src/components/posts/PostCard.vue @@ -1,8 +1,8 @@