fix: hover card, preferences modal, timeline scroll, multi-drag
- ResourceHoverCard: add isInitialLoading to useEffect deps so mouseover/mouseout listeners attach after canvas mounts - PreferencesModal: lift prefsOpen state to AppShell, render modal outside sidebar's backdrop-blur stacking context - Timeline page: constrain to max-h-[100dvh] overflow-hidden so horizontal scrollbar is accessible without scrolling to bottom - Multi-drag: pass selectedAllocationIds from ref at drag completion to prevent stale closure in onMultiDragComplete callback Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -178,7 +178,7 @@ export function useTimelineDrag({
|
||||
onRangeSelected?: (info: RangeSelectedInfo) => void;
|
||||
onAllocationMoved?: (snapshot: AllocationMovedSnapshot) => void;
|
||||
onShiftClickAlloc?: (allocationId: string) => void;
|
||||
onMultiDragComplete?: (daysDelta: number, mode: AllocDragMode) => void;
|
||||
onMultiDragComplete?: (daysDelta: number, mode: AllocDragMode, selectedIds?: string[]) => void;
|
||||
}) {
|
||||
const [dragState, setDragState] = useState<DragState>(INITIAL_DRAG_STATE);
|
||||
const [allocDragState, setAllocDragState] = useState<AllocDragState>(INITIAL_ALLOC_DRAG);
|
||||
@@ -394,7 +394,9 @@ export function useTimelineDrag({
|
||||
multiSelectRef.current = { ...multiSelectRef.current, isMultiDragging: false, multiDragDaysDelta: 0 };
|
||||
|
||||
if (finalDelta !== 0) {
|
||||
onMultiDragCompleteRef.current?.(finalDelta, dragMode);
|
||||
// Pass IDs from ref to avoid stale closure in the callback
|
||||
const ids = multiSelectRef.current.selectedAllocationIds;
|
||||
onMultiDragCompleteRef.current?.(finalDelta, dragMode, ids);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user