Skip to content

feat: add drag handle to resize Recipients application table#325

Merged
tnrdd merged 3 commits into
mainfrom
feat/recipients-table-drag-handle
Jun 29, 2026
Merged

feat: add drag handle to resize Recipients application table#325
tnrdd merged 3 commits into
mainfrom
feat/recipients-table-drag-handle

Conversation

@tnrdd

@tnrdd tnrdd commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

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 ResizableTextarea pattern): the same /resize-handle.svg double-bar icon (rotated -45°) and pointermove/pointerup document listeners.

Details

  • New tableHeight state (initial 280px) drives the scroll container height, with a 160px minimum so it can't be collapsed.
  • The table is wrapped in a position: relative container, and the handle sits outside the overflow: auto scroll box (bottom-right) so it isn't clipped or scrolled away.
  • Handle styling matches the existing pattern: 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 — clean
  • pnpm lint — no warnings or errors
  • pnpm prettier --check — formatted

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
platform Ready Ready Preview, Comment Jun 29, 2026 6:01am

Request Review

@gaston-review gaston-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread src/app/flow-councils/review/review.tsx
Comment thread src/app/flow-councils/review/review.tsx Outdated

@gaston-review gaston-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@gaston-review gaston-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@tnrdd tnrdd merged commit 6e9cd1a into main Jun 29, 2026
4 checks passed
@tnrdd tnrdd deleted the feat/recipients-table-drag-handle branch June 29, 2026 15:12
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.

1 participant