mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Fix bugs when both welcomeTour and docTour are available
Summary: - Unify where in the code tours get initiated. - Avoid start a new tour while one is being started or is in progress. - Ignore welcome tour when on a doc that has a doc tour. - Fix tours when starting with a special page like Access Rules. - Remove mention of the no-longer-present "Give Feedback" button in the last message of the welcome tour. Test Plan: Add a browser test case that docTour preempts the welcome tour and shows no errors (this test case fails in multiple ways without the changes). Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3330
This commit is contained in:
@@ -80,6 +80,11 @@ export function startOnBoarding(messages: IOnBoardingMsg[], onFinishCB: () => vo
|
||||
ctl.start().catch(reportError);
|
||||
}
|
||||
|
||||
// Returns whether some tour is currently active.
|
||||
export function isTourActive(): boolean {
|
||||
return !tourSingleton.isEmpty();
|
||||
}
|
||||
|
||||
class OnBoardingError extends Error {
|
||||
public name = 'OnBoardingError';
|
||||
constructor(message: string) {
|
||||
|
||||
Reference in New Issue
Block a user