<% cache bubble do %>
<%= link_to bubble.bucket.name, bubbles_path(bucket_ids: [ bubble.bucket ]), class: "card__bucket txt-uppercase overflow-ellipsis txt-reversed" %> <%= render "bubbles/tags", bubble: bubble %>

<% if bubble.published? %> <%= turbo_frame_tag bubble, :edit do %> <%= link_to bubble_title(bubble), edit_bucket_bubble_path(bubble.bucket, bubble), class: "card__title-link overflow-line-clamp" %> <% end %> <% else %> <%= form_with model: bubble, url: bucket_bubble_path(bubble.bucket, bubble), id: "bubble_form", data: { controller: "auto-save" } do |form| %> <%= form.text_area :title, placeholder: "Name it…", class: "input input--textarea full-width borderless txt-align-start #{ "fill-highlight" if bubble.creating? }", autofocus: bubble.title.blank?, data: { action: "auto-save#change blur->auto-save#submit keydown.enter->auto-save#submit:prevent keydown.ctrl+enter->auto-save#submit:prevent" } %> <% end %> <% end %>

<%= link_to bucket_bubble_path(bubble.bucket, bubble), class: "card__link" do %> <%= bubble.title %> <% end %>
<%= turbo_frame_tag dom_id(bubble, :stage_picker), src: new_bucket_bubble_stage_picker_path(bubble.bucket, bubble) %>
<%= image_tag bubble.image.presence || "", size: 120, data: { upload_preview_target: "image" } %>
<% if bubble.popped? %>
Completed <%= bubble.popped_at.strftime("%b %d, %Y") %> by <%= bubble.popped_by.name %>
<% end %>
<% end %>