Discourse Retort

We use:
:+1: :astonished: :relaxed: :grinning: :rofl: :cry: :hugs: :rage: :nauseated_face:

The :relaxed: and :grinning: are kinda redundant. I like the :star_struck: and :tada: so I might see about adding those. Weā€™ve opted to not allow the thumbs down or anything like it.

EDIT: As a side note, Iā€™d love to see the plugin evenly split the emojis when thereā€™s more than can fit on one line. With 10 emojis, we wind up with 8 on the top and 2 on the bottom.

6 Likes

Maybe a placeholder emoji that triggers a line-break?

@gdpelican?

3 Likes

OK, guys. Pull my fork instead:

https://github.com/schungx/retort.git

An empty emoji string in the limited set translates to a line-break.

1 Like

Hmm, Iā€™d rather not go with this approach. Iā€™ve pushed up a fix to master which displays the icons sensibly for up to 25 custom emojis (so, for example, 24 emojis will be 6 rows of 4, while 25 emojis will be 5 rows of 5). Hopefully that should cover most use cases :slight_smile:

6 Likes

Reactions is completely separate from likes, which still function as normal (this is, in fact, quite a tiny plugin all told). It would be possible to do some metrics on reactions (which are stored completely separately from likes) with some custom SQL queries, but the plugin does not ship with this functionality.

4 Likes

thanks @gdpelican for these fixes. It might be a small plugin but itā€™s a good one that many people in my community love. :heart_eyes_cat:

This idea of doing metrics on reactions is interesting, or at least fun. It could also help identify which emojis are the most popular and worth including in a limited list. Or which users might be using emoji in a positive, community-building way or in a counter-productive way.

Maybe a data explorer query that lets admins pull data sitewide, by category, by topic, by post? Or by user, by group?

2 Likes

Itā€™ll be a query to run using the data explorer plugin; let me see if I can cook up a couple queries that might be interesting

EDIT: Hereā€™s the raw data:

SELECT REPLACE(key, '|retort', '') as retort, post_details.post_id, posts.user_id
FROM post_details
INNER JOIN posts on posts.id = post_details.post_id
INNER JOIN topics on topics.id = posts.topic_id
INNER JOIN users ON users.id = posts.user_id;

which you could add further columns like users.name, topics.title, etc. to.

and grouped by number of emojis total on the instance:

SELECT REPLACE(key, '|retort', '') as retort, count(key) as c
FROM post_details
WHERE extra = 'retort'
GROUP BY key
ORDER BY c DESC;
5 Likes

I think the automatic behavior is best WITHOUT any explicit formatting instructions from the user. If there is, however, it is best to follow the userā€™s format.

Thatā€™s because line-breaks, placed correctly, can be used to split the limited set into logical groups, each row being one type of emojiā€™s. The numbers may differ from row to row.

For example:

image

So there is a use for explicit formatting. Convention-over-Configuration still allows for configuration if the convention is not suitable.

1 Like

I can see your point @schungx. The update is almost what I was hoping for. Except now with 11 emojis, there are two rows of 5 and one row with just 1. I was hoping it would be more like 6 on top, 5 on bottom. In this case having the ability to split it myself might work better.

And another thingā€¦ :wink: I may be the only person who cares about this, but I think itā€™d be nice to be able to see a full list of who had what reactionā€”much like the way you can click on ā€œX Likesā€ and see who liked the post. Is there a way to do this? Clicking obviously wonā€™t work, since it adds you to the count of people who reacted that way. Listing out everyone every time you hover over it would probably be impractical, especially with reactions with large numbers. Maybe some sort of delay so that if you hover long enough it shows the full list? Iā€™m not familiar with JS, so if this is something we can do on our side, Iā€™ll talk to our admin. Heā€™s much more likely to be able to work it out.

Right now on hover it will show a tooltip of up to two users.

If you pull my fork instead, it shows up to 10 users as a condensed list. I changed it in order to remove the English texts hardcoded into the tooltip.

More than 10 then it just reverts back to two names plus the total count.

1 Like

In my fork, put an empty string in the list and you get a line break.

Hi, this is a really cool plugin!

Some questions related to both this plugin and Data Explorer:

  1. Can someone confirm that the Data Explorer queries can be set up to provide information on how many times [specific reaction] has been used in [specified category] in response to [these users]?
  2. Can those queries be run automatically and be sent to a group on a daily basis?

Another question:

  1. Can CSS be added to sit next to the Retort Button that says ā€œToneā€ or ā€œTone Feedbackā€?

If these are marketplace questions, let me know!

2 Likes

Hey Carson,

I can confirm this. Iā€™ve posted some starter queries a bit earlier in this thread, which you can tweak to taste as you like

I could imagine a plugin which takes some sql query, runs it periodically, and sends the results out in an email, but Iā€™m not sure if it exists yet and is likely beyond the scope of Data Explorer, and definitely beyond the scope of Retort.

As a side note, I wonder if anyoneā€™s had luck linking up a metabase instance to their Discourse forum for extra analytic superpowers.

You could likely achieve this with a little custom CSS on your instance, with a ::before selector. Something like this:

.post-controls .widget-button:first-child::before {
  content: 'Tone';
  margin-right: 8px;
}

09 PM
Althoughā€¦ youā€™ll probably want to figure out a better selector there.

3 Likes

Is possible to notify the author of the post when a new user reacts on the post?
As if it were a Like :heart:

4 Likes

It seems like multilanguage isnā€™t fully supported:

Nope. It isnā€™t. If youā€™re talking about the popup tooltip texts, they are hard-coded English.

If you pull my fork, Iā€™ve removed most of the English words ā€“ a couple remains. That should make it usable for other languages.

1 Like

I talk about the ā€˜emojiā€™ that shows :olhos do corazao: instead of :heart_eyes:

Hrm, I wouldnā€™t expect emojione to be translating their emoji shortnames, and havenā€™t been able to come up with steps to repro.

I tried making a portuguese user on that forum and reacting with heart eyes, but as expected the emoji shortnames remain in English, which is also true for the core discourse emoji picker.

The only possibility I could think of would be that a forum could add a custom emoji, someone reacts with it, and then the custom emoji is removed, which would result in just the shortname being displayed. I donā€™t really have a good response to that use case other than ā€˜Donā€™t do that.ā€™ :slight_smile:

1 Like

Is it me or everybody else is having this problem:

The Retort emoji picker no longer closes when you click on the page background. In fact, there appears to be no way to dismiss the emoji picker except to actually click on an emoji.

I remember before it closes when clicked outside of the picker dialog.

Hrm, yeah it looks like the emoji pickerā€™s event listeners have changed a little recently. Iā€™ve updated so the retort window goes away on an outside click or pressing ā€˜escapeā€™. :frog:

3 Likes