Post Voting has likes enabled but they won't appear

We have the setting qa enable likes on answers enabled but the are no :heart: to be seen.

We also have the official plugin Discourse Reactions installed. Can this be the cause of this bug?


I’ve just toggled Reactions on/off on my test site to check this out and it seems like it is connected. I wonder if this is a consequence of this bug fix Thumbs up, twice?



Reactions are disabled (hide) by default on post voting topics with css.

You can reactivate it with adding a little css to a component Common/CSS :arrow_down_small:

.post-voting-topic-sort-by-activity {
  .discourse-reactions-actions {
    display: inline-flex;

Thank you very much!

The limitation by default is understandable (too many options to give feedback can be confusing) but if there is a setting allowing admins to enable “likes” and those admins had enabled reactions in their site, then it would be logical to enable reactions in voting posts when they enable the setting.

And in any case, I guess more admins are likely to think that there is a bug rather than checking the code and fix the CSS. :slight_smile:

reactions installed post voting installed enable likes on answers invoke removePostMenuButton(‘like’)?
no no no (NA) no, keep :heart:
yes no NA yes, remove the like button, show reactions
no yes no yes, remove the like button for answers
no yes yes no, keep :heart: for every post
yes yes no yes, remove the like button, also only show reactions for the first post not answers
yes yes yes yes, remove the like button, show reactions for all

Sketched out something like a truth table here. We need to programmatically make reactions show up for posts different posts depending on the site settings, especially the enable likes on answers one, instead of a straight up css display:none.

@tgxworld sort of caught this one back then suggesting that we should probably expose an API on discourse-reactions (t/67550/10). Perhaps we should consider that.

// Removing the `like` button
// And adding it again
api.decorateWidget("post-menu:before-extra-controls", (dec) => {
  return dec.attach("discourse-reactions-actions", {

Instead of doing this :arrow_up_small: we should add a replacePostMenuButton method in core plugin api and use it in reactions plugin. In that case, we don’t need a separate logic for reaction button in post voting plugin.

Since there is a workaround, I will make this change after the upcoming release.