Artwork Cleanup: named type on a locked artboard stays out of the text tools

Add a test that Remove Breaks leaves type on a locked artboard as it is
when ids names it, with no undo step. Rewrap the Text tools paragraph
in docs/mcp.md and name the tests in docs/target-app-parity.md.
This commit is contained in:
dotCooCoo
2026-11-13 23:08:11 -08:00
parent 984b93a282
commit e76982bfad
3 changed files with 21 additions and 3 deletions
@@ -435,6 +435,23 @@ fn remove_breaks_named_story_with_a_locked_frame() {
assert_eq!(obj(&s, a).plain_text(), "one two");
}
/// Type on a locked artboard stays as it is even when `ids` names it, with no undo step.
#[test]
fn remove_breaks_named_type_on_a_locked_artboard() {
let mut s = session();
let on_board = text(&mut s, json!({"x": 40, "y": 60, "text": "a\nb", "size": 12}));
s.edit("Lock Artboard", |d, _| {
d.artboards[0].locked = true;
Ok(())
})
.unwrap();
let steps = undo_steps(&s);
let r = s.execute("addon.cleanup.removeBreaks", &json!({"kind": "paragraph", "ids": [on_board.0]}));
assert_eq!(other(r), "No paragraph breaks to remove");
assert_eq!(undo_steps(&s), steps);
assert_eq!(obj(&s, on_board).plain_text(), "a\nb");
}
/// Break Text, Combine and Join Point Text, Set Alignment, Keep Position and Reset Text Transform
/// act on the locked and hidden type that `ids` names (type in a locked layer included), each as
/// one undo step, and leave it as it is when it is only selected.
+2 -2
View File
@@ -10644,8 +10644,8 @@ topmost piece.
The add-on's text tools act on the selected type (or `ids`), each as one undo step, and refuse with an error when there
is nothing for them to do. From the selection they take only type that can be edited; the type that `ids` names, or
that is inside a group or layer it names, is taken even when it, its group or its layer is locked or hidden (not type
on a locked artboard). The objects they make from locked or hidden type are not selected. The pieces they make are point type that keeps its characters' styles, each placed so the
glyph of its first character lands where it was drawn.
on a locked artboard). The objects they make from locked or hidden type are not selected. The pieces they make are
point type that keeps its characters' styles, each placed so the glyph of its first character lands where it was drawn.
- `addon.cleanup.breakText {by?, ids?}` turns each horizontal point or area type object into point type objects, one
per line (`by: "lines"`, the default), paragraph (`"paragraphs"`), word (`"words"`) or glyph (`"glyphs"`; a ligature
+2 -1
View File
@@ -2050,7 +2050,8 @@ refusals), `addons::cleanup::tests` in `vectorcraft-ui-egui` (the submenu and th
With `ids`, the text tools act on the type the ids name even when it, or its group or layer, is locked or hidden, as
`text.convertListToText` does; from the selection they still take only type that can be edited (VectorCraft's own
rule). Tests: `named_locked_and_hidden_type` and the other `named_` tests in `cmd::addons::cleanup::text::tests`.
rule). Tests: `named_locked_and_hidden_type`, `remove_breaks_named_locked_and_hidden_type` and
`remove_breaks_named_story_with_a_locked_frame` in `cmd::addons::cleanup::text::tests`.
## Path Precision Tools add-on (2026-10-30)