Fix displayed comment counter for first comment in protocol steps and results [SCI-9573] (#7013)

This commit is contained in:
wandji 2024-01-30 14:35:44 +01:00 committed by GitHub
parent 05db30285b
commit 5bc542e834
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View file

@ -31,6 +31,7 @@ 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,7 +86,7 @@
@click="openCommentsSidebar"
:data-object-id="step.id">
<i class="sn-icon sn-icon-comments"></i>
<span class="comments-counter" v-if="step.attributes.comments_count"
<span class="comments-counter" v-show="step.attributes.comments_count"
:id="`comment-count-${step.id}`"
:class="{'unseen': step.attributes.unseen_comments}"
>

View file

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