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
feat(task-states): open task/config state notes in the tree popup
Elian Doran1c1953995353
diff --git a/apps/client/src/services/task_states.ts b/apps/client/src/services/task_states.tsindex 6e4b5b8c7a..18f3f11c9c 100644--- a/apps/client/src/services/task_states.ts+++ b/apps/client/src/services/task_states.ts@@ -70,7 +70,10 @@ export async function getTaskStateDefinitions(): Promise<TaskStateDef[]> {return valid.length ? valid : DEFAULT_TASK_STATES;}-/** Opens the "Task States" configuration note in a new tab, hoisted to it. */+/** Opens the "Task States" configuration subtree in a tree-sidebar popup, hoisted to it. */export function openCustomTaskStateConfig(): void {- void appContext.tabManager.openInNewTab(TASK_STATES_CONTAINER_ID, TASK_STATES_CONTAINER_ID, true);+ void appContext.triggerCommand("openInTreePopup", {+ noteIdOrPath: TASK_STATES_CONTAINER_ID,+ hoistedNoteId: TASK_STATES_CONTAINER_ID+ });}diff --git a/apps/client/src/widgets/type_widgets/options/components/RelatedSettings.tsx b/apps/client/src/widgets/type_widgets/options/components/RelatedSettings.tsxindex c1dabc3983..b0762ca34d 100644--- a/apps/client/src/widgets/type_widgets/options/components/RelatedSettings.tsx+++ b/apps/client/src/widgets/type_widgets/options/components/RelatedSettings.tsx@@ -40,12 +40,12 @@ export default function RelatedSettings({ items }: RelatedSettingsProps) {noContainedNavigation={!!targetNoteId}onClick={targetNoteId? (e) => {- // Hidden-subtree config notes open hoisted, in their own tab.+ // Hidden-subtree config notes open hoisted, in a tree-sidebar popup.// stopPropagation keeps the global `a` click handler// (link.ts `goToLink`) from navigating by href instead.e.preventDefault();e.stopPropagation();- void appContext.tabManager.openInNewTab(targetNoteId, targetNoteId, true);+ void appContext.triggerCommand("openInTreePopup", { noteIdOrPath: targetNoteId, hoistedNoteId: targetNoteId });}: undefined}/>