Skip to content

Commit c7f62a2

Browse files
trangdoan982claude
andauthored
[ENG-1459] Obsidian plugin store prep PART 1 (#848)
* fix(obsidian): address plugin store submission requirements + UI text + commands - Update manifest.json description to start with verb and end with period (SR-4, SR-5) - Remove top-level "Discourse Graph Settings" heading (PG-UI7, PG-UI8) - Remove default hotkey Mod+\ from open-node-type-menu command (PG-C14) - Replace workspace.activeLeaf with getActiveViewOfType() (PG-W16) - Add PLUGIN_STORE_SUBMISSION.md and PR_SUMMARY.md tracking docs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Revise PLUGIN_STORE_SUBMISSION.md for clarity and updates Updated submission document to reflect changes addressing failed criteria and improved clarity on plugin guidelines. * remove PR_SUMMARY.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * lint --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c605bce commit c7f62a2

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

apps/obsidian/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "Discourse Graph",
44
"version": "0.1.0",
55
"minAppVersion": "1.7.0",
6-
"description": "Discourse Graph Plugin for Obsidian",
6+
"description": "Add semantic structure to your notes with the Discourse Graph protocol.",
77
"author": "Discourse Graphs",
88
"authorUrl": "https://discoursegraphs.com",
99
"isDesktopOnly": false

apps/obsidian/src/components/Settings.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const Settings = () => {
2929

3030
return (
3131
<div className="flex flex-col gap-4">
32-
<h2 className="dg-h2">Discourse Graph Settings</h2>
3332
<div className="border-modifier-border flex w-full overflow-x-auto border-b p-2">
3433
<button
3534
onClick={() => setActiveTab("general")}

apps/obsidian/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,6 @@ export default class DiscourseGraphPlugin extends Plugin {
410410
this.fileChangeListener.cleanup();
411411
this.fileChangeListener = null;
412412
}
413-
414413
this.app.workspace.detachLeavesOfType(VIEW_TYPE_DISCOURSE_CONTEXT);
415414
}
416415
}

apps/obsidian/src/utils/registerCommands.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { syncAllNodesAndRelations } from "./syncDgNodesToSupabase";
1212
import { publishNode } from "./publishNode";
1313
import { addRelationIfRequested } from "~/components/canvas/utils/relationJsonUtils";
1414
import type { DiscourseNode } from "~/types";
15+
import { TldrawView } from "~/components/canvas/TldrawView";
1516

1617
type ModifyNodeSubmitParams = {
1718
nodeType: DiscourseNode;
@@ -60,7 +61,6 @@ export const registerCommands = (plugin: DiscourseGraphPlugin) => {
6061
plugin.addCommand({
6162
id: "open-node-type-menu",
6263
name: "Open node type menu",
63-
hotkeys: [{ modifiers: ["Mod"], key: "\\" }],
6464
editorCallback: (editor: Editor) => {
6565
const hasSelection = !!editor.getSelection();
6666

@@ -187,7 +187,7 @@ export const registerCommands = (plugin: DiscourseGraphPlugin) => {
187187
id: "switch-to-tldraw-edit",
188188
name: "Switch to discourse markdown edit",
189189
checkCallback: (checking: boolean) => {
190-
const leaf = plugin.app.workspace.activeLeaf;
190+
const leaf = plugin.app.workspace.getActiveViewOfType(TldrawView)?.leaf;
191191
if (!leaf) return false;
192192

193193
if (!checking) {
@@ -204,7 +204,7 @@ export const registerCommands = (plugin: DiscourseGraphPlugin) => {
204204
id: "switch-to-tldraw-preview",
205205
name: "Switch to Discourse Graph canvas view",
206206
checkCallback: (checking: boolean) => {
207-
const leaf = plugin.app.workspace.activeLeaf;
207+
const leaf = plugin.app.workspace.getActiveViewOfType(MarkdownView)?.leaf;
208208
if (!leaf) return false;
209209

210210
if (!checking) {

0 commit comments

Comments
 (0)