Clarify rows without timing wording
This commit is contained in:
parent
2d8deb10cd
commit
c009c5cb38
|
|
@ -311,8 +311,11 @@ impl App {
|
|||
ui.strong("General options");
|
||||
ui.checkbox(&mut profile.ignore_warnings, "Ignore all warnings")
|
||||
.on_hover_text("Try ignoring rows with missing timing, missing titles or unresolved notes/breaks, then rebuild and validate. Column ambiguity and inconsistent timings still block export. Existing manual corrections are preserved.");
|
||||
ui.checkbox(&mut profile.untimed_as_notes, "Treat untimed rows as notes")
|
||||
.on_hover_text("Attach untimed rows to the preceding event. Applied before automatic warning exclusions, so notes are retained where possible.");
|
||||
ui.checkbox(
|
||||
&mut profile.untimed_as_notes,
|
||||
"Treat rows without a timing as notes",
|
||||
)
|
||||
.on_hover_text("Attach rows without a timing to the preceding event. Applied before automatic warning exclusions, so notes are retained where possible.");
|
||||
ui.small("Applied on analysis / recheck. Export requires a consistent schedule.");
|
||||
if before != serde_json::to_string(&profile).unwrap() {
|
||||
self.profile = serde_json::to_string_pretty(&profile).unwrap();
|
||||
|
|
|
|||
|
|
@ -41,6 +41,14 @@ fn short(text: &str, count: usize) -> String {
|
|||
result
|
||||
}
|
||||
|
||||
fn diagnostic_name(code: &str) -> String {
|
||||
if code == "UNTIMED_ROW" {
|
||||
"ROW WITHOUT A TIMING".into()
|
||||
} else {
|
||||
code.replace('_', " ")
|
||||
}
|
||||
}
|
||||
|
||||
/// Presentation only: retain source values and avoid treating plain numbers as times.
|
||||
fn cell_text(cell: &crate::model::Cell) -> String {
|
||||
if cell.time_style {
|
||||
|
|
@ -183,7 +191,7 @@ fn row_hover_text(row: &PreviewRow, analysis: &Analysis, status: &str) -> String
|
|||
};
|
||||
explanation.push_str(&format!(
|
||||
"{severity} · {relationship}{}\n{}\n{}\n\nHow to resolve: {}",
|
||||
diagnostic.code.replace('_', " "),
|
||||
diagnostic_name(&diagnostic.code),
|
||||
if row.related_issues.contains(index) {
|
||||
format!("Related issue at {}", diagnostic.location)
|
||||
} else {
|
||||
|
|
@ -715,7 +723,7 @@ impl App {
|
|||
"{} · {} · {}",
|
||||
i + 1,
|
||||
d.location,
|
||||
short(&d.code.replace('_', " ").to_lowercase(), 40)
|
||||
short(&diagnostic_name(&d.code).to_lowercase(), 40)
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -729,7 +737,7 @@ impl App {
|
|||
egui::Frame::new().fill(Color32::from_rgb(47, 40, 31)).inner_margin(8.0).corner_radius(5.0).show(ui, |ui| {
|
||||
ui.set_width(ui.available_width());
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
ui.strong(d.code.replace('_', " ").to_lowercase());
|
||||
ui.strong(diagnostic_name(&d.code).to_lowercase());
|
||||
if let Some(row) = diagnostic_row(&d) {
|
||||
if ui.small_button(format!("Show row {row}")).clicked() {
|
||||
self.selected_row = Some(row);
|
||||
|
|
@ -1000,7 +1008,7 @@ impl App {
|
|||
egui::Frame::group(ui.style()).show(ui, |ui| {
|
||||
ui.colored_label(color, if preview.related_issues.contains(index) {
|
||||
"RELATED OVERLAP".into()
|
||||
} else { d.code.replace('_', " ") });
|
||||
} else { diagnostic_name(&d.code) });
|
||||
ui.add(egui::Label::new(row_diagnostic_message(preview, *index, d)).wrap());
|
||||
});
|
||||
}
|
||||
|
|
@ -1128,7 +1136,7 @@ impl App {
|
|||
PREVIEW_RED
|
||||
};
|
||||
egui::Frame::group(ui.style()).show(ui, |ui| {
|
||||
ui.colored_label(color, d.code.replace('_', " "));
|
||||
ui.colored_label(color, diagnostic_name(&d.code));
|
||||
ui.add(
|
||||
egui::Label::new(
|
||||
d.message
|
||||
|
|
@ -2086,7 +2094,7 @@ mod tests {
|
|||
assert!(
|
||||
labels
|
||||
.iter()
|
||||
.any(|(s, _)| s.contains("WARNING · UNTIMED ROW")
|
||||
.any(|(s, _)| s.contains("WARNING · ROW WITHOUT A TIMING")
|
||||
&& s.contains("Show!row 3")
|
||||
&& s.contains("This row has content but no timing")
|
||||
&& s.contains("How to resolve:")
|
||||
|
|
@ -2247,7 +2255,7 @@ mod tests {
|
|||
assert!(
|
||||
labels
|
||||
.iter()
|
||||
.any(|(s, _)| s == "Treat untimed rows as notes")
|
||||
.any(|(s, _)| s == "Treat rows without a timing as notes")
|
||||
);
|
||||
let button = labels
|
||||
.iter()
|
||||
|
|
@ -2282,7 +2290,7 @@ mod tests {
|
|||
let labels = render(&mut app, &ctx, size, vec![]);
|
||||
let notes = labels
|
||||
.iter()
|
||||
.find(|(s, _)| s == "Treat untimed rows as notes")
|
||||
.find(|(s, _)| s == "Treat rows without a timing as notes")
|
||||
.unwrap()
|
||||
.1
|
||||
.center();
|
||||
|
|
@ -3004,7 +3012,7 @@ mod tests {
|
|||
render(&mut app, &ctx, [860.0, 900.0], vec![]);
|
||||
let labels = render(&mut app, &ctx, [860.0, 900.0], vec![]);
|
||||
assert!(labels.iter().any(|(s, _)| s == "Original cells"));
|
||||
assert!(labels.iter().any(|(s, _)| s == "UNTIMED ROW"));
|
||||
assert!(labels.iter().any(|(s, _)| s == "ROW WITHOUT A TIMING"));
|
||||
assert!(labels.iter().any(|(s, _)| s == "Empty"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,12 @@ fn run(args: Args) -> Result<bool> {
|
|||
}
|
||||
}
|
||||
for d in &analysis.diagnostics {
|
||||
eprintln!("{} — {}: {}", d.code, d.location, d.message);
|
||||
let name = if d.code == "UNTIMED_ROW" {
|
||||
"ROW WITHOUT A TIMING".into()
|
||||
} else {
|
||||
d.code.clone()
|
||||
};
|
||||
eprintln!("{name} — {}: {}", d.location, d.message);
|
||||
}
|
||||
if let Some(r) = &analysis.rundown {
|
||||
println!("{} entries, {} untimed gaps", r.entries.len(), r.gaps.len());
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ pub fn construct(
|
|||
if let Some(prev) = result.entries.last_mut() {
|
||||
prev.source_rows.push(source_row(table, r));
|
||||
prev.decisions.push(format!(
|
||||
"Untimed row {} retained as notes{}",
|
||||
"Row {} without a timing retained as notes{}",
|
||||
r + 1,
|
||||
if group.is_some() {
|
||||
" inside merged block"
|
||||
|
|
@ -348,7 +348,7 @@ pub fn construct(
|
|||
"UNTIMED_ROW",
|
||||
at(table, r),
|
||||
format!(
|
||||
"This row has content but no timing. Clarify whether it is a note, marker, untimed break or event; use row_kinds or untimed_as_notes in a profile.\nRow preview:\n{}",
|
||||
"This row has content but no timing. Clarify whether it is a note, marker, gap or event; use row_kinds or untimed_as_notes in a profile.\nRow preview:\n{}",
|
||||
row_preview(table, r, map.header_row - 1)
|
||||
),
|
||||
));
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ resolution profiles and usable from the CLI:
|
|||
inconsistencies still block export. Manual row and duration decisions are kept.
|
||||
Automatically excluded rows are counted in the summary and remain visible in
|
||||
**All rows**. Disable the option and recheck to restore them.
|
||||
- **Treat untimed rows as notes** (`untimed_as_notes`): attach untimed rows to the
|
||||
- **Treat rows without a timing as notes** (`untimed_as_notes`): attach rows without a timing to the
|
||||
preceding event. When both options are enabled, this runs before warning
|
||||
exclusions so notes are kept wherever possible.
|
||||
|
||||
|
|
@ -134,10 +134,10 @@ and previous preview so you can resolve several rows without losing your place;
|
|||
export and remembering a resolution remain blocked until validation succeeds.
|
||||
Blank title and timing corrections restore source or calculated values. Start and end accept
|
||||
clock times such as `09:30` or `09:30:00`; duration accepts explicit values such as
|
||||
`2 min` or `00:02:00`. Missing timings, overlaps and untimed row decisions can be
|
||||
`2 min` or `00:02:00`. Missing timings, overlaps and decisions for rows without a timing can be
|
||||
resolved here. Unsupported interpretations and unresolved conflicts retain explicit
|
||||
errors; correct the source when available controls cannot express the intended fix.
|
||||
CLI untimed-row errors also include a labeled source preview.
|
||||
CLI errors for rows without a timing also include a labeled source preview.
|
||||
|
||||
**Save resolutions…** opens the save/load/remember controls without taking space away
|
||||
from the correction table. **Results** offers Open, Open output folder and Copy
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ predecessor pairs and three gap-overlap diagnostics. This subset also omits the
|
|||
those conflicts were removed. **No partial Ontime project was published.**
|
||||
|
||||
The remaining obstacles are semantic: selecting simultaneous tracks, deciding
|
||||
whether untimed rows are instructions or events, distinguishing arrivals and
|
||||
whether rows without a timing are instructions or events, distinguishing arrivals and
|
||||
cutoff markers from timers, and interpreting uncertain overnight deadlines.
|
||||
Neither a following start nor a missing table border supplies that information.
|
||||
Per the requested stop condition, no experimental reader or new runtime dependency
|
||||
|
|
|
|||
Loading…
Reference in New Issue