Skip to content

feat: adding multi-select boxes, allowing batch deletion#12

Open
giannatan wants to merge 5 commits into
mainfrom
gianna/multiple-select-box-feature
Open

feat: adding multi-select boxes, allowing batch deletion#12
giannatan wants to merge 5 commits into
mainfrom
gianna/multiple-select-box-feature

Conversation

@giannatan
Copy link
Copy Markdown

ref: #6

@kyrieb-ekat kyrieb-ekat self-requested a review May 13, 2026 16:26
@kyrieb-ekat kyrieb-ekat added the enhancement New feature or request label May 13, 2026
@kyrieb-ekat
Copy link
Copy Markdown

Hi! Overall looks good, but here's a couple of things that need fixing (and followed by a couple of thoughts/suggestions you can keep/toss at your discretion).
Needs:

  • Esc needs to work! No Escape key handler to cancel an in-progress marquee: cancelDrawing and cancelDrag are both wired in useKeyboardShortcuts, but there's no cancelMarquee; a user mid-drag has no escape hatch if they need to abort

Thoughts:

  • setSelected is kept as a wrapper around setSelectedIds, which is reasonable for backward compatibility, but its remaining call site in AnnotationList.tsx could just be migrated to setSelectedIds([id]) to retire the dual API entirely
  • onPointerMove returns early when marquee is active, which silently blocks pan/drag updates. This is correct behavior, but worth a one-line comment since it's a non-obvious short-circuit that downstream something might get tripped up by
  • rectsIntersect in geometry.ts is a solid AABB test but very dense on one line. Named intermediates (aRight, bRight, etc.) or a short comment would help readability

@giannatan
Copy link
Copy Markdown
Author

Hi, thanks for the notes!! I added the 'escape' option for mid-drawing a marquee, as well as the small comments + constant naming for the rectsIntersect function. For the setSelected note, I'll look a bit more into what you suggested (since it does make sense) and probably push a commit later after I address some other features, if that's ok!

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Allow user to click-and-drag to select multiple boxes at once

2 participants