Files
fizzy/app/views/bubbles/sidebar/_assignment.html.erb
T
Mike Dalessio 5ae87d8140 Ensure the tags dropdown is not subject to the cached card fragment
- Rearrange the _tags and _tag partial, so they are properly nested concerns
- Add turbo frames for _tags and _tag
- Load _tag in a separate request, so it's not cached with the card
- Cache _tag using the bubble and the account
- New model behavior: touch Account when tags are added or removed
- New controller action: "new" for taggings toggles, which renders the _tag partial
- Updating taggings responds with a turbo stream response that updates the _tags frame

This is very much a parallel change to what was done with assignments
in #317.
2025-03-24 16:48:11 -04:00

24 lines
1.2 KiB
Plaintext

<% cache [ bubble, bubble.bucket ] do %>
<%= turbo_frame_tag bubble, :assignment do %>
<dialog class="popup panel flex-column align-start gap-half fill-white shadow" data-dialog-target="dialog">
<strong class="popup__title margin-block-start-half pad-inline-half txt-nowrap">Assign this to…</strong>
<%= form_with url: bucket_bubble_assignment_toggles_path(bubble.bucket, bubble), class: "flex flex-column full-width popup__list", data: { controller: "form" } do |form| %>
<% bubble.bucket.users.active.sort_by(&:name).each do |user| %>
<div class="btn popup__item">
<%= form.check_box "assignee_id[]", {
checked: bubble.assigned_to?(user),
data: { action: "change->form#submit" },
id: dom_id(user, :assign),
include_hidden: false,
}, user.id %>
<%= form.label "assignee_id[]", user.name, for: dom_id(user, :assign), class: "overflow-ellipsis" %>
<%= image_tag "check.svg", aria: { hidden: true }, size: 18, class: "checked flex-item-justify-end" %>
</div>
<% end %>
<% end %>
</dialog>
<% end %>
<% end %>