Include missing titles in bulk ignore
This commit is contained in:
parent
f26715b1ad
commit
57ff1526b7
|
|
@ -459,8 +459,11 @@ fn ignorable_rows(a: &Analysis, table: Option<&Table>, profile: &Profile) -> Vec
|
|||
.into_iter()
|
||||
.filter(|r| {
|
||||
r.row > 0
|
||||
&& r.source_only
|
||||
&& !r.issues.is_empty()
|
||||
&& (r.source_only
|
||||
|| r.issues
|
||||
.iter()
|
||||
.all(|i| a.diagnostics[*i].code == "MISSING_TITLE"))
|
||||
&& r.issues
|
||||
.iter()
|
||||
.all(|i| needs_information(&a.diagnostics[*i]))
|
||||
|
|
@ -1313,7 +1316,7 @@ impl App {
|
|||
self.row_details = true;
|
||||
}
|
||||
ignore_all = ui.add_enabled(!ignorable.is_empty(), egui::Button::new(format!("Ignore all unresolved ({})", ignorable.len())))
|
||||
.on_hover_text("Ignores unresolved source rows across this sheet, including rows outside the current filter. Timed rows, timing errors and existing row corrections are kept. Apply & recheck; restore ignored rows under All rows.").clicked();
|
||||
.on_hover_text("Ignores unresolved source rows and timed rows missing a title across this sheet, including rows outside the current filter. Other timed rows, timing errors and existing row corrections are kept. Apply & recheck; restore ignored rows under All rows.").clicked();
|
||||
});
|
||||
if ignore_all && let Ok(mut profile) = serde_json::from_str::<Profile>(&self.profile) {
|
||||
for row in ignorable {
|
||||
|
|
@ -2180,8 +2183,15 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn bulk_ignore_skips_timed_rows_errors_and_previous_decisions() {
|
||||
fn bulk_ignore_includes_missing_titles_but_skips_timing_errors_and_decisions() {
|
||||
let mut app = sample();
|
||||
app.tables[0].rows[1][2].text.clear();
|
||||
app.analysis = Some(pipeline::analyze(
|
||||
&app.tables[0],
|
||||
&Profile::default(),
|
||||
&AtomicBool::new(false),
|
||||
|_, _| {},
|
||||
));
|
||||
app.analysis
|
||||
.as_mut()
|
||||
.unwrap()
|
||||
|
|
@ -2209,19 +2219,19 @@ mod tests {
|
|||
let labels = render(&mut app, &ctx, size, vec![]);
|
||||
let button = labels
|
||||
.iter()
|
||||
.find(|(s, _)| s == "Ignore all unresolved (8)")
|
||||
.find(|(s, _)| s == "Ignore all unresolved (9)")
|
||||
.unwrap()
|
||||
.1
|
||||
.center();
|
||||
click_size(&mut app, &ctx, button, size);
|
||||
let profile: Profile = serde_json::from_str(&app.profile).unwrap();
|
||||
assert_eq!(profile.row_kinds.len(), 10);
|
||||
assert_eq!(profile.row_kinds.len(), 11);
|
||||
assert_eq!(profile.row_kinds[&6], "note");
|
||||
assert_eq!(profile.starts[&7], "09:30");
|
||||
assert_eq!(profile.ends[&7], "09:32");
|
||||
assert_eq!(profile.durations[&7], "2 min");
|
||||
assert_eq!(profile.row_kinds[&3], "ignore");
|
||||
assert!(!profile.row_kinds.contains_key(&2));
|
||||
assert_eq!(profile.row_kinds[&2], "ignore");
|
||||
assert!(!profile.row_kinds.contains_key(&4));
|
||||
assert!(!profile.row_kinds.contains_key(&15));
|
||||
assert!(app.dirty);
|
||||
|
|
|
|||
|
|
@ -98,12 +98,12 @@ visually distinct from labels and ordinary actions; the active tab uses the stro
|
|||
Unresolved source rows offer **Ignore** to set the ignore resolution and
|
||||
**Details** to open the row editor. Ignoring requires recheck and can be undone
|
||||
under All rows. **Ignore all unresolved (N)** applies this to unresolved source
|
||||
rows across the sheet, regardless of the current filter. Timed rows, timing
|
||||
errors and existing manual row/timing corrections are excluded.
|
||||
rows and timed rows missing a title across the sheet, regardless of the current
|
||||
filter. Other timed rows, timing errors and existing manual corrections are excluded.
|
||||
Hover over a title or details button for row status and full diagnostic explanations.
|
||||
Double-click anywhere on a source row, or click its **Details** / **Error** button,
|
||||
to open the same editor (inline dropdowns keep their normal interaction).
|
||||
It shows timing, editable row type and duration, full diagnostics, timing
|
||||
It shows timing, editable row type and start/end/duration corrections, full diagnostics, timing
|
||||
decisions and a formatted table of original cells (including empty values and
|
||||
formulas). Pending edits are distinguished from the last analyzed timing.
|
||||
**Issues** opens the issue navigator, including sheet-level and gap errors.
|
||||
|
|
|
|||
Loading…
Reference in New Issue