From 4ffed61769badbca6d5df9d10b11c4f967489cd1 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Tue, 3 Nov 2026 15:59:13 +0100 Subject: [PATCH] Refine ambiguous column guidance layout --- crates/rundown-converter/src/gui/review.rs | 49 ++++++++++++++-------- docs/rundown-converter.md | 3 +- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/crates/rundown-converter/src/gui/review.rs b/crates/rundown-converter/src/gui/review.rs index 1bbc84c..4192122 100644 --- a/crates/rundown-converter/src/gui/review.rs +++ b/crates/rundown-converter/src/gui/review.rs @@ -873,24 +873,30 @@ impl App { .map(|column| column_name(*column)) .collect::>() .join(", "); - ui.colored_label( - PREVIEW_AMBER, - format!("Several {role} columns detected: {letters}."), - ); - if ui - .button(format!("Choose {role} column…")) - .on_hover_text(format!( - "Show and highlight the possible {role} columns: {letters}" - )) - .clicked() - { - mapping_focus_scroll = candidates.first().copied(); - mapping_focus = Some((role, candidates)); - mapping_focus_until = Some(now + 3.0); - } - ui.collapsing("Technical details", |ui| { - ui.add(egui::Label::new(&error.message).wrap()); + ui.horizontal_wrapped(|ui| { + ui.colored_label( + PREVIEW_AMBER, + format!("Several {role} columns detected: {letters}."), + ); + if ui + .button(format!("Choose {role} column…")) + .on_hover_text(format!( + "Show and highlight the possible {role} columns: {letters}" + )) + .clicked() + { + mapping_focus_scroll = candidates.first().copied(); + mapping_focus = Some((role, candidates)); + mapping_focus_until = Some(now + 3.0); + } }); + egui::CollapsingHeader::new(RichText::new("Technical details").weak()) + .show(ui, |ui| { + ui.add( + egui::Label::new(RichText::new(&error.message).weak()) + .wrap(), + ); + }); } else { ui.add( egui::Label::new( @@ -1844,7 +1850,14 @@ mod tests { .find(|(s, _)| s == "Choose duration column…") .unwrap() .1 - .center(); + .to_owned(); + let message = labels + .iter() + .find(|(s, _)| s == "Several duration columns detected: B, C.") + .unwrap() + .1; + assert!((message.center().y - choose.center().y).abs() <= 2.0); + let choose = choose.center(); click_size(&mut app, &ctx, choose, [860.0, 900.0]); assert_eq!(app.mapping_focus, Some(("duration".into(), vec![1, 2]))); assert!(app.mapping_focus_until.is_some()); diff --git a/docs/rundown-converter.md b/docs/rundown-converter.md index e1cf774..a838258 100644 --- a/docs/rundown-converter.md +++ b/docs/rundown-converter.md @@ -57,7 +57,8 @@ When several columns could have the same timing role, the error gives a short instruction and highlights all candidate columns in amber immediately. The **Choose … column…** button scrolls to that candidate group and briefly pulses its framing, which distinguishes the requested group when several mapping issues -are present. The original inference explanation remains under **Technical details**. +are present. The short message and button share a line when space permits. The +original inference explanation remains under the subdued **Technical details**. Review has two views: The main navigation and Review view tabs use a subtle purple tint so they remain