@@ -40,12 +50,16 @@ const GrammarNodesRoute = ({
resolveLabel={resolveLabel}
/>
- {node ? (
-
- ) : (
+ {!node ? (
+ ) : subPage === nodeConfigSegmentIds.index ? (
+
+ ) : subPage === nodeConfigSegmentIds.template ? (
+
+ ) : (
+
)}
diff --git a/apps/roam/src/components/settings/NodeConfig.tsx b/apps/roam/src/components/settings/NodeConfig.tsx
index b4114b63b..4f0672a86 100644
--- a/apps/roam/src/components/settings/NodeConfig.tsx
+++ b/apps/roam/src/components/settings/NodeConfig.tsx
@@ -1,13 +1,9 @@
import React, { useState, useCallback, useEffect, useRef } from "react";
import getDiscourseNodes, { DiscourseNode } from "~/utils/getDiscourseNodes";
-import DualWriteBlocksPanel from "./components/EphemeralBlocksPanel";
import { getSubTree } from "roamjs-components/util";
import Description from "~/components/settings/SettingsDescription";
import {
Label,
- Tabs,
- Tab,
- TabId,
InputGroup,
ControlGroup,
Tooltip,
@@ -18,8 +14,6 @@ import DiscourseNodeAttributes from "./DiscourseNodeAttributes";
import DiscourseNodeCanvasSettings, {
formatHexColor,
} from "./DiscourseNodeCanvasSettings";
-import DiscourseNodeIndex from "./DiscourseNodeIndex";
-import { OnloadArgs } from "roamjs-components/types";
import setInputSetting from "roamjs-components/util/setInputSetting";
import {
getDiscourseNodeSetting,
@@ -30,7 +24,6 @@ import {
CANVAS_KEYS,
DISCOURSE_NODE_KEYS,
SPECIFICATION_KEYS,
- TEMPLATE_SETTING_KEYS,
} from "~/components/settings/utils/settingKeys";
import DiscourseNodeSuggestiveRules from "./DiscourseNodeSuggestiveRules";
import { getNodeTagStyles } from "~/utils/getDiscourseNodeColors";
@@ -40,6 +33,10 @@ import {
DiscourseNodeSelectPanel,
} from "./components/BlockPropSettingPanels";
import { ROAM_DOCS, withDocsLink } from "./utils/docs";
+import { SettingsGroup } from "./components/SettingsHeadings";
+import SettingsDrillDownRow from "./components/SettingsDrillDownRow";
+import { useSettingsNav } from "./navigation/SettingsNavContext";
+import { nodeConfigSegmentIds } from "./utils/settingsNavigation";
export const getCleanTagText = (tag: string): string => {
return tag.replace(/^#+/, "").trim().toUpperCase();
@@ -168,13 +165,7 @@ const generateTagPlaceholder = (node: DiscourseNode): string => {
return `#${nodeTextPrefix}-candidate`; // Evidence = #evi-candidate
};
-const NodeConfig = ({
- node,
- onloadArgs,
-}: {
- node: DiscourseNode;
- onloadArgs: OnloadArgs;
-}) => {
+const NodeConfig = ({ node }: { node: DiscourseNode }) => {
const getUid = (key: string) =>
getSubTree({
parentUid: node.type,
@@ -184,19 +175,17 @@ const NodeConfig = ({
const descriptionUid = getUid("Description");
const shortcutUid = getUid("Shortcut");
const tagUid = getUid("Tag");
- const templateUid = getUid("Template");
const overlayUid = getUid("Overlay");
const canvasUid = getUid("Canvas");
const graphOverviewUid = getUid("Graph Overview");
const specificationUid = getUid("Specification");
- const indexUid = getUid("Index");
const suggestiveRulesUid = getUid("Suggestive Rules");
const attributeNode = getSubTree({
parentUid: node.type,
key: "Attributes",
});
- const [selectedTabId, setSelectedTabId] = useState