Describe the bug
In @sourceloop/user-onboarding-client, clicking Next, Previous or a custom button (e.g. Skip) in a tour step does nothing. The tour stays on the current step.
Cause
shepherd.js expects a button's action to be the click handler itself ((this: Tour) => void) and calls it on click. TourButton.action is typed as () => Step.StepOptionsButton['action'], a function that returns a handler.
Under the stricter TypeScript 6 checks that came with the Angular 22 upgrade, the assignments in TourServiceService.actionAssignment were wrapped (b.action = () => handler) to match that type. So on click, shepherd.js gets the handler back but never runs it.
To Reproduce
- Run a tour with more than one step using the latest library version.
- Click Next (or Previous / a custom button) on a step.
- Nothing happens.
Expected behavior
The button runs its handler: it moves to the next or previous step (navigating routes where needed) or runs the custom registered function.
Proposed fix
- Type
TourButton.action as Step.StepOptionsButton['action'].
- Assign the handlers directly in
actionAssignment again, as before the upgrade.
Describe the bug
In
@sourceloop/user-onboarding-client, clicking Next, Previous or a custom button (e.g. Skip) in a tour step does nothing. The tour stays on the current step.Cause
shepherd.js expects a button's
actionto be the click handler itself ((this: Tour) => void) and calls it on click.TourButton.actionis typed as() => Step.StepOptionsButton['action'], a function that returns a handler.Under the stricter TypeScript 6 checks that came with the Angular 22 upgrade, the assignments in
TourServiceService.actionAssignmentwere wrapped (b.action = () => handler) to match that type. So on click, shepherd.js gets the handler back but never runs it.To Reproduce
Expected behavior
The button runs its handler: it moves to the next or previous step (navigating routes where needed) or runs the custom registered function.
Proposed fix
TourButton.actionasStep.StepOptionsButton['action'].actionAssignmentagain, as before the upgrade.