Repository navigation
Selection: a click on a drop shadow or glow selects the object under it - #6758
Merged
bflatastic merged 2 commits intoNov 12, 2026
Merged
Conversation
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.
Contributor
|
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 14 minutes. View limit details
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. |
Member
|
Merged, thanks @dotCooCoo! It passed its CI checks. |
Merged
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).
mainalready behaves this way (hit_leaf,may_hitandcull_reachincrates/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 incrates/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 onhit_leafsays that raster effects (drop shadows, glows, blurs) do not take clicks and that the area they paint is left out there and incull_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_selectiona_click_on_an_outer_glow_or_a_gaussian_blur_outside_the_path_selects_what_is_under_ita_click_on_the_drop_shadow_of_a_group_or_of_point_type_selects_neithera_click_on_the_drop_shadow_of_a_symbols_art_does_not_select_the_instancea_click_on_the_drop_shadow_of_an_image_outside_its_frame_does_not_select_itshift_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_childrenandmay_hit'scull_reachcheck counting a box 50 pt around an object with a visible effect as a hit, 9 of 9 failed; with the marquee'stouchescounting 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,
mainat7dd71a6merged into the branch:cargo fmt --all -- --checkcargo check --workspace --testscargo 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) andassets(335 asset files).cargo xtask ciruns in this pull request's CI.The branch merges cleanly with
mainateb35bd6.cargo xtask cipassed in this pull request's CI run on6eeff01625: https://github.com/storytold/vectorcraft/actions/runs/43144548425/job/130939183946Checklist
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.