feat: add filter by list (status) in list view

Adds a per-list filter to the board action bar, visible only in
List View. Mirrors the existing transient label/member filter
pattern: filterLists is a many-relation on the Board ORM model,
toggled via entry actions and reset on board navigation. Empty
selection keeps the current behavior; non-empty selection shows
only cards whose listId is in the chosen set. Filter UI is hidden
in Kanban/Grid views where columns already convey the same info.

Closes #1524
This commit is contained in:
Symon
2026-05-02 09:24:48 +03:00
parent a8dcd7cef3
commit 401c0412cb
16 changed files with 421 additions and 0 deletions
+16
View File
@@ -63,6 +63,7 @@ export default class extends BaseModel {
}),
filterUsers: many('User', 'filterBoards'),
filterLabels: many('Label', 'filterBoards'),
filterLists: many('List', 'filterBoards'),
};
static reducer({ type, payload }, Board) {
@@ -253,6 +254,14 @@ export default class extends BaseModel {
case ActionTypes.LABEL_FROM_BOARD_FILTER_REMOVE:
Board.withId(payload.boardId).filterLabels.remove(payload.id);
break;
case ActionTypes.LIST_TO_BOARD_FILTER_ADD:
Board.withId(payload.boardId).filterLists.add(payload.id);
break;
case ActionTypes.LIST_FROM_BOARD_FILTER_REMOVE:
Board.withId(payload.boardId).filterLists.remove(payload.id);
break;
case ActionTypes.ACTIVITIES_IN_BOARD_FETCH:
Board.withId(payload.boardId).update({
@@ -389,6 +398,12 @@ export default class extends BaseModel {
});
}
const filterListIds = this.filterLists.toRefArray().map((list) => list.id);
if (filterListIds.length > 0) {
cardModels = cardModels.filter((cardModel) => filterListIds.includes(cardModel.listId));
}
return cardModels;
}
@@ -444,6 +459,7 @@ export default class extends BaseModel {
deleteClearable() {
this.filterUsers.clear();
this.filterLabels.clear();
this.filterLists.clear();
}
deleteRelated(exceptMemberUserId, soft) {