Merge pull request #7391 from wandji20/wb-SCI-10541

Fix Canvas - Broken new comment badge while adding new comments [SCI-10541]
This commit is contained in:
ajugo 2024-04-02 11:31:21 +02:00 committed by GitHub
commit fe6879a0e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 4 deletions

View file

@ -31,7 +31,6 @@ var CommentsSidebar = (function() {
// Replace the number in comment element
commentsCounter.text(commentsCounter.text().replace(/[\d\\+]+/g, commentsAmount));
commentsCounter.removeClass('hidden');
commentsCounter.css('display', 'flex');
}
}

View file

@ -86,9 +86,9 @@
@click="openCommentsSidebar"
:data-object-id="step.id">
<i class="sn-icon sn-icon-comments"></i>
<span class="comments-counter" v-show="step.attributes.comments_count"
<span class="comments-counter"
:id="`comment-count-${step.id}`"
:class="{'unseen': step.attributes.unseen_comments}"
:class="{'unseen': step.attributes.unseen_comments, 'hidden': !step.attributes.comments_count}"
>
{{ step.attributes.comments_count }}
</span>

View file

@ -72,7 +72,7 @@
data-object-type="Result"
:data-object-id="result.id">
<i class="sn-icon sn-icon-comments"></i>
<span class="comments-counter" v-show="result.attributes.comments_count"
<span class="comments-counter" :class="{ 'hidden': !result.attributes.comments_count }"
:id="`comment-count-${result.id}`">
{{ result.attributes.comments_count }}
</span>