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
global note map should not rehoist
zadam0f822b2761e9
diff --git a/src/public/app/components/note_context.js b/src/public/app/components/note_context.jsindex 6b4bc62b64..aafda843b7 100644--- a/src/public/app/components/note_context.js+++ b/src/public/app/components/note_context.js@@ -61,8 +61,11 @@ class NoteContext extends Component {console.log(resolvedNotePath, "resolvedNotePath");- if (this.hoistedNoteId === 'root' && this.notePath.startsWith("root/hidden")) {- // hidden subtree displays only when hoisted so it doesn't make sense to keep root as hoisted note+ if (this.hoistedNoteId === 'root'+ && this.notePath.startsWith("root/hidden")+ && !this.note.hasLabel("keepCurrentHoisting")+ ) {+ // hidden subtree displays only when hoisted, so it doesn't make sense to keep root as hoisted notelet hoistedNoteId = 'hidden';diff --git a/src/services/builtin_attributes.js b/src/services/builtin_attributes.jsindex e1eb571aa6..43f67cea29 100644--- a/src/services/builtin_attributes.js+++ b/src/services/builtin_attributes.js@@ -60,6 +60,7 @@ module.exports = [{ type: 'label', name: 'template' },{ type: 'label', name: 'toc' },{ type: 'label', name: 'color' },+ { type: 'label', name: 'keepCurrentHoisting'},// relation names{ type: 'relation', name: 'internalLink' },diff --git a/src/services/hidden_subtree.js b/src/services/hidden_subtree.jsindex f99c4976d2..64800471c7 100644--- a/src/services/hidden_subtree.js+++ b/src/services/hidden_subtree.js@@ -36,7 +36,8 @@ const HIDDEN_SUBTREE_DEFINITION = {title: 'Note Map',type: 'noteMap',attributes: [- { type: 'label', name: 'mapRootId', value: 'hoisted' }+ { type: 'label', name: 'mapRootNoteId', value: 'hoisted' },+ { type: 'label', name: 'keepCurrentHoisting' }]},{