Skip to content

Artboards: Width, Height, Preset and Orientation apply to every selected artboard - #2565

Merged
bflatastic merged 1 commit into
storytold:mainfrom
dotCooCoo:feat/artboard-size-applies-to-selected
Oct 20, 2026
Merged

bflatastic merged 1 commit into
storytold:mainfrom
dotCooCoo:feat/artboard-size-applies-to-selected

Conversation

@dotCooCoo

@dotCooCoo dotCooCoo commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What and why

This change is part of #1482. On main, with several artboards selected with the Artboard tool, a new W or H in
Properties, the Transform panel or the Control bar, a preset or orientation in Properties or the Control bar, and a new
Width or Height in Artboard Options resize only the active artboard. Using multiple
artboards
and a 2017 Adobe
post
describe the new size going
to every selected artboard.

These controls now resize every selected artboard in one undo step, through a new artboards list param of
artboard.setProps. With Scale Artwork with Artboard on, Properties and the Transform panel scale each object once,
with the artboard it was inside before the change. The Transform panel and the Control bar resize each artboard about its
own reference point, and Artboard Options resizes the other selected artboards about the reference point its form used
for the new size. X, Y and the name still change the active artboard only. Resizing the selected artboards with a handle drag or
with Ctrl/Cmd+D remains for #1482.

How it was tested

The four UI tests (artboard_width_resizes_every_selected_artboard_in_properties_and_transform,
edit_artboards_orientation_turns_every_selected_artboard, edit_artboards_preset_sizes_every_selected_artboard and
artboard_options_width_resizes_every_selected_artboard) select two of three artboards and check one undo step.
artboard_options_width_resizes_every_selected_artboard_about_the_reference_point checks that a Width typed in Artboard
Options resizes both selected artboards about the center. The engine test
tests_xform::artboard_set_props_resizes_several_artboards_and_scales_each_object_once checks that art the first
artboard's new size moves into the second scales once, and that an entry without an index or with an index past the
last artboard is refused.

With the panels sizing only the edited artboard, as on main, each UI test fails at its first size check. With two
separate artboard.setProps calls in place of the list, the engine test fails. With the other artboards keeping their
top-left corners, the Artboard Options reference point test fails.

Targeted checks: clippy on both crates, cargo fmt --all -- --check, the engine's tests_xform and artboard tests
(135 passed), the ui-egui artboard, properties, transform and dialog tests (598 passed), i18n (59 passed), and
cargo xtask brands, layers and assets.

On Windows 11 (x86-64) with rustc 1.99.0, on 82d428b (this branch with main at cdba0aa merged in):

  • CRAFT_FONTS_DIR=<craft-fonts checkout> cargo xtask ci passes its 10 steps: 8,256 tests passed, 0 failed, 12 ignored.

git merge-tree reports no conflicts with main at 9c1d1d5. With main and #2557 merged, it conflicts with #2557 in
the tool.options params text (menus.rs), and keeping both edits resolves it. #2532, #2403, #2038, #1295 and #2526
also change files this branch changes, and each conflicts with main already.

Checklist

  • cargo xtask ci passes (fmt, clippy, tests, assets, brands, layers, wasm).
  • No panics in shipped code: no unwrap(), expect(), panic!, unreachable!, todo! or
    unimplemented! outside tests, and no unchecked indexing on data from files, parameters or
    messages. Errors are returned as Result and shown to the user
    (why and how).
  • Clean-room: nothing copied from Adobe products or GPL/AGPL code (AGENTS.md).
  • Every new asset has a row in ASSETS.md.

Summary by CodeRabbit

  • New Features
    • Resizing artboards with multiple boards selected now updates them together in one undoable action. Size fields, presets, orientation controls, and Artboard Options apply to all selected artboards.
    • Artwork can move or scale with resized artboards according to the existing options. Each object is handled once, based on the artboard it belonged to before resizing.
    • Position and name changes remain limited to the active or displayed artboard.

@dotCooCoo

Copy link
Copy Markdown
Contributor Author

One commit brings this branch up to date with main at cdba0aa:

No catalog rows were needed. The branch merges cleanly with main at a466625, and the i18n tests pass on that merge
(60 passed). On Windows 11, cargo xtask ci passes its 10 steps on 82d428b: 8,256 tests passed, 0 failed, 12 ignored.

@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cb7f4d77-3b34-4dec-ae67-9106b5598dc0
📥 Commits

Reviewing files that changed from the base of the PR and between 82d428b and 7617fcd.

📒 Files selected for processing: 5
  • crates/ui-egui/src/dialogs/tests.rs
  • crates/ui-egui/src/menus.rs
  • crates/ui-egui/src/panels/properties.rs
  • docs/mcp.md
  • docs/target-app-parity.md
+-------------------------------+
| BOFH: Bunny of Friendly Help. |
+-------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ef8493ce-aace-426e-8935-a9d1c5f694c7
📥 Commits

Reviewing files that changed from the base of the PR and between cdba0aa and 82d428b.

