Use page refreshes with morphing to avoid flickering

Replacing the card container will reload the frame. Also, see
https://github.com/basecamp/fizzy/commit/5b70320a6b64adf2d1e0be4bd7dc221a5ba80c95
This commit is contained in:
Jorge Manrubia
2025-11-03 16:01:59 +01:00
parent 995dcfe8e6
commit 00818697ef
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -5,11 +5,11 @@ class Cards::TriagesController < ApplicationController
column = @card.collection.columns.find(params[:column_id])
@card.triage_into(column)
render_card_replacement
redirect_to @card
end
def destroy
@card.send_back_to_triage
render_card_replacement
redirect_to @card
end
end
@@ -12,7 +12,7 @@ class Cards::TriagesControllerTest < ActionDispatch::IntegrationTest
assert_changes -> { card.reload.column }, from: original_column, to: column do
post card_triage_path(card, column_id: column.id)
assert_card_container_rerendered(card)
assert_redirected_to card
end
end
@@ -20,8 +20,8 @@ class Cards::TriagesControllerTest < ActionDispatch::IntegrationTest
card = cards(:shipping)
assert_changes -> { card.reload.column }, to: nil do
delete card_triage_path(card)
assert_card_container_rerendered(card)
delete card_triage_path(card), as: :turbo_stream
assert_redirected_to card
end
end
end