mirror of https://github.com/logseq/logseq
Revert "fix: don't set :logseq.property/built-in? for properties"
This reverts commit e5bb634a08
.
feat/tables
parent
073427d898
commit
fec74edc0c
|
@ -457,11 +457,9 @@
|
|||
(common-util/uuid-string? (:block/name page))))))
|
||||
|
||||
(defn built-in?
|
||||
"Built-in property, page or block"
|
||||
"Built-in page or block"
|
||||
[entity]
|
||||
(or
|
||||
(db-property/built-in? (:db/ident entity))
|
||||
(db-property/property-value-content (:logseq.property/built-in? entity))))
|
||||
(db-property/property-value-content (:logseq.property/built-in? entity)))
|
||||
|
||||
(defn built-in-class-property?
|
||||
"Whether property a built-in property for the specific class"
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
;; Main property vars
|
||||
;; ==================
|
||||
|
||||
;; TODO: consider adding :db/version for each property or maintain a
|
||||
;; version->properties list to ensure users are using the app with correct version.
|
||||
(def ^:large-vars/data-var built-in-properties*
|
||||
"Map of built in properties for db graphs with their :db/ident as keys.
|
||||
Each property has a config map with the following keys:
|
||||
|
@ -169,11 +167,6 @@
|
|||
(assoc v :name (keyword (string/lower-case (name k)))))]))
|
||||
(into (ordered-map))))
|
||||
|
||||
(defn built-in?
|
||||
"Whether property is a built-in property"
|
||||
[ident]
|
||||
(when ident (some? (built-in-properties ident))))
|
||||
|
||||
(def db-attribute-properties
|
||||
"Internal properties that are also db schema attributes"
|
||||
#{:block/alias :block/tags})
|
||||
|
|
|
@ -50,6 +50,9 @@
|
|||
tx (concat [built-in-property]
|
||||
properties
|
||||
[built-in-prop-value]
|
||||
;; Adding built-ins must come after initial properties and built-in-prop-value
|
||||
[(mark-block-as-built-in' built-in-property)]
|
||||
(map mark-block-as-built-in' properties)
|
||||
(keep #(when (= #{"closed value"} (:block/type %)) (mark-block-as-built-in' %))
|
||||
properties))]
|
||||
{:tx tx
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
[frontend.handler.file-sync :as file-sync-handler]
|
||||
[logseq.common.path :as path]
|
||||
[frontend.handler.property.util :as pu]
|
||||
[logseq.db :as ldb]))
|
||||
[logseq.db.frontend.property :as db-property]))
|
||||
|
||||
(defn- delete-page!
|
||||
[page]
|
||||
|
@ -99,7 +99,8 @@
|
|||
|
||||
(when-not (or contents?
|
||||
config/publishing?
|
||||
(and db-based? (ldb/built-in? page)))
|
||||
(and db-based?
|
||||
(db-property/property-value-content (:logseq.property/built-in? page))))
|
||||
{:title (t :page/delete)
|
||||
:options {:on-click #(delete-page-confirm! page)}})
|
||||
|
||||
|
|
|
@ -535,7 +535,6 @@ Some bindings in this fn:
|
|||
(if db-graph?
|
||||
;; This keeps built-in properties from showing up in not results.
|
||||
;; May need to be revisited as more class and property filters are explored
|
||||
;; FIXME: properties don't have :logseq.property/built-in? now
|
||||
(concat [['?b :block/uuid] '[(missing? $ ?b :logseq.property/built-in?)]] q)
|
||||
(concat [['?b :block/uuid]] q))
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
[frontend.worker.util :as worker-util]
|
||||
[logseq.db.sqlite.util :as sqlite-util]
|
||||
[logseq.common.util :as common-util]
|
||||
[logseq.db :as ldb]))
|
||||
[logseq.db :as ldb]
|
||||
[logseq.db.frontend.property :as db-property]))
|
||||
|
||||
;; TODO: use sqlite for fuzzy search
|
||||
(defonce indices (atom nil))
|
||||
|
@ -263,7 +264,7 @@
|
|||
(when p
|
||||
{:id (str (:block/uuid p))
|
||||
:name (:block/name p)
|
||||
:built-in? (ldb/built-in? p)
|
||||
:built-in? (boolean (db-property/property-value-content (:logseq.property/built-in? p)))
|
||||
:original-name (:block/original-name p)}))
|
||||
|
||||
(defn- hidden-page?
|
||||
|
|
Loading…
Reference in New Issue