Merge pull request #21072 from ankush/onboarding_
fix(ux): auto jump to next step in onboarding
This commit is contained in:
commit
fe67fcdb11
1 changed files with 12 additions and 0 deletions
|
|
@ -438,6 +438,7 @@ export default class OnboardingWidget extends Widget {
|
|||
};
|
||||
|
||||
this.update_step_status(step, "is_complete", 1, callback);
|
||||
this.activate_next_step(step);
|
||||
}
|
||||
|
||||
skip_step(step) {
|
||||
|
|
@ -451,6 +452,16 @@ export default class OnboardingWidget extends Widget {
|
|||
};
|
||||
|
||||
this.update_step_status(step, "is_skipped", 1, callback);
|
||||
this.activate_next_step(step);
|
||||
}
|
||||
|
||||
activate_next_step(step) {
|
||||
let current_step_index = this.steps.findIndex((s) => s == step);
|
||||
let next_step = this.steps[current_step_index + 1];
|
||||
|
||||
if (!next_step) return;
|
||||
|
||||
this.show_step(next_step);
|
||||
}
|
||||
|
||||
update_step_status(step, status, value, callback) {
|
||||
|
|
@ -552,6 +563,7 @@ export default class OnboardingWidget extends Widget {
|
|||
localStorage.setItem("dismissed-onboarding", JSON.stringify(dismissed));
|
||||
this.delete(true, true);
|
||||
this.widget.closest(".ce-block").hide();
|
||||
frappe.telemetry.capture("dismissed_" + frappe.scrub(this.title), "frappe_onboarding");
|
||||
});
|
||||
dismiss.appendTo(this.action_area);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue