Selaa lähdekoodia

fix: document and validate a db only config.edn option

Also fix another outdated comment
Gabriel Horner 1 vuosi sitten
vanhempi
sitoutus
46c5110701

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

@@ -55,6 +55,11 @@
  ;; Default value: true
  :ui/auto-expand-block-refs? true
 
+ ;; Hide empty block properties
+ ;; This is _only_ for DB graphs.
+ ;; Default value: false
+ ;; :ui/hide-empty-properties? false
+
  ;; Disable accent marks when searching.
  ;; After changing this setting, rebuild the search index by pressing (^C ^S).
  ;; Default value: true

+ 1 - 1
deps/db/src/logseq/db/sqlite/build.cljs

@@ -555,7 +555,7 @@
    * :pages-and-blocks - This is a vector of maps containing a :page key and optionally a :blocks
      key when defining a page's blocks. More about each key:
      * :page - This is a datascript attribute map for pages with
-       :block/title required e.g. `{:block/original/name \"foo\"}`. Additional keys available:
+       :block/title required e.g. `{:block/title \"foo\"}`. Additional keys available:
        * :build/journal - Define a journal pages as an integer e.g. 20240101 is Jan 1, 2024. :block/title
          is not required if using this since it generates one
        * :build/properties - Defines properties on a page

+ 1 - 0
src/main/frontend/schema/handler/common_config.cljc

@@ -42,6 +42,7 @@
     [:ui/show-command-doc? :boolean]
     [:ui/show-empty-bullets? :boolean]
     [:ui/show-full-blocks? :boolean]
+    [:ui/hide-empty-properties? :boolean]
     [:ui/auto-expand-block-refs? :boolean]
     [:query/views [:map-of
                    :keyword

+ 2 - 1
src/main/frontend/state.cljs

@@ -424,7 +424,8 @@
                       [(< ?d ?next)]]
              :inputs [:today :7d-after]
              :group-by-page? false
-             :collapsed? false}]}}))
+             :collapsed? false}]}
+          :ui/hide-empty-properties? false}))
 
 ;; State that most user config is dependent on
 (declare get-current-repo sub set-state!)