Open daath opened 5 years ago
Hi!
I would also be very interested for the same reasons as @daath stated. :+1:
EDIT: Looking at the code, it seems like the modification should be done in the sentence()
function Line 23:
sentence() {
let usernames = this.state.usernames
switch(usernames.length) {
case 1: return `${usernames[0]} reacted with :${this.state.emoji}:`
case 2: return `${usernames[0]} and ${usernames[1]} reacted with :${this.state.emoji}:`
default: return `${usernames[0]}, ${usernames[1]}, and ${usernames.length - 2} others reacted with :${this.state.emoji}:`
}
}
Replacing default case by a loop inside usernames
should be fairly simple to do
Would be clearer if title were edited to say "all who reacted"
@IwishIcanFLighT Can you please make a pull request with the changes you said?
@GokulNC Sorry I never got the time to actually make this change and no longer need it for my discourse instance.
In the meantime from what I found it looks like my previous suggestion cannot be applied anymore as the plugin seems to support different locales now: https://github.com/gdpelican/retort/blob/7fd191b7e47a9612163436556e14ed1cd1b313ac/config/locales/client.en.yml
en:
js:
retort:
title: 'add an emoji reaction to this post'
reactions:
one_person: "%{first} reacted with :%{emoji}:"
two_people: "%{first} and %{second} reacted with :%{emoji}:"
many_people: "%{first}, %{second}, and %{count} others reacted with :%{emoji}:"
I suppose you'd also need to modify the code in this file as well: https://github.com/gdpelican/retort/blob/8d582c512ae89427c6e0520f9f256e91c05aa07b/assets/javascripts/discourse/widgets/retort-toggle.js.es6
sentence({ usernames, emoji }) {
let key
switch(usernames.length) {
case 1: key = 'retort.reactions.one_person'; break
case 2: key = 'retort.reactions.two_people'; break
default: key = 'retort.reactions.many_people'; break
}
Hi there, thanks for this wonderful plugin! My community has also expressed an interest in this feature. To me it would be ideal if this worked similarly to the built-in like button: Always display a number alongside the reaction and show the reacters underneath the reactions when the number is clicked. I think the relevant Discourse code can be found here.
My users have requested a way to see who has reacted - Doing mouse-over reveals a couple of names, but not the rest - Clicking it just reacts - Holding LMB on the icon reveals the same couple of names...
Thanks! :)