Browse Source

Remove unused :preferred-workflow config for db graphs

part of LOG-3041. Also clean up related namespaces with docstrings
Gabriel Horner 1 year ago
parent
commit
8d0b3c5058

+ 1 - 0
deps/common/resources/templates/config.edn

@@ -8,6 +8,7 @@
  ;; :preferred-format "Markdown"
 
  ;; Set the preferred workflow style.
+ ;; This is _only_ for file graphs.
  ;; Available options:
  ;; - :now for NOW/LATER style (default)
  ;; - :todo for TODO/DOING style

+ 1 - 1
deps/common/src/logseq/common/marker.cljs

@@ -1,5 +1,5 @@
 (ns logseq.common.marker
-  "marker patterns"
+  "Marker patterns. File graph only"
   (:require [clojure.string :as string]))
 
 (defn marker-pattern [format]

+ 5 - 3
src/main/frontend/components/settings.cljs

@@ -718,13 +718,15 @@
         enable-tooltip? (state/enable-tooltip?)
         enable-shortcut-tooltip? (state/sub :ui/shortcut-tooltip?)
         show-brackets? (state/show-brackets?)
-        enable-git-auto-push? (state/enable-git-auto-push? current-repo)]
+        enable-git-auto-push? (state/enable-git-auto-push? current-repo)
+        db-graph? (config/db-based-graph? (state/get-current-repo))]
 
     [:div.panel-wrap.is-editor
-     (when-not (config/db-based-graph? (state/get-current-repo))
+     (when-not db-graph?
        (file-format-row t preferred-format))
      (date-format-row t preferred-date-format)
-     (workflow-row t preferred-workflow)
+     (when-not db-graph?
+       (workflow-row t preferred-workflow))
      (show-brackets-row t show-brackets?)
 
      (when (util/electron?) (switch-spell-check-row t))

+ 2 - 0
src/main/frontend/handler/common/config_edn.cljs

@@ -90,6 +90,8 @@ nested keys or positional errors e.g. tuples"
   "File only config that is deprecated in DB graphs"
   {:preferred-format
    "is not used in DB graphs as there is only markdown mode."
+   :preferred-workflow
+   "is not used in DB graphs"
    :property/separated-by-commas
    "is not used in DB graphs"
    :property-pages/enabled?

+ 2 - 1
src/main/frontend/util/priority.cljs

@@ -1,5 +1,6 @@
 (ns frontend.util.priority
-  "Util fns for task priorities e.g. A, B, C"
+  "Util fns for task priorities e.g. A, B, C.
+   File graph only"
   (:require [clojure.string :as string]
             [frontend.util :as util]
             [frontend.handler.file-based.status :as status]))