Files
fizzy/app/views/bubbles/_messages.html.erb
T
David Heinemeier Hansson 8e0394a090 Lets just preload all avatars for now
They are small, they cache well, scrolling will be less jittery. Small
cost in bandwidth for that.
2025-04-07 13:29:59 +02:00

19 lines
751 B
Plaintext

<%= messages_tag(bubble) do %>
<%= render partial: "messages/message", collection: bubble.messages, cached: true %>
<%= render "comments/new", bubble: bubble, cached: true %>
<div class="comments__subscribers flex flex-column margin-block txt-align-start full-width">
<strong class="txt-uppercase">Subscribers</strong>
<p class="margin-none-block-start margin-block-end-half">
<%= pluralize(@bubble.watchers.count, "person") %> will be notified when someone comments on this.
</p>
<div class="flex align-center flex-wrap gap-half max-width txt-normal">
<% prepend_current_user_to(@bubble.watchers.alphabetically).each do |watcher| %>
<%= avatar_tag watcher %>
<% end %>
</div>
</div>
<% end %>