From d937a55343616ae50a8a48f46e103e1d03e55c8f Mon Sep 17 00:00:00 2001 From: Gabriel Horner Date: Mon, 26 May 2025 12:41:29 -0400 Subject: [PATCH] fix: ui/hide-empty-properties? config no longer working on pages or sidebar. Likewise 'p t' is still useful to have in those contexts --- src/main/frontend/components/property.cljs | 29 ++++++++++++---------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/main/frontend/components/property.cljs b/src/main/frontend/components/property.cljs index 5254e3bbd2..dc9453b0f5 100644 --- a/src/main/frontend/components/property.cljs +++ b/src/main/frontend/components/property.cljs @@ -598,19 +598,22 @@ hide-with-property-id (fn [property-id] (let [property (db/entity property-id)] (boolean - (when-not (or sidebar-properties? page-title?) - (cond - show-empty-and-hidden-properties? - false - root-block? - false - (and (:logseq.property/hide-empty-value property) - (nil? (get properties property-id))) - true - state-hide-empty-properties? - (nil? (get block property-id)) - :else - (boolean (:logseq.property/hide? property))))))) + (cond + show-empty-and-hidden-properties? + false + state-hide-empty-properties? + (nil? (get block property-id)) + :else + ;; For sidebar and page properties, ignore these checks + (when-not (or sidebar-properties? page-title?) + (cond + root-block? + false + (and (:logseq.property/hide-empty-value property) + (nil? (get properties property-id))) + true + :else + (boolean (:logseq.property/hide? property)))))))) property-hide-f (cond config/publishing? ;; Publishing is read only so hide all blank properties as they