Refine ambiguous column guidance layout

This commit is contained in:
Dandaedre 2026-11-03 15:59:13 +01:00
parent 93a5c75bd2
commit 4ffed61769
2 changed files with 33 additions and 19 deletions

View File

@ -873,24 +873,30 @@ impl App {
.map(|column| column_name(*column))
.collect::<Vec<_>>()
.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());

View File

@ -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