Skip to content

Build your personal knowledge base with Trilium Notes

style(jump-to-note): fade the results out under the search field

Elian Doran98afdbe55aba
diff --git a/apps/client/src/stylesheets/theme-next/dialogs.css b/apps/client/src/stylesheets/theme-next/dialogs.css
index 9cee6b44bc..97fb65352b 100644
--- a/apps/client/src/stylesheets/theme-next/dialogs.css
+++ b/apps/client/src/stylesheets/theme-next/dialogs.css
@@ -138,6 +138,7 @@ div.tn-tool-dialog {
.jump-to-note-dialog .modal-content {
--bs-modal-header-padding-x: 0;
--jump-to-note-padding: 20px;
+ --jump-to-note-fade: 20px;
box-shadow: 0 10px 20px rgba(0, 0, 0, var(--dropdown-shadow-opacity));
border: 1px solid var(--dropdown-border-color);
@@ -148,7 +149,7 @@ div.tn-tool-dialog {
.jump-to-note-dialog .modal-header {
padding: unset !important;
- padding-bottom: 26px !important;
+ padding-bottom: calc(26px - var(--jump-to-note-fade)) !important;
}
.jump-to-note-dialog .modal-body {
@@ -160,8 +161,11 @@ div.tn-tool-dialog {
width: auto;
margin-inline-end: calc(0px - var(--jump-to-note-padding));
padding-inline-end: var(--jump-to-note-padding);
+ --scroll-fade-top: var(--jump-to-note-fade);
+ padding-top: var(--jump-to-note-fade);
padding-bottom: var(--jump-to-note-padding);
scroll-padding-bottom: var(--jump-to-note-padding);
+ scroll-padding-top: var(--jump-to-note-fade);
}
/* Search box wrapper */
diff --git a/apps/client/src/widgets/react/NoteAutocomplete.tsx b/apps/client/src/widgets/react/NoteAutocomplete.tsx
index c8464dd776..c5d7a67103 100644
--- a/apps/client/src/widgets/react/NoteAutocomplete.tsx
+++ b/apps/client/src/widgets/react/NoteAutocomplete.tsx
@@ -351,7 +351,8 @@ function NoteSuggestionList({ autocomplete, searchingFor }: {
}) {
return (
<span
- className="aa-dropdown-menu"
+ // Faded at an edge only where a host sets `--scroll-fade-top` or `--scroll-fade-bottom`.
+ className="aa-dropdown-menu scroll-edge-fade"
role="listbox"
// Keeps the input focused, so its blur does not close the list before the click lands
// on a suggestion.