Skip to content

Latest commit

 

History

History
81 lines (66 loc) · 1.88 KB

File metadata and controls

81 lines (66 loc) · 1.88 KB

Timeline Active State Indicator - Quick Reference

Summary

Visual feedback system that enlarges timeline event icons when active (expanded).

Visual Changes

Collapsed (Inactive)

  • Container: 48px × 48px
  • Icon: 24px × 24px (h-6 w-6)
  • Border: 2px
  • Shadow: sm
  • Scale: 1.0

Expanded (Active)

  • Container: 56px × 56px
  • Icon: 28px × 28px (h-7 w-7)
  • Border: 4px
  • Shadow: lg
  • Scale: 1.1 (10% larger)

Animation

  • Duration: 300ms
  • Timing: ease-in-out
  • Smooth GPU-accelerated transitions

Code Changes

1. Icon Container (Line ~2722)

<div style={{ width: isExpanded ? '56px' : '48px' }}>
  <div className={`
    ${isExpanded ? 'w-14 h-14' : 'w-12 h-12'}
    ${isExpanded ? 'border-4 shadow-lg scale-110' : 'border-2 shadow-sm'}
    transition-all duration-300 ease-in-out
  `}>
    {getTimelineIcon(item, stateClasses.iconColor, isExpanded)}
  </div>
</div>

2. Icon Function (Line ~1843)

const getTimelineIcon = (item, iconColorClass, isExpanded = false) => {
  const iconSize = isExpanded ? 'h-7 w-7' : 'h-6 w-6';
  const transitionClass = 'transition-all duration-300 ease-in-out';

  return <Icon className={`${iconSize} ${iconColorClass} ${transitionClass}`} />;
};

Trigger

  • Activate: User clicks timeline event
  • Deactivate: User clicks same event or different event

States Supported

✅ Inactive (Gray) ✅ Urgent (Red) ✅ Active (Blue) ✅ Completed (Green) ✅ Personal Task (Yellow)

Benefits

✓ Clear visual feedback ✓ Improved user orientation ✓ Smooth, professional animations ✓ Works across all event types ✓ Performance optimized

Testing

npm run build  # ✅ Successful

Files Modified

  • src/components/BusinessUnitDetail.tsx
    • Icon container: Dynamic width and styling
    • getTimelineIcon: Added isExpanded parameter

Demo

Open TIMELINE_ACTIVE_STATE_DEMO.html in browser to see interactive demo.