mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-08 07:40:08 +09:00
c48083dcfe
Showing an image's preview when its variant had already been made tied the cached message to state that changes without touching it: a variant made after the message was cached would never show. It also cost a query per embedded image, since Action Text loads the embeds without their variant records. Nothing in the app makes those variants, so the partial no longer looks at them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bj8KnxpTf9sj2Ysa8aLAVa
14 lines
713 B
Plaintext
14 lines
713 B
Plaintext
<%# Files are posted as a message's own attachment, which gets its preview when it's posted; the composer adds none to
|
|
the rich text. One that's there anyway is shown by its name, with no preview: Action Text's partial links to a URL
|
|
that makes one on view, and nothing else in the app would make it. %>
|
|
<figure class="attachment attachment--file attachment--<%= blob.filename.extension %>">
|
|
<figcaption class="attachment__caption">
|
|
<% if caption = blob.try(:caption) %>
|
|
<%= caption %>
|
|
<% else %>
|
|
<span class="attachment__name"><%= blob.filename %></span>
|
|
<span class="attachment__size"><%= number_to_human_size blob.byte_size %></span>
|
|
<% end %>
|
|
</figcaption>
|
|
</figure>
|