brackt/app/components/draft
Chris Parsons ebe06b2522
Improve drag handle UX in queue items with activator node (#188)
* Fix queue drag to only activate on handle and number, not entire row

Restricts drag listeners to the grab handle icon and order number badge
using setActivatorNodeRef, and removes touch-none from the whole row so
mobile users can scroll without accidentally reordering the queue.

https://claude.ai/code/session_01HPtNkL5m9xhYgtzWaGViSC

* Code review cleanup: use GripVertical icon and add drag activation constraint

- Replace inline SVG drag handle with GripVertical from lucide-react,
  which is already used project-wide
- Add activationConstraint (distance: 8px) to PointerSensor so a touch
  on the handle doesn't immediately hijack scroll before the user has
  moved far enough to signal intent to drag

https://claude.ai/code/session_01HPtNkL5m9xhYgtzWaGViSC

* Fix O(n²) lookup, memoize components and callbacks in QueueSection

- Build a participantMap (Map<id, participant>) with useMemo so each
  queue item lookup is O(1) instead of O(n) per render
- Memoize queueIds array for SortableContext to avoid churn
- Wrap handleDragEnd in useCallback so DndContext gets a stable reference
- Wrap SortableQueueItem in memo so it skips re-renders when props haven't
  changed (important since the parent re-renders every second during a
  live draft from timer-update socket events)
- Pass onRemoveFromQueue and onMakePick directly as props instead of
  creating new arrow functions per item per render; SortableQueueItem
  now calls them with the relevant id itself

https://claude.ai/code/session_01HPtNkL5m9xhYgtzWaGViSC

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-20 16:19:44 -07:00
..
AuthRecoveryOverlay.tsx fix: prevent silent logout during long-running draft sessions (#49) 2026-03-01 19:33:03 -08:00
AvailableParticipantsSection.tsx perf: fix draft room lag from excessive re-renders and listener leaks (#54) 2026-03-02 13:18:47 -08:00
ConnectionOverlay.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
DraftGridSection.tsx feat: enhance autodraft functionality with detailed settings and commissioner controls (#61) 2026-03-03 20:14:38 -08:00
DraftSummaryView.tsx feat: add totalRounds prop to DraftSummaryView and pass from DraftRoom (#60) 2026-03-02 22:19:19 -08:00
ParticipantSelectionDialog.tsx fix: prevent iOS Safari viewport zoom on draft room form inputs (#45) 2026-02-27 23:46:09 -08:00
picks-utils.ts refactor: address code review findings in Roster/Summary draft views (#57) 2026-03-02 16:46:35 -08:00
QueueSection.tsx Improve drag handle UX in queue items with activator node (#188) 2026-03-20 16:19:44 -07:00
RecentPicksSection.tsx feat: Implement draft room redesign with collapsible sidebar and tabbed content 2025-10-25 03:23:41 -07:00
SidebarRecentPicks.tsx perf: fix draft room lag from excessive re-renders and listener leaks (#54) 2026-03-02 13:18:47 -08:00
TeamRosterView.tsx refactor: address code review findings in Roster/Summary draft views (#57) 2026-03-02 16:46:35 -08:00
TeamsDraftedGrid.tsx perf: fix draft room lag from excessive re-renders and listener leaks (#54) 2026-03-02 13:18:47 -08:00