Move thread to its own partial

This commit is contained in:
Jose Farias
2024-10-23 14:28:21 -06:00
parent 5221807847
commit 3e5b902e76
3 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -3,5 +3,5 @@
<% end %>
<%= turbo_stream.replace dom_id(@bubble, :thread) do %>
<%= render @bubble.thread %>
<%= render "bubbles/thread", bubble: @bubble %>
<% end %>
+4
View File
@@ -0,0 +1,4 @@
<section id="<%= dom_id(bubble, :thread) %>" class="comments align-center center borderless margin flex flex-column gap-half" style="--bubble-color: <%= bubble.color %>;">
<%= render partial: "thread_entries/thread_entry", collection: bubble.thread.entries, cache: true %>
<%= render "comments/new", bubble: bubble %>
</section>
+1 -4
View File
@@ -19,8 +19,5 @@
<%= render "bubbles/bubble", bubble: @bubble %>
</div>
<section id="<%= dom_id(@bubble, :thread) %>" class="comments align-center center borderless margin flex flex-column gap-half" style="--bubble-color: <%= @bubble.color %>;">
<%= render partial: "thread_entries/thread_entry", collection: @bubble.thread.entries, cache: true %>
<%= render "comments/new", bubble: @bubble %>
</section>
<%= render "bubbles/thread", bubble: @bubble %>
<% end %>