diff --git a/public/s/js/comments.js b/public/s/js/comments.js
index 6d33705..9df9553 100644
--- a/public/s/js/comments.js
+++ b/public/s/js/comments.js
@@ -55,7 +55,12 @@ class CommentSystem {
return;
}
- if (!scrollToId) this.container.innerHTML = '
Loading comments...
';
+ // Initialize with opacity 0 for fade-in
+ if (!scrollToId) {
+ this.container.innerHTML = '';
+ this.container.style.opacity = '0';
+ this.container.style.transition = 'opacity 0.5s ease';
+ }
try {
const res = await fetch(`/api/comments/${this.itemId}?sort=${this.sort}`);
@@ -72,6 +77,11 @@ class CommentSystem {
this.isLocked = data.is_locked || false;
this.render(data.comments, data.user_id, data.is_subscribed);
+ // Trigger fade-in
+ requestAnimationFrame(() => {
+ this.container.style.opacity = '1';
+ });
+
// Priority: Explicit ID > Hash
if (scrollToId) {
this.scrollToComment(scrollToId);