Skip to content

Build your personal knowledge base with Trilium Notes

style(search): draw "Show in full search" as a plain button

Elian Doran04e6f89201ea
diff --git a/apps/client/src/widgets/quick_search.css b/apps/client/src/widgets/quick_search.css
index 8c72cee4ca..6cc70e1f96 100644
--- a/apps/client/src/widgets/quick_search.css
+++ b/apps/client/src/widgets/quick_search.css
@@ -155,10 +155,6 @@
.show-in-full-search {
margin-inline-start: auto;
}
-
- kbd {
- padding: .1875rem .375rem;
- }
}
.dropdown-item {
diff --git a/apps/client/src/widgets/quick_search.spec.tsx b/apps/client/src/widgets/quick_search.spec.tsx
index 94557a087a..5857c92666 100644
--- a/apps/client/src/widgets/quick_search.spec.tsx
+++ b/apps/client/src/widgets/quick_search.spec.tsx
@@ -371,6 +371,8 @@ describe("QuickSearch", () => {
expect(footer?.classList.contains("quick-search-footer")).toBe(true);
const button = footer?.querySelector<HTMLButtonElement>(".show-in-full-search");
if (!button) throw new Error("The footer has no full search button.");
+ // Its key is in the shortcut hints, not on the button.
+ expect(button.querySelector("kbd")).toBeNull();
await act(async () => button.click());
expect(triggerCommand).toHaveBeenCalledWith("searchNotes", { searchString: "#book AND tolkien" });
diff --git a/apps/client/src/widgets/quick_search.tsx b/apps/client/src/widgets/quick_search.tsx
index c794df8ca8..c3326dd101 100644
--- a/apps/client/src/widgets/quick_search.tsx
+++ b/apps/client/src/widgets/quick_search.tsx
@@ -195,7 +195,6 @@ export default function QuickSearch() {
<Button
className="show-in-full-search"
text={t("quick-search.show-in-full-search")}
- keyboardShortcut="Ctrl+Enter"
size="small"
onClick={showInFullSearch}
/>
diff --git a/apps/client/src/widgets/react/NoteAutocomplete.spec.tsx b/apps/client/src/widgets/react/NoteAutocomplete.spec.tsx
index 8ac0b27351..61c88d6253 100644
--- a/apps/client/src/widgets/react/NoteAutocomplete.spec.tsx
+++ b/apps/client/src/widgets/react/NoteAutocomplete.spec.tsx
@@ -804,6 +804,9 @@ describe("NoteAutocomplete's suggestion list", () => {
// The footer under the list opens the full search, reported for the host to close on.
const footer = host.querySelector<HTMLButtonElement>(".note-suggestion-footer button.show-in-full-search");
+ // A plain button, as quick search's: its key is in the shortcut hints.
+ expect(footer).not.toBeNull();
+ expect(footer?.querySelector("kbd, .tn-icon")).toBeNull();
await act(async () => { footer?.click(); });
expect(triggerCommand).toHaveBeenCalledWith("searchNotes", { searchString: "alp" });
expect(onChange).toHaveBeenLastCalledWith({ action: "search-notes", noteTitle: "alp" });
diff --git a/apps/client/src/widgets/react/NoteAutocomplete.tsx b/apps/client/src/widgets/react/NoteAutocomplete.tsx
index ab99c0f467..8d632be704 100644
--- a/apps/client/src/widgets/react/NoteAutocomplete.tsx
+++ b/apps/client/src/widgets/react/NoteAutocomplete.tsx
@@ -383,9 +383,7 @@ export default function NoteAutocomplete({ id, inputRef: externalInputRef, text,
className="show-in-full-search"
kind="lowProfile"
size="small"
- icon="bx-file-find"
text={t("quick-search.show-in-full-search")}
- keyboardShortcut="Ctrl+Enter"
onClick={() => showInFullSearch(value.trim())}
/>}
</div>