Skip to content

Commit

Permalink
(Temporarily) Remove multiple reactions from #index (forem#19142)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaw6 authored Feb 20, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 9b66a8e commit a45d300
Showing 1 changed file with 7 additions and 26 deletions.
33 changes: 7 additions & 26 deletions app/views/articles/_single_story.html.erb
Original file line number Diff line number Diff line change
@@ -120,32 +120,13 @@
<div class="crayons-story__bottom">
<div class="crayons-story__details">
<% if story.public_reactions_count > 0 %>
<% if FeatureFlag.enabled?(:multiple_reactions) %>
<a href="<%= story.path %>" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left" data-reaction-count data-reactable-id="<%= story.id %>" aria-label="<%= t("views.articles.comments.aria_label", title: story.title) %>">
<div class="multiple_reactions_aggregate">
<span dir="rtl">
<% ReactionCategory.for_view.reverse_each do |reaction_type| %>
<% next unless story.reaction_categories.include?(reaction_type.slug.to_s) %>
<span class="crayons_icon_container">
<%= image_tag reaction_type.icon, size: "18x18" %>
</span>
<% end %>
</span>
<span class="aggregate_reactions_counter"><%= t("views.reactions.summary.count_html",
count: story.public_reactions_count,
start: tag("span", { class: %w[hidden s:inline] }, true),
end: "</span>".html_safe) %></span>
</div>
</a>
<% else %>
<a href="<%= story.path %>" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left" data-reaction-count data-reactable-id="<%= story.id %>" aria-label="<%= t("views.articles.comments.aria_label", title: story.title) %>">
<%= crayons_icon_tag("small-heart", title: t("views.reactions.summary.title")) %>
<%= t("views.reactions.summary.count_html",
count: story.public_reactions_count,
start: tag("span", { class: %w[hidden s:inline] }, true),
end: "</span>".html_safe) %>
</a>
<% end %>
<a href="<%= story.path %>" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left" data-reaction-count data-reactable-id="<%= story.id %>" aria-label="<%= t("views.articles.comments.aria_label", title: story.title) %>">
<%= crayons_icon_tag("small-heart", title: t("views.reactions.summary.title")) %>
<%= t("views.reactions.summary.count_html",
count: story.public_reactions_count,
start: tag("span", { class: %w[hidden s:inline] }, true),
end: "</span>".html_safe) %>
</a>
<% end %>
<% if story.comments_count > 0 %>
<a href="<%= story.path %>#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center" aria-label="<%= t("views.articles.comments.aria_label", title: story.title) %>">

0 comments on commit a45d300

Please sign in to comment.