From 9d359b7938c1572149c48c03db963e432025c953 Mon Sep 17 00:00:00 2001
From: hom3mad3 <8156337+hom3mad3@users.noreply.github.com>
Date: Thu, 15 Aug 2024 14:27:48 +0200
Subject: [PATCH] comments and ratings: small changes following mB redesign
---
.../__snapshots__/comment.jest.jsx.snap | 40 +++++++++++++++++++
.../__snapshots__/comment_box.jest.jsx.snap | 12 ++++--
.../static/comments_async/comment_form.jsx | 4 +-
.../static/comments_async/comment_list.jsx | 2 +-
.../comment_manage_dropdown.jsx | 26 +++++++-----
.../ratings/static/ratings/react_ratings.jsx | 6 ++-
6 files changed, 72 insertions(+), 18 deletions(-)
diff --git a/adhocracy4/comments_async/static/comments_async/__tests__/__snapshots__/comment.jest.jsx.snap b/adhocracy4/comments_async/static/comments_async/__tests__/__snapshots__/comment.jest.jsx.snap
index 7463e3501..6003349b8 100644
--- a/adhocracy4/comments_async/static/comments_async/__tests__/__snapshots__/comment.jest.jsx.snap
+++ b/adhocracy4/comments_async/static/comments_async/__tests__/__snapshots__/comment.jest.jsx.snap
@@ -82,6 +82,11 @@ exports[`Comment Component renders comment with creator and comment text 1`] = `
class="fa fa-chevron-up"
/>
10
+
+ Likes
+
2
+
+ Dislikes
+
10
+
+ Likes
+
2
+
+ Dislikes
+
10
+
+ Likes
+
2
+
+ Dislikes
+
10
+
+ Likes
+
2
+
+ Dislikes
+
-
+
@@ -280,7 +284,7 @@ exports[`CommentBox Component comments are fetched and loading spinners is hidde
+
{translated.onlyInvited}
)
} else {
return (
-
+
{translated.notAllowedComment}
)
diff --git a/adhocracy4/comments_async/static/comments_async/comment_list.jsx b/adhocracy4/comments_async/static/comments_async/comment_list.jsx
index bf8064704..3c3caee4e 100644
--- a/adhocracy4/comments_async/static/comments_async/comment_list.jsx
+++ b/adhocracy4/comments_async/static/comments_async/comment_list.jsx
@@ -4,7 +4,7 @@ import Comment from './comment'
const CommentList = (props) => {
return (
-
)
}
diff --git a/adhocracy4/ratings/static/ratings/react_ratings.jsx b/adhocracy4/ratings/static/ratings/react_ratings.jsx
index d9d4f23e6..c09873a84 100644
--- a/adhocracy4/ratings/static/ratings/react_ratings.jsx
+++ b/adhocracy4/ratings/static/ratings/react_ratings.jsx
@@ -7,7 +7,9 @@ import config from '../../../static/config'
const translations = {
upvote: django.gettext('Click to vote up'),
- downvote: django.gettext('Click to vote down')
+ downvote: django.gettext('Click to vote down'),
+ likes: django.gettext('Likes'),
+ dislikes: django.gettext('Dislikes')
}
class RatingBox extends React.Component {
@@ -133,6 +135,7 @@ class RatingBox extends React.Component {
>
{this.state.positiveRatings}
+
{translations.likes}
)