diff --git a/deps/graph-parser/src/logseq/graph_parser/property.cljs b/deps/graph-parser/src/logseq/graph_parser/property.cljs index 177fb2e2b0..54552d9844 100644 --- a/deps/graph-parser/src/logseq/graph_parser/property.cljs +++ b/deps/graph-parser/src/logseq/graph_parser/property.cljs @@ -168,6 +168,7 @@ ;; ============= ;; FIXME: no support for built-in-extended-properties +;; TODO: add description (def db-built-in-properties {:alias {:original-name "Alias" :schema {:type :page @@ -196,7 +197,8 @@ :schema {:type :map}} :public {:schema {:type :checkbox}} :filters {:schema {:type :map}} - :exclude-from-graph-view {:schema {:type :checkbox}}}) + :exclude-from-graph-view {:schema {:type :checkbox}} + :created-in-property {:schema {:type :checkbox}}}) (def db-user-facing-built-in-properties "These are built-in properties that users can see and use" diff --git a/src/main/frontend/components/block.cljs b/src/main/frontend/components/block.cljs index 5ee6932fdd..b7aff56457 100644 --- a/src/main/frontend/components/block.cljs +++ b/src/main/frontend/components/block.cljs @@ -2370,8 +2370,9 @@ (rum/defc block-refs-count < rum/static [block *hide-block-refs?] - (let [block-refs-count (count (:block/_refs block))] - (when (> block-refs-count 0) + (let [created-in-property? (pu/get-property block :created-in-property) + block-refs-count (count (:block/_refs block))] + (when (and (not created-in-property?) (> block-refs-count 0)) [:div [:a.open-block-ref-link.bg-base-2.text-sm.ml-2.fade-link {:title "Open block references" diff --git a/src/main/frontend/components/property.cljs b/src/main/frontend/components/property.cljs index d27d964cdf..f0b781a38b 100644 --- a/src/main/frontend/components/property.cljs +++ b/src/main/frontend/components/property.cljs @@ -236,12 +236,14 @@ (let [repo (state/get-current-repo) content (string/trim (util/evalue e))] (when-not (string/blank? content) - (let [new-block (-> (editor-handler/wrap-parse-block {:block/format :markdown + (let [pid (:block/uuid (db/entity [:block/name "created-in-property"])) + new-block (-> (editor-handler/wrap-parse-block {:block/format :markdown :block/content content}) (outliner-core/block-with-timestamps) - (assoc :block/page {:db/id - (or (:db/id (:block/page block)) - (:db/id block))})) + (merge {:block/page {:db/id + (or (:db/id (:block/page block)) + (:db/id block))} + :block/properties {pid true}})) id (:block/uuid new-block)] (db/transact! repo [new-block] {:outliner-op :insert-blocks}) (add-property! block (:block/original-name property) id)