From 9fcee9cc53044c8cdb158ccf0205c3bd3e1dc41c Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 5 Dec 2025 11:59:08 +0200 Subject: [PATCH 1/2] Fix (NoteMap): map overflows when switching type in ribbon (#7939) --- apps/client/src/widgets/note_map/NoteMap.tsx | 6 +++--- apps/client/src/widgets/ribbon/NoteMapTab.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/client/src/widgets/note_map/NoteMap.tsx b/apps/client/src/widgets/note_map/NoteMap.tsx index 1c503c363..12e15202d 100644 --- a/apps/client/src/widgets/note_map/NoteMap.tsx +++ b/apps/client/src/widgets/note_map/NoteMap.tsx @@ -95,13 +95,13 @@ export default function NoteMap({ note, widgetMode, parentRef }: NoteMapProps) { if (!graphRef.current || !notesAndRelationsRef.current) return; graphRef.current.d3Force("link")?.distance(linkDistance); graphRef.current.graphData(notesAndRelationsRef.current); - }, [ linkDistance ]); + }, [ linkDistance, mapType ]); // React to container size useEffect(() => { if (!containerSize || !graphRef.current) return; graphRef.current.width(containerSize.width).height(containerSize.height); - }, [ containerSize?.width, containerSize?.height ]); + }, [ containerSize?.width, containerSize?.height, mapType ]); // Fixing nodes when dragged. useEffect(() => { @@ -114,7 +114,7 @@ export default function NoteMap({ note, widgetMode, parentRef }: NoteMapProps) { node.fy = undefined; } }) - }, [ fixNodes ]); + }, [ fixNodes, mapType ]); return (
diff --git a/apps/client/src/widgets/ribbon/NoteMapTab.tsx b/apps/client/src/widgets/ribbon/NoteMapTab.tsx index ec7f4a749..c803dfa02 100644 --- a/apps/client/src/widgets/ribbon/NoteMapTab.tsx +++ b/apps/client/src/widgets/ribbon/NoteMapTab.tsx @@ -29,14 +29,14 @@ export default function NoteMapTab({ note }: TabContext) { {!isExpanded ? ( setExpanded(true)} /> ) : ( setExpanded(false)} From 982fb212e431cd09e2acd07240e09bd793e62440 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 5 Dec 2025 12:19:12 +0200 Subject: [PATCH 2/2] docs(release): update change log for #7939 --- docs/Release Notes/!!!meta.json | 2 +- docs/Release Notes/Release Notes/v0.100.0.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/Release Notes/!!!meta.json b/docs/Release Notes/!!!meta.json index 9d2190fcd..0f4246575 100644 --- a/docs/Release Notes/!!!meta.json +++ b/docs/Release Notes/!!!meta.json @@ -1,6 +1,6 @@ { "formatVersion": 2, - "appVersion": "0.99.5", + "appVersion": "0.100.0", "files": [ { "isClone": false, diff --git a/docs/Release Notes/Release Notes/v0.100.0.md b/docs/Release Notes/Release Notes/v0.100.0.md index 8626db6ac..2c4023cbf 100644 --- a/docs/Release Notes/Release Notes/v0.100.0.md +++ b/docs/Release Notes/Release Notes/v0.100.0.md @@ -85,6 +85,7 @@ * Switching an existing note (with children) to mindmap type will still display preview cards for its children. * Clarify converting notes to attachments in tree context menu (better message, disable option when not supported). * Note actions: some menu items disabled when switching note type. +* [Note map: map overflows when switching type in ribbon](https://github.com/TriliumNext/Trilium/pull/7939) by @SiriusXT ## ✨ Improvements