Skip to content

Add multi-step components#2151

Merged
alexandrudanpop merged 4 commits intomainfrom
feat/multi-step
Mar 20, 2026
Merged

Add multi-step components#2151
alexandrudanpop merged 4 commits intomainfrom
feat/multi-step

Conversation

@alexandrudanpop
Copy link
Contributor

Fixes OPS-3931

Additional Notes

Verified benchmarks still works as expected

Copilot AI review requested due to automatic review settings March 19, 2026 14:02
@linear
Copy link

linear bot commented Mar 19, 2026

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the existing Wizard UI components with a new MultiStepForm component suite, and migrates the benchmark wizard UI to use the new API (Fixes OPS-3931).

Changes:

  • Removed the legacy Wizard component set and its exports.
  • Added a new MultiStepForm component set (container, header/content/footer, step, and step parts).
  • Updated Storybook and benchmark wizard usages to reference MultiStepForm.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
packages/ui-components/src/ui/wizard/wizard.tsx Removed legacy Wizard context + container component.
packages/ui-components/src/ui/wizard/wizard-header.tsx Removed legacy Wizard header/title/close components.
packages/ui-components/src/ui/wizard/wizard-footer.tsx Removed legacy Wizard footer/next/previous components.
packages/ui-components/src/ui/wizard/wizard-content.tsx Removed legacy Wizard content wrapper.
packages/ui-components/src/ui/wizard/index.ts Removed Wizard barrel exports.
packages/ui-components/src/ui/multi-step-form/multi-step-form.tsx Added MultiStepForm context, navigation helpers, and controlled/uncontrolled support.
packages/ui-components/src/ui/multi-step-form/multi-step-form-step.tsx Added step component that registers itself and optional step validation hook.
packages/ui-components/src/ui/multi-step-form/multi-step-form-step-parts.tsx Kept step title/description/body parts; removed WizardStep export.
packages/ui-components/src/ui/multi-step-form/multi-step-form-header.tsx Added MultiStepForm header/title/close components.
packages/ui-components/src/ui/multi-step-form/multi-step-form-footer.tsx Added MultiStepForm footer/next/previous navigation buttons.
packages/ui-components/src/ui/multi-step-form/multi-step-form-content.tsx Added MultiStepForm content wrapper.
packages/ui-components/src/ui/multi-step-form/index.ts Added MultiStepForm barrel exports.
packages/ui-components/src/stories/multi-step-form/multi-step-form.stories.tsx Migrated story from Wizard to MultiStepForm.
packages/ui-components/src/index.ts Exported multi-step-form and removed wizard export from the package entrypoint.
packages/ui-components/src/components/benchmark/benchmark-ready-step.tsx Updated StepDescription import to the new multi-step-form location.
packages/react-ui/src/app/features/benchmark/components/benchmark-wizard.tsx Migrated benchmark wizard container layout from Wizard to MultiStepForm.
packages/react-ui/src/app/features/benchmark/components/benchmark-wizard-footer.tsx Migrated footer navigation controls from Wizard to MultiStepForm.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +85 to +90
const goToNext = React.useCallback(async () => {
const validationFn = stepValidationsRef.current.get(effectiveStep);
if (validationFn) {
const isValid = await validationFn();
if (!isValid) {
return false;
@alexandrudanpop alexandrudanpop requested a review from cezudas March 19, 2026 14:16
Comment on lines +74 to +81
const handleClick = async (e: React.MouseEvent<HTMLButtonElement>) => {
onClick?.(e);
if (onNext) {
await onNext();
} else {
await goToNext();
}
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Comment on lines +58 to +61
const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {
onClick?.(e);
onClose?.();
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

Comment on lines +5 to +6
interface StepValidationFn {
(): boolean | Promise<boolean>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick]

Suggested change
interface StepValidationFn {
(): boolean | Promise<boolean>;
type StepValidationFn = () => boolean | Promise<boolean>;

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 20, 2026

Quality Gate Passed Quality Gate passed

Issues
0 New issues
2 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@alexandrudanpop alexandrudanpop merged commit 3f52e12 into main Mar 20, 2026
25 checks passed
@alexandrudanpop alexandrudanpop deleted the feat/multi-step branch March 20, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants