Skip to content

Conversation

@ziyanwan
Copy link
Collaborator

@ziyanwan ziyanwan commented Jan 6, 2026

What is the purpose of this change?

Add a UI component based on https://stepperize.vercel.app/docs/react/shadcn/introduction

How was this change implemented?

1. copy example code from https://stepperize.vercel.app/docs/react/shadcn/installation
2. fix type issues and export style
3. fix step button style (use outline button variant for inactive step, use cursor default)

How was this change tested?

  • [✅ ] Manual testing: [Tested with npm link in SAM enterprise]
  • Unit tests: [new/modified tests]
  • Integration tests: [if applicable]
  • Known limitations: [what wasn't tested]

Is there anything the reviewers should focus on/be aware of?

Special attention areas, potential risks, or open questions

Demos

Screen.Recording.2026-01-06.at.12.30.45.PM.mov
Screenshot 2026-01-06 at 12 28 23 PM Screenshot 2026-01-06 at 12 28 34 PM Screenshot 2026-01-06 at 12 27 45 PM Screenshot 2026-01-06 at 12 28 00 PM

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

WhiteSource Policy Violation Summary

✅︎ No Blocking Whitesource Policy Violations found in solaceai/solace-agent-mesh-ui-pr-744!

...rest,
useStepper,
Stepper: {
Provider: ({ variant = "horizontal", labelOrientation = "horizontal", tracking = false, children, className, ...props }) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a lot going on in this file which makes it a little hard to follow. Notably, there's a lot of sub-components, and we're also mixing having some defined here vs. as top-level constants in the file. For maintainability, we should probably:

  1. Use a single pattern for these components on Stepper, if possible. My preference would be extracting these into separate constants to make the separation of responsibilities clear.
  2. Consider splitting-up this file to better divide the responsibilities (eg. creating a "stepper" directory with a few files). Maybe the hook(s) could be in one, the sub-components in another (or even individual files if we think they might grow in complexity over time), reusable types in one, etc. This will also have the benefit of fixing the Copilot-flagged fast refresh warnings.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you, Ben.
We are likely to switch to MRC components in the future. For now, I wouldn't spend too much time on the refactoring.

@@ -0,0 +1,377 @@
import { Slot } from "@radix-ui/react-slot";
import * as Stepperize from "@stepperize/react";
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider scoping this import more narrowly to help with tree-shaking. If we're concerned about name collisions, we can do something like import { Stepper as StepperizeStepper } as needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point, thank you, Ben.
@stepperize/react has 6 outputs, Get, Step, Stepper is from @stepperize/core, and then {type ScopedProps, type StepperReturn, defineStepper}. All of these 6 exports are used in this component. Tree-shaking won't help here.

@bwiebe-solace
Copy link
Contributor

One more thought: we have a stepper in the config portal UI (ie. when running sam init --gui) as well. In the future, we may want to replace that implementation with this common one for consistency and maintainability.

"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-tabs": "^1.1.12",
"@radix-ui/react-tooltip": "^1.2.7",
"@stepperize/react": "^5.1.9",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just curious, do you have any idea of the size of this new import?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

NPM says it has 7.95 kB unpacked.
As a comparison, the one above it, @radix-ui/react-tooltip has 135 kB, 17 times more.
So I wouldn't concern about the size.

</nav>
);
},
Step: ({ children, className, icon, ...props }) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could consider adding test ids here and there now to facilitate testing.

@lgh-solace
Copy link
Collaborator

And perhaps a storybook test, if not now then later?

@sonarqube-solacecloud
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@ziyanwan ziyanwan merged commit fb1e4ac into main Jan 6, 2026
29 of 31 checks passed
@ziyanwan ziyanwan deleted the ziyang/DATAGO-120289-1 branch January 6, 2026 21:12
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.

4 participants