enhance: show Tag and Property classes in page header

Addresses
https://github.com/logseq/logseq/pull/11634#discussion_r1901175283
This commit is contained in:
Gabriel Horner
2025-01-03 12:12:21 -05:00
parent 17ee522779
commit 01b40b42c3
2 changed files with 8 additions and 3 deletions

View File

@@ -89,7 +89,8 @@
[promesa.core :as p]
[reitit.frontend.easy :as rfe]
[rum.core :as rum]
[shadow.loader :as loader]))
[shadow.loader :as loader]
[clojure.set :as set]))
;; local state
(defonce *dragging?
@@ -2642,12 +2643,15 @@
"Tags without inline or hidden tags"
[config block]
(when (:block/raw-title block)
(let [block-tags (->>
(let [hidden-internal-tags (cond-> ldb/internal-tags
(:show-tag-and-property-classes? config)
(set/difference #{:logseq.class/Tag :logseq.class/Property}))
block-tags (->>
(:block/tags block)
(remove (fn [t]
(or (ldb/inline-tag? (:block/raw-title block) t)
(:logseq.property.class/hide-from-node t)
(contains? ldb/internal-tags (:db/ident t))))))
(contains? hidden-internal-tags (:db/ident t))))))
popup-opts {:align :end
:content-props {:on-click (fn [] (shui/popup-hide!))
:class "w-60"}}

View File

@@ -485,6 +485,7 @@
:sidebar? sidebar?
:hide-children? true
:container-id container-id
:show-tag-and-property-classes? true
:from-journals? (contains? #{:home :all-journals} (get-in (state/get-route-match) [:data :name]))}
page)]]))