Improve the message when loading comments below event
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
10826650e7
commit
d9cc9f5842
|
@ -39,10 +39,13 @@
|
|||
<b-notification v-else :closable="false">{{
|
||||
$t("The organiser has chosen to close comments.")
|
||||
}}</b-notification>
|
||||
<transition name="comment-empty-list" mode="out-in">
|
||||
<p v-if="$apollo.queries.comments.loading" class="loading">
|
||||
{{ $t("Loading…") }}
|
||||
<p
|
||||
v-if="$apollo.queries.comments.loading"
|
||||
class="loading has-text-centered"
|
||||
>
|
||||
{{ $t("Loading comments…") }}
|
||||
</p>
|
||||
<transition name="comment-empty-list" mode="out-in" v-else>
|
||||
<transition-group
|
||||
name="comment-list"
|
||||
v-if="comments.length"
|
||||
|
|
|
@ -91,7 +91,7 @@ describe("CommentTree", () => {
|
|||
expect(wrapper.findComponent({ name: "b-notification" }).text()).toBe(
|
||||
"The organiser has chosen to close comments."
|
||||
);
|
||||
expect(wrapper.find(".loading").text()).toBe("Loading…");
|
||||
expect(wrapper.find(".loading").text()).toBe("Loading comments…");
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
|
|
|
@ -3,12 +3,9 @@
|
|||
exports[`CommentTree renders a comment tree 1`] = `
|
||||
<div>
|
||||
<b-notification-stub active="true" duration="2000" animation="fade">The organiser has chosen to close comments.</b-notification-stub>
|
||||
<transition-stub name="comment-empty-list" mode="out-in">
|
||||
<p class="loading">
|
||||
Loading…
|
||||
<p class="loading has-text-centered">
|
||||
Loading comments…
|
||||
</p>
|
||||
<!---->
|
||||
</transition-stub>
|
||||
</div>
|
||||
`;
|
||||
|
||||
|
@ -16,7 +13,6 @@ exports[`CommentTree renders a comment tree 2`] = `
|
|||
<div>
|
||||
<b-notification-stub active="true" duration="2000" animation="fade">The organiser has chosen to close comments.</b-notification-stub>
|
||||
<transition-stub name="comment-empty-list" mode="out-in">
|
||||
<!---->
|
||||
<transition-group-stub tag="ul" name="comment-list" class="comment-list">
|
||||
<comment-stub comment="[object Object]" event="[object Object]" class="root-comment"></comment-stub>
|
||||
<comment-stub comment="[object Object]" event="[object Object]" class="root-comment"></comment-stub>
|
||||
|
|
Loading…
Reference in a new issue