From a33e97bc52c42fde96d3765435ad2489ef514403 Mon Sep 17 00:00:00 2001 From: Trang Doan Date: Wed, 25 Mar 2026 17:01:36 -0400 Subject: [PATCH 1/2] add Datacore dependency callout in plugin settings Shows a warning banner at the top of the settings page when the Datacore plugin is not installed/enabled, with a link to install it. Co-Authored-By: Claude Opus 4.6 --- .../src/components/DatacoreCallout.tsx | 33 +++++++++++++++++++ apps/obsidian/src/components/Settings.tsx | 2 ++ apps/obsidian/src/services/QueryEngine.ts | 2 +- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 apps/obsidian/src/components/DatacoreCallout.tsx diff --git a/apps/obsidian/src/components/DatacoreCallout.tsx b/apps/obsidian/src/components/DatacoreCallout.tsx new file mode 100644 index 000000000..6c4526a8f --- /dev/null +++ b/apps/obsidian/src/components/DatacoreCallout.tsx @@ -0,0 +1,33 @@ +import { useState, useEffect, useCallback } from "react"; +import { useApp } from "./AppContext"; +import { AppWithPlugins } from "~/services/QueryEngine"; + +export const DatacoreCallout = () => { + const app = useApp(); + + const datacorePlugin = (app as AppWithPlugins)?.plugins?.plugins?.[ + "datacore" + ]; + + if (datacorePlugin) return null; + + return ( +
+
+ ⚠️ Datacore plugin required +
+
+

+ The Datacore plugin is required for Discourse Graphs to function. + Please install and enable it. +

+ + Install Datacore + +
+
+ ); +}; diff --git a/apps/obsidian/src/components/Settings.tsx b/apps/obsidian/src/components/Settings.tsx index 811e3d355..eed9e31c1 100644 --- a/apps/obsidian/src/components/Settings.tsx +++ b/apps/obsidian/src/components/Settings.tsx @@ -9,6 +9,7 @@ import NodeTypeSettings from "./NodeTypeSettings"; import GeneralSettings from "./GeneralSettings"; import { AdminPanelSettings } from "./AdminPanelSettings"; import { PluginProvider } from "./PluginContext"; +import { DatacoreCallout } from "./DatacoreCallout"; const Settings = () => { const [activeTab, setActiveTab] = useState("general"); @@ -29,6 +30,7 @@ const Settings = () => { return (
+