Link review remapping to Setup settings
This commit is contained in:
parent
3132dc50e5
commit
74de54eb2d
|
|
@ -249,9 +249,8 @@ impl App {
|
|||
}
|
||||
}
|
||||
fn mapping_controls(&mut self, ui: &mut egui::Ui) {
|
||||
ui.collapsing("Remap columns, header and units / advanced profile", |ui| {
|
||||
self.mapping_fields(ui)
|
||||
});
|
||||
ui.heading("Remap columns, header and units / advanced profile");
|
||||
self.mapping_fields(ui);
|
||||
}
|
||||
fn mapping_fields(&mut self, ui: &mut egui::Ui) {
|
||||
if let (Some(table), Ok(mut profile)) = (
|
||||
|
|
|
|||
|
|
@ -449,7 +449,10 @@ impl App {
|
|||
ui.heading("Column meanings");
|
||||
ui.label("Choose the intended role when inference is ambiguous. Every timing cell is still validated.");
|
||||
ui.label("Metadata goes into Ontime notes. Ignore excludes the column from inference and Ontime export. Auto includes other columns as metadata.");
|
||||
self.mapping_controls(ui);
|
||||
if ui.link("Remap columns in Setup →").clicked() {
|
||||
self.settings = true;
|
||||
self.tab = Tab::Setup;
|
||||
}
|
||||
if let (Some(table), Ok(mut profile)) = (
|
||||
self.tables.iter().find(|t| t.name == self.sheet),
|
||||
serde_json::from_str::<Profile>(&self.profile),
|
||||
|
|
@ -1051,6 +1054,33 @@ mod tests {
|
|||
assert!(app.dirty);
|
||||
}
|
||||
}
|
||||
#[test]
|
||||
fn remap_link_opens_setup_with_mapping_settings_visible() {
|
||||
let mut app = sample();
|
||||
app.review_view = ReviewView::Columns;
|
||||
let profile = app.profile.clone();
|
||||
let ctx = egui::Context::default();
|
||||
configure_style(&ctx);
|
||||
let size = [860.0, 620.0];
|
||||
render(&mut app, &ctx, size, vec![]);
|
||||
let labels = render(&mut app, &ctx, size, vec![]);
|
||||
let link = labels
|
||||
.iter()
|
||||
.find(|(s, _)| s == "Remap columns in Setup →")
|
||||
.unwrap()
|
||||
.1
|
||||
.center();
|
||||
click_size(&mut app, &ctx, link, size);
|
||||
assert!(app.tab == Tab::Setup);
|
||||
assert!(app.settings);
|
||||
render(&mut app, &ctx, size, vec![]);
|
||||
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());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn preview_includes_missing_rows_in_order_and_opens_their_issue() {
|
||||
let mut app = sample();
|
||||
|
|
|
|||
|
|
@ -54,8 +54,9 @@ click **Analyze rundown**. Review has two views:
|
|||
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. Expand **Remap columns, header and units /
|
||||
advanced profile** for header row, duration units and JSON settings (also in Setup).
|
||||
columns remain included as metadata by default. **Remap columns in Setup →**
|
||||
opens Setup with mapping settings expanded for header row, duration units and
|
||||
advanced JSON settings.
|
||||
|
||||
Click **Apply & recheck** after corrections. Pending edits retain the issue list
|
||||
and previous preview so you can resolve several rows without losing your place;
|
||||
|
|
|
|||
Loading…
Reference in New Issue