Reduce clutter in column review
This commit is contained in:
parent
2b355ff755
commit
6777174beb
|
|
@ -425,7 +425,10 @@ impl App {
|
|||
{
|
||||
self.review_view = ReviewView::Rows;
|
||||
}
|
||||
if navigation_tab(ui, "Columns", self.review_view == ReviewView::Columns).clicked() {
|
||||
if navigation_tab(ui, "Columns", self.review_view == ReviewView::Columns)
|
||||
.on_hover_text("Auto keeps inference enabled. Metadata adds the column to Ontime notes. Ignore excludes it from inference and Ontime output. Every timing cell is validated.")
|
||||
.clicked()
|
||||
{
|
||||
self.review_view = ReviewView::Columns;
|
||||
}
|
||||
if ui.button("Save resolutions…").clicked() {
|
||||
|
|
@ -825,14 +828,6 @@ impl App {
|
|||
}
|
||||
|
||||
fn columns_view(&mut self, ui: &mut egui::Ui) {
|
||||
ui.label("Review detected roles or choose a correction.");
|
||||
ui.collapsing("Column role help", |ui| {
|
||||
ui.label("Metadata goes into Ontime notes. Ignore excludes the column from inference and Ontime export. Auto includes other columns as metadata. Every timing cell is validated.");
|
||||
});
|
||||
if ui.link("Remap columns in Setup →").clicked() {
|
||||
self.settings = true;
|
||||
self.tab = Tab::Setup;
|
||||
}
|
||||
let mut mapping_focus = self.mapping_focus.clone();
|
||||
let mut mapping_focus_scroll = self.mapping_focus_scroll;
|
||||
if let (Some(table), Ok(mut profile)) = (
|
||||
|
|
@ -2197,55 +2192,48 @@ mod tests {
|
|||
}
|
||||
}
|
||||
#[test]
|
||||
fn remap_link_opens_setup_with_mapping_settings_visible() {
|
||||
fn column_help_stays_hidden_until_the_tab_is_hovered() {
|
||||
let mut app = sample();
|
||||
app.review_view = ReviewView::Columns;
|
||||
let profile = app.profile.clone();
|
||||
let ctx = egui::Context::default();
|
||||
configure_style(&ctx);
|
||||
ctx.style_mut(|style| {
|
||||
style.interaction.tooltip_delay = 0.0;
|
||||
style.interaction.tooltip_grace_time = 0.0;
|
||||
});
|
||||
let size = [860.0, 620.0];
|
||||
render(&mut app, &ctx, size, vec![]);
|
||||
let labels = render(&mut app, &ctx, size, vec![]);
|
||||
let link = labels
|
||||
for removed in [
|
||||
"Review detected roles or choose a correction.",
|
||||
"Column role help",
|
||||
"Remap columns in Setup →",
|
||||
] {
|
||||
assert!(!labels.iter().any(|(text, _)| text == removed));
|
||||
}
|
||||
assert!(
|
||||
!labels
|
||||
.iter()
|
||||
.any(|(text, _)| text.contains("Metadata adds the column"))
|
||||
);
|
||||
let columns = labels
|
||||
.iter()
|
||||
.find(|(s, _)| s == "Remap columns in Setup →")
|
||||
.find(|(text, _)| text == "Columns")
|
||||
.unwrap()
|
||||
.1
|
||||
.center();
|
||||
click_size(&mut app, &ctx, link, size);
|
||||
assert!(app.tab == Tab::Setup);
|
||||
assert!(app.settings);
|
||||
render(&mut app, &ctx, size, vec![]);
|
||||
render(
|
||||
&mut app,
|
||||
&ctx,
|
||||
size,
|
||||
vec![egui::Event::PointerMoved(columns)],
|
||||
);
|
||||
let labels = render(&mut app, &ctx, size, vec![]);
|
||||
assert!(labels.iter().any(|(s, _)| s == "Header row"));
|
||||
assert_eq!(app.profile, profile);
|
||||
assert!(!app.dirty);
|
||||
assert!(app.analysis.is_some());
|
||||
assert!(!app.advanced_settings);
|
||||
assert!(!labels.iter().any(|(s, _)| s == "Duration unit"));
|
||||
let size = [860.0, 900.0];
|
||||
let labels = render(&mut app, &ctx, size, vec![]);
|
||||
let mapping = labels
|
||||
.iter()
|
||||
.find(|(s, _)| s == "Manual header mapping")
|
||||
.unwrap()
|
||||
.1
|
||||
.center();
|
||||
click_size(&mut app, &ctx, mapping, size);
|
||||
let labels = render(&mut app, &ctx, size, vec![]);
|
||||
let advanced = labels
|
||||
.iter()
|
||||
.find(|(s, _)| s == "Advanced settings")
|
||||
.unwrap()
|
||||
.1
|
||||
.center();
|
||||
click_size(&mut app, &ctx, advanced, size);
|
||||
let labels = render(&mut app, &ctx, size, vec![]);
|
||||
assert!(app.advanced_settings);
|
||||
assert!(!app.settings);
|
||||
assert!(labels.iter().any(|(s, _)| s == "Duration unit"));
|
||||
assert!(!labels.iter().any(|(s, _)| s == "Header row"));
|
||||
assert_eq!(app.profile, profile);
|
||||
assert!(
|
||||
labels
|
||||
.iter()
|
||||
.any(|(text, _)| text.contains("Metadata adds the column"))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -104,13 +104,14 @@ visually distinct from labels and ordinary actions; the active tab uses the stro
|
|||
the timing preview and diagnostics continue to show the previous analysis.
|
||||
- **Columns** shows a concise verified mapping summary, green detected roles,
|
||||
per-column role dropdowns, and sample values. Expand **Detection evidence** for
|
||||
full inference and validation details; **Column role help** explains the choices. Selecting one duration column explicitly resolves duplicate TIMER
|
||||
full inference and validation details; hover the **Columns** tab for a compact
|
||||
explanation of the role choices. Selecting one duration column explicitly resolves duplicate TIMER
|
||||
headers. **Metadata** keeps a column as Ontime notes without treating its values
|
||||
as timing or titles; **Ignore** excludes it from inference and Ontime output.
|
||||
Several columns can be metadata or ignored. **Auto** restores inference; other
|
||||
columns remain included as metadata by default. **Remap columns in Setup →**
|
||||
opens **Manual header mapping** in Setup for the header row and column choices.
|
||||
The separate **Advanced settings** section contains duration units and profile JSON.
|
||||
columns remain included as metadata by default. **Manual header mapping** remains
|
||||
available in Setup for the header row and column choices. The separate
|
||||
**Advanced settings** section contains duration units and profile JSON.
|
||||
|
||||
The row type selector shows the detected type in parentheses, such as **Auto (Event)**.
|
||||
**Auto (?)** means unresolved or awaiting recheck.
|
||||
|
|
|
|||
Loading…
Reference in New Issue