forked from cardosofelipe/pragma-stack
feat(frontend): implement main dashboard page (#48)
Implement the main dashboard / projects list page for Syndarix as the landing page after login. The implementation includes: Dashboard Components: - QuickStats: Overview cards showing active projects, agents, issues, approvals - ProjectsSection: Grid/list view with filtering and sorting controls - ProjectCardGrid: Rich project cards for grid view - ProjectRowList: Compact rows for list view - ActivityFeed: Real-time activity sidebar with connection status - PerformanceCard: Performance metrics display - EmptyState: Call-to-action for new users - ProjectStatusBadge: Status indicator with icons - ComplexityIndicator: Visual complexity dots - ProgressBar: Accessible progress bar component Features: - Projects grid/list view with view mode toggle - Filter by status (all, active, paused, completed, archived) - Sort by recent, name, progress, or issues - Quick stats overview with counts - Real-time activity feed sidebar with live/reconnecting status - Performance metrics card - Create project button linking to wizard - Responsive layout for mobile/desktop - Loading skeleton states - Empty state for new users API Integration: - useProjects hook for fetching projects (mock data until backend ready) - useDashboardStats hook for statistics - TanStack Query for caching and data fetching Testing: - 37 unit tests covering all dashboard components - E2E test suite for dashboard functionality - Accessibility tests (keyboard nav, aria attributes, heading hierarchy) Technical: - TypeScript strict mode compliance - ESLint passing - WCAG AA accessibility compliance - Mobile-first responsive design - Dark mode support via semantic tokens - Follows design system guidelines
This commit is contained in:
50
frontend/src/components/projects/wizard/StepIndicator.tsx
Normal file
50
frontend/src/components/projects/wizard/StepIndicator.tsx
Normal file
@@ -0,0 +1,50 @@
|
||||
'use client';
|
||||
|
||||
/**
|
||||
* Step Indicator Component
|
||||
*
|
||||
* Shows progress through the wizard steps with visual feedback.
|
||||
* Dynamically adjusts based on whether script mode is active.
|
||||
*/
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
import { getStepLabels, getDisplayStep, getTotalSteps } from './constants';
|
||||
|
||||
interface StepIndicatorProps {
|
||||
currentStep: number;
|
||||
isScriptMode: boolean;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function StepIndicator({ currentStep, isScriptMode, className }: StepIndicatorProps) {
|
||||
const steps = getStepLabels(isScriptMode);
|
||||
const totalSteps = getTotalSteps(isScriptMode);
|
||||
const displayStep = getDisplayStep(currentStep, isScriptMode);
|
||||
|
||||
return (
|
||||
<div className={cn('w-full', className)}>
|
||||
<div className="mb-2 flex items-center justify-between text-sm text-muted-foreground">
|
||||
<span>
|
||||
Step {displayStep} of {totalSteps}
|
||||
</span>
|
||||
<span>{steps[displayStep - 1]}</span>
|
||||
</div>
|
||||
<div className="flex gap-1" role="progressbar" aria-valuenow={displayStep} aria-valuemax={totalSteps}>
|
||||
{Array.from({ length: totalSteps }, (_, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className={cn(
|
||||
'h-2 flex-1 rounded-full transition-colors',
|
||||
i + 1 < displayStep
|
||||
? 'bg-primary'
|
||||
: i + 1 === displayStep
|
||||
? 'bg-primary/70'
|
||||
: 'bg-muted'
|
||||
)}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user