feat(apollo-vertex): multi-step form wizard and stepper [AGVSOL-4703]#906
feat(apollo-vertex): multi-step form wizard and stepper [AGVSOL-4703]#906frankkluijtmans wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📊 Coverage + size by packagePer-package bundle size on this PR (no JS/TS source changes detected under
"Coverage" is each package's own |
There was a problem hiding this comment.
Pull request overview
Adds a new multi-step form wizard feature to Apollo Vertex (the Vertex docs/demo app), building on the existing TanStack Form + Zod patterns and introducing a reusable Stepper primitive for progress indication.
Changes:
- Introduces a composable
StepperUI primitive and registers it for installation. - Adds
FormWizardcomponents +useFormWizardhook with conditional steps, per-step schema picking, and optional local/session persistence. - Adds demo + docs page + navigation metadata + i18n keys, and wires required dependencies.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updates lockfile for new deps and re-resolution; currently includes GitHub Packages tarball URLs for @uipath/*. |
| apps/apollo-vertex/tsconfig.json | Adds path aliases for the new form-wizard and stepper components. |
| apps/apollo-vertex/registry/stepper/stepper.tsx | New Stepper primitive (orientation + states + composed subparts). |
| apps/apollo-vertex/registry/form-wizard/wizard-schema.ts | Step definition types + visible-step filtering + per-step schema picking helpers. |
| apps/apollo-vertex/registry/form-wizard/use-form-wizard.ts | New wizard hook: navigation, per-step validation, conditional visibility, persistence. |
| apps/apollo-vertex/registry/form-wizard/index.ts | Public exports for the form-wizard package. |
| apps/apollo-vertex/registry/form-wizard/form-wizard.tsx | Wizard container + Stepper-backed steps rendering + step slot component. |
| apps/apollo-vertex/registry/form-wizard/form-wizard-nav.tsx | Back/Next/Submit navigation controls with i18n labels. |
| apps/apollo-vertex/registry.json | Registers stepper and form-wizard for the registry installer. |
| apps/apollo-vertex/package.json | Adds @tanstack/react-store dependency. |
| apps/apollo-vertex/locales/en.json | Adds wizard demo + navigation i18n strings. |
| apps/apollo-vertex/app/components/form-wizard/page.mdx | New docs page describing installation and usage. |
| apps/apollo-vertex/app/components/form-wizard/form-wizard-demo.tsx | New demo showing conditional step + session persistence + translated validation keys. |
| apps/apollo-vertex/app/components/_meta.ts | Adds docs nav entry for the new Form Wizard page. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
1ea8024 to
c1170ac
Compare
c1170ac to
54049f3
Compare
54049f3 to
68467f4
Compare
Dependency License Review
License distribution
Excluded packages
|
68467f4 to
7d8a602
Compare
5bb5556 to
bb605f6
Compare
bb605f6 to
7b50908
Compare
7b50908 to
fa62b41
Compare
fa62b41 to
7a4bb5c
Compare
7a4bb5c to
dc2c00f
Compare
dc2c00f to
656319e
Compare
| <button | ||
| // Spread first so component-controlled attributes below can't be overridden. | ||
| {...props} | ||
| {...(interactive ? { onClick } : { "aria-disabled": true, tabIndex: -1 })} | ||
| type="button" |
| const persistKey = persist?.key ?? ""; | ||
| const [persisted, setPersisted, removePersisted] = useLocalStorage< | ||
| PersistedState<TValues> | undefined | ||
| >({ key: persistKey, getInitialValueInEffect: false }); |
|
|
||
| - **One form instance.** `useFormWizard` creates a single `useAppForm` from your `formOptions`, wires `revalidateLogic()` and a full-form `onDynamic` schema for the final submit, and owns step navigation, conditional visibility, and optional persistence. | ||
| - **Nested values per step.** `defaultValues` is grouped by step (`{ account: {...}, plan: {...} }`), so each step owns a slice of the form. | ||
| - **Per-step schemas via `FormGroup`.** Each step is a `withForm` component whose `form.FormGroup` validates only that step's slice with its own schema on advance. The full `schema` passed to `useFormWizard` is not sliced per step; it is only the final-submit backstop. |
| "name": "form-wizard", | ||
| "type": "registry:ui", | ||
| "title": "Form Wizard", | ||
| "description": "A multi-step wizard built on TanStack Form and Zod. Each step is a withForm component that validates its own slice through a FormGroup, with conditional steps and optional persistence.", |
| ## Installation | ||
|
|
||
| ```bash | ||
| npx shadcn@latest add @uipath/form-wizard |
656319e to
546c037
Compare
Adds multi-step wizard forms to Apollo Vertex, built on the existing TanStack Form and Zod foundation. Each step is validated against a partial schema derived (via
.pick()) from a single master schema, so validation rules live in one place and cannot drift between steps. The wizard supports conditional steps (hidden from navigation, the stepper, and submit validation) and optionallocalStoragepersistence (viauseLocalStoragefrom@mantine/hooks) that hydrates and clears automatically. A new composable, shadcn-nativeStepperprimitive backs the progress indicator and is independently installable. Includes a demo, docs page, nav entry, and i18n keys, with typecheck, lint, format, and registry build all passing.👨 Generated with Kluijt Code