Skip to content

Commit 699d3ea

Browse files
committed
fix: don't show parents for children tags in hierarchy
1 parent 94a2d9c commit 699d3ea

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/main/frontend/components/block.cljs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,9 @@
714714
All page-names are sanitized except page-name-in-block"
715715
[state
716716
{:keys [contents-page? whiteboard-page? other-position?
717-
on-context-menu stop-event-propagation? with-tags?]
718-
:or {with-tags? true}
717+
on-context-menu stop-event-propagation? with-tags? show-unique-title?]
718+
:or {with-tags? true
719+
show-unique-title? true}
719720
:as config}
720721
page-entity children label]
721722
(let [*mouse-down? (::mouse-down? state)
@@ -798,7 +799,9 @@
798799
(ldb/page? page-entity)
799800
(if untitled?
800801
(t :untitled)
801-
(let [s (util/trim-safe (block-handler/block-unique-title page-entity {:with-tags? with-tags?}))]
802+
(let [s (util/trim-safe (if show-unique-title?
803+
(block-handler/block-unique-title page-entity {:with-tags? with-tags?})
804+
(:block/title page-entity)))]
802805
(if (and tag? (not (:hide-tag-symbol? config)))
803806
(str "#" s)
804807
s)))

src/main/frontend/components/class.cljs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
(when (seq children)
1414
[:ul
1515
(for [child (sort-by :block/title children)]
16-
(let [title [:li.ml-2 (block/page-reference {:show-brackets? false} (:block/uuid child) nil)]]
16+
(let [title [:li.ml-2 (block/page-reference {:show-brackets? false
17+
:show-unique-title? false} (:block/uuid child) nil)]]
1718
(if (seq (:logseq.property.class/_extends child))
1819
(ui/foldable
1920
title

0 commit comments

Comments
 (0)