@@ -2,7 +2,7 @@ import React, { useState } from "react";
22import { OnloadArgs } from "roamjs-components/types" ;
33import { render as renderToast } from "roamjs-components/components/Toast" ;
44import { Label , Dialog , Button , Intent , Classes } from "@blueprintjs/core" ;
5- import Description from "roamjs-components /components/Description " ;
5+ import Description from "~ /components/settings/SettingsDescription " ;
66import { addStyle } from "roamjs-components/dom" ;
77import { NodeMenuTriggerComponent } from "~/components/DiscourseNodeMenu" ;
88import {
@@ -35,6 +35,7 @@ import posthog from "posthog-js";
3535import internalError from "~/utils/internalError" ;
3636import { setPersonalSetting , type SettingsSnapshot } from "./utils/accessors" ;
3737import { getStoredRelationsEnabled } from "~/utils/storedRelations" ;
38+ import { ROAM_DOCS , withDocsLink } from "./utils/docs" ;
3839
3940const enum RelationMigrationDialog {
4041 "none" ,
@@ -119,7 +120,12 @@ const HomePersonalSettings = ({
119120 < div className = "flex flex-col gap-4 p-1" >
120121 < Label >
121122 Personal node menu trigger
122- < Description description = "Override the global trigger for the discourse node menu." />
123+ < Description
124+ description = { withDocsLink (
125+ "Override the global trigger for the discourse node menu." ,
126+ ROAM_DOCS . creatingNodes ,
127+ ) }
128+ />
123129 < NodeMenuTriggerComponent
124130 extensionAPI = { extensionAPI }
125131 initialValue = { personalSettings [ PERSONAL_KEYS . personalNodeMenuTrigger ] }
@@ -138,13 +144,19 @@ const HomePersonalSettings = ({
138144 settingKey = { DISCOURSE_TOOL_SHORTCUT_KEY }
139145 blockPropKey = { PERSONAL_KEYS . discourseToolShortcut }
140146 label = "Discourse tool keyboard shortcut"
141- description = "Set a single key to activate the discourse tool in tldraw. Only single keys (no modifiers) are supported. Leave empty for no shortcut."
147+ description = { withDocsLink (
148+ "Set a single key to activate the discourse tool in tldraw. Only single keys (no modifiers) are supported. Leave empty for no shortcut." ,
149+ ROAM_DOCS . creatingNodes ,
150+ ) }
142151 placeholder = "Click to set single key"
143152 initialValue = { personalSettings [ PERSONAL_KEYS . discourseToolShortcut ] }
144153 />
145154 < PersonalFlagPanel
146155 title = "Overlay"
147- description = "Whether or not to overlay discourse context information over discourse node references."
156+ description = { withDocsLink (
157+ "Whether or not to overlay discourse context information over discourse node references." ,
158+ ROAM_DOCS . discourseContextOverlay ,
159+ ) }
148160 settingKeys = { [ PERSONAL_KEYS . discourseContextOverlay ] }
149161 initialValue = { personalSettings [ PERSONAL_KEYS . discourseContextOverlay ] }
150162 onChange = { ( checked ) => {
@@ -157,7 +169,10 @@ const HomePersonalSettings = ({
157169 />
158170 < PersonalFlagPanel
159171 title = "Enable stored relations"
160- description = "Use stored relations instead of legacy pattern-based relations"
172+ description = { withDocsLink (
173+ "Use stored relations instead of legacy pattern-based relations" ,
174+ ROAM_DOCS . migrationToStoredRelations ,
175+ ) }
161176 settingKeys = { [ "Reified relation triples" ] }
162177 initialValue = { personalSettings [ "Reified relation triples" ] }
163178 value = { storedRelations }
@@ -179,7 +194,10 @@ const HomePersonalSettings = ({
179194
180195 < PersonalFlagPanel
181196 title = "Text selection popup"
182- description = "Whether or not to show the discourse node menu when selecting text."
197+ description = { withDocsLink (
198+ "Whether or not to show the discourse node menu when selecting text." ,
199+ ROAM_DOCS . creatingNodes ,
200+ ) }
183201 settingKeys = { [ PERSONAL_KEYS . textSelectionPopup ] }
184202 initialValue = { personalSettings [ PERSONAL_KEYS . textSelectionPopup ] }
185203 onChange = { ( checked ) => {
@@ -221,7 +239,10 @@ const HomePersonalSettings = ({
221239 />
222240 < PersonalFlagPanel
223241 title = "Auto canvas relations"
224- description = "Automatically add discourse relations to canvas when a node is added"
242+ description = { withDocsLink (
243+ "Automatically add discourse relations to canvas when a node is added" ,
244+ ROAM_DOCS . storedRelations ,
245+ ) }
225246 settingKeys = { [ PERSONAL_KEYS . autoCanvasRelations ] }
226247 initialValue = { personalSettings [ PERSONAL_KEYS . autoCanvasRelations ] }
227248 onChange = { ( checked ) => {
@@ -231,7 +252,10 @@ const HomePersonalSettings = ({
231252
232253 < PersonalFlagPanel
233254 title = "(BETA) Overlay in canvas"
234- description = "Whether or not to overlay discourse context information over canvas nodes."
255+ description = { withDocsLink (
256+ "Whether or not to overlay discourse context information over canvas nodes." ,
257+ ROAM_DOCS . discourseContextOverlay ,
258+ ) }
235259 settingKeys = { [ PERSONAL_KEYS . overlayInCanvas ] }
236260 initialValue = { personalSettings [ PERSONAL_KEYS . overlayInCanvas ] }
237261 onChange = { ( checked ) => {
0 commit comments