feat(#81): improve discussion discoverability
- Add comment count badge on the Discussion tab (seeded from SSR, updated live) - Add 'Diskussion starten' nudge above collapsed panel when no comments exist - Add empty state hint with speech-bubble icon inside the discussion panel - Fix CommentThread to fire onCountChange with SSR-seeded count on mount - Add tests for all three behaviours in CommentThread and DocumentBottomPanel Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,9 +8,11 @@ type Props = {
|
||||
canComment: boolean;
|
||||
currentUserId: string | null;
|
||||
canAdmin: boolean;
|
||||
onCountChange?: (count: number) => void;
|
||||
};
|
||||
|
||||
let { documentId, initialComments, canComment, currentUserId, canAdmin }: Props = $props();
|
||||
let { documentId, initialComments, canComment, currentUserId, canAdmin, onCountChange }: Props =
|
||||
$props();
|
||||
</script>
|
||||
|
||||
<div class="flex-1 overflow-y-auto p-6">
|
||||
@@ -20,5 +22,6 @@ let { documentId, initialComments, canComment, currentUserId, canAdmin }: Props
|
||||
canComment={canComment}
|
||||
currentUserId={currentUserId}
|
||||
canAdmin={canAdmin}
|
||||
onCountChange={onCountChange}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user