Files
fizzy/app/views/bubbles/_assignees.html.erb
T
Jorge Manrubia 6d716fa932 Prevent turbo frames from loading edit forms when previwing cards in collections
To render N cards we were loading 3xN turbo frames. I suspect this makes staging choke.
2025-04-02 11:21:30 +02:00

17 lines
779 B
Plaintext

<%= turbo_frame_tag bubble, :assignees do %>
<div class="flex">
<% bubble.assignees.each do |assignee| %>
<%= avatar_tag assignee, loading: :lazy, class: "avatar" %>
<% end %>
<div class="position-relative" data-controller="dialog" data-action="keydown.esc->dialog#close click@document->dialog#closeOnClickOutside">
<button class="btn card__hide-on-index <%= bubble.creating? || bubble.drafted? ? "fill-highlight" : "fill-transparent" %>" data-action="click->dialog#open:stop">
<%= icon_tag "add" %>
<span class="for-screen-reader">Assign</span>
</button>
<%= turbo_frame_tag bubble, :assignment, src: new_bucket_bubble_assignment_toggle_path(bubble.bucket, bubble) unless previewing_card? %>
</div>
</div>
<% end %>