📒 Files selected for processing: 10
  • crates/engine/src/cmd/layer.rs
  • crates/engine/src/tests_xform.rs
  • crates/ui-egui/src/dialogs/artboard_options.rs
  • crates/ui-egui/src/dialogs/tests.rs
  • crates/ui-egui/src/menus.rs
  • crates/ui-egui/src/panels/artboards.rs
  • crates/ui-egui/src/panels/properties.rs
  • crates/ui-egui/src/panels/transform.rs
  • docs/mcp.md
  • docs/target-app-parity.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

📝 Walkthrough

The change adds batched artboard.setProps updates and applies them to selected-artboard resizing in desktop panels and Artboard Options. It also adds engine and UI tests and updates command and behavior documentation.

Changes: Multi-artboard resizing

Layer / File(s) Summary
Batch artboard property edits
crates/engine/src/cmd/layer.rs, crates/engine/src/tests_xform.rs, docs/mcp.md
artboard.setProps accepts per-artboard entries and applies them in one undo step. Duplicate indices and invalid batches return errors. Art inside multiple edited artboards follows the first qualifying entry.
Resize selected artboards from panels
crates/ui-egui/src/panels/artboards.rs, crates/ui-egui/src/panels/transform.rs, crates/ui-egui/src/panels/properties.rs, crates/ui-egui/src/menus.rs, crates/ui-egui/src/panels/properties.rs, docs/target-app-parity.md
Shared helpers submit property updates for selected artboards. Size, preset, and orientation controls use each artboard’s dimensions and orientation; X/Y edits remain limited to the active artboard. Tests cover selection, undo, and unselected artboards.
Resize selected artboards in Artboard Options
crates/ui-egui/src/dialogs/artboard_options.rs, crates/ui-egui/src/dialogs/tests.rs
The dialog records the reference point used for size changes and submits the primary and resized artboards together. Tests cover resizing, name-only edits, undo, and Enter-key submission.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant TransformPanel
  participant ArtboardProperties
  participant artboards_set_props as artboards::set_props
  participant artboard_setProps as artboard.setProps
  TransformPanel->>artboards_set_props: Submit selected-artboard resize entries
  ArtboardProperties->>artboards_set_props: Submit size, preset, or orientation entries
  artboards_set_props->>artboard_setProps: Run one property update
  artboard_setProps-->>artboards_set_props: Return command result
Loading

Suggested reviewers: bflatastic, autohenry, callmeballoch

Merge Risk: ⚪ Minimal · up to 82d42

No identified issue blocks merging after normal checks.

Security architecture risk: 🔵 Low · up to 82d42

The change remains scoped to the current document and preserves transactional edits and snapshot-based undo. No new privilege or cross-document access was identified. Large-batch resource behavior and batch-specific recovery scenarios remain incompletely validated.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — A caller already able to execute engine commands can target multiple existing artboards and their eligible artwork in the active session document, not merely the UI selection. The new list provides no document selector, external resource reference, or cross-document authority.

Security Findings and Attack Paths

  • inferred — No introduced security attack path is established by the inspected batching change. Large batches can repeat document-membership scans, but the unchanged command.batch path already allowed repeated artboard edits within one request. That counterevidence weakens an introduced denial-of-service claim; production work limits remain unverified.

Trust Boundaries and Controls

  • observed — The control dispatcher forwards registered engine commands through the existing application and Session execution paths. The handler validates indices against the current document before editing. These repository-local checks establish command and document scope, but do not establish the host transport's authentication or caller isolation.

Resilience and Maintainability Implications

  • inferred — Mutable Session access and synchronous control dispatch prevent interleaving within the inspected batch path. Transaction snapshots contain ordinary edit failures, and repeating identical target rectangles does not schedule another resize transform. Panic recovery restores the active document snapshot, but this does not guarantee recovery from process termination or resource exhaustion.
Pre-merge checks: Passed 5
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 83.78% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 8 files. (2 skipped: 2 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the main change: sizing controls now apply to every selected artboard.
Description check Passed The description includes the required What and why, How it was tested, and Checklist sections. It explains the behavior, test coverage, validation results, and marks all checklist items complete.
Full details: Docstring Coverage

Explanation

Docstring coverage is 83.78% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 8 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@dotCooCoo dotCooCoo closed this Oct 19, 2026
@dotCooCoo dotCooCoo reopened this Oct 19, 2026
@dotCooCoo dotCooCoo closed this Oct 19, 2026
@dotCooCoo dotCooCoo reopened this Oct 19, 2026
@bflatastic
bflatastic force-pushed the feat/artboard-size-applies-to-selected branch from 82d428b to 7617fcd Compare October 20, 2026 00:32
@bflatastic
bflatastic merged commit 39fdaf7 into storytold:main Oct 20, 2026
3 checks passed
@bflatastic

Copy link
Copy Markdown
Member

Merged, thanks @dotCooCoo! With several artboards selected, W, H, Preset and Orientation (in Properties, the Transform panel, the Control bar and Artboard Options) now resize every selected artboard in one undo step, as helpx describes. I resolved a conflict with main in the tool.options help text in menus.rs, keeping both edits, and checked artboard.setProps {artboards} live over MCP, including that an artboard listed twice is refused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants