diff --git a/src/components/moderation/ModerationQueue.tsx b/src/components/moderation/ModerationQueue.tsx index 6237ea7b..f3767133 100644 --- a/src/components/moderation/ModerationQueue.tsx +++ b/src/components/moderation/ModerationQueue.tsx @@ -148,9 +148,12 @@ export const ModerationQueue = forwardRef((props, ref) => { // Enable transitions after initial render useEffect(() => { if (!loading && items.length > 0 && !hasRenderedOnce) { - // Delay to ensure DOM has painted - const timer = setTimeout(() => setHasRenderedOnce(true), 100); - return () => clearTimeout(timer); + // Use requestAnimationFrame to enable transitions AFTER first paint + requestAnimationFrame(() => { + requestAnimationFrame(() => { + setHasRenderedOnce(true); + }); + }); } }, [loading, items.length, hasRenderedOnce]); @@ -1695,7 +1698,11 @@ export const ModerationQueue = forwardRef((props, ref) => { } return ( -
+
{items.map((item) => ( 0 ? 'border-l-red-600' : item.status === 'flagged' ? 'border-l-red-500' : item.status === 'approved' ? 'border-l-green-500' : @@ -118,7 +118,8 @@ export const QueueItem = memo(({ }`} style={{ opacity: actionLoading === item.id ? 0.5 : 1, - pointerEvents: actionLoading === item.id ? 'none' : 'auto' + pointerEvents: actionLoading === item.id ? 'none' : 'auto', + transition: isInitialRender ? 'none' : 'opacity 200ms' }} > diff --git a/src/index.css b/src/index.css index 709ba089..44715005 100644 --- a/src/index.css +++ b/src/index.css @@ -120,6 +120,14 @@ All colors MUST be HSL. } } +/* Suppress ALL animations during initial queue render */ +[data-initial-load="true"] * { + animation-duration: 0s !important; + animation-delay: 0s !important; + transition-duration: 0s !important; + transition-delay: 0s !important; +} + /* Custom Uppy Photo Upload Styling */ @layer components { /* Uppy Dashboard customization to match theme */