Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(mobile): step out of a workspace instead of into its note
Elian Doranb3a8d126a515
diff --git a/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.spec.tsx b/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.spec.tsxindex 3983f68b57..1bfda8cbb2 100644--- a/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.spec.tsx+++ b/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.spec.tsx@@ -7,7 +7,6 @@ import FBranch from "../../entities/fbranch";import type FNote from "../../entities/fnote";import content_renderer from "../../services/content_renderer";import froca from "../../services/froca";-import hoisted_note from "../../services/hoisted_note";import type LoadResults from "../../services/load_results";import search from "../../services/search";import { buildNote, buildNotes } from "../../test/easy-froca";@@ -160,12 +159,12 @@ describe("WorkspaceCards", () => {describe("UnhoistButton", () => {afterEach(() => vi.restoreAllMocks());- it("shows a door with the hoisted note's icon and title, and unhoists the tab", () => {- const unhoist = vi.spyOn(hoisted_note, "unhoist").mockResolvedValue();+ it("shows a door with the hoisted note's icon and title, and unhoists on a tap", () => {+ const unhoist = vi.fn();const workspace = buildNote({ title: "Work", "#workspace": "", "#workspaceIconClass": "bx bx-briefcase", "#iconClass": "bx bx-folder" });const plain = buildNote({ title: "Plain", "#iconClass": "bx bx-book" });- const button = renderInto(<UnhoistButton hoistedNoteId={workspace.noteId} />).querySelector("button");+ const button = renderInto(<UnhoistButton hoistedNoteId={workspace.noteId} onUnhoist={unhoist} />).querySelector("button");expect(button?.getAttribute("aria-label")).toBe("note_tree.unhoist");expect(button?.querySelector(".mobile-navigator-back-icon.bx-door-open")).not.toBeNull();expect(button?.querySelector(".mobile-navigator-unhoist-icon.bx-briefcase")).not.toBeNull();@@ -173,7 +172,7 @@ describe("UnhoistButton", () => {button?.click();expect(unhoist).toHaveBeenCalledTimes(1);- const plainButton = renderInto(<UnhoistButton hoistedNoteId={plain.noteId} />).querySelector("button");+ const plainButton = renderInto(<UnhoistButton hoistedNoteId={plain.noteId} onUnhoist={unhoist} />).querySelector("button");expect(plainButton?.querySelector(".mobile-navigator-unhoist-icon.bx-book")).not.toBeNull();expect(plainButton?.textContent).toBe("Plain");});diff --git a/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.tsx b/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.tsxindex d808828b79..052510e9de 100644--- a/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.tsx+++ b/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.tsx@@ -35,7 +35,7 @@ import {import Icon from "../react/Icon";import NoItems from "../react/NoItems";import { ParentComponent } from "../react/react_utils";-import { getLastSegment, getSpotlightedNoteId, getTreeStack, setTabTree } from "./tab_navigation";+import { getLastSegment, getSpotlightedNoteId, getTreeStack, leaveHoistedNote, setTabTree } from "./tab_navigation";/*** A touch-native replacement for the Fancytree-based note tree on mobile. Shows one@@ -201,6 +201,11 @@ export default function MobileNoteNavigator() {navigateTo(stack.slice(0, -1));}, [stack, navigateTo]);+ const unhoist = useCallback(() => {+ if (tabId) leaveHoistedNote(tabId, activeNotePath, effectiveHoistedId);+ void hoisted_note.unhoist();+ }, [tabId, activeNotePath, effectiveHoistedId]);+// Registered once, so a menu or dialog opened over the tree later answers back first.const isTreeShown = useRef(false);useTriliumEvent("activeScreenChanged", ({ activeScreen }) => {@@ -266,7 +271,7 @@ export default function MobileNoteNavigator() {</span></button>) : (- <UnhoistButton hoistedNoteId={effectiveHoistedId} />+ <UnhoistButton hoistedNoteId={effectiveHoistedId} onUnhoist={unhoist} />)}</div>)}@@ -458,7 +463,7 @@ export function PreviewSlot({ note, shown, hideArchived, onReady }: {* as on the hoisted note's row in the desktop tree, then the hoisted note's icon and title.* Tapping it unhoists the tab.*/-export function UnhoistButton({ hoistedNoteId }: { hoistedNoteId: string }) {+export function UnhoistButton({ hoistedNoteId, onUnhoist }: { hoistedNoteId: string, onUnhoist: () => void }) {const hoistedNote = useNote(hoistedNoteId);const hoistedNoteIcon = useNoteIcon(hoistedNote);const hoistedTitle = useNoteTitle(hoistedNoteId, undefined);@@ -469,7 +474,7 @@ export function UnhoistButton({ hoistedNoteId }: { hoistedNoteId: string }) {<buttontype="button"className="mobile-navigator-back mobile-navigator-unhoist"- onClick={() => hoisted_note.unhoist()}+ onClick={onUnhoist}aria-label={t("note_tree.unhoist")}><Icon icon="bx bx-door-open" className="mobile-navigator-back-icon" />diff --git a/apps/client/src/widgets/mobile_widgets/tab_navigation.spec.ts b/apps/client/src/widgets/mobile_widgets/tab_navigation.spec.tsindex e907137554..e49360e4e1 100644--- a/apps/client/src/widgets/mobile_widgets/tab_navigation.spec.ts+++ b/apps/client/src/widgets/mobile_widgets/tab_navigation.spec.ts@@ -1,7 +1,7 @@import { describe, expect, it } from "vitest";import { buildNotes } from "../../test/easy-froca";-import { forgetTabs, getSpotlightedNoteId, getTabNavigation, getTreeStack, setTabScreen, setTabTree } from "./tab_navigation";+import { forgetTabs, getSpotlightedNoteId, getTabNavigation, getTreeStack, leaveHoistedNote, setTabScreen, setTabTree } from "./tab_navigation";describe("tab navigation", () => {buildNotes([@@ -47,4 +47,14 @@ describe("tab navigation", () => {expect(getSpotlightedNoteId("folder/inner", "root/folder/inner/leaf")).toBe("leaf");expect(getSpotlightedNoteId("folder/inner", "root/folder/page")).toBeUndefined();});++ it("leaves a hoisted note for the column holding it, whatever note the tab shows", () => {+ const notePath = "root/folder/inner/leaf";+ leaveHoistedNote("leaving", notePath, "inner");+ expect(getTreeStack("leaving", notePath, "root")).toEqual([ "root", "root/folder" ]);++ // A hoisted note right under the root leaves for the root.+ leaveHoistedNote("leaving", notePath, "folder");+ expect(getTreeStack("leaving", notePath, "root")).toEqual([ "root" ]);+ });});diff --git a/apps/client/src/widgets/mobile_widgets/tab_navigation.ts b/apps/client/src/widgets/mobile_widgets/tab_navigation.tsindex ecbd91987b..b9619911d7 100644--- a/apps/client/src/widgets/mobile_widgets/tab_navigation.ts+++ b/apps/client/src/widgets/mobile_widgets/tab_navigation.ts@@ -50,6 +50,18 @@ export function getTreeStack(tabId: string | null | undefined, notePath: stringreturn buildStackForActiveNote(notePath, hoistedNoteId);}+/**+ * Leaves the tree of `tabId` on the column holding `hoistedNoteId` once the tab unhoists, as a step+ * up out of the hoisted note, instead of the column of the note the tab shows. Runs before the+ * unhoisting, which keeps `notePath` open.+ */+export function leaveHoistedNote(tabId: string, notePath: string | null | undefined, hoistedNoteId: string) {+ const segments = notePath?.split("/") ?? [];+ const parentSegments = segments.slice(0, Math.max(segments.indexOf(hoistedNoteId), 1));+ const stack = parentSegments.map((_, index) => parentSegments.slice(0, index + 1).join("/"));+ setTabTree(tabId, { notePath, hoistedNoteId: "root", stack: stack.length ? stack : [ "root" ] });+}+/*** The child of the column at `columnPath` that leads to `notePath`, which a column with* `#subtreeHidden` still lists, as the desktop tree's spotlight does. A hoisted tree's `columnPath`diff --git a/apps/server/src/assets/help/help_content.json b/apps/server/src/assets/help/help_content.jsonindex f0dd7633b2..c974a20835 100644--- a/apps/server/src/assets/help/help_content.json+++ b/apps/server/src/assets/help/help_content.json@@ -87,7 +87,7 @@"_help_Oxyb6jOjjVNL": "<h2>Progressive Search Strategy</h2><p>Trilium uses a progressive search strategy that performs exact matching first, then adds fuzzy matching when needed.</p><p>The search has three phases:</p><ol><li><strong>Phase 1 - Exact Matching</strong>: When you search, Trilium first looks for exact matches of your search terms. This handles the vast majority of searches (90%+) and returns results almost instantly.</li><li><strong>Phase 2 - Fuzzy Fallback</strong>: If Phase 1 doesn't find enough high-quality results (fewer than 5 results with good relevance scores), Trilium automatically adds fuzzy matching to find results with typos or spelling variations.</li><li><strong>Result Ordering</strong>: Exact matches always appear before fuzzy matches, regardless of individual scores. This ensures that when you search for \"project\", notes containing the exact word \"project\" will appear before notes containing similar words like \"projects\" or \"projection\".</li></ol><h3>Progressive Search Behavior</h3><ul><li><strong>Speed</strong>: Most searches complete using only exact matching</li><li><strong>Ordering</strong>: Exact matches appear before fuzzy matches</li><li><strong>Fallback</strong>: Fuzzy matching activates when exact matches return fewer than 5 results</li><li><strong>Identification</strong>: Results indicate whether they are exact or fuzzy matches</li></ul><h2>Search Performance</h2><p>Search system specifications:</p><ul><li>Content size limit: 10MB per note (previously 50KB)</li><li>Edit distance calculations for fuzzy matching</li><li>Infinite scrolling in Quick Search</li></ul><h2>Label and Relation Shortcuts</h2><p>The \"full\" syntax for searching by labels is:</p><pre><code class=\"language-text-x-trilium-auto\">note.labels.publicationYear = 1954</code></pre><p>For relations:</p><pre><code class=\"language-text-x-trilium-auto\">note.relations.author.title *=* Tolkien</code></pre><p>However, common label and relation searches have shortcut syntax:</p><pre><code class=\"language-text-x-trilium-auto\">#publicationYear = 1954\n~author.title *=* Tolkien</code></pre><h2>Separating Full-Text and Attribute Parts</h2><p>Search syntax allows combining full-text search with attribute-based search. For example, <code>tolkien #book</code> contains:</p><ol><li>Full-text tokens - <code>tolkien</code></li><li>Attribute expressions - <code>#book</code></li></ol><p>Trilium detects the separation between full text search and attribute/property search by looking for certain special characters or words that denote attributes and properties (e.g., #, ~, note.). If you need to include these in full-text search, escape them with a backslash so they are processed as regular text:</p><pre><code class=\"language-text-x-trilium-auto\">\"note.txt\" \n\\#hash \n#myLabel = 'Say \"Hello World\"'</code></pre><h2>Escaping Special Characters</h2><p>Special characters can be enclosed in quotes or escaped with a backslash to be used in full-text search:</p><pre><code class=\"language-text-x-trilium-auto\">\"note.txt\"\n\\#hash\n#myLabel = 'Say \"Hello World\"'</code></pre><p>Three types of quotes are supported: single, double, and backtick.</p><h2>Type Coercion</h2><p>Label values are technically strings but can be coerced for numeric comparisons:</p><pre><code class=\"language-text-x-trilium-auto\">note.dateCreated =* '2019-05'</code></pre><p>This finds notes created in May 2019. Numeric operators like <code>#publicationYear >= 1960</code> convert string values to numbers for comparison.</p>","_help_WbjlujkUhEb5": "<p>The single most common source of confusion is that the <code>=</code> sign means two <em>different</em> things depending on where it appears. Read this section once and the rest of search becomes predictable.</p><p>There are three matching modes:</p><figure class=\"table\"><table><thead><tr><th>Mode</th><th>How you trigger it</th><th>What it matches</th><th>Substring?</th><th>Fuzzy (typos)?</th></tr></thead><tbody><tr><td><strong>Default</strong></td><td>type words with no prefix</td><td>whole words <em>and</em> substrings, anywhere in title, content or attributes, relevance-ranked</td><td>Yes</td><td>Yes</td></tr><tr><td><strong>Exact full-text</strong></td><td>a leading <code>=</code> (e.g. <code>=sync</code>)</td><td>the exact whole word or phrase, ignoring surrounding punctuation</td><td>No</td><td>No</td></tr><tr><td><strong>Attribute / property equality</strong></td><td><code>=</code> inside a <code>#label=value</code> or <code>note.property=value</code> clause</td><td>the <em>entire</em> attribute or property value, exactly</td><td>No</td><td>No</td></tr></tbody></table></figure><h3>Default matching (no prefix)</h3><p><strong>Rule:</strong> typing words with no prefix finds notes that contain those words anywhere in the title, content or attributes, as whole words or as substrings. The closest matches are ranked first.</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Example note content</th><th>Matches?</th><th>Why</th></tr></thead><tbody><tr><td><code>sync</code></td><td><code>please sync the folders</code></td><td>Yes (ranked higher)</td><td>contains the exact word <code>sync</code></td></tr><tr><td><code>sync</code></td><td><code>synchronize the database now</code></td><td>Yes (ranked lower)</td><td><code>sync</code> is a substring of <code>synchronize</code></td></tr></tbody></table></figure><h3>Exact match with the <code>=</code> prefix</h3><p><strong>Rule:</strong> a leading <code>=</code> switches the full-text search to exact matching. It finds the whole word or phrase only, ignoring surrounding punctuation, with <strong>no</strong> substring and <strong>no</strong> fuzzy matching. Use it when a normal search returns too many near-matches.</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Example note content</th><th>Matches?</th><th>Why</th></tr></thead><tbody><tr><td><code>=sync</code></td><td><code>see (sync) mode</code></td><td>Yes</td><td><code>(sync)</code> is the whole word <code>sync</code>; punctuation is ignored</td></tr><tr><td><code>=sync</code></td><td><code>in sync, then continue</code></td><td>Yes</td><td><code>sync,</code> is the whole word <code>sync</code></td></tr><tr><td><code>=sync</code></td><td><code>he said \"sync\" out loud</code></td><td>Yes</td><td><code>\"sync\"</code> is the whole word <code>sync</code></td></tr><tr><td><code>=sync</code></td><td><code>synchronize the database now</code></td><td>No</td><td><code>=</code> never matches substrings</td></tr><tr><td><code>=sync</code></td><td><code>please send the file</code></td><td>No</td><td><code>=</code> never matches typos / fuzzy</td></tr></tbody></table></figure><p>To match an exact <strong>phrase</strong>, quote it after the <code>=</code> (single, double or backtick quotes all work). The phrase must appear as consecutive words, but punctuation between or around them is ignored:</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Example note (title or content)</th><th>Matches?</th><th>Why</th></tr></thead><tbody><tr><td><code>=\"project plan\"</code></td><td>title <code>Project Plan</code></td><td>Yes</td><td>the title is exactly the phrase</td></tr><tr><td><code>=\"project plan\"</code></td><td><code>the (project plan) is ready to share</code></td><td>Yes</td><td>the consecutive phrase appears; punctuation is ignored</td></tr><tr><td><code>=\"project plan\"</code></td><td><code>the plan for this project is late</code></td><td>No</td><td>the words are present but not consecutive</td></tr></tbody></table></figure><h3>Attribute and property equality (<code>=</code>, <code>!=</code>)</h3><p><strong>Rule:</strong> when <code>=</code> compares an attribute or property, as in <code>#label=value</code> or <code>note.title=value</code>, it is <strong>strict full-value equality</strong>: the <em>whole</em> value must equal what you typed, ignoring case and diacritics. This is <strong>not</strong> word matching. <code>!=</code> inverts it.</p><p>The examples below assume four notes: <em>Austria</em> (<code>#capital=Vienna</code>), <em>Somewhere</em> (<code>#capital=Vienna Austria</code>), <em>Czech Republic</em> (<code>#capital=Prague</code>) and <em>Switzerland</em> (<code>#capital=Zürich</code>).</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Example label value</th><th>Matches?</th><th>Why</th></tr></thead><tbody><tr><td><code>#capital=Vienna</code></td><td><code>Vienna</code></td><td>Yes</td><td>the whole value equals <code>Vienna</code></td></tr><tr><td><code>#capital=Vienna</code></td><td><code>Vienna Austria</code></td><td>No</td><td>the whole value is <code>Vienna Austria</code>, not <code>Vienna</code></td></tr><tr><td><code>#capital=\"Vienna Austria\"</code></td><td><code>Vienna Austria</code></td><td>Yes</td><td>quote a multi-word value to match it in full</td></tr><tr><td><code>#capital=Zurich</code></td><td><code>Zürich</code></td><td>Yes</td><td>equality ignores diacritics</td></tr><tr><td><code>#capital!=Vienna</code></td><td><code>Prague</code></td><td>Yes</td><td><code>!=</code> matches every value that is not <code>Vienna</code></td></tr><tr><td><code>#capital!=Vienna</code></td><td><code>Vienna</code></td><td>No</td><td><code>!=</code> excludes the exact value</td></tr></tbody></table></figure><blockquote><p><strong>Quick search relaxes this.</strong> The <a href=\"#root/_help_Ms1nauBra7gq\">Quick search</a> bar and autocomplete treat an attribute <code>=</code> as \"contains\", so <code>#capital=Vienna</code> typed there also matches <code>Vienna Austria</code>. The strict full-value equality described here applies only in the full Search.</p></blockquote><h3>Fuzzy operators (<code>~=</code> and <code>~*</code>)</h3><p><strong>Rule:</strong> the fuzzy operators tolerate typos. <code>~=</code> (fuzzy-equals) matches a value that is a close whole-word variant of your term. <code>~*</code> (fuzzy-contains) matches when your term appears anywhere inside the value, either as a fragment or as a near-miss. Both work on note properties such as <code>note.title</code> and <code>note.content</code>, and on labels (<code>#label</code>). Fuzzy operators accept terms of at least 3 characters, though how many typos each term tolerates depends on its length — see <em>Fuzzy tolerance</em> below.</p><p>The examples assume a note titled <code>Books</code> carrying the label <code>#author=Tolkien</code>, and a note whose content is <code>learn programming today</code>.</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Example value</th><th>Matches?</th><th>Why</th></tr></thead><tbody><tr><td><code>note.title ~= boks</code></td><td>title <code>Books</code></td><td>Yes</td><td>one edit away from <code>books</code></td></tr><tr><td><code>#author ~= tolkein</code></td><td>author <code>Tolkien</code></td><td>Yes</td><td><code>tolkein</code> is a typo of <code>tolkien</code></td></tr><tr><td><code>note.content ~* progr</code></td><td><code>learn programming today</code></td><td>Yes</td><td><code>progr</code> is a fragment of <code>programming</code></td></tr><tr><td><code>note.content ~* programing</code></td><td><code>learn programming today</code></td><td>Yes</td><td><code>programing</code> is one edit from <code>programming</code></td></tr></tbody></table></figure><h3>Fuzzy tolerance</h3><p><strong>Rule:</strong> how many typos are tolerated depends on the <strong>length</strong> of your search term. Short terms must match exactly, because a single edit is enough to turn one short word into an unrelated one; longer terms have greater tolerance.</p><figure class=\"table\"><table><thead><tr><th>Term length</th><th>Edits allowed</th></tr></thead><tbody><tr><td>1–3 characters</td><td>0 (exact only)</td></tr><tr><td>4–6 characters</td><td>1</td></tr><tr><td>7+ characters</td><td>2</td></tr></tbody></table></figure><figure class=\"table\"><table><thead><tr><th>Query</th><th>Term length</th><th>Example note content</th><th>Matches?</th><th>Why</th></tr></thead><tbody><tr><td><code>cat</code></td><td>3</td><td><code>a bright red car</code></td><td>No</td><td>No edits are allowed below 4 characters, so <code>cat</code> does not reach <code>car</code></td></tr><tr><td><code>carr</code></td><td>4</td><td><code>a blue debit card</code></td><td>Yes</td><td>1 edit is within budget for 4–6 character terms</td></tr><tr><td><code>ceck</code></td><td>4</td><td><code>the latest tech trends</code></td><td>No</td><td><code>ceck</code>→<code>tech</code> needs 2 edits; only 1 is allowed at this length</td></tr><tr><td><code>combinef</code></td><td>8</td><td><code>the values were combined together</code></td><td>Yes</td><td><code>combinef</code>→<code>combined</code> is 1 edit; up to 2 are allowed at 7+ characters</td></tr></tbody></table></figure><h3>Relevance ranking</h3><p><strong>Rule:</strong> results are ordered by <em>how well</em> they match, not merely whether they match. Exact whole-word and phrase matches rank above substring and fuzzy matches, and a note where your words appear as a consecutive phrase outranks one where they are scattered.</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Ranked higher</th><th>Ranked lower</th><th>Why</th></tr></thead><tbody><tr><td><code>sync</code></td><td><code>please sync the folders</code></td><td><code>synchronize the database now</code></td><td>exact word beats substring</td></tr><tr><td><code>you and me</code></td><td><code>I like you and me as a phrase</code></td><td><code>the menu is here and you know it</code></td><td>consecutive phrase beats scattered words</td></tr></tbody></table></figure><h3>What is searchable</h3><p>A search looks at more than the visible body text. All of the following are indexed and searchable:</p><ul><li>note titles,</li><li>note body content,</li><li>labels and relations (<a href=\"#root/_help_zEY4DaJG4YT5\">attributes</a>),</li><li>link URLs and the titles/descriptions of link previews,</li><li>the titles of notes that a note reference-links to.</li></ul><p>The last point is the least obvious: if a note's only content is a reference link to another note, searching for that other note's <strong>title</strong> still finds the linking note.</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Setup</th><th>Matches?</th><th>Why</th></tr></thead><tbody><tr><td><code>special topic</code></td><td>a note whose only content is a reference link to a note titled <code>Special Topic</code></td><td>Yes, and the linked target ranks first</td><td>the target's title is indexed into the linking note's searchable text</td></tr><tr><td><code>special</code></td><td>the same note (only a reference link to <code>Special Topic</code>)</td><td>Yes, one word from the target's title is enough</td><td>the indexed title is normalized just like body text, so even one lowercased word matches</td></tr><tr><td><code>zurich</code></td><td>a note whose only content is a reference link to a note titled <code>Zürich</code></td><td>Yes</td><td>the indexed title has its accents normalized, so the plain form matches the accented title</td></tr></tbody></table></figure><h3>Diacritics</h3><p><strong>Rule:</strong> accents are normalized on both sides, so an accented word and its plain form match each other.</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Example note content</th><th>Matches?</th></tr></thead><tbody><tr><td><code>ktory</code></td><td><code>slovo ktorý znamena nieco</code></td><td>Yes</td></tr><tr><td><code>ktorý</code></td><td><code>the word ktory appears here</code></td><td>Yes</td></tr></tbody></table></figure><h3>Regular expressions (<code>%=</code>)</h3><p><strong>Rule:</strong> the <code>%=</code> operator matches a property or label value against a regular expression.</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Example note content</th><th>Matches?</th></tr></thead><tbody><tr><td><code>note.content %= 'colou?r'</code></td><td><code>my favorite color of all</code></td><td>Yes</td></tr><tr><td><code>note.content %= 'colou?r'</code></td><td><code>my favourite colour of all</code></td><td>Yes</td></tr></tbody></table></figure><p>The search on <a href=\"#root/_help_R9pX4DGra2Vt\">shared pages</a> does not accept <code>%=</code>: a query that uses it returns no results and reports an error.</p>","_help_u3YFHC9tQlpm": "<p>Frequently used notes can be bookmarked, which will make them appear in the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> for easy access.</p><h2>Configuring the launch bar</h2><p>If bookmarks don't appear in the launch bar, then most likely the bookmark section has been hidden. Go to the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> configuration from the <a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a> and ensure <em>Bookmarks</em> is in the <em>Visible Launchers</em> section.</p><h2>Bookmark folder</h2><p>Space in the left panel is limited, and you might want to bookmark many items. One possible solution is to bookmark a folder, so it shows its children:</p><p>To do this, bookmark a folder, then right click its button in the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> and check <em>Show as a folder</em>. The button then opens a menu instead of the note itself: the note is at the top, followed by its children. Uncheck <em>Show as a folder</em> to turn it back into a regular bookmark.</p><p>A child that has children of its own shows an arrow at the end of its row. Click the arrow to list its children in a submenu, or click the rest of the row to open the note. Submenus nest up to four levels deep. A menu that lists more than 15 children shows a filter field above them: type part of a title to list only the notes that match. A note whose subtree is hidden (see <a class=\"reference-link\" href=\"#root/_help_wyaGBBQrl4i3\">Hiding the subtree</a>) doesn't list its children here either.</p><p>The notes in the menu open the way links do: a middle click or <kbd>Ctrl</kbd>+click opens a note in a new tab, <kbd>Shift</kbd>+click opens it in a new window, and a right click lists the other places it can be opened in.</p><p><em>Show as a folder</em> assigns the <code>#bookmarkFolder</code> label to the note, so adding the label by hand works as well. Because the label belongs to the note, a note that is both bookmarked and dropped onto the launch bar shows its children in both places.</p><h2>Choosing where a bookmark opens</h2><p>A bookmark opens its note in the current tab. To open it somewhere else, right click its button in the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> and pick a place under <em>Open mode</em>. The place in effect is checked.</p><figure class=\"table\"><table><thead><tr><th><em>Open mode</em></th><th>Label value</th><th>Where the note opens</th></tr></thead><tbody><tr><td><em>Current tab</em></td><td><code>currentTab</code></td><td>In the current tab. This is the default.</td></tr><tr><td><em>New tab</em></td><td><code>newTab</code></td><td>In a new tab after the current one (see <a class=\"reference-link\" href=\"#root/_help_3seOhtN8uLIY\">Tabs</a>).</td></tr><tr><td><em>New split</em></td><td><code>newSplit</code></td><td>In a new split next to the current note (see <a class=\"reference-link\" href=\"#root/_help_luNhaphA37EO\">Split View</a>).</td></tr><tr><td><em>New window</em></td><td><code>newWindow</code></td><td>In a new window.</td></tr><tr><td><em>Quick edit</em></td><td><code>quickEdit</code></td><td>In a popup over the current note (see <a class=\"reference-link\" href=\"#root/_help_ZjLYv08Rp3qC\">Quick edit</a>).</td></tr></tbody></table></figure><p><em>Open mode</em> sets the <code>#bookmarkOpenMode</code> label on the note, so adding the label by hand works as well. The label works the same way for a note dropped onto the launch bar and for the notes in a bookmark folder's menu. On a folder, <em>Open mode</em> makes the label inheritable, so every note in the folder's menu and its submenus follows it, the folder's own note included (see <a class=\"reference-link\" href=\"#root/_help_bwZpz2ajCEwO\">Attribute Inheritance</a>). A note in the folder can still have a value of its own, such as <code>currentTab</code>, added by hand.</p><p>The open mode applies to a plain click only. A middle click or <kbd>Ctrl</kbd>+click still opens the note in a new tab, and <kbd>Shift</kbd>+click on a note in a folder's menu still opens it in a new window.</p><h2>Mobile</h2><p>On mobile, bookmarks are only displayed starting with v0.102.0. Because of the more constrained screen size, the bookmarks are grouped under a single icon instead of displaying them as separate icons.</p><p>When pressed, a menu will appear listing all the bookmarks. Bookmark folders are also supported and will appear as submenus. Each submenu starts with its own note, so a note with children can be opened as well as browsed.</p><p>On a phone, the bookmarks are also listed at the top of the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> while it shows the root of a tab that is not hoisted, below the <a class=\"reference-link\" href=\"#root/_help_9sRHySam5fXb\">Workspaces</a>. Tap a bookmark to open it, or, for one with children, to list them, as with the other notes of the tree.</p>",- "_help_OR8WJ7Iz9K4U": "<p>Hoisting is a standard outliner feature which allows you to focus on (or \"zoom into\") a specific note and its subtree by hiding all parent and sibling notes. Demo:</p><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Navigation/Note%20Hoisting_note-hoisting.gif\"></p><p>In addition to showing only this subtree, this also narrows both full text search and <a href=\"#root/_help_MMiBEQljMQh2\">“jump to note”</a> to just notes present in hoisted subtree.</p><h2>Showing all notes again</h2><p>While a note is hoisted, the desktop interface shows a <em>Show all notes</em> button with the <span class=\"tn-icon bx bx-arrow-back\"></span> icon above the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>. Click it to unhoist the note and see the whole tree again.</p><p>On a phone, the back button at the top level of the hoisted tree turns into a <span class=\"tn-icon bx bx-door-open\"></span> button, followed by the hoisted note's icon and title. Tap it to unhoist the note.</p><p>See also <a href=\"#root/_help_9sRHySam5fXb\">Workspace</a> which extends this feature.</p>",+ "_help_OR8WJ7Iz9K4U": "<p>Hoisting is a standard outliner feature which allows you to focus on (or \"zoom into\") a specific note and its subtree by hiding all parent and sibling notes. Demo:</p><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Navigation/Note%20Hoisting_note-hoisting.gif\"></p><p>In addition to showing only this subtree, this also narrows both full text search and <a href=\"#root/_help_MMiBEQljMQh2\">“jump to note”</a> to just notes present in hoisted subtree.</p><h2>Showing all notes again</h2><p>While a note is hoisted, the desktop interface shows a <em>Show all notes</em> button with the <span class=\"tn-icon bx bx-arrow-back\"></span> icon above the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>. Click it to unhoist the note and see the whole tree again.</p><p>On a phone, the back button at the top level of the hoisted tree turns into a <span class=\"tn-icon bx bx-door-open\"></span> button, followed by the hoisted note's icon and title. Tap it to unhoist the note; the tree then shows the level holding the hoisted note, as one more step up.</p><p>See also <a href=\"#root/_help_9sRHySam5fXb\">Workspace</a> which extends this feature.</p>","_help_ZjLYv08Rp3qC": "<figure class=\"image image-style-align-right image_resized\" style=\"width:53.13%;\"><img style=\"aspect-ratio:895/694;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Navigation/Quick%20edit_image.png\" width=\"895\" height=\"694\"></figure><p><em>Quick edit</em> provides an alternative to the standard tab-based navigation and editing.</p><p>Instead of clicking on a note which switches the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> to the newly selected note, or navigating between two different <a class=\"reference-link\" href=\"#root/_help_3seOhtN8uLIY\">Tabs</a>, the <em>Quick edit</em> feature opens as a popup window that can be easily dismissed.</p><p>This feature is also well integrated with <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a> such as the calendar view, which makes it easy to edit entries without having to go back and forth between the child note and the calendar.</p><h2>Feature highlights</h2><ul><li>All note types are supported, including <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a>.</li><li>Note that the <a class=\"reference-link\" href=\"#root/_help_0ESUbbAxVnoK\">Note List</a> will not be displayed, except for notes of type <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a>.</li><li>For <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a> notes, depending on user preference, both the floating and classic editors are supported. See <a class=\"reference-link\" href=\"#root/_help_nRhnJkTT8cPs\">Formatting toolbar</a>.</li><li>The title and the note and the icon are editable, just like a normal tab.</li><li>The note's actions and its menu are shown in the header of the popup, as in the title row of a tab.<ul><li>When other notes link to the note, a button with a link icon lists the <a class=\"reference-link\" href=\"#root/_help_wfGXLmm7x27z\">Backlinks</a>. Pressing one opens that note in the popup.</li><li>The menu items that only work in a tab are not shown: <em>Note map</em>, <em>Full width</em> and <em>Convert into attachment</em>.</li><li><em>Find</em> in the menu, or <kbd>Ctrl</kbd>+<kbd>F</kbd> on the desktop application, opens the <a class=\"reference-link\" href=\"#root/_help_McngOG2jbUWX\">Search in note</a> bar at the bottom of the popup. It searches the note in the popup, not the note in the tab behind it.</li><li>A help page opened from the popup, such as through the help button of the note type, opens in a second popup on top of it. Closing that popup returns to the note being edited.</li></ul></li><li>The <a class=\"reference-link\" href=\"#root/_help_OFXdgB2nNk1F\">Promoted Attributes</a> are also displayed.<ul><li>This integrates well with <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a> where there are predefined attributes such as the <em>Start date</em> and <em>End date</em>, allowing for easy editing.</li></ul></li></ul><h2>Accessing the quick edit</h2><ul><li>From the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>:<ul><li>Right click on a note and select <em>Quick edit</em>.</li><li>or, press <kbd>Ctrl</kbd>+<kbd>Right click</kbd> on a note.</li></ul></li><li>On <a class=\"reference-link\" href=\"#root/_help_hrZ1D00cLbal\">Internal (reference) links</a>: <ul><li>Right click and select <em>Quick edit</em>.</li><li>or, press <kbd>Ctrl</kbd>+<kbd>Right click</kbd> on the link.</li></ul></li><li>On a <a class=\"reference-link\" href=\"#root/_help_lgKX7r3aL30x\">Note Tooltip</a>, press the quick edit icon.</li><li>In <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a>:<ul><li>For <a class=\"reference-link\" href=\"#root/_help_xWbu3jpNWapp\">Calendar</a>:<ul><li>Clicking on an event will open that event for quick editing.</li><li>If the calendar is for the <a class=\"reference-link\" href=\"#root/_help_l0tKav7yLHGF\">Day Notes</a> root, clicking on the day number will open the popup for that day note.</li></ul></li><li>For <a class=\"reference-link\" href=\"#root/_help_81SGnPGMk7Xc\">Geo Map</a>:<ul><li>Clicking on a marker will open that marker, but only if the map is in read-only mode.</li></ul></li></ul></li></ul><h2>Handling of read-only notes</h2><p>The Quick edit feature has a unique behavior for <a class=\"reference-link\" href=\"#root/_help_CoFPLs3dRlXc\">Read-Only Notes</a>: </p><ul><li>If the note is read-only due to performance reasons (auto read-only), then the note is made editable for quick editing.</li><li>If the note has been manually set to read-only, then the note is read-only to prevent accidental change.<ul><li>In this case, the note can still be edited by on-screen instructions.</li></ul></li></ul><h2>Mobile support</h2><p>On a phone, the popup uses the full width of the screen and the note's content keeps the same side margin as a <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a> note. The <a class=\"reference-link\" href=\"#root/_help_nRhnJkTT8cPs\">Formatting toolbar</a> of a text note sits at the foot of the dialog, below the note; its dropdowns open upwards so the keyboard does not cover them.</p>","_help_9sRHySam5fXb": "<p>Workspace is a concept built up on top of <a href=\"#root/_help_OR8WJ7Iz9K4U\">note hoisting</a>. It is based on the idea that a user has several distinct spheres of interest. An example might be \"Personal\" and \"Work\", these two spheres are quite distinct and don't interact together. When I focus on Work, I don't really care about personal notes.</p><p>So far workspace consists of these features:</p><ul><li><p><a href=\"#root/_help_OR8WJ7Iz9K4U\">note hoisting</a> - you can \"zoom\" into a workspace subtree to focus only on the relevant notes</p></li><li><p>easy entering of workspace: </p><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Navigation/1_Workspaces_image.jpg\"></p></li><li><p>opening a workspace in a new tab: right-click the <span class=\"tn-icon bx bx-plus\"></span> button of the <a class=\"reference-link\" href=\"#root/_help_3seOhtN8uLIY\">Tabs</a> bar and select the workspace.</p></li><li><p>on a phone, the workspaces are listed at the top of the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> while it shows the root of a tab that is not hoisted, such as a new tab. Tap one to enter it, and tap the <span class=\"tn-icon bx bx-door-open\"></span> button at the top of the workspace's tree to leave it.</p></li><li><p>visual identification of workspace in tabs:<br><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Navigation/Workspaces_image.jpg\"></p></li></ul><h3>Configuration</h3><figure class=\"table\"><table><thead><tr><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>workspace</code></td><td>Marks this note as a workspace, button to enter the workspace is controlled by this</td></tr><tr><td><code>workspaceIconClass</code></td><td>defines box icon CSS class which will be used in tab when hoisted to this note, and in the menu of the tab bar's <span class=\"tn-icon bx bx-plus\"></span> button</td></tr><tr><td><code>workspaceTabBackgroundColor</code></td><td>CSS color used in the note tab when hoisted to this note, and for the workspace's icon in the menu of the tab bar's <span class=\"tn-icon bx bx-plus\"></span> button, use any CSS color format, e.g. \"lightblue\" or \"#ddd\". See <a href=\"https://www.w3schools.com/cssref/css_colors.asp\">https://www.w3schools.com/cssref/css_colors.asp</a>.</td></tr><tr><td><code>workspaceCalendarRoot</code></td><td>Marking a note with this label will define a new per-workspace calendar for <a class=\"reference-link\" href=\"#root/_help_l0tKav7yLHGF\">Day Notes</a>. If there's no such note, the global calendar will be used.</td></tr><tr><td><code>workspaceTemplate</code></td><td>This note will appear in the selection of available template when creating new note, but only when hoisted into a workspace containing this template</td></tr><tr><td><code>workspaceSearchHome</code></td><td>new search notes will be created as children of this note when hoisted to some ancestor of this workspace note</td></tr><tr><td><code>workspaceInbox</code></td><td>Default inbox location for new notes when hoisted to some ancestor of this workspace note. See <a class=\"reference-link\" href=\"#root/_help_S0Fos78ZfcY7\">Note Inbox</a> for more information.</td></tr></tbody></table></figure>","_help_xWtq5NUHOwql": "<figure class=\"image image-style-align-right image_resized\" style=\"width:50.46%;\"><img style=\"aspect-ratio:538/290;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Navigation/Similar%20Notes_image.png\" width=\"538\" height=\"290\"></figure><p>The Similar Notes feature tries to identify notes that relate to the current note by looking at the content of the notes, their relationships, as well as the date they were created.</p><p>To access the list of similar notes:</p><ul><li>Go to the <a class=\"reference-link\" href=\"#root/_help_KRlZFoIH0j6p\">Connections tab</a> in the <a class=\"reference-link\" href=\"#root/_help_RnaPdbciOfeq\">Right Sidebar</a> and look for the corresponding section.</li><li>Alternatively, press the <span class=\"tn-icon bx bx-info-circle\"></span> in the <a class=\"reference-link\" href=\"#root/_help_AlJ73vBCjWDw\">Status bar</a> and select <em>Show similar notes</em> which will open a pane at the bottom.</li><li>On the <a class=\"reference-link\" href=\"#root/_help_RDslemsQ6gCp\">Mobile Frontend</a>, open the <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a> → <em>Note info</em> and select <em>Show similar notes</em>.</li></ul><h2>Interaction</h2><ul><li>Hover over a note to see a short preview of the note.</li><li>Click over a note to open it in the current view.</li><li><kbd>Ctrl</kbd> + click a note to open it in a separate tab.</li></ul>",diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Note Hoisting.md b/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Note Hoisting.mdindex 81ceead0cb..596ec9cb3f 100644--- a/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Note Hoisting.md+++ b/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Note Hoisting.md@@ -9,6 +9,6 @@ In addition to showing only this subtree, this also narrows both full text searcWhile a note is hoisted, the desktop interface shows a _Show all notes_ button with the <span class="tn-icon bx bx-arrow-back"></span> icon above the <a class="reference-link" href="../UI%20Elements/Note%20Tree.md">Note Tree</a>. Click it to unhoist the note and see the whole tree again.-On a phone, the back button at the top level of the hoisted tree turns into a <span class="tn-icon bx bx-door-open"></span> button, followed by the hoisted note's icon and title. Tap it to unhoist the note.+On a phone, the back button at the top level of the hoisted tree turns into a <span class="tn-icon bx bx-door-open"></span> button, followed by the hoisted note's icon and title. Tap it to unhoist the note; the tree then shows the level holding the hoisted note, as one more step up.See also [Workspace](Workspaces.md) which extends this feature.\ No newline at end of file