Abstract onboarding wizard into reusable FormWizard#663
Open
SinhSinhAn wants to merge 1 commit intodevelopfrom
Open
Abstract onboarding wizard into reusable FormWizard#663SinhSinhAn wants to merge 1 commit intodevelopfrom
SinhSinhAn wants to merge 1 commit intodevelopfrom
Conversation
Extract the ~400-line OnboardingForm wizard into a reusable form.Wizard and form.WizardStep component system that integrates with TanStack Form's formComponents registry. This enables multi-step wizards for onboarding, club match, club creation, and event creation forms. Key changes: - Create FormWizard/ directory with types, context, and components - Register Wizard and WizardStep as formComponents in form.ts - Fix validation to only block forward navigation (not backward) - Auto-advance to finish step after successful form submission - Rewrite OnboardingForm from ~400 lines to ~260 lines - Delete OnboardingFormStep (content moved inline to WizardStep children) Closes #588
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
form.Wizardandform.WizardStepcomponents that any form can use<form.WizardStep>How it works
The wizard registers as a TanStack Form
formComponent, so consumers use it asform.Wizard/form.WizardStep:Each step declares its
fieldsarray, which the wizard uses for per-step validation. The wizard handles the MUI Stepper, slide transitions, dynamic height, and navigation buttons automatically.Files changed
src/components/form/FormWizard/src/utils/form.tssrc/components/getting-started/OnboardingForm.tsxsrc/components/getting-started/OnboardingFormStep.tsxsrc/components/form/FormWizard.tsxCloses #588