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(client): the note map takes the connections tab's leftover height
Elian Doran99dffde2c494
diff --git a/apps/client/src/widgets/Backlinks.css b/apps/client/src/widgets/Backlinks.cssindex 713d11a787..e944dfd289 100644--- a/apps/client/src/widgets/Backlinks.css+++ b/apps/client/src/widgets/Backlinks.css@@ -100,17 +100,3 @@font-size: .85em;}}--/* The placeholder for a note nothing points at stands in the list as an item of it, so that it is- held by whichever container the list is given (see BacklinksList in FloatingButtonsDefinitions).- The card it stands in within the sidebar takes the height the tab leaves over, and the placeholder- is handed that height down the chain — it is the card's whole answer, not the first row of a list- that isn't there. */-#right-pane .tn-backlinks-widget:has(.backlinks-empty),-#right-pane .tn-backlinks-widget .backlinks-items:has(.backlinks-empty),-#right-pane .backlinks-empty {- display: flex;- flex-direction: column;- flex-grow: 1;- min-height: 0;-}diff --git a/apps/client/src/widgets/sidebar/Backlinks.tsx b/apps/client/src/widgets/sidebar/Backlinks.tsxindex 2cbd51abc9..cef117fbc4 100644--- a/apps/client/src/widgets/sidebar/Backlinks.tsx+++ b/apps/client/src/widgets/sidebar/Backlinks.tsx@@ -14,7 +14,6 @@ export default function Backlinks() {id="backlinks"title={t("right_pane.backlinks")}buttons={<SidebarHelp section="backlinks" />}- grow>{note && <BacklinksWidget note={note} />}</RightPanelWidget>diff --git a/apps/client/src/widgets/sidebar/NoteMap.tsx b/apps/client/src/widgets/sidebar/NoteMap.tsxindex 4616a01266..0ba0e4eb44 100644--- a/apps/client/src/widgets/sidebar/NoteMap.tsx+++ b/apps/client/src/widgets/sidebar/NoteMap.tsx@@ -23,9 +23,9 @@ import SidebarHelp from "./SidebarHelp";* pane keeps its controls in its header, and a map this small has little room to stand buttons over.* The map reads the same option, so the two stay of one mind without being told.*- * It grows, sharing the room the tab's lists leave over with the backlinks below them and taking all- * of it where they are collapsed — a map is worth whatever height it is given, and there is no height- * at which it is finished being read. Where it stops is in NoteMap.css.+ * It is the one card of the tab that grows, taking whatever room the lists below it leave over — a+ * map is worth whatever height it is given, and there is no height at which it is finished being+ * read, which is true of none of the lists. Where it stops being squeezed is in NoteMap.css.*/export default function NoteMap() {const { notePath } = useActiveNoteContext();diff --git a/apps/client/src/widgets/sidebar/RightPanelContainer.tsx b/apps/client/src/widgets/sidebar/RightPanelContainer.tsxindex 71571fd932..68d58b8cfa 100644--- a/apps/client/src/widgets/sidebar/RightPanelContainer.tsx+++ b/apps/client/src/widgets/sidebar/RightPanelContainer.tsx@@ -225,7 +225,7 @@ function useItems(rightPaneVisible: boolean, widgetsByParent: WidgetsByParent):},{// Where the note sits in the tree, above what points at it: placements first, then the- // backlinks below take whatever height is left.+ // backlinks below.el: <NotePaths />,enabled: !!note,tab: "connections"diff --git a/apps/client/src/widgets/sidebar/RightPanelWidget.tsx b/apps/client/src/widgets/sidebar/RightPanelWidget.tsxindex ba1eb29f9f..b5a38cf580 100644--- a/apps/client/src/widgets/sidebar/RightPanelWidget.tsx+++ b/apps/client/src/widgets/sidebar/RightPanelWidget.tsx@@ -38,10 +38,9 @@ interface RightPanelWidgetProps {* keeping to the height of the content. Use for the one widget a tab is really about — a note's own* attributes, its table of contents, the chat — so that the rest keep to their content around it.*- * Two of them in a tab share the leftover height between them, each keeping its own floor — the- * connections tab's map and backlinks, a PDF's outline and its pages. Ask for it once more than- * that and none of them is left with room worth having. It lapses while the widget is collapsed,- * so the others move up to fill the room.+ * Two of them in a tab share the leftover height between them, each keeping its own floor — a+ * PDF's outline and its pages. Ask for it once more than that and none of them is left with room+ * worth having. It lapses while the widget is collapsed, so the others move up to fill the room.*/grow?: boolean;/**