docbrown/app/views/articles/_reaction_button.html.erb
Joshua Wehner 5188ca8138
Cleanup multiple reactions feature flag (#19257)
* Update notifications_helper

* Update notification decorator

* Removed old notifications views

* Remove flag check from _actions partial

* Remove feature flag from views

* Remove flag from model

* Update logic in reaction drawer button

* Missed this somehow

* Update app/assets/javascripts/initializers/initializeArticleReactions.js

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Update these tests to multiple reactions

* Adjust logged-out test to account for multiple reactions

* Removed unused

* Try to boost coverage

---------

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2023-04-07 17:14:10 +02:00

20 lines
1 KiB
Text

<button
id="reaction-butt-<%= category %>"
aria-label="<%= aria_label %>"
aria-pressed="false"
class="crayons-reaction crayons-reaction--<%= category %> crayons-tooltip__activator relative"
data-category="<%= category %>">
<span class="crayons-reaction__icon <%= "crayons-reaction__icon--borderless" %> crayons-reaction__icon--inactive">
<%= crayons_icon_tag(image_path, aria_hidden: true) %>
</span>
<% if user_signed_in? # We cannot trigger the action state unless the user is signed in, so no need to render. %>
<span class="crayons-reaction__icon <%= "crayons-reaction__icon--borderless" %> crayons-reaction__icon--active">
<%= crayons_icon_tag(image_active_path, aria_hidden: true) %>
</span>
<% end %>
<span class="crayons-reaction__count" id="reaction-number-<%= category %>"><span class="bg-base-40 opacity-25 p-2 inline-block radius-default"></span></span>
<span data-testid="tooltip" class="crayons-tooltip__content">
<%= description %>
</span>
</button>