From c9dbdb42a6372cf907e60628810929ff362514cb Mon Sep 17 00:00:00 2001
From: Felipe Carlos
Date: Wed, 17 Apr 2024 12:13:48 -0300
Subject: [PATCH] contrib: updating component style
---
.../feedback/components/FeedbackSpace.js | 342 +++++++++++-------
.../feedback/components/feedback/Feedback.js | 37 +-
.../components/modal/FeedbackModal.js | 6 +-
3 files changed, 255 insertions(+), 130 deletions(-)
diff --git a/src/lib/contrib/feedback/components/FeedbackSpace.js b/src/lib/contrib/feedback/components/FeedbackSpace.js
index 7d8c406..cdae235 100644
--- a/src/lib/contrib/feedback/components/FeedbackSpace.js
+++ b/src/lib/contrib/feedback/components/FeedbackSpace.js
@@ -23,6 +23,8 @@ import {
Popup,
Icon,
Container,
+ List,
+ Header,
} from 'semantic-ui-react';
import { i18next } from '@translations/i18next';
@@ -161,141 +163,237 @@ export class FeedbackSpaceComponent extends Component {
-
+
-
+
Community feedback for {recordTitle}
-
-
-
-
-
- {recordMetricDataOverview ? (
-
-
- {recordMetricDataOverview}/5
-
-
-
- General Rating{' '}
-
-
- }
- flowing
- hoverable
- >
-
- {topicMetricsDataOverview.map(
- (topicMetric) => (
-
-
-
- {topicMetric.name}
-
-
- {topicMetric.rating}/5
-
-
-
- )
- )}
-
-
-
-
- ) : (
+
+
+ {recordMetricDataOverview ? (
+
+
+ {recordMetricDataOverview}/5
+
+
+
+ General Rating
+
+ }
+ flowing
+ hoverable
+ >
-
-
- {i18next.t(
- 'There is not feedback metrics available yet.'
- )}
-
-
+ {topicMetricsDataOverview.map(
+ (topicMetric) => (
+
+
+
+ {topicMetric.name}
+
+
+ {topicMetric.rating}/5
+
+
+
+ )
+ )}
- )}
-
-
-
-
+
+
+
+ ) : (
+
+
+
+ {i18next.t(
+ 'There is not feedback metrics available yet.'
+ )}
+
+
+
+ )}
+
+
+
+
+
+ {recordMetricDataOverview ? (
+
+
+
+
+
+
+
+
+
+ {topicMetricsDataOverview.map(
+ (topic, index) => {
+ const topicValue = Math.round(
+ topic.rating
+ );
+ return (
+
+
+
+ {topicValue}/5
+
+
+
+
+ {topic.name}
+
+
+
+ );
+ }
+ )}
+
+
+
+
+ ) : (
+
+
+
+ {i18next.t(
+ 'There is not feedback metrics available yet.'
+ )}
+
+
+
+ )}
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/lib/contrib/feedback/components/feedback/Feedback.js b/src/lib/contrib/feedback/components/feedback/Feedback.js
index eaddacc..1b6d3c9 100644
--- a/src/lib/contrib/feedback/components/feedback/Feedback.js
+++ b/src/lib/contrib/feedback/components/feedback/Feedback.js
@@ -9,7 +9,7 @@
import React, { Component } from 'react';
import { Image } from 'react-invenio-forms';
-import { Container, Dropdown, Feed, Grid, Statistic } from 'semantic-ui-react';
+import { Dropdown, Feed, Grid, List, Statistic } from 'semantic-ui-react';
import { i18next } from '@translations/i18next';
@@ -70,18 +70,19 @@ export class Feedback extends Component {
{error && }
-
+
-
+
-
+
+
{topics.map((topic, index) => {
const topicValue = Math.round(topic.rating);
return (
-
+
{topic.name}
{topicValue}/5
@@ -92,6 +93,32 @@ export class Feedback extends Component {
})}
+
+
+
+ {topics.map((topic, index) => {
+ const topicValue = Math.round(topic.rating);
+ return (
+
+
+
+ {topicValue}/5
+
+
+
+
+ {topic.name}
+
+
+
+ );
+ })}
+
+
diff --git a/src/lib/contrib/feedback/components/modal/FeedbackModal.js b/src/lib/contrib/feedback/components/modal/FeedbackModal.js
index 008e9d3..acacd78 100644
--- a/src/lib/contrib/feedback/components/modal/FeedbackModal.js
+++ b/src/lib/contrib/feedback/components/modal/FeedbackModal.js
@@ -96,8 +96,8 @@ export class FeedbackModalComponent extends Component {
>
{({ values, touched, errors, handleSubmit, isSubmitting }) => (