From 51f559b332fb4e2d5382ecf558fb84f9efeb1dc2 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 20 Oct 2025 19:37:19 +0300 Subject: [PATCH] feat(client/search): apply full-width for collection view --- apps/client/src/widgets/note_wrapper.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/note_wrapper.ts b/apps/client/src/widgets/note_wrapper.ts index 619f8cda4..01a1f7c87 100644 --- a/apps/client/src/widgets/note_wrapper.ts +++ b/apps/client/src/widgets/note_wrapper.ts @@ -78,6 +78,10 @@ export default class NoteWrapperWidget extends FlexContainer { return true; } + if (note.type === "search" && ![ "grid", "list" ].includes(note.getLabelValue("viewType") ?? "list")) { + return true; + } + return !!note?.isLabelTruthy("fullContentWidth"); } @@ -87,7 +91,7 @@ export default class NoteWrapperWidget extends FlexContainer { const noteId = this.noteContext?.noteId; if ( loadResults.isNoteReloaded(noteId) || - loadResults.getAttributeRows().find((attr) => attr.type === "label" && ["cssClass", "language"].includes(attr.name ?? "") && attributeService.isAffecting(attr, this.noteContext?.note)) + loadResults.getAttributeRows().find((attr) => attr.type === "label" && ["cssClass", "language", "viewType"].includes(attr.name ?? "") && attributeService.isAffecting(attr, this.noteContext?.note)) ) { this.refresh(); }