feat: Add custom emojis, pinned comments, and thread locking features, and remove comments list fade-in animation logic.
This commit is contained in:
@@ -57,20 +57,7 @@ class CommentSystem {
|
|||||||
|
|
||||||
// Render skeleton (Result: Layout visible immediately)
|
// Render skeleton (Result: Layout visible immediately)
|
||||||
if (!scrollToId) {
|
if (!scrollToId) {
|
||||||
this.container.style.opacity = '1'; // Ensure container is visible
|
|
||||||
this.container.style.transition = ''; // Reset
|
|
||||||
|
|
||||||
// Assume defaults for skeleton
|
|
||||||
this.render([], this.user, false);
|
this.render([], this.user, false);
|
||||||
|
|
||||||
// Hide list initially for fade-in
|
|
||||||
const list = this.container.querySelector('.comments-list');
|
|
||||||
if (list) {
|
|
||||||
list.style.opacity = '0';
|
|
||||||
list.style.transition = 'opacity 0.5s ease';
|
|
||||||
// Add a spinner or just empty? User said "not see the loading comments"
|
|
||||||
// but "layout present". Empty list is fine.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -90,17 +77,7 @@ class CommentSystem {
|
|||||||
// Render real data
|
// Render real data
|
||||||
this.render(data.comments, data.user_id, data.is_subscribed);
|
this.render(data.comments, data.user_id, data.is_subscribed);
|
||||||
|
|
||||||
// Fade in the NEW list
|
|
||||||
const list = this.container.querySelector('.comments-list');
|
|
||||||
if (list) {
|
|
||||||
list.style.opacity = '0'; // Start invisible
|
|
||||||
list.style.transition = 'opacity 0.5s ease';
|
|
||||||
|
|
||||||
// Trigger reflow
|
|
||||||
requestAnimationFrame(() => {
|
|
||||||
list.style.opacity = '1';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (scrollToId) {
|
if (scrollToId) {
|
||||||
this.scrollToComment(scrollToId);
|
this.scrollToComment(scrollToId);
|
||||||
|
|||||||
Reference in New Issue
Block a user