From 93e59cc3b6bd7628d376be0e260a0b928ae43b13 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 21 Feb 2026 18:49:55 +0200 Subject: [PATCH 1/8] fix(search): "no results" item not shown --- apps/client/src/widgets/search_result.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/client/src/widgets/search_result.tsx b/apps/client/src/widgets/search_result.tsx index 3049d5292d..384c602e3a 100644 --- a/apps/client/src/widgets/search_result.tsx +++ b/apps/client/src/widgets/search_result.tsx @@ -1,9 +1,12 @@ +import "./search_result.css"; + +import clsx from "clsx"; import { useEffect, useState } from "preact/hooks"; + import { t } from "../services/i18n"; +import { SearchNoteList } from "./collections/NoteList"; import Alert from "./react/Alert"; import { useNoteContext, useTriliumEvent } from "./react/hooks"; -import "./search_result.css"; -import { SearchNoteList } from "./collections/NoteList"; enum SearchResultState { NO_RESULTS, @@ -42,7 +45,7 @@ export default function SearchResult() { }); return ( -
+
{state === SearchResultState.NOT_EXECUTED && ( {t("search_result.search_not_executed")} )} From 16ed14f85ac4311766cb134bffc5bb92d7ef24e4 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 21 Feb 2026 18:51:16 +0200 Subject: [PATCH 2/8] feat(search): use `NoItems` for not executed & no results --- apps/client/src/widgets/search_result.css | 5 ----- apps/client/src/widgets/search_result.tsx | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/apps/client/src/widgets/search_result.css b/apps/client/src/widgets/search_result.css index 6ac3447547..ad0c027ffe 100644 --- a/apps/client/src/widgets/search_result.css +++ b/apps/client/src/widgets/search_result.css @@ -9,8 +9,3 @@ .search-result-widget .note-list { padding: 10px; } - -.search-no-results, .search-not-executed-yet { - margin: 20px; - padding: 20px !important; -} \ No newline at end of file diff --git a/apps/client/src/widgets/search_result.tsx b/apps/client/src/widgets/search_result.tsx index 384c602e3a..5bd1c72701 100644 --- a/apps/client/src/widgets/search_result.tsx +++ b/apps/client/src/widgets/search_result.tsx @@ -5,8 +5,8 @@ import { useEffect, useState } from "preact/hooks"; import { t } from "../services/i18n"; import { SearchNoteList } from "./collections/NoteList"; -import Alert from "./react/Alert"; import { useNoteContext, useTriliumEvent } from "./react/hooks"; +import NoItems from "./react/NoItems"; enum SearchResultState { NO_RESULTS, @@ -47,11 +47,11 @@ export default function SearchResult() { return (
{state === SearchResultState.NOT_EXECUTED && ( - {t("search_result.search_not_executed")} + )} {state === SearchResultState.NO_RESULTS && ( - {t("search_result.no_notes_found")} + )} {state === SearchResultState.GOT_RESULTS && ( From d7b585230a1db2cbed0178ef6453cf5bb7675b19 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 21 Feb 2026 18:56:07 +0200 Subject: [PATCH 3/8] fix(search): double scrollbars --- apps/client/src/widgets/search_result.css | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/client/src/widgets/search_result.css b/apps/client/src/widgets/search_result.css index ad0c027ffe..19b2537030 100644 --- a/apps/client/src/widgets/search_result.css +++ b/apps/client/src/widgets/search_result.css @@ -1,8 +1,6 @@ .search-result-widget { flex-grow: 100000; flex-shrink: 100000; - height: 100%; - overflow: auto; contain: none !important; } From 94eb19d87969e7a45129a1bdb5d03c6a2c16a7d8 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 21 Feb 2026 18:59:13 +0200 Subject: [PATCH 4/8] feat(search): center no results vertically --- apps/client/src/widgets/search_result.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/client/src/widgets/search_result.css b/apps/client/src/widgets/search_result.css index 19b2537030..13acf04e9d 100644 --- a/apps/client/src/widgets/search_result.css +++ b/apps/client/src/widgets/search_result.css @@ -7,3 +7,8 @@ .search-result-widget .note-list { padding: 10px; } + +.note-split.type-search .scrolling-container { + display: flex; + flex-direction: column; +} From d9eafff7df277d9a09244f599be16e06209edc1f Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 21 Feb 2026 19:02:29 +0200 Subject: [PATCH 5/8] style(client): improve no items size and alignment --- apps/client/src/widgets/react/NoItems.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/react/NoItems.css b/apps/client/src/widgets/react/NoItems.css index f9876db6c4..f3cc6c6553 100644 --- a/apps/client/src/widgets/react/NoItems.css +++ b/apps/client/src/widgets/react/NoItems.css @@ -7,9 +7,11 @@ padding: 0.75em; color: var(--muted-text-color); height: 100%; + text-align: center; .tn-icon { - font-size: 3em; + font-size: 4em; + margin-bottom: 1rem; } button { From e9c9b456e0f7472b31f9dbfabc103a018d0af5d9 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 21 Feb 2026 19:15:42 +0200 Subject: [PATCH 6/8] feat(search): add button to search now --- .../src/translations/en/translation.json | 2 +- apps/client/src/widgets/search_result.tsx | 25 +++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json index 377a287183..9fd5f604d0 100644 --- a/apps/client/src/translations/en/translation.json +++ b/apps/client/src/translations/en/translation.json @@ -1824,7 +1824,7 @@ }, "search_result": { "no_notes_found": "No notes have been found for given search parameters.", - "search_not_executed": "Search has not been executed yet. Click on \"Search\" button above to see the results." + "search_not_executed": "Search has not been executed yet." }, "spacer": { "configure_launchbar": "Configure Launchbar" diff --git a/apps/client/src/widgets/search_result.tsx b/apps/client/src/widgets/search_result.tsx index 5bd1c72701..57e45b6930 100644 --- a/apps/client/src/widgets/search_result.tsx +++ b/apps/client/src/widgets/search_result.tsx @@ -3,8 +3,12 @@ import "./search_result.css"; import clsx from "clsx"; import { useEffect, useState } from "preact/hooks"; +import froca from "../services/froca"; import { t } from "../services/i18n"; +import toast from "../services/toast"; +import { getErrorMessage } from "../services/utils"; import { SearchNoteList } from "./collections/NoteList"; +import Button from "./react/Button"; import { useNoteContext, useTriliumEvent } from "./react/hooks"; import NoItems from "./react/NoItems"; @@ -15,7 +19,7 @@ enum SearchResultState { } export default function SearchResult() { - const { note, notePath, ntxId } = useNoteContext(); + const { note, notePath, ntxId, parentComponent } = useNoteContext(); const [ state, setState ] = useState(); const [ highlightedTokens, setHighlightedTokens ] = useState(); @@ -47,7 +51,24 @@ export default function SearchResult() { return (
{state === SearchResultState.NOT_EXECUTED && ( - + +