From 88d56032c2ea5cf0ca525667f91eadc1cd63333c Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 30 Nov 2026 11:31:01 +0100 Subject: style(todo): one row of chips, as tall as the running row Stacked full-width lines took too much of the Dashboard. Each task is now a chip, title over its due label, up to three side by side and a "+N" for the rest. Co-Authored-By: Claude Opus 5.5 --- static/dashboard.js | 6 +++--- static/deck.css | 17 ++++++++++------- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'static') diff --git a/static/dashboard.js b/static/dashboard.js index 1f123a7..7dbf00c 100644 --- a/static/dashboard.js +++ b/static/dashboard.js @@ -183,7 +183,7 @@ const SKELETON = `
- +
`; export default { @@ -343,7 +343,7 @@ export default { for (const t of tasks.slice(0, 3)) { const line = document.createElement("div"); line.className = "td"; - line.innerHTML = ``; + line.innerHTML = ``; line.querySelector(".nf").textContent = G.todo; line.querySelector(".tt").textContent = t.title; const due = dueLabel(t.due); @@ -357,7 +357,7 @@ export default { if (tasks.length > 3) { const more = document.createElement("div"); more.className = "td more"; - more.textContent = `+${tasks.length - 3} more`; + more.textContent = `+${tasks.length - 3}`; todo.append(more); } }; diff --git a/static/deck.css b/static/deck.css index c01b5e4..04825a0 100644 --- a/static/deck.css +++ b/static/deck.css @@ -749,10 +749,11 @@ select { .dash .legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.75rem; color: var(--udt-subtext0); } .dash .legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; background: var(--c); } -/* Vikunja tasks due now: one line each, hidden when there are none. - touch-action none, so a swipe right reaches dashboard.js, not the page. */ -.dash-todo { flex: none; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; overflow: hidden; } -.dash-todo .td { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; +/* Vikunja tasks due now: a row of chips as tall as the running row, hidden + when there are none. touch-action none, so a swipe right reaches + dashboard.js, not the page. */ +.dash-todo { flex: none; display: flex; gap: 8px; height: 52px; } +.dash-todo .td { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 10px; background: var(--udt-surface0); touch-action: none; user-select: none; cursor: pointer; transition: transform .25s ease, opacity .25s ease, background-color .8s ease; } .dash-todo .td.sliding { transition: none; } @@ -760,10 +761,12 @@ select { .dash-todo .td.gone { opacity: 0; transform: scale(.97); } .dash-todo .td.fail { background: color-mix(in srgb, var(--udt-red) 35%, var(--udt-surface0)); } .dash-todo .td .nf { color: var(--udt-accent); font-size: 1.1rem; } -.dash-todo .td .tt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } -.dash-todo .td .due { flex: none; font-size: 0.786rem; color: var(--udt-subtext0); } +.dash-todo .td .col { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; } +.dash-todo .td .tt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.dash-todo .td .due { flex: none; font-size: 0.714rem; color: var(--udt-subtext0); white-space: nowrap; } .dash-todo .td.late .due { color: var(--udt-red); } -.dash-todo .td.more, .dash-todo .td.err { background: none; cursor: default; color: var(--udt-overlay1); font-size: 0.786rem; padding: 2px 10px; } +.dash-todo .td.more { flex: none; background: none; cursor: default; color: var(--udt-overlay1); font-size: 0.786rem; padding: 0 4px; } +.dash-todo .td.err { background: none; cursor: default; color: var(--udt-overlay1); font-size: 0.786rem; } /* The running row: one to three chips in equal columns, each opening its slot (and detail) as a centred modal. A line too long for the slot slides to its -- cgit v1.2.3