Skip to content

Commit 9d3176f

Browse files
committed
deleted comments fix
1 parent 2e3d921 commit 9d3176f

1 file changed

Lines changed: 3 additions & 44 deletions

File tree

frontend/src/bundle.js

Lines changed: 3 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -650,18 +650,6 @@
650650
animation: none;
651651
}
652652
653-
/* Deleted comment styling */
654-
.ck-comment-deleted {
655-
opacity: 0.6;
656-
}
657-
658-
.ck-comment-deleted .ck-comment-inner {
659-
background: #fafafa;
660-
border-radius: var(--ck-radius);
661-
padding: 12px;
662-
border: 1px dashed #e5e7eb;
663-
}
664-
665653
.ck-replies {
666654
margin-top: 16px;
667655
margin-left: 56px; /* Align with parent comment content */
@@ -1666,36 +1654,8 @@
16661654
const hasReplies = comment.replies && comment.replies.length > 0;
16671655
const replyCount = hasReplies ? comment.replies.length : 0;
16681656
const isExpanded = this.state.expandedReplies.has(comment.id);
1669-
const isPlaceholder = comment.isPlaceholder || false;
1670-
1671-
// Render placeholder for deleted comments
1672-
if (isPlaceholder) {
1673-
return `
1674-
<div class="ck-comment ck-comment-deleted" data-id="${comment.id}">
1675-
<div class="ck-comment-inner">
1676-
<div class="ck-avatar" style="background: #f3f4f6; color: #9ca3af; border-color: #e5e7eb;">
1677-
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1678-
<circle cx="12" cy="12" r="10"></circle>
1679-
<line x1="15" y1="9" x2="9" y2="15"></line>
1680-
<line x1="9" y1="9" x2="15" y2="15"></line>
1681-
</svg>
1682-
</div>
1683-
<div class="ck-comment-content">
1684-
<div class="ck-comment-body" style="color: #9ca3af; font-style: italic;">
1685-
${this.escapeHtml(comment.content)}
1686-
</div>
1687-
</div>
1688-
</div>
1689-
${hasReplies ? `
1690-
<div class="ck-replies">
1691-
${comment.replies.map(r => this.renderComment(r, depth + 1)).join('')}
1692-
</div>
1693-
` : ''}
1694-
</div>
1695-
`;
1696-
}
16971657

1698-
// Regular comment rendering
1658+
// Regular comment rendering (works for both real and placeholder comments)
16991659
return `
17001660
<div class="ck-comment" data-id="${comment.id}">
17011661
<div class="ck-comment-inner">
@@ -2200,15 +2160,14 @@
22002160
// Create a placeholder comment
22012161
const placeholder = {
22022162
id: parentId,
2203-
author_name: '[deleted]',
2163+
author_name: 'Deleted',
22042164
author_email_hash: null,
2205-
content: '[deleted comment]',
2165+
content: '[removed]',
22062166
parent_id: null,
22072167
likes: 0,
22082168
user_liked: false,
22092169
created_at: replies[0].created_at, // Use first reply's timestamp
22102170
replies: replies,
2211-
isPlaceholder: true, // Flag to identify placeholders
22122171
};
22132172

22142173
map.set(parentId, placeholder);

0 commit comments

Comments
 (0)