Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
client/collections/board/search & filtering: fix comments
Adorian Doran507ed3464fec
diff --git a/apps/client/src/widgets/collections/board/api.ts b/apps/client/src/widgets/collections/board/api.tsindex 5041021126..ded9c542d9 100644--- a/apps/client/src/widgets/collections/board/api.ts+++ b/apps/client/src/widgets/collections/board/api.ts@@ -1140,12 +1140,7 @@ export default class BoardApi {return attributes.removeOwnedLabelByName(note, this.statusAttribute);}- /**- * Moves a card to the end of another column, where a new one would go.- *- * A card sent across by the keyboard is aimed at no card in particular, unlike a drop, so it- * goes where the reader would look for it.- */+ /** Moves a card to the end of another column, where a card sent by the keyboard belongs. */async moveToColumnEnd(noteId: string, branchId: string, targetColumn: string) {// What is already at the end, as far as this instance can know: nothing waits for the board// to redraw between two keystrokes, so the column map still shows the target as it wasdiff --git a/apps/client/src/widgets/collections/board/index.tsx b/apps/client/src/widgets/collections/board/index.tsxindex 71e2f10592..0c8307ebef 100644--- a/apps/client/src/widgets/collections/board/index.tsx+++ b/apps/client/src/widgets/collections/board/index.tsx@@ -573,10 +573,8 @@ export default function BoardView({ note: parentNote, noteIds, viewConfig, saveConCardEnd: (card, position) => {const branchId = byColumn?.get(card.fromColumn)?.[card.index]?.branch.branchId;if (position && branchId && byColumn && allByColumn) {- // Drawn where it landed at once, and held there until both writes are in: each of- // them lands a redraw, and the first would show the card at the top of the column.- // Written into the full column, which is what the cards are drawn from, at the- // place the move is written against rather than the one it was dropped at.+ // Drawn at once, into `allByColumn` since that is what `byColumn` derives from, at+ // the index `unfilteredCardIndex` translates rather than the visible drop index.setAllByColumn(applyCardMove(allByColumn, card.noteId, card.fromColumn, position.column,unfilteredCardIndex(diff --git a/apps/client/src/widgets/collections/collection_filter.spec.tsx b/apps/client/src/widgets/collections/collection_filter.spec.tsxindex 4cd7baf0f9..c1aa3ae248 100644--- a/apps/client/src/widgets/collections/collection_filter.spec.tsx+++ b/apps/client/src/widgets/collections/collection_filter.spec.tsx@@ -165,7 +165,7 @@ describe("useCollectionFilter", () => {searchInSubtree.mockReturnValueOnce(stored);await mount({ persistedQuery: "#done" });- // Nothing may be drawn yet: the matches the board would narrow to are still unknown.+ // Nothing must be drawn yet: the matches the board would narrow to are still unknown.expect(currentFilter?.isResolvingStoredQuery).toBe(true);await act(async () => {