# Discourse Retort

**URL:** https://meta.discourse.org/t/discourse-retort/35903
**Category:** Plugin
**Tags:** end-of-life
**Created:** [2015年十一月22日 11:53 UTC](https://meta.discourse.org/t/discourse-retort/35903 "2015-11-22T11:53:58Z")
**Posts on this page:** 20
**Page:** 10

<div class="post-metadata">

### Author: ![JoJoG](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jojog/32/120341_2.png) [@JoJoG](https://meta.discourse.org/u/JoJoG)
#### Post date: [2017年十月11日 15:51 UTC](https://meta.discourse.org/t/discourse-retort/35903/188 "2017-10-11T15:51:13Z")

</div>

We use:  
👍 😲 😌 😀 🤣 😢 🤗 😡 🤢

The 😌 and 😀 are kinda redundant. I like the 🤩 and 🎉 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.

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [2017年十月11日 15:57 UTC](https://meta.discourse.org/t/discourse-retort/35903/189 "2017-10-11T15:57:18Z")

</div>

Maybe a _placeholder_ emoji that triggers a line-break?

@gdpelican?

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [2017年十月12日 04:48 UTC](https://meta.discourse.org/t/discourse-retort/35903/190 "2017-10-12T04:48:32Z")

</div>

OK, guys. Pull my fork instead:

[https://github.com/schungx/retort.git](https://github.com/schungx/retort.git)

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

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [2017年十月13日 00:41 UTC](https://meta.discourse.org/t/discourse-retort/35903/191 "2017-10-13T00:41:44Z")

</div>

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 🙂

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [2017年十月13日 00:43 UTC](https://meta.discourse.org/t/discourse-retort/35903/192 "2017-10-13T00:43:00Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [2017年十月13日 01:03 UTC](https://meta.discourse.org/t/discourse-retort/35903/193 "2017-10-13T01:03:03Z")

</div>

thanks @gdpelican for these fixes. It might be a small plugin but it’s a good one that many people in my community love. 😻

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](https://meta.discourse.org/t/32566?silent=true) query that lets admins pull data sitewide, by category, by topic, by post? Or by user, by group?

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [2017年十月13日 01:51 UTC](https://meta.discourse.org/t/discourse-retort/35903/194 "2017-10-13T01:51:42Z")

</div>

It’ll be a query to run using the [data explorer](https://github.com/discourse/discourse-data-explorer) plugin; let me see if I can cook up a couple queries that might be interesting

EDIT: Here’s the raw data:

```plaintext
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:

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

```

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [2017年十月13日 02:17 UTC](https://meta.discourse.org/t/discourse-retort/35903/195 "2017-10-13T02:17:02Z")

</div>

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](https://global.discourse-cdn.com/meta/original/3X/1/0/1040409e7b49a3aaea9a3848a328b3b1373a83af.jpg)

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

---

<div class="post-metadata">

### Author: ![JoJoG](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jojog/32/120341_2.png) [@JoJoG](https://meta.discourse.org/u/JoJoG)
#### Post date: [2017年十月18日 12:48 UTC](https://meta.discourse.org/t/discourse-retort/35903/196 "2017-10-18T12:48:31Z")

</div>

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… 😉 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.

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [2017年十月18日 12:54 UTC](https://meta.discourse.org/t/discourse-retort/35903/197 "2017-10-18T12:54:44Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [2017年十月18日 13:47 UTC](https://meta.discourse.org/t/discourse-retort/35903/198 "2017-10-18T13:47:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![outofthebox](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/outofthebox/32/83708_2.png) [@outofthebox](https://meta.discourse.org/u/outofthebox)
#### Post date: [2017年十月31日 14:55 UTC](https://meta.discourse.org/t/discourse-retort/35903/199 "2017-10-31T14:55:03Z")

</div>

Hi, this is a really cool plugin!

Some questions related to both this plugin and [Data Explorer](https://meta.discourse.org/t/32566?silent=true):

1. Can someone confirm that the [Data Explorer](https://meta.discourse.org/t/32566?silent=true) 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!

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [2017年十一月1日 03:53 UTC](https://meta.discourse.org/t/discourse-retort/35903/200 "2017-11-01T03:53:46Z")

</div>

Hey Carson,

> [@outofthebox](#):
>
> Can someone confirm that the [Data Explorer](https://meta.discourse.org/t/32566?silent=true) 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]?

I can confirm this. I’ve posted some starter queries [a bit earlier in this thread](https://meta.discourse.org/t/retort-a-reaction-style-plugin-for-discourse/35903/194), which you can tweak to taste as you like

> [@outofthebox](#):
>
> Can those queries be run automatically and be sent to a group on a daily basis?

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](https://meta.discourse.org/t/32566?silent=true), and definitely beyond the scope of Retort.

As a side note, I wonder if anyone’s had luck linking up a [metabase](https://metabase.com/) instance to their Discourse forum for extra analytic superpowers.

> [@outofthebox](#):
>
> Can CSS be added to sit next to the Retort Button that says “Tone” or “Tone Feedback”?

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

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

```

![09 PM](https://global.discourse-cdn.com/meta/original/3X/6/7/67470baef5ed5cd80e3ff6bb3b0b1cc9c138bae6.png)  
Although… you’ll probably want to figure out a better selector there.

---

<div class="post-metadata">

### Author: ![barreeeiroo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barreeeiroo/32/165264_2.png) [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)
#### Post date: [2017年十一月3日 14:13 UTC](https://meta.discourse.org/t/discourse-retort/35903/201 "2017-11-03T14:13:28Z")

</div>

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

---

<div class="post-metadata">

### Author: ![barreeeiroo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barreeeiroo/32/165264_2.png) [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)
#### Post date: [2017年十一月16日 16:01 UTC](https://meta.discourse.org/t/discourse-retort/35903/202 "2017-11-16T16:01:58Z")

</div>

It seems like multilanguage isn’t fully supported:

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/5/35d0ad861f06d878ff5af6f8f0e78e2c0915603e.png)

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [2017年十一月16日 16:30 UTC](https://meta.discourse.org/t/discourse-retort/35903/203 "2017-11-16T16:30:09Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![barreeeiroo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barreeeiroo/32/165264_2.png) [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)
#### Post date: [2017年十一月16日 17:19 UTC](https://meta.discourse.org/t/discourse-retort/35903/204 "2017-11-16T17:19:12Z")

</div>

I talk about the ‘emoji’ that shows `:olhos do corazao:` instead of 😍

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [2017年十一月16日 21:09 UTC](https://meta.discourse.org/t/discourse-retort/35903/205 "2017-11-16T21:09:56Z")

</div>

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.’ 🙂

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [2017年十一月23日 03:00 UTC](https://meta.discourse.org/t/discourse-retort/35903/206 "2017-11-23T03:00:09Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [2017年十一月23日 03:42 UTC](https://meta.discourse.org/t/discourse-retort/35903/207 "2017-11-23T03:42:49Z")

</div>

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’. 🐸

[上一頁](https://meta.discourse.org/t/discourse-retort/35903.md?page=9)

[下一頁](https://meta.discourse.org/t/discourse-retort/35903.md?page=11)
