fix: don't show parents for children tags in hierarchy

This commit is contained in:
Tienson Qin
2025-11-06 17:22:55 +08:00
parent 94a2d9c284
commit 699d3eaf4a
2 changed files with 8 additions and 4 deletions

View File

@@ -714,8 +714,9 @@
All page-names are sanitized except page-name-in-block"
[state
{:keys [contents-page? whiteboard-page? other-position?
on-context-menu stop-event-propagation? with-tags?]
:or {with-tags? true}
on-context-menu stop-event-propagation? with-tags? show-unique-title?]
:or {with-tags? true
show-unique-title? true}
:as config}
page-entity children label]
(let [*mouse-down? (::mouse-down? state)
@@ -798,7 +799,9 @@
(ldb/page? page-entity)
(if untitled?
(t :untitled)
(let [s (util/trim-safe (block-handler/block-unique-title page-entity {:with-tags? with-tags?}))]
(let [s (util/trim-safe (if show-unique-title?
(block-handler/block-unique-title page-entity {:with-tags? with-tags?})
(:block/title page-entity)))]
(if (and tag? (not (:hide-tag-symbol? config)))
(str "#" s)
s)))

View File

@@ -13,7 +13,8 @@
(when (seq children)
[:ul
(for [child (sort-by :block/title children)]
(let [title [:li.ml-2 (block/page-reference {:show-brackets? false} (:block/uuid child) nil)]]
(let [title [:li.ml-2 (block/page-reference {:show-brackets? false
:show-unique-title? false} (:block/uuid child) nil)]]
(if (seq (:logseq.property.class/_extends child))
(ui/foldable
title