fix: limit tags length

pull/11492/head
Tienson Qin 2024-08-30 08:52:16 +08:00
parent dbd6f7d780
commit fad0f832ab
2 changed files with 15 additions and 6 deletions

View File

@ -2390,14 +2390,13 @@
(remove (fn [t] (= (:db/ident t) :logseq.class/Task)) tags')
tags')]
(when (seq block-tags)
[:div.block-tags.flex.flex-row.flex-wrap.items-center.gap-1
[:div.block-tags
(for [tag block-tags]
[:span.h-6
(rum/with-key
(page-cp (assoc config
[:div.block-tag
{:key (str "tag-" (:db/id tag))}
(page-cp (assoc config
:tag? true
:disable-preview? true) tag)
(str "tag-" (:db/id tag)))])]))))
:disable-preview? true) tag)])]))))
(rum/defc block-positioned-properties
[config block position]

View File

@ -863,3 +863,13 @@ html.is-mac {
text-overflow: ellipsis;
}
}
.block-tags {
@apply flex flex-row flex-wrap items-center gap-1;
max-width: 256px;
}
.block-tag span {
@apply h-6 whitespace-nowrap overflow-hidden;
max-width: 160px;
text-overflow: ellipsis;
}