From 5934029e959979d4732e094b385849cc6bd88e40 Mon Sep 17 00:00:00 2001 From: Agamya Samuel Date: Wed, 28 Jan 2026 19:56:18 +0000 Subject: [PATCH 1/4] Backend: Add show_stats check to votes-stats endpoint Only return voting statistics when show_stats is enabled for the round. This prevents statistics from being returned when the feature is disabled. --- montage/juror_endpoints.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/montage/juror_endpoints.py b/montage/juror_endpoints.py index 0f6241cd..8a1f5901 100644 --- a/montage/juror_endpoints.py +++ b/montage/juror_endpoints.py @@ -172,6 +172,10 @@ def get_votes_stats_from_round(user_dao, round_id): juror_dao = JurorDAO(user_dao) rnd = juror_dao.get_round(round_id) + # Only return statistics if show_stats is enabled + if not rnd.show_stats: + return None + stats = None if rnd.vote_method == 'yesno': From 27776550d0d5beb801a818dc51767b2a8998950b Mon Sep 17 00:00:00 2001 From: Agamya Samuel Date: Wed, 28 Jan 2026 19:56:19 +0000 Subject: [PATCH 2/4] Frontend: Add voting statistics display to VoteYesNo component - Add statistics display section showing Accept/Decline counts - Implement statistics fetching on mount and round prop changes - Refresh statistics automatically after each vote submission - Add CSS styles for statistics display --- frontend/src/components/Vote/VoteYesNo.vue | 80 +++++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Vote/VoteYesNo.vue b/frontend/src/components/Vote/VoteYesNo.vue index a7fce3a7..cf985600 100644 --- a/frontend/src/components/Vote/VoteYesNo.vue +++ b/frontend/src/components/Vote/VoteYesNo.vue @@ -71,6 +71,20 @@ +
+

{{ $t('montage-round-stats') }}

+
+
+ {{ $t('montage-vote-accept') }}: + {{ voteStats.stats?.yes || 0 }} +
+
+ {{ $t('montage-vote-decline') }}: + {{ voteStats.stats?.no || 0 }} +
+
+
+

{{ $t('montage-vote-actions') }}

@@ -164,7 +178,7 @@ From 97edce5c2a4a6615968538adc991760eca14d332 Mon Sep 17 00:00:00 2001 From: Agamya Samuel Date: Wed, 28 Jan 2026 19:56:20 +0000 Subject: [PATCH 3/4] Frontend: Add voting statistics display to VoteRating component - Add statistics display section showing star ratings distribution (1-5 stars) - Implement statistics fetching on mount and round prop changes - Refresh statistics automatically after each vote submission - Add CSS styles for statistics display --- frontend/src/components/Vote/VoteRating.vue | 87 ++++++++++++++++++++- 1 file changed, 86 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Vote/VoteRating.vue b/frontend/src/components/Vote/VoteRating.vue index fec33399..06a8b3a3 100644 --- a/frontend/src/components/Vote/VoteRating.vue +++ b/frontend/src/components/Vote/VoteRating.vue @@ -70,6 +70,19 @@
+
+

{{ $t('montage-round-stats') }}

+
+
+ + + {{ star }}: + + {{ voteStats.stats?.[star] || 0 }} +
+
+
+

{{ $t('montage-vote-actions') }}

@@ -163,7 +176,7 @@ From 1657280e32f57d6ee97f77a8afc61f039d6bdedc Mon Sep 17 00:00:00 2001 From: Agamya Samuel Date: Wed, 28 Jan 2026 20:16:04 +0000 Subject: [PATCH 4/4] Fix star icon alignment in voting statistics display Improve vertical alignment of star icons in the statistics section by using inline-flex with center alignment for better visual consistency. --- frontend/src/components/Vote/VoteRating.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/components/Vote/VoteRating.vue b/frontend/src/components/Vote/VoteRating.vue index 06a8b3a3..9ed954dc 100644 --- a/frontend/src/components/Vote/VoteRating.vue +++ b/frontend/src/components/Vote/VoteRating.vue @@ -681,6 +681,9 @@ onMounted(() => { .vote-stats-star-icon { width: 16px; height: 16px; + display: inline-flex; + align-items: center; + justify-content: center; } .vote-stats-value {