mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-19 12:38:18 +00:00
Place: show progress window with Cancel for slow placed files (part of #5930)
This commit is contained in:
@@ -1596,6 +1596,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
|
||||
"",
|
||||
"{} close the progress window of the files being opened; they go on being read, shown in the status bar → {hidden: n}",
|
||||
),
|
||||
(
|
||||
"file.cancelPlace",
|
||||
"Cancel Place",
|
||||
"",
|
||||
"{} stop placing every file being read in the background (its progress window's Cancel): the files aren't placed → {cancelled: n}",
|
||||
),
|
||||
(
|
||||
"ui.dxfOptionsDialog",
|
||||
"DXF Options Dialog",
|
||||
|
||||
@@ -637,6 +637,7 @@ impl VectorcraftApp {
|
||||
plugin_runs::show(self, &ctx);
|
||||
trace_runs::show(self, &ctx);
|
||||
opening::show(self, &ctx);
|
||||
placing::show(self, &ctx);
|
||||
// After every window this pass may open, and before the palette's field takes the keyboard.
|
||||
panel_docking::close_overlays_for_modal(self, &ctx);
|
||||
palette::show(self, &ctx);
|
||||
|
||||
@@ -135,11 +135,20 @@ pub enum Pressed {
|
||||
Hide,
|
||||
}
|
||||
|
||||
/// A modal progress window with only a Cancel button (and bound to Esc).
|
||||
pub fn window_cancel(ctx: &egui::Context, id: &str, heading: &str, body: impl FnOnce(&mut egui::Ui)) -> Option<Pressed> {
|
||||
window_impl(ctx, id, heading, false, body)
|
||||
}
|
||||
|
||||
/// A modal window (`id`) headed `heading`, in the UI language: `body` draws how far the work has
|
||||
/// got, then come Cancel (also Esc) and Continue in Background → the one pressed. Work that may
|
||||
/// take a while in the background shows it: exports, and heavy plug-in filters
|
||||
/// ([`crate::plugin_runs`]).
|
||||
pub fn window(ctx: &egui::Context, id: &str, heading: &str, body: impl FnOnce(&mut egui::Ui)) -> Option<Pressed> {
|
||||
window_impl(ctx, id, heading, true, body)
|
||||
}
|
||||
|
||||
fn window_impl(ctx: &egui::Context, id: &str, heading: &str, allow_hide: bool, body: impl FnOnce(&mut egui::Ui)) -> Option<Pressed> {
|
||||
let mut pressed = None;
|
||||
modal::show(ctx, heading, egui::Id::unique(id), -40.0, 20, |ui| {
|
||||
ui.set_width(360.0);
|
||||
@@ -152,9 +161,11 @@ pub fn window(ctx: &egui::Context, id: &str, heading: &str, body: impl FnOnce(&m
|
||||
if widgets::secondary_button(ui, "Cancel").clicked() {
|
||||
pressed = Some(Pressed::Cancel);
|
||||
}
|
||||
ui.add_space(8.0);
|
||||
if widgets::secondary_button(ui, "Continue in Background").clicked() {
|
||||
pressed = Some(Pressed::Hide);
|
||||
if allow_hide {
|
||||
ui.add_space(8.0);
|
||||
if widgets::secondary_button(ui, "Continue in Background").clicked() {
|
||||
pressed = Some(Pressed::Hide);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -187,6 +187,7 @@ fn run_ui_part1(app: &mut VectorcraftApp, id: &str, p: &Value) -> Option<Result<
|
||||
"file.saveInBackground" => Ok(io::hide_saves(app)),
|
||||
"file.cancelOpen" => Ok(crate::opening::cancel_all(app)),
|
||||
"file.openInBackground" => Ok(crate::opening::hide_all(app)),
|
||||
"file.cancelPlace" => Ok(crate::placing::cancel_all(app)),
|
||||
id if id.starts_with("file.openRecent") => match recent_slot(app, id).filter(|path| recent_readable(path)).cloned() {
|
||||
Some(path) => io::open_reporting(app, &path),
|
||||
None => Err("no such recent file".into()),
|
||||
|
||||
@@ -240,6 +240,7 @@ pub fn enabled(app: &VectorcraftApp, id: &str) -> bool {
|
||||
"file.cancelSave" | "file.saveInBackground" => app.background.running(crate::background::Kind::Save),
|
||||
"file.cancelOpen" => !app.opening.pending.is_empty(),
|
||||
"file.openInBackground" => crate::opening::any_shown(app),
|
||||
"file.cancelPlace" => crate::placing::can_cancel(app),
|
||||
"plugin.cancelRuns" => crate::plugin_runs::any_running(app),
|
||||
"plugin.hideRuns" => crate::plugin_runs::any_shown(app),
|
||||
"imageTrace.cancelRuns" => crate::trace_runs::any_running(app),
|
||||
|
||||
@@ -1597,6 +1597,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
|
||||
"",
|
||||
"{} close the progress window of the files being opened; they go on being read, shown in the status bar → {hidden: n}",
|
||||
),
|
||||
(
|
||||
"file.cancelPlace",
|
||||
"Cancel Place",
|
||||
"",
|
||||
"{} stop placing every file being read in the background (its progress window's Cancel): the files aren't placed → {cancelled: n}",
|
||||
),
|
||||
(
|
||||
"ui.dxfOptionsDialog",
|
||||
"DXF Options Dialog",
|
||||
|
||||
@@ -209,7 +209,7 @@ pub fn show(app: &mut VectorcraftApp, ctx: &egui::Context) {
|
||||
seen.1
|
||||
});
|
||||
let exporting = app.background.jobs.iter().any(|j| j.progress.is_some() && !j.hidden && !j.cancelled());
|
||||
let other = exporting || crate::plugin_runs::any_shown(app) || crate::trace_runs::any_shown(app);
|
||||
let other = exporting || crate::plugin_runs::any_shown(app) || crate::trace_runs::any_shown(app) || crate::placing::any_shown(app);
|
||||
if now - since < DELAY || app.ui.dialog.is_some() || other {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ use std::sync::mpsc::{Receiver, Sender, TryRecvError, channel};
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use serde_json::{Value, json};
|
||||
use vectorcraft_engine::cancel::{self, CancelToken};
|
||||
use vectorcraft_engine::cmd::clipboard::{Clipboard, Flavour, ImageRead, read_image};
|
||||
use vectorcraft_engine::cmd::place::{PlaceRead, QueueRead};
|
||||
use vectorcraft_engine::file_access::ScopeHandle;
|
||||
@@ -154,6 +155,7 @@ enum Pasted {
|
||||
|
||||
/// Files being read for Place.
|
||||
pub struct Pending {
|
||||
pub(crate) id: u64,
|
||||
/// The file's name ("photo.tif"; the names joined with ", " for the place cursor's files).
|
||||
pub(crate) name: String,
|
||||
/// What the status bar shows ("Placing photo.tif").
|
||||
@@ -167,13 +169,15 @@ pub struct Pending {
|
||||
/// [`crate::place::drop_files`]'s do).
|
||||
dropped: bool,
|
||||
/// Whether it is a paste's bitmap ([`adopt_for_paste`]) rather than a file.
|
||||
paste: bool,
|
||||
pub(crate) paste: bool,
|
||||
/// The number of the paste's chain ([`Placing::chains`]).
|
||||
chain: Option<u64>,
|
||||
done: Receiver<Result<Read, String>>,
|
||||
/// The automation roots in force when the read started, kept in force when it is placed: a
|
||||
/// DXF placed against an artboard that changed meanwhile is read again then.
|
||||
scope: ScopeHandle,
|
||||
token: CancelToken,
|
||||
pub hidden: bool,
|
||||
}
|
||||
|
||||
/// A read waiting for the thread that reads the files.
|
||||
@@ -198,6 +202,7 @@ pub struct Placing {
|
||||
latest_chain: HashMap<u64, u64>,
|
||||
/// The number the next chain takes.
|
||||
next_chain: u64,
|
||||
pub next_id: u64,
|
||||
/// The thread that reads the files, one at a time in the order they were started: started with
|
||||
/// the first read, it ends when the app does.
|
||||
reader: Option<Sender<Job>>,
|
||||
@@ -389,6 +394,8 @@ fn spawn_labeled(
|
||||
let completion = scope.clone();
|
||||
#[cfg(test)]
|
||||
let reading = app.placing.reading.clone();
|
||||
let token = CancelToken::new();
|
||||
let raised = token.clone();
|
||||
let job: Job = Box::new(move || {
|
||||
#[cfg(test)]
|
||||
{
|
||||
@@ -396,7 +403,7 @@ fn spawn_labeled(
|
||||
reading[1].fetch_max(now, std::sync::atomic::Ordering::SeqCst);
|
||||
}
|
||||
let r = scope
|
||||
.run(|| vectorcraft_engine::guard::catch_panic(read))
|
||||
.run(|| vectorcraft_engine::guard::catch_panic(|| cancel::scope(&raised, None, read)))
|
||||
.unwrap_or_else(|msg| Err(format!("internal error: {msg} (please report this bug)")));
|
||||
#[cfg(test)]
|
||||
reading[0].fetch_sub(1, std::sync::atomic::Ordering::SeqCst);
|
||||
@@ -421,7 +428,22 @@ fn spawn_labeled(
|
||||
let _ = reader.send(job);
|
||||
app.placing.reader = Some(reader);
|
||||
}
|
||||
app.placing.pending.push(Pending { name, label: label.clone(), doc, reverts, dropped, paste: chain.is_some(), chain, done, scope: completion });
|
||||
app.placing.next_id += 1;
|
||||
let id = app.placing.next_id;
|
||||
app.placing.pending.push(Pending {
|
||||
id,
|
||||
name,
|
||||
label: label.clone(),
|
||||
doc,
|
||||
reverts,
|
||||
dropped,
|
||||
paste: chain.is_some(),
|
||||
chain,
|
||||
done,
|
||||
scope: completion,
|
||||
token,
|
||||
hidden: false,
|
||||
});
|
||||
let status = format!("{label}…");
|
||||
app.status(status.clone());
|
||||
Ok(Some(json!({ "background": true, "status": status })))
|
||||
@@ -712,5 +734,76 @@ pub(crate) fn confirm_swatch_paste(app: &mut VectorcraftApp, id: &str, params: V
|
||||
result
|
||||
}
|
||||
|
||||
/// The progress window's Cancel: the files being read for Place aren't placed.
|
||||
pub fn cancel_all(app: &mut VectorcraftApp) -> Value {
|
||||
let mut cancelled = 0;
|
||||
let mut i = 0;
|
||||
while i < app.placing.pending.len() {
|
||||
if !app.placing.pending[i].paste {
|
||||
let p = app.placing.pending.remove(i);
|
||||
p.token.cancel();
|
||||
if app.ui.status == format!("{}…", p.label) {
|
||||
app.ui.status.clear();
|
||||
}
|
||||
if let Some(chain) = p.chain
|
||||
&& !app.placing.swatch_paste.as_ref().is_some_and(|waiting| waiting.chain == chain)
|
||||
{
|
||||
finish_chain(app, chain);
|
||||
}
|
||||
cancelled += 1;
|
||||
} else {
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
json!({ "cancelled": cancelled })
|
||||
}
|
||||
|
||||
/// Can any placed file being read be cancelled?
|
||||
pub fn can_cancel(app: &VectorcraftApp) -> bool {
|
||||
app.placing.pending.iter().any(|p| !p.paste)
|
||||
}
|
||||
|
||||
/// Is a placed file being read that the progress window shows?
|
||||
pub fn any_shown(app: &VectorcraftApp) -> bool {
|
||||
app.placing.pending.iter().any(|p| !p.paste && !p.hidden)
|
||||
}
|
||||
|
||||
/// The progress window of the first file being read for Place, once that has been read for
|
||||
/// [`crate::export_progress::DELAY`]: a quick place doesn't flash it. Not while a dialog or another
|
||||
/// progress window (an export, a heavy plug-in filter, an Image Trace, an open) is open: never two modals at once.
|
||||
pub fn show(app: &mut VectorcraftApp, ctx: &egui::Context) {
|
||||
let shown: Vec<&Pending> = app.placing.pending.iter().filter(|p| !p.paste && !p.hidden).collect();
|
||||
let Some(first) = shown.first() else { return };
|
||||
let now = ctx.input(|i| i.time);
|
||||
let since = ctx.data_mut(|m| {
|
||||
let seen = m.get_temp_mut_or_insert_with(egui::Id::unique("placing-seen"), || (first.id, now));
|
||||
if seen.0 != first.id {
|
||||
*seen = (first.id, now);
|
||||
}
|
||||
seen.1
|
||||
});
|
||||
let exporting = app.background.jobs.iter().any(|j| j.progress.is_some() && !j.hidden && !j.cancelled());
|
||||
let other = exporting || crate::plugin_runs::any_shown(app) || crate::trace_runs::any_shown(app) || crate::opening::any_shown(app);
|
||||
if now - since < crate::export_progress::DELAY || app.ui.dialog.is_some() || other {
|
||||
return;
|
||||
}
|
||||
let heading = format!("{}…", crate::i18n::msg(&first.label));
|
||||
let more = shown.len() - 1;
|
||||
let t = crate::theme::Tokens::get(ctx);
|
||||
let pressed = crate::export_progress::window_cancel(ctx, "placing-progress", &heading, |ui| {
|
||||
crate::export_progress::indeterminate(ui, tl!("Reading the file…"));
|
||||
if more > 0 {
|
||||
ui.add_space(6.0);
|
||||
let queued = crate::i18n::tn(more as u64, "{n} more file waiting", "{n} more files waiting");
|
||||
ui.label(egui::RichText::new(queued).size(11.5).color(t.text_dim));
|
||||
}
|
||||
});
|
||||
if pressed == Some(crate::export_progress::Pressed::Cancel)
|
||||
&& let Err(e) = app.run("file.cancelPlace", json!({}))
|
||||
{
|
||||
app.status(e);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
@@ -1911,3 +1911,172 @@ fn a_file_read_again_when_placed_stays_within_the_roots_it_was_read_in() {
|
||||
assert!(app.ui.status.contains("outside the read root"), "{}", app.ui.status);
|
||||
let _ = std::fs::remove_dir_all(base);
|
||||
}
|
||||
|
||||
/// Draws one frame of the place progress window at `time` seconds → the texts it drew.
|
||||
fn progress(app: &mut VectorcraftApp, ctx: &egui::Context, time: f64) -> String {
|
||||
let mut out = ctx.run_ui(egui::RawInput { time: Some(time), ..Default::default() }, |ui| super::show(app, ui.ctx()));
|
||||
out.textures_delta.clear();
|
||||
let mut texts = String::new();
|
||||
for shape in out.shapes {
|
||||
if let egui::epaint::Shape::Text(t) = shape.shape {
|
||||
texts.push_str(t.galley.text());
|
||||
texts.push('\n');
|
||||
}
|
||||
}
|
||||
texts
|
||||
}
|
||||
|
||||
/// #5930: placing a file that takes longer than 0.4 s shows a progress window with its name,
|
||||
/// an indeterminate moving bar and a Cancel button (Escape); never two modals at once.
|
||||
#[test]
|
||||
fn a_file_that_takes_a_while_to_place_shows_a_progress_window() {
|
||||
let hold = Arc::new(std::sync::atomic::AtomicBool::new(true));
|
||||
let hold_read = hold.clone();
|
||||
let services = Services {
|
||||
read: Some(Box::new(move |p: &str| {
|
||||
while hold_read.load(std::sync::atomic::Ordering::SeqCst) {
|
||||
std::thread::sleep(std::time::Duration::from_millis(5));
|
||||
}
|
||||
std::fs::read(p).map_err(|e| e.to_string())
|
||||
})),
|
||||
..Default::default()
|
||||
};
|
||||
let mut app = VectorcraftApp::new(Session::new(), services);
|
||||
app.placing.off_the_ui_thread = true;
|
||||
app.run("file.new", json!({"width": 400, "height": 300})).unwrap();
|
||||
|
||||
let ctx = egui::Context::default();
|
||||
crate::theme::install_fonts(&ctx);
|
||||
assert_eq!(progress(&mut app, &ctx, 0.0), "", "nothing placing");
|
||||
|
||||
let slow_path = saved("progress", "slow.png", &picture(Png, 100, 100));
|
||||
let p = json!({"path": slow_path, "at": [200, 150]});
|
||||
start(&mut app, &p, false).unwrap();
|
||||
|
||||
// Not shown before DELAY (0.4 s)
|
||||
assert_eq!(progress(&mut app, &ctx, 1.0), "", "not at once");
|
||||
progress(&mut app, &ctx, 1.0 + crate::export_progress::DELAY + 0.05); // measures first
|
||||
let texts = progress(&mut app, &ctx, 1.0 + crate::export_progress::DELAY + 0.1);
|
||||
for want in ["Placing slow.png…", "Reading the file…", "Cancel"] {
|
||||
assert!(texts.contains(want), "{want} in {texts}");
|
||||
}
|
||||
assert!(!texts.contains("Continue in Background"), "no background button in {texts}");
|
||||
assert!(!texts.contains("waiting"), "{texts}");
|
||||
|
||||
// Another file queued shows more waiting
|
||||
let next_path = saved("progress", "next.png", &picture(Png, 100, 100));
|
||||
start(&mut app, &json!({"path": next_path, "at": [200, 150]}), false).unwrap();
|
||||
let texts = progress(&mut app, &ctx, 2.0);
|
||||
assert!(texts.contains("Placing slow.png…") && texts.contains("1 more file waiting"), "{texts}");
|
||||
|
||||
// Never two modals at once
|
||||
app.ui.dialog = Some(crate::state::Dialog::new(crate::dialogs::save_options::KIND, json!({})));
|
||||
assert_eq!(progress(&mut app, &ctx, 3.0), "", "never two modals at once");
|
||||
app.ui.dialog = None;
|
||||
|
||||
// Release and finish
|
||||
hold.store(false, std::sync::atomic::Ordering::SeqCst);
|
||||
placed(&mut app);
|
||||
}
|
||||
|
||||
/// #5930: cancelling a place aborts the operation, drops the parsed asset, leaves the document
|
||||
/// completely unmodified (no undo step added, no nodes added), and clears the status bar.
|
||||
#[test]
|
||||
fn cancelling_a_place_places_nothing() {
|
||||
let hold = Arc::new(std::sync::atomic::AtomicBool::new(true));
|
||||
let hold_read = hold.clone();
|
||||
let services = Services {
|
||||
read: Some(Box::new(move |p: &str| {
|
||||
while hold_read.load(std::sync::atomic::Ordering::SeqCst) {
|
||||
std::thread::sleep(std::time::Duration::from_millis(5));
|
||||
}
|
||||
std::fs::read(p).map_err(|e| e.to_string())
|
||||
})),
|
||||
..Default::default()
|
||||
};
|
||||
let mut app = VectorcraftApp::new(Session::new(), services);
|
||||
app.placing.off_the_ui_thread = true;
|
||||
app.run("file.new", json!({"width": 400, "height": 300})).unwrap();
|
||||
|
||||
let before = state(&app);
|
||||
let initial_names = names(&app);
|
||||
assert!(!crate::menus::enabled(&app, "file.cancelPlace"));
|
||||
|
||||
let slow_path = saved("cancel", "slow.png", &picture(Png, 100, 100));
|
||||
let p = json!({"path": slow_path, "at": [200, 150]});
|
||||
start(&mut app, &p, false).unwrap();
|
||||
|
||||
assert!(crate::menus::enabled(&app, "file.cancelPlace"));
|
||||
assert!(crate::opening::long_operation_busy(&app));
|
||||
assert!(app.ui.status.starts_with("Placing"));
|
||||
|
||||
// Cancel the place operation
|
||||
let cancelled = app.run("file.cancelPlace", json!({})).unwrap();
|
||||
assert_eq!(cancelled["cancelled"], 1);
|
||||
assert!(app.placing.pending.is_empty());
|
||||
assert!(!crate::opening::long_operation_busy(&app));
|
||||
assert!(!app.ui.status.starts_with("Placing"), "{}", app.ui.status);
|
||||
assert!(!crate::menus::enabled(&app, "file.cancelPlace"));
|
||||
|
||||
// Let the background reader thread finish reading and drain
|
||||
hold.store(false, std::sync::atomic::Ordering::SeqCst);
|
||||
app.placing.wait_for_reads();
|
||||
poll(&mut app);
|
||||
|
||||
// Document must be completely unmodified
|
||||
assert_eq!(state(&app), before, "document unmodified, no undo step added");
|
||||
assert_eq!(names(&app), initial_names, "no document nodes mutated or added");
|
||||
assert_eq!(app.session.doc().unwrap().history.undo.len(), 0, "no undo step added");
|
||||
}
|
||||
|
||||
/// #5930: Escape key in the progress window cancels the place operation.
|
||||
#[test]
|
||||
fn cancelling_a_place_via_escape_key() {
|
||||
let hold = Arc::new(std::sync::atomic::AtomicBool::new(true));
|
||||
let hold_read = hold.clone();
|
||||
let services = Services {
|
||||
read: Some(Box::new(move |p: &str| {
|
||||
while hold_read.load(std::sync::atomic::Ordering::SeqCst) {
|
||||
std::thread::sleep(std::time::Duration::from_millis(5));
|
||||
}
|
||||
std::fs::read(p).map_err(|e| e.to_string())
|
||||
})),
|
||||
..Default::default()
|
||||
};
|
||||
let mut app = VectorcraftApp::new(Session::new(), services);
|
||||
app.placing.off_the_ui_thread = true;
|
||||
app.run("file.new", json!({"width": 400, "height": 300})).unwrap();
|
||||
|
||||
let before = state(&app);
|
||||
let ctx = egui::Context::default();
|
||||
crate::theme::install_fonts(&ctx);
|
||||
|
||||
let slow_path = saved("escape", "slow.png", &picture(Png, 100, 100));
|
||||
let p = json!({"path": slow_path, "at": [200, 150]});
|
||||
start(&mut app, &p, false).unwrap();
|
||||
|
||||
// First frame initializes the timer at 1.0 s
|
||||
assert_eq!(progress(&mut app, &ctx, 1.0), "", "not at once");
|
||||
// Advance time past DELAY
|
||||
progress(&mut app, &ctx, 1.0 + crate::export_progress::DELAY + 0.05);
|
||||
let texts = progress(&mut app, &ctx, 1.0 + crate::export_progress::DELAY + 0.1);
|
||||
assert!(texts.contains("Placing slow.png…"));
|
||||
assert_eq!(app.placing.pending.len(), 1);
|
||||
|
||||
// Send Escape event
|
||||
let raw_input = egui::RawInput {
|
||||
events: vec![egui::Event::Key { key: egui::Key::Escape, physical_key: None, pressed: true, repeat: false, modifiers: egui::Modifiers::NONE }],
|
||||
time: Some(1.0 + crate::export_progress::DELAY + 0.15),
|
||||
..Default::default()
|
||||
};
|
||||
let _ = ctx.run_ui(raw_input, |ui| super::show(&mut app, ui.ctx()));
|
||||
|
||||
// Operation was cancelled
|
||||
assert!(app.placing.pending.is_empty(), "place was cancelled by Escape");
|
||||
|
||||
hold.store(false, std::sync::atomic::Ordering::SeqCst);
|
||||
app.placing.wait_for_reads();
|
||||
poll(&mut app);
|
||||
|
||||
assert_eq!(state(&app), before, "document completely unmodified");
|
||||
}
|
||||
|
||||
+2
-1
@@ -40,6 +40,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-11-19 | minor | G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s (part of #5930, `file.cancelPlace`); indeterminate moving bar, Cancel (Esc) leaves the document unmodified without undo steps; scores and estimates unchanged. |
|
||||
| 2026-11-18 | minor | G11: SVG export writes physical unit suffixes on the root <svg width="..." height="..."> for documents with physical units (mm, cm, in, pc), preventing drawings from scaling to 75% in external tools and preserving units across round-trips (#864; general unit preference on restart remains open under #864). Estimate 8–15 → 6–13 h. |
|
||||
| 2026-11-18 | minor | G12: Layers panel ruler guide and blend spine row context menus (#8592): Hide/Show, Lock/Unlock, Release Guides, Delete and Locate Object on guide rows; Select, Blend Options…, Reverse Spine, Reverse Front to Back, Expand, Release and Locate Object on blend spine rows. Scores and estimates unchanged. |
|
||||
| 2026-11-18 | minor | G19: PDF export writes the document language chosen in Document Setup as the catalog's `/Lang` (its BCP 47 tag, `en-US` by default) and the XMP packet's `dc:language`, in exported and printed PDFs (#3644); `/MarkInfo` stays with tagged PDF (#3643). Scores and estimates unchanged. |
|
||||
@@ -509,7 +510,7 @@ macOS cursor delivery (#2292) is narrowed to a native host adapter using the exi
|
||||
Estimate unchanged.
|
||||
- **Done (2026-10-21, #394):** General › Constrain Angle turns the arrow keys' axes (guides stay on the page's), holds Shift drags of the Selection, Direct Selection, Free Transform, Slice Selection, Reshape and Measure tools and the Pen's handles to the turned axes, and new rectangles, rounded rectangles, ellipses, grids, point and area type, Shift-drawn polygons and stars and the shape size dialogs are drawn along it with their bounding box turned; 0° and whole turns are exactly as before, quarter turns exact (<https://helpx.adobe.com/illustrator/desktop/manage-objects/arrange-objects/rotate-objects-by-specific-angles.html>). Flares and the Pen's new paths are not turned yet. Estimate unchanged.
|
||||
- **Done (2026-10-21, #394):** General › Constrain Angle turns the arrow keys' axes (guides stay on the page's), holds Shift drags of the Selection, Direct Selection, Free Transform, Slice Selection, Reshape and Measure tools and the Pen's handles to the turned axes, and new rectangles, rounded rectangles, ellipses, grids, point and area type, Shift-drawn polygons and stars and the shape size dialogs are drawn along it with their bounding box turned; 0° and whole turns are exactly as before, quarter turns exact (<https://helpx.adobe.com/illustrator/desktop/manage-objects/arrange-objects/rotate-objects-by-specific-angles.html>). Flares and the Pen's new paths are not turned yet. Estimate unchanged. **2026-10-24:** General › Corner Radius is the Rounded Rectangle tool's radius: the tool takes the preference when chosen and when it changes while the tool is active (or lent a selection tool for a drag), and the radius ↑/↓ set while drawing one, or a Tool Options value, becomes the preference, clamped to its 0–1296 pt range (<https://helpx.adobe.com/illustrator/using/drawing-simple-lines-shapes.html>). Estimate unchanged.
|
||||
- **Done (2026-10-17):** Background Export shows its progress in a dialog with Cancel and Continue in Background (#2564), on the shared cancel token (#2546); a cancelled export writes no file. Save As, Export for Screens and Export Selection don't show it yet. Estimate unchanged. **2026-11-06:** opening a file that takes longer than 0.4 s shows a progress window too, with a moving bar, Cancel and Continue in Background (part of #5930); Save and Place still show only the status bar's spinner. Estimate unchanged. **2026-11-15:** a save that runs in the background shows in that window too, with a moving bar, Cancel (the file stays as it was and the document stays modified) and Continue in Background (`file.cancelSave`, `file.saveInBackground`); Place still shows only the spinner. Estimate unchanged.
|
||||
- **Done (2026-10-17):** Background Export shows its progress in a dialog with Cancel and Continue in Background (#2564), on the shared cancel token (#2546); a cancelled export writes no file. Save As, Export for Screens and Export Selection don't show it yet. Estimate unchanged. **2026-11-06:** opening a file that takes longer than 0.4 s shows a progress window too, with a moving bar, Cancel and Continue in Background (part of #5930); Save and Place still show only the status bar's spinner. Estimate unchanged. **2026-11-15:** a save that runs in the background shows in that window too, with a moving bar, Cancel (the file stays as it was and the document stays modified) and Continue in Background (`file.cancelSave`, `file.saveInBackground`); Place still shows only the spinner. Estimate unchanged. **2026-11-19:** placing a file that takes longer than 0.4 s shows a progress window too, with the file name, an indeterminate moving bar and Cancel (Esc; `file.cancelPlace`: the file isn't placed and the document stays unmodified; part of #5930). Estimate unchanged.
|
||||
- **Done:** quick Image Trace presets trace at once and leave the panel as it was; the Image Trace button (Control bar, Properties) opens the controls with Threshold and Advanced (Paths, Corners, Noise), as the public documentation describes (<https://helpx.adobe.com/illustrator/using/image-trace-results-optimization.html>). Other context-specific Properties gaps remain.
|
||||
- **Done (2026-10-31, #394):** Units › East Asian Type is read, and Q and Ha are units. 1 Q and 1 Ha are each a
|
||||
quarter of a millimetre (0.709 pt), the Japanese typesetting units: the [Illustrator Scripting Guide's
|
||||
|
||||
@@ -71,6 +71,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-11-19 | minor | G12: Place: show progress window with Cancel for slow placed files (part of #5930, `file.cancelPlace`). Placing a file that takes longer than 0.4 s shows the standard progress window with the file name, an indeterminate progress indicator and a Cancel button (Escape); cancelling cleanly aborts the place operation and leaves the document unmodified without adding undo steps. Tests: `placing::tests::a_file_that_takes_a_while_to_place_shows_a_progress_window`, `placing::tests::cancelling_a_place_places_nothing`, `placing::tests::cancelling_a_place_via_escape_key`. Scores and estimates unchanged. |
|
||||
| 2026-11-18 | minor | G11: SVG export writes physical unit suffixes on the root <svg width="..." height="..."> for documents with physical units (mm, cm, in, pc), preventing drawings from scaling to 75% in external tools and preserving units across round-trips (#864; general unit preference on restart remains open under #864). Tests: export_physical_units_writes_unit_suffixes (crates/svg/tests/it/import_units.rs) and svg_round_trip_preserves_document_units (crates/engine/src/cmd/fileio/tests_svg.rs). G11 estimate 8–15 → 6–13 h. |
|
||||
| 2026-11-18 | minor | PDF import (#8543): type filled and stroked (text rendering modes 2 and 6) by a `TJ` whose kerning starts a new line part way through came in as four type objects, each part filled only and each part stroked only over it: the reader fills every glyph of the operator before it strokes them, and the line the first part was gathered on was finished before the stroke pass came back to it. Lines an operator's fill pass finishes while a stroke may still be drawn over them are now kept (up to 64 besides the open line, so a `TJ` over up to 65 lines: one over more stays a filled object and a stroked one for each part, as before) until the stroke pass goes past them, and the pass's strokes are held (up to 4096: a longer pass is matched a part at a time, each part to glyphs filled one right after another, never to one an operator before it filled) until it ends, then matched to the glyphs filled last, in the order they were filled, so each stroke finds the glyph it was filled as, also where the `TJ` draws a glyph again where it drew one (`[(A) -3500 (B) 4834 (A)] TJ`). Each part comes in as one type object filled and stroked, in the order drawn; also a `TJ` that jumps back and one whose kerning starts two new lines. In an `ActualText` span (whose stroke was lost) the replacement text stays one type object on the first glyph's line and in its style, now filled and stroked, also where the `TJ` draws a glyph again: the span's strokes are matched the same way. A stroke over no filled glyph (stroked type of its own) and the start and end of an `ActualText` span end a stroke pass: no stroke after them goes over a glyph filled before them, so none is drawn under type drawn after it, and a later span keeps its own replacement text. Stroke rendering stays stroke only, and translucent type stays a filled object and a stroked one. Tests: `a_tj_whose_kerning_starts_a_new_line_is_filled_and_stroked`, `a_tj_that_draws_a_glyph_again_where_it_drew_one_strokes_each_copy`, `a_stroked_tj_whose_kerning_starts_a_new_line_stays_stroke_only`, `a_translucent_tj_whose_kerning_starts_a_new_line_stays_fill_and_stroke_apart`, `a_long_stroke_pass_strokes_its_own_glyphs_not_one_filled_before`, `a_stroke_after_stroked_type_of_its_own_does_not_join_a_glyph_filled_before`, `a_stroke_in_an_actual_text_span_does_not_take_an_earlier_spans_glyph`, `a_tj_that_draws_a_glyph_again_in_an_actual_text_span_strokes_the_replacement`, `a_tj_over_more_lines_than_are_kept_comes_in_as_fill_and_stroke_apart`, `a_tj_over_more_lines_than_are_kept_that_ends_where_it_began_stays_fill_and_stroke_apart`, `type_after_a_tj_over_more_lines_than_are_kept_is_filled_and_stroked`; scores and estimates unchanged. |
|
||||
| 2026-11-18 | minor | Hardening: PDF export writes the document language (Document Setup) as the catalog's `/Lang` and XMP `dc:language` (#3644). Scores and estimates unchanged. |
|
||||
|
||||
+2
-1
@@ -22,6 +22,7 @@ Numeric fields step on wheel hover without taking keyboard focus (#5949). Arrow
|
||||
|
||||
A flare keeps its settings through transforms and saves. With a flare selected, double-clicking the Flare tool opens Flare Tool Options filled from it, and OK draws it again in its place as one undo step (`shape.editFlare`; none when nothing changed); the Flare tool shows the selected flare's center and end handles, and dragging either changes its length or direction; Object › Expand turns it into plain objects ([Draw and edit flares](https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/draw-shapes/draw-and-edit-flares.html)). Regressions: `edit_flare_draws_a_transformed_flare_again_in_its_place_in_one_undo_step`, `dragging_a_selected_flares_handles_changes_its_length_and_direction` and `with_a_flare_selected_the_options_show_its_settings_and_ok_draws_it_again`. Scores and estimates unchanged.
|
||||
|
||||
| 2026-11-19 | minor | Placing a file that takes longer than 0.4 s shows a progress window: the file name, an indeterminate moving bar and Cancel (Esc; the file isn't placed and the document stays unmodified) (part of #5930, `file.cancelPlace`); scores and estimates unchanged |
|
||||
| 2026-11-06 | minor | Opening a file that takes longer than 0.4 s shows a progress window: the file name, a moving bar (reading reports no steps), how many more files wait, Cancel (Esc; the file doesn't open) and Continue in Background (`file.cancelOpen`, `file.openInBackground`); it never opens over another dialog or progress window (part of #5930); scores and estimates unchanged |
|
||||
Raster rendering fits and preflattens curved stroke outlines more tightly only below four times the raster tolerance, retaining thin-band coverage without changing stroke weight or vector export geometry. Current cached character/object outlines, cropped long strokes, gradient clips and effect rasters share the helper; cropped-region reuse and guarded flattening remain. The unchanged `fractional_curved_strokes_retain_coverage_between_notches` regression covers fractional weights, rotation, phase, opacity and f32-rounded endpoints. This is a quality/cost tradeoff, not a speed claim. Scores and estimates unchanged.
|
||||
|
||||
@@ -494,7 +495,7 @@ next unit in the order a right-click on a ruler lists them, from Feet back to Po
|
||||
| Gradient panel: delete a stop | done | Delete Stop at the right end of the ramp deletes the selected stop, and a stop dragged down off the ramp is deleted on release, never below two stops, one undo step each; [Gradient panel options](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/create-and-edit-gradients/gradient-tool-and-panel.html); `panels::gradient` test |
|
||||
| Gradient tool: the annotator's end handle changes the length; Alt-drag changes the length and angle together | done | A plain drag keeps the end on the bar's line, at least 10 px from the start (VectorCraft's own minimum); Alt-drag moves it freely, Shift with Alt at 45° steps; [Default keyboard shortcuts](https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html); `xform::gradient` tests |
|
||||
| Workspaces (save, reset, switch); each remembers the layout changes made in it across switches and restarts until Reset <name> | done | `UiState::workspace_changes` |
|
||||
| Opening a file: after 0.4 s a progress window with the file name, a moving bar (reading counts no steps), how many more files wait, Cancel (Esc: the file doesn't open) and Continue in Background; never over another dialog or progress window | done | #5930; `opening::show`, `file.cancelOpen`, `file.openInBackground`. A save that runs in the background shows the same window, with how many more saves wait; its Cancel (`file.cancelSave`) stops the save before it replaces the file, which stays as it was. A save whose file is already being replaced finishes and is reported as saved, and a save of several files (EPS with Use Artboards) whose first file is in place writes the rest. Its Continue in Background is `file.saveInBackground` (the help page lists each background save's progress with a Cancel button: https://helpx.adobe.com/illustrator/using/saving-artwork.html). Place and Close still show only the status bar's spinner (Place runs off the UI thread; Close is immediate) |
|
||||
| Opening a file: after 0.4 s a progress window with the file name, a moving bar (reading counts no steps), how many more files wait, Cancel (Esc: the file doesn't open) and Continue in Background; never over another dialog or progress window | done | #5930; `opening::show`, `file.cancelOpen`, `file.openInBackground`. A save that runs in the background shows the same window, with how many more saves wait; its Cancel (`file.cancelSave`) stops the save before it replaces the file, which stays as it was. A save whose file is already being replaced finishes and is reported as saved, and a save of several files (EPS with Use Artboards) whose first file is in place writes the rest. Its Continue in Background is `file.saveInBackground` (the help page lists each background save's progress with a Cancel button: https://helpx.adobe.com/illustrator/using/saving-artwork.html). A place that takes longer than 0.4 s shows the progress window with Cancel (`placing::show`, `file.cancelPlace`); Close still shows only the status bar's spinner (Close is immediate) |
|
||||
| Window › Help Bar shows or hides the tool-help strip apart from the status bar; kept with the preferences and in saved workspaces; Presentation Mode hides both bars | done | `window.helpBar`; `help_bar_toggle_is_independent_and_saved_in_workspaces`, `help_bar_and_status_bar_render_independently`, `legacy_help_bar_visibility_follows_each_layouts_status_bar` |
|
||||
| Status bar: a click on the info field opens a Show menu that chooses its readout: Artboard Name, Current Tool (the default), Date and Time, Number of Undos (undo and redo counts) or Document Color Profile; kept with the UI state | done | `view.statusBarShow`; [public behavior reference](https://web.archive.org/web/2014/https://helpx.adobe.com/illustrator/using/workspace-basics.html); `the_status_bar_info_field_shows_the_chosen_readout`, `a_click_on_the_info_field_opens_the_show_menu`, `the_status_bar_show_choice_is_checked_and_saved`. The menu labels are VectorCraft's own |
|
||||
| Background Export: a progress dialog with the file name, the artboard count and a bar (busy for one artboard and for formats made in one go), Cancel (Esc) and Continue in Background; it opens after 0.4 s and never over another dialog. A cancelled export writes no file | done | #2564; on the shared `vectorcraft_doc::cancel` token (#2546), so a cancelled render keeps no half-drawn pattern tile or effect raster. The bar moves between artboards, not within one. Save As, Export for Screens and Export Selection don't show it yet |
|
||||
|
||||
Reference in New Issue
Block a user