Skip to content

[ProjectInputStepView]: show "Cancel" instead of "Back" on first dialog step#839

Merged
rorychatt merged 2 commits into
developmentfrom
823-dialog-back-button-should-be-cancel-when-theres-nothing-to-back-to
May 23, 2026
Merged

[ProjectInputStepView]: show "Cancel" instead of "Back" on first dialog step#839
rorychatt merged 2 commits into
developmentfrom
823-dialog-back-button-should-be-cancel-when-theres-nothing-to-back-to

Conversation

@defymecobra
Copy link
Copy Markdown
Collaborator

Problem

The ProjectInputStepView component is used in two different contexts:

Context File Step Position Back Action
OnboardingApp OnboardingApp.cs 3rd step of 4 Navigates to previous step
AddProjectDialog AddProjectDialog.cs 1st step of 3 Closes the dialog (CancelAndClose())

In AddProjectDialog, the view is the first step in the flow — there is no previous step to navigate back to. However, the button was hardcoded as "← Back", which is misleading. The onBack action actually calls CancelAndClose(), so the button should reflect that.

What needed to be done

The button label and icon needed to adapt to the context:

  • When used as a middle/later step (e.g. in Onboarding) → show "← Back" with an arrow icon
  • When used as the first step (e.g. in AddProjectDialog) → show "Cancel" without an arrow icon

What was changed

ProjectInputStepView.cs

  • Added a new optional constructor parameter backButtonText (default: "Back") — following the existing pattern already used for skipButtonText and nextButtonText
  • The button now uses backButtonText instead of the hardcoded "Back" string
  • The arrow icon (Icons.ArrowLeft) is now conditionally rendered — it only appears when the button text is "Back", and is hidden for "Cancel" since a left arrow doesn't make sense for a cancel action

AddProjectDialog.cs

  • Passed backButtonText: "Cancel" when constructing ProjectInputStepView at step 0

No changes to OnboardingApp.cs

The default value "Back" preserves the existing behavior — no modifications needed.

Result

Context Before After
AddProjectDialog (step 0) ← Back Cancel
OnboardingApp (step 2) ← Back ← Back (unchanged)
image image

@defymecobra defymecobra requested a review from rorychatt May 23, 2026 13:18
@defymecobra defymecobra self-assigned this May 23, 2026
@defymecobra defymecobra added the bug Something isn't working label May 23, 2026
@defymecobra defymecobra linked an issue May 23, 2026 that may be closed by this pull request
@defymecobra
Copy link
Copy Markdown
Collaborator Author

image Made the onBack parameter optional in ProjectInputStepView. When omitted (e.g. on the first step of AddProjectDialog), the back button is hidden since the dialog's close button already handles dismissal.

@rorychatt rorychatt merged commit 950fa33 into development May 23, 2026
@artem-ivy-ai
Copy link
Copy Markdown

Staging removed

Staging environment has been deleted for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dialog back button should be cancel when there's nothing to back to

3 participants