From 633334c63736e39dc6273f9c3880047e7aa12d4b Mon Sep 17 00:00:00 2001 From: Alex Grozav Date: Thu, 15 Aug 2024 12:49:51 +0300 Subject: [PATCH] feat: improve node label readability --- .../nodes/render-types/CanvasNodeDefault.vue | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/editor-ui/src/components/canvas/elements/nodes/render-types/CanvasNodeDefault.vue b/packages/editor-ui/src/components/canvas/elements/nodes/render-types/CanvasNodeDefault.vue index 4a62ee0e186ea..f953543b45c67 100644 --- a/packages/editor-ui/src/components/canvas/elements/nodes/render-types/CanvasNodeDefault.vue +++ b/packages/editor-ui/src/components/canvas/elements/nodes/render-types/CanvasNodeDefault.vue @@ -213,7 +213,7 @@ function openContextMenu(event: MouseEvent) { top: 100%; position: absolute; width: 100%; - min-width: 200px; + min-width: calc(var(--canvas-node--width) * 2); margin-top: var(--spacing-2xs); display: flex; flex-direction: column; @@ -223,16 +223,27 @@ function openContextMenu(event: MouseEvent) { .label { font-size: var(--font-size-m); - line-height: var(--font-line-height-compact); text-align: center; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + overflow-wrap: anywhere; + font-weight: var(--font-weight-bold); + line-height: var(--font-line-height-compact); } .subtitle { + width: 100%; + text-align: center; color: var(--color-text-light); font-size: var(--font-size-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + line-height: var(--font-line-height-compact); + font-weight: 400; } .statusIcons {