Skip to content

Create OnboardingStep UI component #893

Closed

Description

@propr-dev

Context

To guide users through the initial setup process, we need a visually distinct UI component that represents a single step in the onboarding journey.

Requirements

  • Create a reusable OnboardingStep component.
  • It should display a step number (or checkmark if completed), title, description, and an action button.
  • It must support three visual states: active, completed, and pending.

Implementation Specification

  • Create a new file propr-ui/src/components/Dashboard/OnboardingStep.tsx.
  • Use Tailwind CSS for styling to match the "Studio Aesthetic" outlined in the design guidelines (e.g., using indigo for active, green for completed, gray for pending).

Acceptance Criteria

  • Component renders correctly based on the provided status.
  • Completed steps show a checkmark instead of a number and hide the CTA.
  • Active steps highlight the CTA button.

Created by ProPR AI Planner

Activity

  1. propr-dev commented on Mar 3, 2026

    @propr-dev
    ContributorAuthor

    Suggested Implementation:

    Implementation Approach

    This component isolates the visual logic for an individual step. It uses our established semantic color palette (indigo for action, green for success, slate for neutral) to provide immediate visual feedback on the user's progress.

    File: propr-ui/src/components/Dashboard/OnboardingStep.tsx

    import React from 'react';
    import { Check, ArrowRight } from 'lucide-react';
    
    export type StepStatus = 'completed' | 'active' | 'pending';
    
    export interface OnboardingStepProps {
      number: number;
      title: string;
      description: string;
      status: StepStatus;
      ctaText: string;
      onCtaClick: () => void;
    }
    
    export const OnboardingStep: React.FC<OnboardingStepProps> = ({
      number,
      title,
      description,
      status,
      ctaText,
      onCtaClick
    }) => {
      const isCompleted = status === 'completed';
      const isActive = status === 'active';
    
      // Determine dynamic styling based on the step's status to guide the user's focus
      const containerClass = isActive 
        ? 'border-indigo-500 bg-indigo-50/50 shadow-md ring-1 ring-indigo-500' 
        : isCompleted 
          ? 'border-green-200 bg-green-50/30' 
          : 'border-gray-200 bg-gray-50/50 opacity-70';
    
      const badgeClass = isActive 
        ? 'bg-indigo-600 text-white' 
        : isCompleted 
          ? 'bg-green-500 text-white' 
          : 'bg-gray-200 text-gray-500';
    
      const titleClass = isActive 
        ? 'text-indigo-900' 
        : isCompleted 
          ? 'text-green-900' 
          : 'text-gray-700';
    
      const descClass = isActive 
        ? 'text-indigo-700' 
        : isCompleted 
          ? 'text-green-700' 
          : 'text-gray-500';
    
      return (
        <div className={`relative flex items-start gap-4 p-5 rounded-xl border transition-all duration-300 ${containerClass}`}>
          {/* Step Indicator Badge */}
          <div className={`flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center font-bold shadow-sm ${badgeClass}`}>
            {isCompleted ? <Check size={16} strokeWidth={3} /> : number}
          </div>
          
          {/* Content Area */}
          <div className="flex-1 min-w-0">
            <h4 className={`text-base font-semibold mb-1 ${titleClass}`}>
              {title}
            </h4>
            <p className={`text-sm mb-4 leading-relaxed ${descClass}`}>
              {description}
            </p>
            
            {/* Call to Action - Only show on the currently active step */}
            {isActive && (
              <button
                onClick={onCtaClick}
                className="inline-flex items-center gap-1.5 px-4 py-2 bg-indigo-600 text-white text-sm font-medium rounded-lg hover:bg-indigo-700 transition-colors shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
              >
                {ctaText}
                <ArrowRight size={16} />
              </button>
            )}
          </div>
        </div>
      );
    };
  2. propr-dev commented on Mar 3, 2026

    @propr-dev
    ContributorAuthor

    🤖 AI processing has started for this issue using claude agent with claude-opus-4-5-20251101 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-4-5-20251101
    • Branch: 893/claude-opus-4-5-20251101-create-onboardingstep-ui--20260303-1208-afv
    • Base Branch: 892-epic-create-usesystemreadiness-xcn
    • Worktree: issue-893-20260303-1208-claude-opus-4-5-20251101-afv

    🔍 Track Task Execution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions