From 5ec17ad1b1363ddae2255c8c6853cf77adb9fbc3 Mon Sep 17 00:00:00 2001 From: limina1 Date: Thu, 6 Nov 2025 10:46:37 -0500 Subject: [PATCH] Add article and section commenting system with NIP-22 support --- .../publications/CommentButton.svelte | 520 ++++++++++ .../publications/CommentLayer.svelte | 282 ++++++ .../publications/CommentPanel.svelte | 280 ++++++ .../publications/SectionComments.svelte | 323 +++++++ src/lib/utils/mockCommentData.ts | 177 ++++ src/lib/utils/nostrUtils.ts | 31 + tests/unit/commentButton.test.ts | 911 ++++++++++++++++++ 7 files changed, 2524 insertions(+) create mode 100644 src/lib/components/publications/CommentButton.svelte create mode 100644 src/lib/components/publications/CommentLayer.svelte create mode 100644 src/lib/components/publications/CommentPanel.svelte create mode 100644 src/lib/components/publications/SectionComments.svelte create mode 100644 src/lib/utils/mockCommentData.ts create mode 100644 tests/unit/commentButton.test.ts diff --git a/src/lib/components/publications/CommentButton.svelte b/src/lib/components/publications/CommentButton.svelte new file mode 100644 index 0000000..fb6ee25 --- /dev/null +++ b/src/lib/components/publications/CommentButton.svelte @@ -0,0 +1,520 @@ + + + +
+ + + + {#if showCommentUI} +
+
+

Add Comment

+ {#if $userStore.profile} + + {/if} +
+ +