Skip to content

feat(stepper): consistently offer Cancel across setup wizards - #5522

Merged
norman-abramovitz merged 1 commit into
cloudfoundry:developfrom
nabramovitz:norm/feat/stepper-cancel-consistency
Jul 1, 2026
Merged

feat(stepper): consistently offer Cancel across setup wizards#5522
norman-abramovitz merged 1 commit into
cloudfoundry:developfrom
nabramovitz:norm/feat/stepper-cancel-consistency

Conversation

@nabramovitz

Copy link
Copy Markdown
Contributor

Summary

Brings the first-run setup wizards into line with every other Stratos stepper so a Cancel button is consistently offered.

The shared stepper only renders Cancel when a cancel route is supplied (!hideCloseButton && cancel in steppers.component.html). An audit of all 36 <app-steppers> consumers found 33 already pass a cancel route (they render Cancel today); the only ones missing it were the three pre-login setup wizards.

Changes

  • console-uaa-wizard, local-account-wizard[cancel]="'/setup'": the generic themed Cancel now returns to the welcome / auth-method choice, restarting the flow.
  • setup-welcome — it's the flow's start with no in-app destination, so a router nav would be a no-op. Added an optional cancelReload input to the shared stepper: the same Cancel button does a full-page window.location.assign(cancel), matching the setup flow's existing hard-reload-on-success idiom. Opted in via [cancel]="'/setup'" [cancelReload]="true".

cancelReload defaults off, so all existing steppers are behavior-identical (routerLink still resolves to cancel$, onCancel just calls onLeave(false)).

Verification

  • vitest --project=core --project=cloud-foundry over the shared stepper suite + consumers (steppers.component, steppers-destructive-flow canClose gating, step.component, stepper-form, add-route-stepper, all three setup specs): 21 files / 65 tests pass.
  • ESLint clean on all touched files.

Out of scope (follow-up)

Modal dialogs (connect-endpoint, add-api-key, add-user, variable-edit, rollback, …) hand-roll their own Cancel with inconsistent classes (btn-warn/btn-danger/btn-secondary). Not <app-steppers> consumers — a separate normalization worth its own issue.

Closes #5521.

The shared stepper only renders Cancel when a `cancel` route is passed,
so the three first-run setup wizards (welcome, UAA, local account) showed
none. Give them the generic themed Cancel button instead of leaving the
flow un-cancellable.

- uaa/local: [cancel]="'/setup'" routes back to the auth-method choice.
- welcome is the flow's start with no in-app destination, so add an
  optional `cancelReload` input: the same button does a full-page
  window.location load to `cancel`, matching the setup flow's existing
  hard-reload-on-success idiom and restarting the wizard clean.

cancelReload defaults off, so all existing steppers are unchanged.

Toward cloudfoundry#5521.

@norman-abramovitz norman-abramovitz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@norman-abramovitz
norman-abramovitz merged commit 126bc66 into cloudfoundry:develop Jul 1, 2026
13 checks passed
@nabramovitz
nabramovitz deleted the norm/feat/stepper-cancel-consistency branch July 1, 2026 11:41
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.

Steppers: consistently offer a Cancel button across wizard steppers

2 participants