fix(web): stop board swaps from nesting the full board inside the grid
Status-change actions (detail panel buttons and drag-and-drop) targeted #kanban-board with innerHTML, but the handlers return the full _KanbanBoard partial including the #board-content wrapper and filter bar. Each action nested a new board inside the grid, duplicating the filter chips and collapsing the layout. Target #board-content with outerHTML instead, matching the filter bar and create-task form. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
@using TaskTracker.Api.Pages
|
@using TaskTracker.Api.Pages
|
||||||
@using TaskTracker.Core.Enums
|
@using TaskTracker.Core.Enums
|
||||||
@model TaskTracker.Core.Entities.WorkTask
|
@model TaskTracker.Core.Entities.WorkTask
|
||||||
|
|
||||||
@@ -192,15 +192,15 @@
|
|||||||
{
|
{
|
||||||
case WorkTaskStatus.Pending:
|
case WorkTaskStatus.Pending:
|
||||||
<button hx-put="/board?handler=Start&id=@Model.Id"
|
<button hx-put="/board?handler=Start&id=@Model.Id"
|
||||||
hx-target="#kanban-board"
|
hx-target="#board-content"
|
||||||
hx-swap="innerHTML"
|
hx-swap="outerHTML"
|
||||||
class="btn btn--primary btn--full"
|
class="btn btn--primary btn--full"
|
||||||
onclick="closeDetailPanel()">
|
onclick="closeDetailPanel()">
|
||||||
Start
|
Start
|
||||||
</button>
|
</button>
|
||||||
<button hx-delete="/board?handler=Abandon&id=@Model.Id"
|
<button hx-delete="/board?handler=Abandon&id=@Model.Id"
|
||||||
hx-target="#kanban-board"
|
hx-target="#board-content"
|
||||||
hx-swap="innerHTML"
|
hx-swap="outerHTML"
|
||||||
class="btn btn--danger btn--full"
|
class="btn btn--danger btn--full"
|
||||||
onclick="closeDetailPanel()">
|
onclick="closeDetailPanel()">
|
||||||
Abandon
|
Abandon
|
||||||
@@ -209,22 +209,22 @@
|
|||||||
|
|
||||||
case WorkTaskStatus.Active:
|
case WorkTaskStatus.Active:
|
||||||
<button hx-put="/board?handler=Pause&id=@Model.Id"
|
<button hx-put="/board?handler=Pause&id=@Model.Id"
|
||||||
hx-target="#kanban-board"
|
hx-target="#board-content"
|
||||||
hx-swap="innerHTML"
|
hx-swap="outerHTML"
|
||||||
class="btn btn--amber btn--full"
|
class="btn btn--amber btn--full"
|
||||||
onclick="closeDetailPanel()">
|
onclick="closeDetailPanel()">
|
||||||
Pause
|
Pause
|
||||||
</button>
|
</button>
|
||||||
<button hx-put="/board?handler=Complete&id=@Model.Id"
|
<button hx-put="/board?handler=Complete&id=@Model.Id"
|
||||||
hx-target="#kanban-board"
|
hx-target="#board-content"
|
||||||
hx-swap="innerHTML"
|
hx-swap="outerHTML"
|
||||||
class="btn btn--emerald btn--full"
|
class="btn btn--emerald btn--full"
|
||||||
onclick="closeDetailPanel()">
|
onclick="closeDetailPanel()">
|
||||||
Complete
|
Complete
|
||||||
</button>
|
</button>
|
||||||
<button hx-delete="/board?handler=Abandon&id=@Model.Id"
|
<button hx-delete="/board?handler=Abandon&id=@Model.Id"
|
||||||
hx-target="#kanban-board"
|
hx-target="#board-content"
|
||||||
hx-swap="innerHTML"
|
hx-swap="outerHTML"
|
||||||
class="btn btn--danger btn--full"
|
class="btn btn--danger btn--full"
|
||||||
onclick="closeDetailPanel()">
|
onclick="closeDetailPanel()">
|
||||||
Abandon
|
Abandon
|
||||||
@@ -233,22 +233,22 @@
|
|||||||
|
|
||||||
case WorkTaskStatus.Paused:
|
case WorkTaskStatus.Paused:
|
||||||
<button hx-put="/board?handler=Resume&id=@Model.Id"
|
<button hx-put="/board?handler=Resume&id=@Model.Id"
|
||||||
hx-target="#kanban-board"
|
hx-target="#board-content"
|
||||||
hx-swap="innerHTML"
|
hx-swap="outerHTML"
|
||||||
class="btn btn--primary btn--full"
|
class="btn btn--primary btn--full"
|
||||||
onclick="closeDetailPanel()">
|
onclick="closeDetailPanel()">
|
||||||
Resume
|
Resume
|
||||||
</button>
|
</button>
|
||||||
<button hx-put="/board?handler=Complete&id=@Model.Id"
|
<button hx-put="/board?handler=Complete&id=@Model.Id"
|
||||||
hx-target="#kanban-board"
|
hx-target="#board-content"
|
||||||
hx-swap="innerHTML"
|
hx-swap="outerHTML"
|
||||||
class="btn btn--emerald btn--full"
|
class="btn btn--emerald btn--full"
|
||||||
onclick="closeDetailPanel()">
|
onclick="closeDetailPanel()">
|
||||||
Complete
|
Complete
|
||||||
</button>
|
</button>
|
||||||
<button hx-delete="/board?handler=Abandon&id=@Model.Id"
|
<button hx-delete="/board?handler=Abandon&id=@Model.Id"
|
||||||
hx-target="#kanban-board"
|
hx-target="#board-content"
|
||||||
hx-swap="innerHTML"
|
hx-swap="outerHTML"
|
||||||
class="btn btn--danger btn--full"
|
class="btn btn--danger btn--full"
|
||||||
onclick="closeDetailPanel()">
|
onclick="closeDetailPanel()">
|
||||||
Abandon
|
Abandon
|
||||||
|
|||||||
@@ -47,8 +47,8 @@
|
|||||||
|
|
||||||
// Fire htmx request to update the task status
|
// Fire htmx request to update the task status
|
||||||
htmx.ajax('PUT', '/board?handler=' + handler + '&id=' + taskId, {
|
htmx.ajax('PUT', '/board?handler=' + handler + '&id=' + taskId, {
|
||||||
target: '#kanban-board',
|
target: '#board-content',
|
||||||
swap: 'innerHTML'
|
swap: 'outerHTML'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user