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 ? ( + + + +
General Rating
+
+
+ + + + {topicMetricsDataOverview.map( + (topic, index) => { + const topicValue = Math.round( + topic.rating + ); + return ( + + + +

{topicValue}/5

+
+
+ + +

{topic.name}

+
+
+
+ ); + } + )} +
+
+
+
+ ) : ( + + + + {i18next.t( + 'There is not feedback metrics available yet.' + )} + + + + )} +
+
+
+ + + +