Browse Source

enhance(ux): show only the first line of block title for name cells

Tienson Qin 9 months ago
parent
commit
e5544885e6
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/main/frontend/components/views.cljs

+ 5 - 1
src/main/frontend/components/views.cljs

@@ -215,7 +215,11 @@
                           {:align :start})
                          (editor-handler/edit-block! block :max {:container-id :unknown-container}))))))}
      (if block
-       [:div (inline-title (:block/title block))]
+       [:div (inline-title
+              (some->> (:block/title block)
+                       string/trim
+                       string/split-lines
+                       first))]
        [:div])]))
 
 (defn build-columns