From 11c4579dfd0e7288b92d3daf11ea730c7ea06574 Mon Sep 17 00:00:00 2001 From: Chad Curtis Date: Thu, 26 Feb 2026 19:47:52 -0600 Subject: [PATCH] Remove sub-reply indent wrapper, fix inline author layout with threadedLast --- src/components/NoteCard.tsx | 86 ++++++++++++++++++++++++++++++++++-- src/pages/PostDetailPage.tsx | 2 +- 2 files changed, 84 insertions(+), 4 deletions(-) diff --git a/src/components/NoteCard.tsx b/src/components/NoteCard.tsx index 0a2b603d..de848297 100644 --- a/src/components/NoteCard.tsx +++ b/src/components/NoteCard.tsx @@ -55,6 +55,8 @@ interface NoteCardProps { compact?: boolean; /** If true, render in threaded ancestor style: connector line below avatar, no bottom border. */ threaded?: boolean; + /** Like threaded but without the connector line — used for the last item in a thread (e.g. sub-reply hint). */ + threadedLast?: boolean; } /** Formats a sats amount into a compact human-readable string. */ @@ -148,7 +150,7 @@ function encodeEventId(event: NostrEvent): string { return nip19.neventEncode({ id: event.id, author: event.pubkey }); } -export function NoteCard({ event, className, repostedBy, compact, threaded }: NoteCardProps) { +export function NoteCard({ event, className, repostedBy, compact, threaded, threadedLast }: NoteCardProps) { const { config } = useAppContext(); const { user } = useCurrentUser(); const author = useAuthor(event.pubkey); @@ -346,11 +348,11 @@ export function NoteCard({ event, className, repostedBy, compact, threaded }: No // Shared avatar element const avatarElement = author.isLoading ? ( - + ) : ( e.stopPropagation()}> - + {displayName[0]?.toUpperCase()} @@ -439,6 +441,84 @@ export function NoteCard({ event, className, repostedBy, compact, threaded }: No ); } + // ── Threaded-last layout: same column layout as threaded, but no connector line ── + if (threadedLast) { + return ( +
+
+
+ {avatarElement} +
+
+ {authorInfo} + {contentBlock} + + {/* Action buttons */} +
+ + + + {(isReposted: boolean) => ( + + )} + + + + + {canZapAuthor && ( + + + + )} + + +
+ + + +
+
+
+ ); + } + // ── Normal layout ── return (
{firstSubReply && ( - + )} ))