From b4e80987ee61caf78cec17990e6df304c7f9edf5 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Tue, 28 Oct 2025 17:06:17 -0500 Subject: [PATCH] Add a placeholder to reduce flashing on load/update --- app/views/cards/container/footer/_published.html.erb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/views/cards/container/footer/_published.html.erb b/app/views/cards/container/footer/_published.html.erb index ec2fe6527..72d01fdbf 100644 --- a/app/views/cards/container/footer/_published.html.erb +++ b/app/views/cards/container/footer/_published.html.erb @@ -1,7 +1,15 @@ <%# FIXME: Let's move this aside outside of the card container section so these frames don't reload/flicker when card is replaced %>
- <%= turbo_frame_tag card, :watch, src: card_watch_path(card), target: "_top", refresh: :morph %> - <%= turbo_frame_tag card, :pin, src: card_pin_path(card), refresh: :morph %> + <%= turbo_frame_tag card, :watch, src: card_watch_path(card), target: "_top", refresh: :morph do %> + <%= button_to card_watch_path(card), class: "btn", data: { controller: "tooltip" } do %> + <%= icon_tag "bell-off" %> Watch this + <% end %> + <% end %> + <%= turbo_frame_tag card, :pin, src: card_pin_path(card), refresh: :morph do %> + <%= button_to card_pin_path(card), class: "btn", data: { controller: "tooltip" } do %> + <%= icon_tag "unpinned" %> Pin this card + <% end %> + <% end %>
<%= render "cards/container/closure", card: card %>