Skip to content

Selection: a click on a drop shadow or glow selects the object under it - #6758

Merged
bflatastic merged 2 commits into
storytold:mainfrom
dotCooCoo:test/select-skips-raster-effects
Nov 12, 2026
Merged

bflatastic merged 2 commits into
storytold:mainfrom
dotCooCoo:test/select-skips-raster-effects

Conversation

@dotCooCoo

@dotCooCoo dotCooCoo commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

What and why

When the selection tools decide what a click hits, the area that a drop shadow or another raster effect paints beyond an object is left out, so the click reaches the object the user meant. The help page describes this for drop shadows and raster effects and names no setting for it (the help page). main already behaves this way (hit_leaf, may_hit and cull_reach in crates/doc/src/hit.rs, and the marquee's touch test), but no test held it in place. This pull request adds those tests, a doc comment and a docs line. It does not change any behavior.

  • crates/engine/src/tests/select_effects.rs (new, registered in crates/engine/src/tests.rs): each test first checks the rendered pixel to show the effect paints at the click point, then clicks, hovers, drags or draws a marquee there.
  • crates/doc/src/hit.rs: a doc comment on hit_leaf says that raster effects (drop shadows, glows, blurs) do not take clicks and that the area they paint is left out there and in cull_reach.
  • docs/target-app-parity.md: one line in "Evidence: what ships today", after the Selection tool's Escape entry, with the help page's URL.

How it was tested

New tests in crates/engine/src/tests/select_effects.rs:

  • a_click_on_a_drop_shadow_selects_the_object_under_it: A's drop shadow covers part of B; a click on the shadow selects B, and a click on A's fill selects A.
  • a_click_on_a_drop_shadow_over_the_canvas_selects_nothing_and_clears_the_selection
  • a_click_on_an_outer_glow_or_a_gaussian_blur_outside_the_path_selects_what_is_under_it
  • a_click_on_the_drop_shadow_of_a_group_or_of_point_type_selects_neither
  • a_click_on_the_drop_shadow_of_a_symbols_art_does_not_select_the_instance
  • a_click_on_the_drop_shadow_of_an_image_outside_its_frame_does_not_select_it
  • shift_click_direct_selection_and_hover_on_a_drop_shadow_pass_through_it: a Shift-click on the shadow over B adds B and keeps A, Direct Selection takes B through the shadow and nothing over the canvas, and with A selected the pointer is the move cursor over A and the plain arrow over its shadow.
  • a_drag_from_the_drop_shadow_of_a_selected_object_does_not_move_it: a drag from the shadow over the canvas draws a marquee, and one from the shadow over B moves B; A stays where it was.
  • a_marquee_that_touches_only_a_drop_shadow_does_not_select_its_object: a marquee over only the shadow selects nothing, and one over B and the shadow selects B only.

All nine fail when the behavior is broken: with hit_children and may_hit's cull_reach check counting a box 50 pt around an object with a visible effect as a hit, 9 of 9 failed; with the marquee's touches counting a path's box grown 50 pt when it has an effect, the marquee and drag tests failed. Both edits were then restored.

Focused checks on the final tree, main at 7dd71a6 merged into the branch:

  • cargo fmt --all -- --check
  • cargo check --workspace --tests
  • cargo clippy -p vectorcraft-doc -p vectorcraft-engine --all-targets -- -D warnings (run per crate)
  • cargo test -p vectorcraft-engine --lib select_effects: 9 passed, 0 failed.
  • cargo xtask brands, layers (30 crates) and assets (335 asset files).
  • cargo xtask ci runs in this pull request's CI.

The branch merges cleanly with main at eb35bd6.

cargo xtask ci passed in this pull request's CI run on 6eeff01625: https://github.com/storytold/vectorcraft/actions/runs/43144548425/job/130939183946

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.

Clicks, the hover pointer and marquees with the selection tools already
leave out the area that raster effects paint beyond an object. New tests
in crates/engine/src/tests/select_effects.rs hold that in place for drop
shadows, Outer Glow and Gaussian Blur on paths, groups, point type,
symbol art and images, for Shift-click, Direct Selection, the hover
pointer, a drag from a selected object's shadow and a marquee. hit_leaf
gets a doc comment, and docs/target-app-parity.md gets a line citing
https://helpx.adobe.com/illustrator/using/selecting-objects.html.
@coderabbitai

coderabbitai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between eb35bd6 and 6eeff01.

Files selected for processing: 4

  • crates/doc/src/hit.rs
  • crates/engine/src/tests.rs
  • crates/engine/src/tests/select_effects.rs
  • docs/target-app-parity.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@bflatastic
bflatastic merged commit 63bdfc1 into storytold:main Nov 12, 2026
7 checks passed
@bflatastic

Copy link
Copy Markdown
Member

Merged, thanks @dotCooCoo! It passed its CI checks.

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