-
Notifications
You must be signed in to change notification settings - Fork 50
🐛 Fix wizard back button in first step #2587
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
WalkthroughAdds explicit localized Next/Back labels to wizard footers in three wizards, reveals Back on the final Generate Assets step, hides Back in the single-step Retrieve Config wizard, and reorders footer property placements; submission/cancel control flow remains unchanged. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Wizard as WizardStep (Footer)
participant Handlers as Handlers
rect rgb(240,248,255)
note right of Wizard: Multi-step wizards (Generate Assets, Discover Import)
User->>Wizard: Click Back
Wizard-->>User: Navigate to previous step
User->>Wizard: Click Next
alt Review step showing results
Wizard->>Handlers: handleCancel()
Handlers-->>Wizard: Close wizard / return
else No results
Wizard->>Handlers: submitTasksAndSaveResults() / onSubmitTask()
Handlers-->>Wizard: Show results
end
end
rect rgb(249,249,249)
note right of Wizard: Single-step wizard (Retrieve Config)
note over Wizard: Back hidden (isBackHidden: true)
User->>Wizard: Click Next
alt Showing results
Wizard->>Handlers: handleCancel()
else Not showing results
Wizard->>Handlers: handleSubmit(onSubmit)
end
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
client/src/app/pages/applications/retrieve-config-wizard/retrieve-config-wizard.tsx (1)
161-163
: Localize step title for consistencyConsider translating the literal "Review" to stay consistent with other wizards.
- name="Review" + name={t("retrieveConfigWizard.review.stepTitle")}client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx (1)
144-151
: Optional: DRY up repeated nav labelsIf desired, extract shared nav labels to reduce repetition.
Example:
const nav = { nextButtonText: t("actions.next"), backButtonText: t("actions.back") }; // usage: footer={{ ...nav, isNextDisabled: !state.profile }}Also applies to: 160-168, 176-188
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx
(3 hunks)client/src/app/pages/applications/retrieve-config-wizard/retrieve-config-wizard.tsx
(1 hunks)client/src/app/pages/source-platforms/discover-import-wizard/discover-import-wizard.tsx
(2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: sjd78
PR: konveyor/tackle2-ui#2558
File: client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx:0-0
Timestamp: 2025-08-15T22:35:55.912Z
Learning: The Generate Assets Wizard in client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx is designed to accommodate additional wizard steps in the future, so the current conditional rendering of the Results step is intentional and appropriate for the planned architecture.
📚 Learning: 2025-08-15T22:35:55.912Z
Learnt from: sjd78
PR: konveyor/tackle2-ui#2558
File: client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx:0-0
Timestamp: 2025-08-15T22:35:55.912Z
Learning: The Generate Assets Wizard in client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx is designed to accommodate additional wizard steps in the future, so the current conditional rendering of the Results step is intentional and appropriate for the planned architecture.
Applied to files:
client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx
client/src/app/pages/source-platforms/discover-import-wizard/discover-import-wizard.tsx
client/src/app/pages/applications/retrieve-config-wizard/retrieve-config-wizard.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: unit-test
- GitHub Check: build-and-upload-for-global-ci
🔇 Additional comments (6)
client/src/app/pages/source-platforms/discover-import-wizard/discover-import-wizard.tsx (2)
135-139
: Explicit Back label on step 1 — aligns with PR objectiveAdding backButtonText ensures the Back control renders; on a multi-step wizard it should appear disabled on the first step. Please verify in your PF version that it renders disabled (not hidden).
151-159
: Review step footer semantics preserved; good UX after submissionReordering + explicit backButtonText look good. Disabling Back and hiding Cancel when results exist matches the post-submit state; onNext logic is unchanged.
client/src/app/pages/applications/retrieve-config-wizard/retrieve-config-wizard.tsx (1)
164-170
: Hide Back in single-step wizard — correct fixUsing isBackHidden: true satisfies “single step ⇒ hide Back.” onNext behavior is unchanged and correct.
client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx (3)
148-151
: First step labels standardizedExplicit next/back labels improve consistency; Back should render disabled by default on the first step. Please sanity-check this in the UI.
164-167
: Second step labels standardizedLooks good; no behavior changes besides visible, localized labels.
180-188
: Final step Back exposed with correct post-submit statebackButtonText added; Back disabled and Cancel hidden when results exist; onNext unchanged. Matches the intended UX.
5c6d866
to
0dc21d0
Compare
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx (1)
148-151
: Make first-step Back state explicit to match PR behavior.PF typically disables Back on the first step, but since we’re customizing the footer, make the intent explicit to avoid regressions and align with “first step Back is disabled” for multi-step wizards.
footer={{ nextButtonText: t("actions.next"), backButtonText: t("actions.back"), + isBackDisabled: true, isNextDisabled: !state.profile, }}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx
(3 hunks)client/src/app/pages/applications/retrieve-config-wizard/retrieve-config-wizard.tsx
(1 hunks)client/src/app/pages/source-platforms/discover-import-wizard/discover-import-wizard.tsx
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- client/src/app/pages/source-platforms/discover-import-wizard/discover-import-wizard.tsx
- client/src/app/pages/applications/retrieve-config-wizard/retrieve-config-wizard.tsx
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: sjd78
PR: konveyor/tackle2-ui#2558
File: client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx:0-0
Timestamp: 2025-08-15T22:35:55.912Z
Learning: The Generate Assets Wizard in client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx is designed to accommodate additional wizard steps in the future, so the current conditional rendering of the Results step is intentional and appropriate for the planned architecture.
📚 Learning: 2025-08-15T22:35:55.912Z
Learnt from: sjd78
PR: konveyor/tackle2-ui#2558
File: client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx:0-0
Timestamp: 2025-08-15T22:35:55.912Z
Learning: The Generate Assets Wizard in client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx is designed to accommodate additional wizard steps in the future, so the current conditional rendering of the Results step is intentional and appropriate for the planned architecture.
Applied to files:
client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: unit-test
- GitHub Check: build-and-upload-for-global-ci
🔇 Additional comments (2)
client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx (2)
164-167
: LGTM: Consistent localized navigation labels.Adds explicit Next/Back text; no behavior changes to gating on parameters validity.
183-188
: LGTM: Result-state footer wiring is correct.Back is disabled and Cancel hidden when results exist; Next relabels to Close and triggers handleCancel.
Resolves: https://issues.redhat.com/browse/MTA-6037 In the first step of a wizard, if there is only one step, the back button should be hidden. If there is more than one step, the back button on the first step should be disabled. Signed-off-by: Scott J Dickerson <[email protected]>
0dc21d0
to
36e9a08
Compare
Resolves: https://issues.redhat.com/browse/MTA-6037
In the first step of a wizard, if there is only one step, the back button should be hidden. If there is more than one step, the back button on the first step should be disabled.
Summary by CodeRabbit
New Features
Chores