From 647294ad7bfe421b031ae9464a60516f2714c7c1 Mon Sep 17 00:00:00 2001 From: Robert <35533304+merefield@users.noreply.github.com> Date: Tue, 30 Jul 2024 10:45:27 +0100 Subject: [PATCH] FIX: Poll: Clickable, hoverable avatars (#28121) - Add titles and User Card functionality to voter avatars --- .../discourse/components/poll-voters-ranked-choice.gjs | 10 ++++++++-- .../javascripts/discourse/components/poll-voters.gjs | 8 +++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/plugins/poll/assets/javascripts/discourse/components/poll-voters-ranked-choice.gjs b/plugins/poll/assets/javascripts/discourse/components/poll-voters-ranked-choice.gjs index de9155630ca..67b19d43115 100644 --- a/plugins/poll/assets/javascripts/discourse/components/poll-voters-ranked-choice.gjs +++ b/plugins/poll/assets/javascripts/discourse/components/poll-voters-ranked-choice.gjs @@ -36,9 +36,15 @@ export default class PollVotersComponent extends Component { {{else}} {{rank.rank}} {{/if}} - {{#each rank.voters as |user|}} + {{#each rank.voters as |voter|}}
  • - {{avatar user.user.avatar_template "tiny"}} + {{avatar + voter.user.avatar_template + "tiny" + usernamePath=voter.user.username + namePath=voter.user.name + title=voter.user.username + }}
  • {{/each}} diff --git a/plugins/poll/assets/javascripts/discourse/components/poll-voters.gjs b/plugins/poll/assets/javascripts/discourse/components/poll-voters.gjs index 91903040fe4..b2668ec2bfc 100644 --- a/plugins/poll/assets/javascripts/discourse/components/poll-voters.gjs +++ b/plugins/poll/assets/javascripts/discourse/components/poll-voters.gjs @@ -18,7 +18,13 @@ export default class PollVotersComponent extends Component { {{else}} {{#each @voters as |user|}}
  • - {{avatar user.avatar_template "tiny"}} + {{avatar + user.avatar_template + "tiny" + usernamePath=user.username + namePath=user.name + title=user.username + }}
  • {{/each}} {{/if}}