feat(timeline): add pulse animation for in-flight drag mutations
Allocation bars that have active optimistic overrides (post-drag, awaiting server confirmation) now pulse subtly via animate-pulse. The pending set is derived from the existing optimisticAllocations map keys, requiring no additional state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import { motion, AnimatePresence } from "framer-motion";
|
||||
import { useEffect, useCallback, useRef, type ReactNode } from "react";
|
||||
import { useFocusTrap } from "~/hooks/useFocusTrap.js";
|
||||
|
||||
interface AnimatedModalProps {
|
||||
open: boolean;
|
||||
@@ -24,6 +25,8 @@ export function AnimatedModal({
|
||||
}: AnimatedModalProps) {
|
||||
const panelRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
useFocusTrap(panelRef, open);
|
||||
|
||||
const handleEscape = useCallback(
|
||||
(e: KeyboardEvent) => {
|
||||
if (e.key === "Escape") onClose();
|
||||
|
||||
Reference in New Issue
Block a user