From 19ab660ed329d05d3b6405c3c1ba8f4470eb9e7f Mon Sep 17 00:00:00 2001 From: padreug Date: Sat, 20 Sep 2025 12:18:38 +0200 Subject: [PATCH] Enhance reply visibility and collapse functionality in ThreadedPost component - Updated the collapse state logic to automatically collapse replies if there are more than 2 direct replies, improving user experience by reducing clutter. - Added a "Load more replies" button to allow users to expand and view additional replies when collapsed, enhancing interaction and engagement. These changes contribute to a more organized and user-friendly interface within the NostrFeed module. --- .../nostr-feed/components/ThreadedPost.vue | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/src/modules/nostr-feed/components/ThreadedPost.vue b/src/modules/nostr-feed/components/ThreadedPost.vue index 1b8416f..de31096 100644 --- a/src/modules/nostr-feed/components/ThreadedPost.vue +++ b/src/modules/nostr-feed/components/ThreadedPost.vue @@ -26,8 +26,8 @@ const props = withDefaults(defineProps(), { const emit = defineEmits() -// Collapse state for this post's replies -const isCollapsed = ref(false) +// Collapse state for this post's replies - auto-collapse if more than 2 direct replies +const isCollapsed = ref((props.post.replies?.length || 0) > 2) // Check if this is an admin post const isAdminPost = computed(() => props.adminPubkeys.includes(props.post.pubkey)) @@ -230,10 +230,11 @@ function getRideshareType(post: FeedPost): string { - -
+ +
+ + + +
+ +