feat: add drag handle to resize Recipients application table#325
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Gaston Review
Verdict: Comment
Score: ███████░░░ 7/10
Pull Request Summary
This PR wraps the Recipients application table in a relatively-positioned container and adds a drag handle at the bottom-right corner, allowing users to vertically resize the table by dragging. The resize logic uses pointer events with document-level listeners.
Review Summary
🟡 Warning — Drag listener leak when pointer leaves window
The resize handler registers pointermove/pointerup on document without using pointer capture. If the pointer exits the viewport during a drag (common on fast gestures), pointerup won't fire and the move listener stays attached indefinitely, causing phantom resizing and a memory leak. Using setPointerCapture is the standard fix for reliable pointer tracking.
The feature works for the happy path and the code is straightforward. The one real concern is the missing pointer capture, which makes the drag unreliable at window edges — not a blocker but worth fixing before this ships to avoid subtle UX bugs.
📌 2 inline comments
🟡 Warning: 1 · 🔵 Suggestion: 1
🔍 Reviewed by Gaston
There was a problem hiding this comment.
Gaston Review
Verdict: Approved
Score: ████████░░ 8/10
Pull Request Summary
This PR adds a drag handle at the bottom-right corner of the Recipients application table, letting users vertically resize it. The resize logic uses pointer capture on the handle element with proper cleanup via pointerup and lostpointercapture, and clamps the height between 160px and 70% of the viewport.
Both concerns from my prior review are addressed: pointer capture prevents the listener leak, and max height is capped. The implementation is solid — listeners attach to the handle (not document), cleanup is thorough, and the UX constraints are reasonable. Ship it.
🔍 Reviewed by Gaston
…-drag-handle # Conflicts: # src/app/flow-councils/review/review.tsx
There was a problem hiding this comment.
Gaston Review
Verdict: Approved
Score: ███████░░░ 7/10
Pull Request Summary
This PR adds a drag handle to vertically resize the Recipients application table, using pointer capture for reliable tracking with height clamped between 160px and 70% of the viewport.
Both concerns from prior reviews are addressed: pointer capture prevents listener leaks, and max height is capped. The implementation is straightforward and correct — listeners attach to the handle element, cleanup covers both pointerup and lostpointercapture, and the UX constraints are reasonable. The bulk of the diff is just re-indentation from wrapping the table in a relative container. Ship it.
🔍 Reviewed by Gaston
Summary
Adds a drag handle to the bottom-right of the project application table on the Recipients (review) page, letting reviewers resize the table's height.
It reuses the exact icon and resize mechanism already used for the comms message input and dynamic application form elements (the
ResizableTextareapattern): the same/resize-handle.svgdouble-bar icon (rotated -45°) andpointermove/pointerupdocument listeners.Details
tableHeightstate (initial 280px) drives the scroll container height, with a 160px minimum so it can't be collapsed.position: relativecontainer, and the handle sits outside theoverflow: autoscroll box (bottom-right) so it isn't clipped or scrolled away.cursor: ns-resize,opacity: 0.7,draggable={false}.The diff looks large because adding the wrapper bumped the table block one indentation level, so Prettier reformatted it. The functional change is the new state/handler plus the wrapper and handle.
Verification
pnpm typecheck— cleanpnpm lint— no warnings or errorspnpm prettier --check— formatted