Repository navigation
Conversation
… stack With `aligned`, the rows and effects a command names are rows of the first target's stack. Since the art of a graph design in a series was left out of the targets before those rows were matched, a command given that art first took its rows from the next object instead and edited a different row there. - appearance.setItem, appearance.removeItem, appearance.duplicateItem and the effect commands match aligned rows and effects against the targets as given, the design's art included, then leave the art out of the edit. - An aligned appearance.moveItem or effect.move is refused when the art's stack differs from the others, as is an aligned appearance.duplicateItem with `to`. - effect.apply reports the row the effect landed on in the object it edited. - Without `aligned`, an item the art lacks is still taken from the other objects' own stacks. docs/mcp.md states the rule.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 54 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
What and why
Follows #7320.
With
aligned, the rows and effects a command names are rows of the first target's stack. #7320 left the art of a graph design in a series out of the targets before those rows were matched, so a command given that art first took its rows from the next object and edited a different row there. For example, with the art's stack[red fill, blue fill]and a mark's[blue fill, stroke],appearance.removeItemwithindex: 1andaligned: trueremoved the mark's stroke instead of its blue fill.appearance.setItem,appearance.removeItem,appearance.duplicateItemand the effect commands now match aligned rows and effects against the targets as given, the design's art included, and then leave the art out of the edit.appearance.moveItemoreffect.moveis refused when the art's stack differs from the others, as is an alignedappearance.duplicateItemwithto.effect.applyreports the row the effect landed on in the object it edited.aligned, an item the art lacks is still taken from the other objects' own stacks.docs/mcp.mdstates the rule.How it was tested
The head is
0986c6dab5, one commit onmainat1e4e3534f5;git merge-treereports no conflict withmainat2a56e3395. It conflicts with #7368 incrates/engine/src/cmd/appearance.rs,crates/engine/src/cmd/effectcmd.rsanddocs/mcp.md, and with #7412 incrates/engine/src/cmd/appearance.rs; the one that merges second keeps both sides. The commands below ran on Linux on the head.aligned_rows_given_with_a_graph_designs_art_first_are_rows_of_its_stackincrates/engine/src/cmd/graph/tests.rsgives a mark the art's stack with a different fill below it, then, with the art first:appearance.removeItemandappearance.setItemwithalignededit the mark's row equal to the art's fill, not the row at the same index;effect.applywithalignedputs the effect on that row and reports it;appearance.moveItem,effect.moveandappearance.duplicateItemwithtoare refused and add no undo step;effect.applywithoutalignedand an item only the mark has edits the mark.The test fails with each part of the change undone.
cargo fmt --all -- --check: clean for the changed files (crates/svg/src/lib.rsonmainis reported).cargo check --workspace --tests: clean.cargo clippy -p vectorcraft-engine --all-targets -- -D warnings: clean.cargo test -p vectorcraft-engine --lib -- graph::tests appearance effect: 552 passed.Checklist
cargo xtask cipasses (fmt, clippy, tests, assets, brands, layers, wasm).unwrap(),expect(),panic!,unreachable!,todo!orunimplemented!outside tests, and no unchecked indexing on data from files, parameters ormessages. Errors are returned as
Resultand shown to the user(why and how).
ASSETS.md.Summary by CodeRabbit
Bug Fixes
Documentation