mirror of https://github.com/logseq/logseq
fix: property completion should only include properties
Was including classes and blocks with :block/schema. Also not hiding icon property correctly. Also updated outdated docstringspull/10544/head
parent
6c618ffae1
commit
6c5072e7e6
|
@ -20,6 +20,7 @@
|
|||
| 4 | db schema |
|
||||
| 5 | unknown type |
|
||||
| 6 | property block |
|
||||
| 7 | macro |
|
||||
"
|
||||
[block]
|
||||
(cond
|
||||
|
@ -70,7 +71,7 @@
|
|||
(transit/write t-writer))))
|
||||
|
||||
(defn block-with-timestamps
|
||||
"Copy of outliner-core/block-with-timestamps. Too basic to couple this to main app"
|
||||
"Adds updated-at timestamp and created-at if it doesn't exist"
|
||||
[block]
|
||||
(let [updated-at (time-ms)
|
||||
block (cond->
|
||||
|
|
|
@ -1181,7 +1181,10 @@ independent of format as format specific heading characters are stripped"
|
|||
(let [db (conn/get-db)
|
||||
ids (->> (d/datoms db :aevt :block/schema)
|
||||
(map :e))]
|
||||
(map #(:block/original-name (db-utils/entity %)) ids)))
|
||||
(->> ids
|
||||
(map db-utils/entity)
|
||||
(filter #(contains? (:block/type %) "property"))
|
||||
(map :block/original-name))))
|
||||
|
||||
(defn get-all-properties
|
||||
"Returns a seq of property name strings"
|
||||
|
|
|
@ -178,7 +178,9 @@
|
|||
(defn get-all-properties
|
||||
[]
|
||||
(let [hidden-props (if (config/db-based-graph? (state/get-current-repo))
|
||||
(set (map name db-property/hidden-built-in-properties))
|
||||
(set (map #(or (get-in db-property/built-in-properties [% :original-name])
|
||||
(name %))
|
||||
db-property/hidden-built-in-properties))
|
||||
(set (map name (property-util/hidden-properties))))]
|
||||
(remove hidden-props (db-model/get-all-properties))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue