Skip to content

Build your personal knowledge base with Trilium Notes

search help dropdown button

zadam7aadd57d2fce
diff --git a/package-lock.json b/package-lock.json
index eddc86023b..3e4efe33d3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -7918,9 +7918,9 @@
}
},
"ws": {
- "version": "7.4.1",
- "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.1.tgz",
- "integrity": "sha512-pTsP8UAfhy3sk1lSk/O/s4tjD0CRwvMnzvwr4OKGX7ZvqZtUyx4KIJB5JWbkykPoc55tixMGgTNoh3k4FkNGFQ=="
+ "version": "7.4.2",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.2.tgz",
+ "integrity": "sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA=="
},
"xdg-basedir": {
"version": "4.0.0",
diff --git a/package.json b/package.json
index ceb0f4cf90..75ca943108 100644
--- a/package.json
+++ b/package.json
@@ -71,7 +71,7 @@
"turndown": "7.0.0",
"turndown-plugin-gfm": "1.0.2",
"unescape": "1.0.1",
- "ws": "7.4.1",
+ "ws": "7.4.2",
"yauzl": "2.10.0",
"yazl": "2.5.1"
},
diff --git a/src/public/app/widgets/search_definition.js b/src/public/app/widgets/search_definition.js
index 73b42bc73e..22d1f0066e 100644
--- a/src/public/app/widgets/search_definition.js
+++ b/src/public/app/widgets/search_definition.js
@@ -1,9 +1,6 @@
-import TypeWidget from "./type_widgets/type_widget.js";
import noteAutocompleteService from "../services/note_autocomplete.js";
import SpacedUpdate from "../services/spaced_update.js";
import server from "../services/server.js";
-import toastService from "../services/toast.js";
-import NoteListRenderer from "../services/note_list_renderer.js";
import TabAwareWidget from "./tab_aware_widget.js";
import treeCache from "../services/tree_cache.js";
@@ -42,6 +39,26 @@ const TPL = `
<td colspan="3">
<input type="text" class="form-control search-string">
</td>
+ <td>
+ <div class="dropdown">
+ <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ ?
+ </button>
+ <div class="dropdown-menu dropdown-menu-right p-4" style="width: 500px;">
+ <strong>Search tips</strong> - also see <button class="btn btn-sm" type="button" data-help-page="Search">complete help on search</button>
+ <p>
+ <ul>
+ <li>Just enter any text for full text search</li>
+ <li><code>#abc</code> - returns notes with label abc</li>
+ <li><code>#year = 2019</code> - matches notes with label <code>year</code> having value <code>2019</code></li>
+ <li><code>#rock #pop</code> - matches notes which have both <code>rock</code> and <code>pop</code> labels</li>
+ <li><code>#rock or #pop</code> - only one of the labels must be present</li>
+ <li><code>#year &lt;= 2000</code> - numerical comparison (also &gt;, &gt;=, &lt;).</li>
+ <li><code>note.dateCreated >= MONTH-1</code> - notes created in the last month</li>
+ </ul>
+ </p>
+ </div>
+ </td>
</tr>
<tr>
<td>Limit search to subtree:</td>
@@ -76,6 +93,7 @@ export default class SearchDefinitionWidget extends TabAwareWidget {
doRender() {
this.$widget = $(TPL);
this.contentSized();
+ this.overflowing();
this.$searchString = this.$widget.find(".search-string");
this.$searchString.on('input', () => this.spacedUpdate.scheduleUpdate());
diff --git a/src/public/app/widgets/type_widgets/book.js b/src/public/app/widgets/type_widgets/book.js
index aca93d3c38..dc39368c7d 100644
--- a/src/public/app/widgets/type_widgets/book.js
+++ b/src/public/app/widgets/type_widgets/book.js
@@ -1,4 +1,3 @@
-import NoteListRenderer from "../../services/note_list_renderer.js";
import TypeWidget from "./type_widget.js";
const TPL = `
diff --git a/src/public/app/widgets/type_widgets/editable_code.js b/src/public/app/widgets/type_widgets/editable_code.js
index 96be79f00e..c54a4efad2 100644
--- a/src/public/app/widgets/type_widgets/editable_code.js
+++ b/src/public/app/widgets/type_widgets/editable_code.js
@@ -1,9 +1,6 @@
import libraryLoader from "../../services/library_loader.js";
import TypeWidget from "./type_widget.js";
import keyboardActionService from "../../services/keyboard_actions.js";
-import server from "../../services/server.js";
-import toastService from "../../services/toast.js";
-import utils from "../../services/utils.js";
const TPL = `
<div class="note-detail-code note-detail-printable">
diff --git a/src/public/app/widgets/type_widgets/read_only_code.js b/src/public/app/widgets/type_widgets/read_only_code.js
index afe6d4580f..47b36be7db 100644
--- a/src/public/app/widgets/type_widgets/read_only_code.js
+++ b/src/public/app/widgets/type_widgets/read_only_code.js
@@ -4,8 +4,6 @@ const TPL = `
<div class="note-detail-read-only-code note-detail-printable">
<style>
.note-detail-read-only-code {
- overflow: auto;
- height: 100%;
position: relative;
}
diff --git a/src/public/app/widgets/type_widgets/read_only_text.js b/src/public/app/widgets/type_widgets/read_only_text.js
index 365ae78fd8..aecc83267e 100644
--- a/src/public/app/widgets/type_widgets/read_only_text.js
+++ b/src/public/app/widgets/type_widgets/read_only_text.js
@@ -15,8 +15,6 @@ const TPL = `
.note-detail-readonly-text h6 { font-size: 1.1em; }
.note-detail-readonly-text {
- overflow: auto;
- height: 100%;
padding: 10px;
font-family: var(--detail-text-font-family);
position: relative;
diff --git a/src/public/app/widgets/type_widgets/render.js b/src/public/app/widgets/type_widgets/render.js
index 78484b5b52..98c433381f 100644
--- a/src/public/app/widgets/type_widgets/render.js
+++ b/src/public/app/widgets/type_widgets/render.js
@@ -3,12 +3,6 @@ import TypeWidget from "./type_widget.js";
const TPL = `
<div class="note-detail-render note-detail-printable">
- <style>
- .note-detail-render {
- height: 100%;
- }
- </style>
-
<div class="note-detail-render-help alert alert-warning" style="margin: 50px; padding: 20px;">
<p><strong>This help note is shown because this note of type Render HTML doesn't have required relation to function properly.</strong></p>