-
Notifications
You must be signed in to change notification settings - Fork 54
"Add site" Stepper: Introduce click handler to allow clicks on the previous step that is already complete #1891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| className={ cx( | ||
| `text-sm`, | ||
| isCurrent ? 'text-gray-900 font-medium' : 'text-gray-500' | ||
| `text-sm font-medium`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curios to hear what you think about this change.
Before (you can see slight shift / movement in labels):
Screen.Capture.on.2025-10-15.at.17-17-26.mov
After (there's no shift in the labels; instead the unselected label has thinner font size):
Screen.Capture.on.2025-10-15.at.17-16-26.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
📊 Performance Test ResultsComparing a4bb4c0 vs trunk site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change |
bcotrim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Added some suggestions, but feel free to merge as is.
| { steps.map( ( step, index ) => { | ||
| const isCurrent = step.status === 'current'; | ||
| const isCompleted = step.status === 'completed'; | ||
| const isClickable = isCompleted && step.path; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also move this logic to the useStepper hook.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestions, Bernardo. I agree, it make sense to move these. I have moved the click handler as well: ad724a7.
gcsecsey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes LGTM and work well. I can navigate back using the labels, and the file selection in earlier step is also preserved. 👍
|
Thank you for your reviews, Bernardo and Gergely! |
Related issues
Proposed Changes
handleStepClickto handle clicks on the previous step that is already completeScreen.Capture.on.2025-10-15.at.17-24-50.mp4
Testing Instructions
npm install && npm start.Add sitebutton in the app sidebar and try to navigate through the steps ofStart from BlueprintandImport from backupflows.Continuebutton, it should be possible to get back to the first step by clicking the step label (not just theBackbutton).Import from backupflow and navigating back to the step where the import file is selected, it should be remembered.Pre-merge Checklist