fizzy icon indicating copy to clipboard operation
fizzy copied to clipboard

Fix: board columns actions are stale when moving a column moves

Open tomycostantino opened this issue 2 weeks ago • 1 comments

Problem

When creating or destroying a column or moving it either right or left, the views/boards/show/menu/_column_form.html.erb partial of already existing columns is stale, so the action buttons inside the form are either disabled or actionable when should not be the case.

How to reproduce

  1. Create a new board and navigate to it.
  2. Create a new column.
  3. Create another column.
  4. Expand the first created column by clicking on it.
  5. Open the action menu by clicking on the ellipsis icon.
  6. The action button to move it right is disabled although it can be moved right.
  7. Delete the first created column.
  8. Expand the second created column.
  9. Open the action menu by clicking on it.
  10. The action button to move the column left is still enabled, even though there is nothing to the left side.

Demonstration video

https://github.com/user-attachments/assets/d43090e7-0870-447a-9b24-903e2181de44

Solution

Refresh board columns on move right/left and create/destroy actions. I extracted the update logic into the views/columns/_refresh_surroundings.turbo_stream.erb which is rendered by other streams.

tomycostantino avatar Dec 09 '25 09:12 tomycostantino

Hey @jorgemanrubia thank you for reviewing! Just made the changes you've requested, and fixed the bug referenced in the issue. Here's how it looks:

https://github.com/user-attachments/assets/730a17f2-7fb7-435c-9b7f-b1154f57aad8

tomycostantino avatar Dec 11 '25 09:12 tomycostantino