Retort - a reaction-style plugin for Discourse

Yep, I’m aware of this and will fix. It’s a bit more work because Retort uses the new widget system and the new emoji picker is still a component, but I should have some time to puzzle it out in the near future.

2 Likes

I also had this same issue and had to uninstall the retort plugin. Anything I could do to speed up the process?

PRs welcome :slight_smile: I’ll need to do the same for Babble, which has the same technical inconvenience (Babble is also widget based)

I’ve installed this and the settings appear but when I go to react to a post there is no icon anywhere?

You should probably read the topic before installing plugins blindly, it has already been established that recent changes to Discourse, broke this plugin. The author will fix it when he has time available.

The author should edit the original post saying so :smiley:

Temporarily moved into #plugin:broken-plugin.

2 Likes

Alright, I’ve pushed a fix for this to work with the latest Discourse, although I’ll need to wait for this to get merged in:

https://github.com/discourse/discourse/pull/5009

So that the new emoji picker can support opening without a composer present. Thanks for your patience :slight_smile:

2 Likes

This avatar flair is appeared out of place.

I have made no changes to the theme settings…

Retort CSS is breaking the avatar flair position.

4 Likes

Thank you James for your work and this fix.

Can you estimate how long it will take until it is merged?

I’ve updated to the latest version. Unfortunately, i have still the following issue with the retort plugin. It seems that it is only working properly for the last post of each thread.

In this example (see screenshot below), i’ve posted a first comment on a topic and it works fine (i.e. in my case i can like or dislike the comment).

Then i’ve posted second comment on the topic. Now the plugin works properly for the second comment, but no longer for the first comment (see screenshot below).

Can anyone help with this issue please? Thank you so much

Does this plugin work in prod now? :slight_smile:

I’ll answer myself: no it doesn’t :slight_smile: The emoji-button shows up but not the picker :slight_smile:

@gdpelican I second what @kjump29 reported, retort only shows the picker for the last comment within a thread. Is there any chance for a fix?

display: flex is added to the emoji-picker of the wrong post.

The correct dark background overlay is activated (i.e. the one associated with the relevant post), but always the last emoji-picker is set to flex. This is a bug.

The correct behavior is to set display: flex on the emoji-picker of the relevant post.

File retort-picker.js.es6:

_loadCategoriesEmojis() {
    if (siteSettings.retort_limited_emoji_set) {
      const $picker = $('.emoji-picker')
      $picker.html("")
      siteSettings.retort_allowed_emojis.split('|').map((code) => {
        $picker.append(`<button type="button" title="${code}" class="emoji" />`)
        $(`button.emoji[title="${code}"]`).css("background-image", `url("${emojiUrlFor(code)}")`)
      })
      this._bindEmojiClick($picker);
    } else {
      this._super()
    }
  }

The line:

const $picker = $('.emoji-picker')

should pick up a whole array of emoji pickers (each one with class emoji-picker), and the line:

this._bindEmojiClick($picker);

probably needs to bind to only one picker (the one within the current post). However, since it binds to a list, I suspect that it is always binding to the last picker, which is the picker within the last post. And since that picker is hidden by the wrapper if it is not active, no picker ends up being shown.

Now, $picker = $('.emoji-picker') might just pick up the last DOM element with the class emoji-picker, in which case it would have produced the current behavior right away.

I am pretty sure this is a bug, and the line should probably be:

const $picker = $('.emoji-picker', this.rootDomNode)

or something to base the CSS search off the current root of the DOM tree to get that particular emoji picker under the current post.

The current code should work fine when there is only one emoji picker on the page, I believe…

Hi, thanks for the reports, sorry for the delay. I’ve updated Retort to work with the latest version of Discourse now. Please let me know if you find any further issues?

@sam This should be good to reactivate now as a non-broken plugin \o/

8 Likes

Thanks for the fix @gdpelican.

It works in standard threads now.

I found 2 issues:

  1. It doesn’t show the picker in message threads

  2. When the picker is shown, the left hand side has clickable categories, but clicking them doesn’t work

Tested with Firefox 55.0.3

How come it becomes like this:

Not centered on screen. Buttons not centered. Button widths screwed up.,

Strange because I can see display: flex put on the wrapper, which certainly will not make the buttons wrap.

Am I missing a CSS file or something?

1 Like