Update transition timing

This commit is contained in:
Mike Fortman 2025-10-23 14:51:00 -05:00
parent 883877b4e7
commit 9b6903853d
4 changed files with 5 additions and 20 deletions

View file

@ -125,28 +125,11 @@ export function OnboardingContent({
<OnboardingStep
isVisible={currentStep >= 2 && !isLoading && !!displayMessage}
isCompleted={currentStep > 2}
text="Now, let's add your data."
text="Lastly, let's add your data."
hideIcon={true}
>
<OnboardingUpload onComplete={handleStepComplete} />
</OnboardingStep>
{/* Step 4 */}
<OnboardingStep
isVisible={currentStep >= 3}
isCompleted={currentStep > 3}
text="Step 3: You're all set!"
>
<div className="space-y-4">
<button
type="button"
onClick={handleStepComplete}
className="px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90"
>
Go to Chat
</button>
</div>
</OnboardingStep>
</div>
</StickToBottom.Content>
</StickToBottom>

View file

@ -39,7 +39,9 @@ const OnboardingUpload = ({ onComplete }: OnboardingUploadProps) => {
console.error("Upload failed", (error as Error).message);
} finally {
setIsUploading(false);
await new Promise(resolve => setTimeout(resolve, 1000));
setCurrentStep(STEP_LIST.length);
await new Promise(resolve => setTimeout(resolve, 500));
onComplete();
}
};

View file

@ -20,7 +20,7 @@ export function AnimatedProviderSteps({
if (currentStep < steps.length - 1) {
const interval = setInterval(() => {
setCurrentStep(currentStep + 1);
}, 1000);
}, 1500);
return () => clearInterval(interval);
}
}, [currentStep, setCurrentStep, steps]);

View file

@ -27,7 +27,7 @@ export const UI_CONSTANTS = {
export const ANIMATION_DURATION = 0.4;
export const SIDEBAR_WIDTH = 280;
export const HEADER_HEIGHT = 54;
export const TOTAL_ONBOARDING_STEPS = 4;
export const TOTAL_ONBOARDING_STEPS = 3;
/**
* Local Storage Keys