Try right-to-left for stack effect (#19083)
* Try right-to-left for stack effect * Reverse order to counter rtl ordering * Better post-merge reconciliation * Try to get test ratio boost * Fix test
This commit is contained in:
parent
0b684eb421
commit
567e31248a
3 changed files with 28 additions and 7 deletions
|
|
@ -477,7 +477,7 @@
|
|||
height: 28px;
|
||||
}
|
||||
|
||||
svg {
|
||||
img {
|
||||
margin: 3px 3px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -123,12 +123,14 @@
|
|||
<% 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">
|
||||
<% ReactionCategory.for_view.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 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),
|
||||
|
|
|
|||
|
|
@ -62,6 +62,17 @@ RSpec.describe NotificationDecorator, type: :decorator do
|
|||
notification = build(:notification, action: "Milestone::Reaction::64")
|
||||
expect(notification.decorate.milestone_type).to eq("Reaction")
|
||||
end
|
||||
|
||||
it "is a milestone type" do
|
||||
notification = build(:notification, action: "Milestone::Reaction::64")
|
||||
expect(notification.notifiable_type).to eq("Article")
|
||||
expect(notification.decorate).to be_milestone
|
||||
end
|
||||
|
||||
it "is also a milestone type if has milestone type" do
|
||||
notification = build(:notification, notifiable_type: "Milestone")
|
||||
expect(notification.decorate).to be_milestone
|
||||
end
|
||||
end
|
||||
|
||||
describe "#milestone_count" do
|
||||
|
|
@ -113,6 +124,10 @@ RSpec.describe NotificationDecorator, type: :decorator do
|
|||
expect(decorated.reactable_title).to eq("This is the article's title here")
|
||||
end
|
||||
|
||||
it "responds to reactable_type" do
|
||||
expect(decorated.reactable_type).to be_nil
|
||||
end
|
||||
|
||||
it "responds to reaction_category" do
|
||||
expect(decorated.reaction_category).to eq("like")
|
||||
end
|
||||
|
|
@ -174,6 +189,10 @@ RSpec.describe NotificationDecorator, type: :decorator do
|
|||
expect(decorated.reactable_title).to be_nil
|
||||
end
|
||||
|
||||
it "responds to reactable_type" do
|
||||
expect(decorated.reactable_type).to be_nil
|
||||
end
|
||||
|
||||
it "responds to reaction_category" do
|
||||
expect(decorated.reaction_category).to eq("like")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue