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:
@@ -520,6 +520,7 @@ function TimelineResourcePanelInner({
|
||||
onInlineEdit,
|
||||
scrollLeft,
|
||||
containerWidth,
|
||||
optimisticAllocations.size > 0 ? new Set(optimisticAllocations.keys()) : undefined,
|
||||
)}
|
||||
{filters.showVacations &&
|
||||
renderVacationBlocks(
|
||||
@@ -628,6 +629,7 @@ function renderAllocBlocksFromData(
|
||||
onInlineEdit?: (allocationId: string, initialValues: { startDate: Date; endDate: Date; hoursPerDay: number }, barRect: DOMRect) => void,
|
||||
scrollLeft = 0,
|
||||
containerWidth = 1200,
|
||||
pendingMutationIds?: ReadonlySet<string>,
|
||||
) {
|
||||
const OVERSCAN_PX = 10 * CELL_WIDTH;
|
||||
const visibleLeft = scrollLeft - OVERSCAN_PX;
|
||||
@@ -810,6 +812,7 @@ function renderAllocBlocksFromData(
|
||||
? "opacity-30 z-[10]"
|
||||
: "transition-[opacity] duration-75 z-[10]",
|
||||
selectedAllocationSet.has(alloc.id) && "z-20",
|
||||
pendingMutationIds?.has(alloc.id) && !isBeingDragged && "animate-pulse",
|
||||
)}
|
||||
style={{
|
||||
left: segmentLeft + 2,
|
||||
|
||||
Reference in New Issue
Block a user