From bbfb9864bd68cc4484e2b9ab20a04ac178b6b14c Mon Sep 17 00:00:00 2001 From: Frederico Castro Date: Sat, 28 Feb 2026 00:59:25 -0300 Subject: [PATCH] Truncar textos dos cards de tarefas para layout padronizado MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Truncar descrição em 120 caracteres no JS com tooltip do texto completo - Truncar nome com ellipsis via CSS - Limitar descrição a 2 linhas com max-height --- public/css/styles.css | 4 ++++ public/js/components/tasks.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/public/css/styles.css b/public/css/styles.css index c54712d..fd81144 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -3364,6 +3364,9 @@ tbody tr:hover td { font-size: 14px; font-weight: 600; color: var(--text-primary); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .task-card-description { @@ -3374,6 +3377,7 @@ tbody tr:hover td { -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; + max-height: 3em; } .task-card-footer { diff --git a/public/js/components/tasks.js b/public/js/components/tasks.js index 6968359..4691e09 100644 --- a/public/js/components/tasks.js +++ b/public/js/components/tasks.js @@ -68,7 +68,7 @@ const TasksUI = {

${Utils.escapeHtml(task.name)}

${Utils.escapeHtml(categoryLabel)} - ${task.description ? `

${Utils.escapeHtml(task.description)}

` : ''} + ${task.description ? `

${Utils.escapeHtml(task.description.length > 120 ? task.description.slice(0, 120) + '…' : task.description)}

` : ''}