From b84949c59c61513afbe6a406d83e4e71d4b07063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sun, 30 Aug 2026 03:15:50 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20fix(web):=20a=20subtask=20says?= =?UTF-8?q?=20where=20it=20sits=20on=20one=20line,=20in=20order?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The masthead stacked two keys in the same mono a line apart — the parent's above, the task's own below — and nothing said which was which. An arrow was the only hint, and it pointed at a line that read as a caption rather than a way out. They are one breadcrumb now: the whole, then this, left to right, ending in the key the page already showed. The parent's title rides with its key, because `DZ-5NJJM` on its own names nothing a person can recognise, and it is the part that truncates when the line runs out — a key broken across two lines is not a key any more. The link carries a solid underline at rest. The ledger skin marks a record's own key with a *dotted* one, so before this the only thing on the line that looked clickable was the one thing that wasn't. A task with no parent renders exactly what it rendered before: its key, alone. --- crates/izlek-web/src/detail.rs | 21 +++++++----- crates/izlek-web/tests/http.rs | 4 +-- style/main.scss | 60 +++++++++++++++++++++++++++------- 3 files changed, 63 insertions(+), 22 deletions(-) diff --git a/crates/izlek-web/src/detail.rs b/crates/izlek-web/src/detail.rs index bb72a28..4515055 100644 --- a/crates/izlek-web/src/detail.rs +++ b/crates/izlek-web/src/detail.rs @@ -1711,14 +1711,19 @@ pub async fn task_modal(cx: &Cx, task_id: &str, confirm_delete: bool, tab: Tab)
- if let Some(parent) = detail.parent.clone() { - - "\u{2190}" - (parent.task_key.clone()) - (parent.title.clone()) - - } - (detail.task_key.clone()) + // One line, read left to right: the whole, then + // this. Two keys stacked in the same mono said + // nothing about which was which — order does. +
+ if let Some(parent) = detail.parent.clone() { + + (parent.task_key.clone()) + (parent.title.clone()) + + + } + (detail.task_key.clone()) +
(title_control(cx, &detail, may_write, lang).await?)
diff --git a/crates/izlek-web/tests/http.rs b/crates/izlek-web/tests/http.rs index 965ba4d..f417924 100644 --- a/crates/izlek-web/tests/http.rs +++ b/crates/izlek-web/tests/http.rs @@ -1521,7 +1521,7 @@ async fn taking_a_task_in_and_letting_it_out_are_the_same_form() { let page = String::from_utf8_lossy(&page.bytes); // The way back up: a link that names the whole, not a caption. assert!( - page.contains("detail-parent") && page.contains(&format!("/?task={parent}")), + page.contains("detail-crumb-up") && page.contains(&format!("/?task={parent}")), "the part does not link back to its whole" ); assert!( @@ -1805,7 +1805,7 @@ async fn the_parts_have_a_tab_and_a_subtask_is_not_offered_one() { "a subtask rendered the Subtasks tab" ); assert!( - forced.contains("detail-parent"), + forced.contains("detail-crumb-up"), "the fallback did not render the task itself" ); } diff --git a/style/main.scss b/style/main.scss index 69d4325..170b86a 100644 --- a/style/main.scss +++ b/style/main.scss @@ -1446,35 +1446,71 @@ img.avatar { color: var(--muted-soft); } -// A subtask names the whole it belongs to, above its own key, and that name -// is the way back up. An arrow and the parent's title rather than a bare -// caption: "Part of DZ-14" read as a label, and nobody tried to click it. -.detail-parent { +// Where this task sits, on one line above its title. A subtask stacked its +// parent's key above its own read as two near-identical mono strings with +// nothing to say which was which; left-to-right order says it instead, and +// the parent's title is what makes its key legible at all. +.detail-crumbs { display: flex; - align-items: center; + align-items: baseline; gap: 6px; - font-size: 11px; + min-width: 0; + // The parent's title is the only part allowed to give way; a key broken + // across two lines is not a key any more. + flex-wrap: nowrap; + + .detail-key { + flex: none; + white-space: nowrap; + } +} + +.detail-crumb { + display: flex; + align-items: baseline; + gap: 6px; + min-width: 0; + flex: 0 1 auto; color: var(--muted); text-decoration: none; - width: fit-content; &:hover { color: var(--ink); - .detail-parent-title { text-decoration: underline; } + .detail-crumb-title { text-decoration: underline; } } } -.detail-parent-arrow, -.detail-parent-key { +.detail-crumb-key { + flex: none; font-family: var(--font-mono); + font-size: 11px; } -.detail-parent-title { +// Underlined at rest, solid: the ledger skin marks a record's own key with a +// *dotted* underline, so without this the one thing on the line that is not +// a link was the only thing that looked like one. +.detail-crumb-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - max-width: 30ch; + max-width: 28ch; + flex: 0 1 auto; + min-width: 3ch; + font-size: 12px; + text-decoration: underline; + text-decoration-color: var(--border-strong); + text-underline-offset: 3px; +} + +.detail-crumb:hover .detail-crumb-title { + text-decoration-color: currentColor; +} + +.detail-crumb-sep { + flex: none; + font-size: 11px; + color: var(--muted-soft); } .detail-title {