Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emoji reactions are no longer showing authors #5343

Closed
jywarren opened this issue Apr 2, 2019 · 5 comments
Closed

Emoji reactions are no longer showing authors #5343

jywarren opened this issue Apr 2, 2019 · 5 comments
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute JavaScript

Comments

@jywarren
Copy link
Member

jywarren commented Apr 2, 2019

Hi @ViditChitkara -- i noticed this on comments... maybe due to the refactor?

image

I'd love some help getting this fixed! And please don't be discouraged by the bugs here, this was a really big refactor so they're bound to happen 😄

One thing we might do now, is to write a system test for some of this, to protect the features! #5316

@jywarren jywarren added bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute JavaScript labels Apr 2, 2019
@ViditChitkara
Copy link
Member

Hi @jywarren , that's quite odd. I think this might be a specific case where authors are not showing with the emoji. Oh I think I got it, it shows the authors after refreshing. The reason might be, we are dynamically adding the emoji but, associated js.erb doesn't cater for the tooltip which shows the authors. Is that what might be happening?
Also, could you share the link to the comment in the screenshot above? and yeah I'll be starting with the tests next.
Thanks!

@jywarren
Copy link
Member Author

jywarren commented Apr 2, 2019 via email

@jainaman224
Copy link
Contributor

@jywarren @ViditChitkara Can I work on this?

@jainaman224
Copy link
Contributor

After https://github.com/publiclab/plots2/blob/master/app/controllers/comment_controller.rb#L209 adding

@user_reactions_map = comment.user_reactions_map

After https://github.com/publiclab/plots2/blob/master/app/views/comments/like_comment.js.erb#L12 adding

<% if @user_reactions_map.has_key? capitalized_emoji_name %>
  $("<%= str %>").attr("data-original-title", "<%= @user_reactions_map[capitalized_emoji_name] %>");
<% end %>

Fixed the issue.

@ViditChitkara
Copy link
Member

@jainaman224 that's really cool!! Could you open a PR for this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute JavaScript
Projects
None yet
Development

No branches or pull requests

3 participants